Changeset 36414 for trunk/src/wp-includes/class-wp-customize-nav-menus.php
- Timestamp:
- 01/27/2016 05:54:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-nav-menus.php
r36383 r36414 49 49 $this->manager = $manager; 50 50 51 add_filter( 'customize_refresh_nonces', array( $this, 'filter_nonces' ) ); 51 52 add_action( 'wp_ajax_load-available-menu-items-customizer', array( $this, 'ajax_load_available_items' ) ); 52 53 add_action( 'wp_ajax_search-available-menu-items-customizer', array( $this, 'ajax_search_available_items' ) ); … … 61 62 add_action( 'customize_controls_print_footer_scripts', array( $this, 'available_items_template' ) ); 62 63 add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) ); 64 } 65 66 /** 67 * Add nonce for customizing menus. 68 * 69 * @since 4.5.0 70 * @access public 71 * 72 * @param array $nonces Array of nonces. 73 * @return array $nonces Array of nonces. 74 */ 75 public function filter_nonces( $nonces ) { 76 $nonces['customize-menus'] = wp_create_nonce( 'customize-menus' ); 77 return $nonces; 63 78 } 64 79 … … 330 345 // Pass data to JS. 331 346 $settings = array( 332 'nonce' => wp_create_nonce( 'customize-menus' ),333 347 'allMenus' => wp_get_nav_menus(), 334 348 'itemTypes' => $this->available_item_types(), … … 940 954 'renderNonceValue' => wp_create_nonce( self::RENDER_AJAX_ACTION ), 941 955 'renderNoncePostKey' => self::RENDER_NONCE_POST_KEY, 942 'requestUri' => empty( $_SERVER['REQUEST_URI'] ) ? home_url( '/' ) : esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ),943 'theme' => array(944 'stylesheet' => $this->manager->get_stylesheet(),945 'active' => $this->manager->is_theme_active(),946 ),947 'previewCustomizeNonce' => wp_create_nonce( 'preview-customize_' . $this->manager->get_stylesheet() ),948 956 'navMenuInstanceArgs' => $this->preview_nav_menu_instance_args, 949 957 'l10n' => array(
Note: See TracChangeset
for help on using the changeset viewer.