Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.
See #47632. Built from https://develop.svn.wordpress.org/trunk@45590 git-svn-id: http://core.svn.wordpress.org/trunk@45401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -727,7 +727,8 @@ function current_user_can_for_blog( $blog_id, $capability ) {
|
||||
* @return bool Whether the post author has the given capability.
|
||||
*/
|
||||
function author_can( $post, $capability ) {
|
||||
if ( ! $post = get_post( $post ) ) {
|
||||
$post = get_post( $post );
|
||||
if ( ! $post ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -966,7 +967,8 @@ function revoke_super_admin( $user_id ) {
|
||||
|
||||
$user = get_userdata( $user_id );
|
||||
if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
|
||||
if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) {
|
||||
$key = array_search( $user->user_login, $super_admins );
|
||||
if ( false !== $key ) {
|
||||
unset( $super_admins[ $key ] );
|
||||
update_site_option( 'site_admins', $super_admins );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user