Make WordPress Core

Ticket #39665: 39665.diff

File 39665.diff, 1.3 KB (added by dlh, 7 years ago)
  • src/wp-includes/class-wp-customize-nav-menus.php

     
    11321132                add_action( 'wp_enqueue_scripts', array( $this, 'customize_preview_enqueue_deps' ) );
    11331133                add_filter( 'wp_nav_menu_args', array( $this, 'filter_wp_nav_menu_args' ), 1000 );
    11341134                add_filter( 'wp_nav_menu', array( $this, 'filter_wp_nav_menu' ), 10, 2 );
     1135                add_filter( 'wp_page_menu', array( $this, 'filter_wp_nav_menu' ), 10, 2 );
    11351136                add_filter( 'wp_footer', array( $this, 'export_preview_data' ), 1 );
    11361137                add_filter( 'customize_render_partials_response', array( $this, 'export_partial_rendered_nav_menu_instances' ) );
    11371138        }
     
    12941295         * @return null
    12951296         */
    12961297        public function filter_wp_nav_menu( $nav_menu_content, $args ) {
     1298                $args = (object) $args;
    12971299                if ( isset( $args->customize_preview_nav_menus_args['can_partial_refresh'] ) && $args->customize_preview_nav_menus_args['can_partial_refresh'] ) {
    12981300                        $attributes = sprintf( ' data-customize-partial-id="%s"', esc_attr( 'nav_menu_instance[' . $args->customize_preview_nav_menus_args['args_hmac'] . ']' ) );
    12991301                        $attributes .= ' data-customize-partial-type="nav_menu_instance"';