WordPress.org

Make WordPress Core

Ticket #34468: 34468.1.diff

File 34468.1.diff, 899 bytes (added by danielbachhuber, 4 years ago)
  • src/wp-includes/class-wp-customize-nav-menus.php

    diff --git src/wp-includes/class-wp-customize-nav-menus.php src/wp-includes/class-wp-customize-nav-menus.php
    index adccacd..26161ac 100644
    final class WP_Customize_Nav_Menus { 
    310310         * @access public
    311311         */
    312312        public function enqueue_scripts() {
     313
     314                if ( ! $this->manager->get_panel( 'nav_menus' ) ) {
     315                        return;
     316                }
     317
    313318                wp_enqueue_style( 'customize-nav-menus' );
    314319                wp_enqueue_script( 'customize-nav-menus' );
    315320
    final class WP_Customize_Nav_Menus { 
    657662         * @access public
    658663         */
    659664        public function print_templates() {
     665
     666                if ( ! $this->manager->get_panel( 'nav_menus' ) ) {
     667                        return;
     668                }
     669
    660670                ?>
    661671                <script type="text/html" id="tmpl-available-menu-item">
    662672                        <li id="menu-item-tpl-{{ data.id }}" class="menu-item-tpl" data-menu-item-id="{{ data.id }}">