*
* @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB.
* @param string $name Optional. User's username
- * @param int $blog_id Optional Blog ID, defaults to current blog.
+ * @param int $blog_id Optional Site ID, defaults to current site.
*/
public function __construct( $id = 0, $name = '', $blog_id = '' ) {
if ( ! isset( self::$back_compat_keys ) ) {
/**
* Sets up object properties, including capabilities.
*
- * @param object $data User DB row object
- * @param int $blog_id Optional. The blog id to initialize for
+ * @param object $data User DB row object.
+ * @param int $blog_id Optional. The site ID to initialize for.
*/
public function init( $data, $blog_id = '' ) {
$this->data = $data;
}
/**
- * Makes private/protected methods readable for backwards compatibility.
+ * Makes private/protected methods readable for backward compatibility.
*
* @since 4.3.0
* @access public
*/
public function __isset( $key ) {
if ( 'id' == $key ) {
- _deprecated_argument( 'WP_User->id', '2.1',
+ _deprecated_argument( 'WP_User->id', '2.1.0',
sprintf(
/* translators: %s: WP_User->ID */
__( 'Use %s instead.' ),
*/
public function __get( $key ) {
if ( 'id' == $key ) {
- _deprecated_argument( 'WP_User->id', '2.1',
+ _deprecated_argument( 'WP_User->id', '2.1.0',
sprintf(
/* translators: %s: WP_User->ID */
__( 'Use %s instead.' ),
*/
public function __set( $key, $value ) {
if ( 'id' == $key ) {
- _deprecated_argument( 'WP_User->id', '2.1',
+ _deprecated_argument( 'WP_User->id', '2.1.0',
sprintf(
/* translators: %s: WP_User->ID */
__( 'Use %s instead.' ),
*/
public function __unset( $key ) {
if ( 'id' == $key ) {
- _deprecated_argument( 'WP_User->id', '2.1',
+ _deprecated_argument( 'WP_User->id', '2.1.0',
sprintf(
/* translators: %s: WP_User->ID */
__( 'Use %s instead.' ),
*
* @see map_meta_cap()
*
- * @param string $cap Capability name.
- * @param int $object_id Optional. ID of the specific object to check against if `$cap` is a "meta" cap.
- * "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used
- * by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts',
- * 'edit_others_posts', etc. The parameter is accessed via func_get_args() and passed
- * to map_meta_cap().
+ * @param string $cap Capability name.
+ * @param int $object_id,... Optional. ID of the specific object to check against if `$cap` is a "meta" cap.
+ * "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used
+ * by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts',
+ * 'edit_others_posts', etc. The parameter is accessed via func_get_args() and passed
+ * to map_meta_cap().
* @return bool Whether the current user has the given capability. If `$cap` is a meta cap and `$object_id` is
* passed, whether the current user has the given meta capability for the given object.
*/
public function has_cap( $cap ) {
if ( is_numeric( $cap ) ) {
- _deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
+ _deprecated_argument( __FUNCTION__, '2.0.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
$cap = $this->translate_level_to_cap( $cap );
}
}
/**
- * Set the blog to operate on. Defaults to the current blog.
+ * Set the site to operate on. Defaults to the current site.
*
* @since 3.0.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param int $blog_id Optional Blog ID, defaults to current blog.
+ * @param int $blog_id Optional. Site ID, defaults to current site.
*/
public function for_blog( $blog_id = '' ) {
global $wpdb;