Docs: Clarify descriptions and parameter types for various user capability checking functions.

See #41017

Built from https://develop.svn.wordpress.org/trunk@41322


git-svn-id: http://core.svn.wordpress.org/trunk@41153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2017-08-29 16:43:47 +00:00
parent 1afaf8c605
commit d611184f4f
2 changed files with 12 additions and 12 deletions

View File

@ -565,13 +565,13 @@ function current_user_can( $capability ) {
}
/**
* Whether current user has a capability or role for a given site.
* Whether the current user has a specific capability for a given site.
*
* @since 3.0.0
*
* @param int $blog_id Site ID.
* @param string $capability Capability or role name.
* @return bool
* @param string $capability Capability name.
* @return bool Whether the user has the given capability.
*/
function current_user_can_for_blog( $blog_id, $capability ) {
$switched = is_multisite() ? switch_to_blog( $blog_id ) : false;
@ -598,13 +598,13 @@ function current_user_can_for_blog( $blog_id, $capability ) {
}
/**
* Whether author of supplied post has capability or role.
* Whether the author of the supplied post has a specific capability.
*
* @since 2.9.0
*
* @param int|object $post Post ID or post object.
* @param string $capability Capability or role name.
* @return bool
* @param int|WP_Post $post Post ID or post object.
* @param string $capability Capability name.
* @return bool Whether the post author has the given capability.
*/
function author_can( $post, $capability ) {
if ( !$post = get_post($post) )
@ -622,13 +622,13 @@ function author_can( $post, $capability ) {
}
/**
* Whether a particular user has capability or role.
* Whether a particular user has a specific capability.
*
* @since 3.1.0
*
* @param int|object $user User ID or object.
* @param string $capability Capability or role name.
* @return bool
* @param int|WP_User $user User ID or object.
* @param string $capability Capability name.
* @return bool Whether the user has the given capability.
*/
function user_can( $user, $capability ) {
if ( ! is_object( $user ) )

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41321';
$wp_version = '4.9-alpha-41322';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.