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:
Gary Pendergast
2019-07-02 23:42:58 +00:00
parent 55b2d94cca
commit 4803fc405e
76 changed files with 1038 additions and 588 deletions

View File

@@ -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 );