Changeset 37040 for trunk/src/wp-includes/class-wp-customize-nav-menus.php
- Timestamp:
- 03/21/2016 09:58:02 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-nav-menus.php
r36889 r37040 394 394 'reorderLabelOff' => esc_attr__( 'Close reorder mode' ), 395 395 ), 396 'settingTransport' => isset( $this->manager->selective_refresh ) ? 'postMessage' : 'refresh',396 'settingTransport' => 'postMessage', 397 397 'phpIntMax' => PHP_INT_MAX, 398 398 'defaultSettingValues' => array( … … 446 446 $setting_args = array( 447 447 'type' => WP_Customize_Nav_Menu_Setting::TYPE, 448 'transport' => isset( $this->manager->selective_refresh ) ? 'postMessage' : 'refresh',448 'transport' => 'postMessage', 449 449 ); 450 450 } elseif ( preg_match( WP_Customize_Nav_Menu_Item_Setting::ID_PATTERN, $setting_id ) ) { 451 451 $setting_args = array( 452 452 'type' => WP_Customize_Nav_Menu_Item_Setting::TYPE, 453 'transport' => isset( $this->manager->selective_refresh ) ? 'postMessage' : 'refresh',453 'transport' => 'postMessage', 454 454 ); 455 455 } … … 536 536 $setting = $this->manager->get_setting( $setting_id ); 537 537 if ( $setting ) { 538 $setting->transport = isset( $this->manager->selective_refresh ) ? 'postMessage' : 'refresh';538 $setting->transport = 'postMessage'; 539 539 remove_filter( "customize_sanitize_{$setting_id}", 'absint' ); 540 540 add_filter( "customize_sanitize_{$setting_id}", array( $this, 'intval_base10' ) ); … … 544 544 'theme_supports' => 'menus', 545 545 'type' => 'theme_mod', 546 'transport' => isset( $this->manager->selective_refresh ) ? 'postMessage' : 'refresh',546 'transport' => 'postMessage', 547 547 'default' => 0, 548 548 ) ); … … 571 571 $nav_menu_setting_id = 'nav_menu[' . $menu_id . ']'; 572 572 $this->manager->add_setting( new WP_Customize_Nav_Menu_Setting( $this->manager, $nav_menu_setting_id, array( 573 'transport' => isset( $this->manager->selective_refresh ) ? 'postMessage' : 'refresh',573 'transport' => 'postMessage', 574 574 ) ) ); 575 575 … … 586 586 $this->manager->add_setting( new WP_Customize_Nav_Menu_Item_Setting( $this->manager, $menu_item_setting_id, array( 587 587 'value' => $value, 588 'transport' => isset( $this->manager->selective_refresh ) ? 'postMessage' : 'refresh',588 'transport' => 'postMessage', 589 589 ) ) ); 590 590 … … 989 989 */ 990 990 public function customize_preview_enqueue_deps() { 991 if ( isset( $this->manager->selective_refresh ) ) {992 $script = wp_scripts()->registered['customize-preview-nav-menus'];993 $script->deps[] = 'customize-selective-refresh';994 }995 996 991 wp_enqueue_script( 'customize-preview-nav-menus' ); // Note that we have overridden this. 997 992 wp_enqueue_style( 'customize-preview' );
Note: See TracChangeset
for help on using the changeset viewer.