Make WordPress Core

Ticket #37026: 37026.3.patch

File 37026.3.patch, 1.0 KB (added by apermo, 13 months ago)

Improved order in if from cheapest to most expensive for good measure.

  • src/wp-admin/nav-menus.php

     
    12121212                                                                                        <div class="menu-settings-input checkbox-input">
    12131213                                                                                                <input type="checkbox"<?php checked( $checked ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
    12141214                                                                                                <label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
    1215                                                                                                 <?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] !== $nav_menu_selected_id ) : ?>
     1215                                                                                                <?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] !== $nav_menu_selected_id && is_nav_menu( $menu_locations[ $location ] ) ) : ?>
    12161216                                                                                                        <span class="theme-location-set">
    12171217                                                                                                        <?php
    12181218                                                                                                                printf(