Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2020-01-29 00:45:18 +00:00
parent e336b24edd
commit 001ffe81fb
497 changed files with 6841 additions and 5486 deletions

View File

@@ -53,7 +53,7 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
break;
case 'edit_user':
case 'edit_users':
// Allow user to edit itself
// Allow user to edit themselves.
if ( 'edit_user' == $cap && isset( $args[0] ) && $user_id == $args[0] ) {
break;
}
@@ -137,7 +137,7 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
break;
// edit_post breaks down to edit_posts, edit_published_posts, or
// edit_others_posts
// edit_others_posts.
case 'edit_post':
case 'edit_page':
$post = get_post( $args[0] );
@@ -910,7 +910,7 @@ function grant_super_admin( $user_id ) {
*/
do_action( 'grant_super_admin', $user_id );
// Directly fetch site_admins instead of using get_super_admins()
// Directly fetch site_admins instead of using get_super_admins().
$super_admins = get_site_option( 'site_admins', array( 'admin' ) );
$user = get_userdata( $user_id );
@@ -957,7 +957,7 @@ function revoke_super_admin( $user_id ) {
*/
do_action( 'revoke_super_admin', $user_id );
// Directly fetch site_admins instead of using get_super_admins()
// Directly fetch site_admins instead of using get_super_admins().
$super_admins = get_site_option( 'site_admins', array( 'admin' ) );
$user = get_userdata( $user_id );