Make WordPress Core


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

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

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

    r47210 r47219  
    244244
    245245        if ( self::$this_quicktags ) {
    246             if ( 'content' === $editor_id && ! empty( $GLOBALS['current_screen'] ) && $GLOBALS['current_screen']->base === 'post' ) {
     246            if ( 'content' === $editor_id && ! empty( $GLOBALS['current_screen'] ) && 'post' === $GLOBALS['current_screen']->base ) {
    247247                $toolbar_id = 'ed_toolbar';
    248248            } else {
     
    744744                $page_template = get_page_template_slug( $post );
    745745
    746                 if ( $page_template !== false ) {
     746                if ( false !== $page_template ) {
    747747                    $page_template = empty( $page_template ) ? 'default' : str_replace( '.', '-', basename( $page_template, '.php' ) );
    748748                    $body_class   .= ' page-template-' . sanitize_html_class( $page_template );
Note: See TracChangeset for help on using the changeset viewer.