Make WordPress Core

Changeset 34279 for branches/4.3


Ignore:
Timestamp:
09/18/2015 05:49:20 AM (9 years ago)
Author:
westonruter
Message:

Customize: Fix live previewing of menu changes on subdirectory installs.

Merges [34278] from trunk.

Props adamsilverstein, westonruter.
Fixes #33916 for 4.3.

Location:
branches/4.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3

  • branches/4.3/src/wp-includes/class-wp-customize-nav-menus.php

    r33602 r34279  
    931931            'renderNonceValue'      => wp_create_nonce( self::RENDER_AJAX_ACTION ),
    932932            'renderNoncePostKey'    => self::RENDER_NONCE_POST_KEY,
    933             'requestUri'            => '/',
     933            'requestUri'            => empty( $_SERVER['REQUEST_URI'] ) ? home_url( '/' ) : esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
    934934            'theme'                 => array(
    935935                'stylesheet' => $this->manager->get_stylesheet(),
     
    940940        );
    941941
    942         if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
    943             $exports['requestUri'] = esc_url_raw( home_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
    944         }
    945 
    946942        printf( '<script>var _wpCustomizePreviewNavMenusExports = %s;</script>', wp_json_encode( $exports ) );
    947943    }
Note: See TracChangeset for help on using the changeset viewer.