WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (22 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/capabilities.php

    r47178 r47219  
    535535            }
    536536
    537             if ( 'delete_term' === $cap && ( $term->term_id == get_option( 'default_' . $term->taxonomy ) ) ) {
     537            if ( 'delete_term' === $cap && ( get_option( 'default_' . $term->taxonomy ) == $term->term_id ) ) {
    538538                $caps[] = 'do_not_allow';
    539539                break;
     
    868868 */
    869869function is_super_admin( $user_id = false ) {
    870     if ( ! $user_id || $user_id == get_current_user_id() ) {
     870    if ( ! $user_id || get_current_user_id() == $user_id ) {
    871871        $user = wp_get_current_user();
    872872    } else {
Note: See TracChangeset for help on using the changeset viewer.