X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/138998bbd8f7a1ac38b2f1eacbdf7cd522be4b13..8d3bb1a5dcfdea9857d3c88c3751f09593e34dc8:/wp-includes/class-wp-user.php?ds=inline diff --git a/wp-includes/class-wp-user.php b/wp-includes/class-wp-user.php index 91dc5a7e..0f5ee105 100644 --- a/wp-includes/class-wp-user.php +++ b/wp-includes/class-wp-user.php @@ -113,7 +113,7 @@ class WP_User { * * @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 ) ) { @@ -157,8 +157,8 @@ class WP_User { /** * 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; @@ -242,7 +242,7 @@ class WP_User { } /** - * Makes private/protected methods readable for backwards compatibility. + * Makes private/protected methods readable for backward compatibility. * * @since 4.3.0 * @access public @@ -269,7 +269,7 @@ class WP_User { */ 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.' ), @@ -299,7 +299,7 @@ class WP_User { */ 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.' ), @@ -338,7 +338,7 @@ class WP_User { */ 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.' ), @@ -362,7 +362,7 @@ class WP_User { */ 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.' ), @@ -701,18 +701,18 @@ class WP_User { * * @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 ); } @@ -768,13 +768,13 @@ class WP_User { } /** - * 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;