Customize: Fix live previewing of menu changes on subdirectory installs.
Merges [34278] from trunk. Props adamsilverstein, westonruter. Fixes #33916 for 4.3. Built from https://develop.svn.wordpress.org/branches/4.3@34279 git-svn-id: http://core.svn.wordpress.org/branches/4.3@34243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
286bf05ea7
commit
0b2de83d41
|
@ -930,7 +930,7 @@ final class WP_Customize_Nav_Menus {
|
|||
'renderQueryVar' => self::RENDER_QUERY_VAR,
|
||||
'renderNonceValue' => wp_create_nonce( self::RENDER_AJAX_ACTION ),
|
||||
'renderNoncePostKey' => self::RENDER_NONCE_POST_KEY,
|
||||
'requestUri' => '/',
|
||||
'requestUri' => empty( $_SERVER['REQUEST_URI'] ) ? home_url( '/' ) : esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
|
||||
'theme' => array(
|
||||
'stylesheet' => $this->manager->get_stylesheet(),
|
||||
'active' => $this->manager->is_theme_active(),
|
||||
|
@ -939,10 +939,6 @@ final class WP_Customize_Nav_Menus {
|
|||
'navMenuInstanceArgs' => $this->preview_nav_menu_instance_args,
|
||||
);
|
||||
|
||||
if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
||||
$exports['requestUri'] = esc_url_raw( home_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
|
||||
}
|
||||
|
||||
printf( '<script>var _wpCustomizePreviewNavMenusExports = %s;</script>', wp_json_encode( $exports ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue