mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Coding Standards: Use Yoda conditions where appropriate.
See #49222. git-svn-id: https://develop.svn.wordpress.org/trunk@47219 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -534,7 +534,7 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( 'delete_term' === $cap && ( $term->term_id == get_option( 'default_' . $term->taxonomy ) ) ) {
|
||||
if ( 'delete_term' === $cap && ( get_option( 'default_' . $term->taxonomy ) == $term->term_id ) ) {
|
||||
$caps[] = 'do_not_allow';
|
||||
break;
|
||||
}
|
||||
@@ -867,7 +867,7 @@ function get_super_admins() {
|
||||
* @return bool True if the user is a site admin.
|
||||
*/
|
||||
function is_super_admin( $user_id = false ) {
|
||||
if ( ! $user_id || $user_id == get_current_user_id() ) {
|
||||
if ( ! $user_id || get_current_user_id() == $user_id ) {
|
||||
$user = wp_get_current_user();
|
||||
} else {
|
||||
$user = get_userdata( $user_id );
|
||||
|
||||
Reference in New Issue
Block a user