WordPress.org

Make WordPress Core

Changeset 49994


Ignore:
Timestamp:
01/21/2021 12:15:47 PM (9 months ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty-One: Consistently use Yoda condition for display_title_and_tagline setting.

Props mukesh27.
Fixes #52329.

Location:
trunk/src/wp-content/themes/twentytwentyone/template-parts/header
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/template-parts/header/site-branding.php

    r49826 r49994  
    3535    <?php endif; ?>
    3636
    37     <?php if ( $description && get_theme_mod( 'display_title_and_tagline', true ) === true ) : ?>
     37    <?php if ( $description && true === get_theme_mod( 'display_title_and_tagline', true ) ) : ?>
    3838        <p class="site-description">
    3939            <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput ?>
  • trunk/src/wp-content/themes/twentytwentyone/template-parts/header/site-header.php

    r49826 r49994  
    1010$wrapper_classes  = 'site-header';
    1111$wrapper_classes .= has_custom_logo() ? ' has-logo' : '';
    12 $wrapper_classes .= true === get_theme_mod( 'display_title_and_tagline', true ) ? ' has-title-and-tagline' : '';
     12$wrapper_classes .= ( true === get_theme_mod( 'display_title_and_tagline', true ) ) ? ' has-title-and-tagline' : '';
    1313$wrapper_classes .= has_nav_menu( 'primary' ) ? ' has-menu' : '';
    1414?>
Note: See TracChangeset for help on using the changeset viewer.