WordPress.org

Make WordPress Core

Changeset 34278


Ignore:
Timestamp:
09/18/2015 05:46:53 AM (4 years ago)
Author:
westonruter
Message:

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

Props adamsilverstein, westonruter.
Fixes #33916.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r33859 r34278  
    935935            'renderNonceValue'      => wp_create_nonce( self::RENDER_AJAX_ACTION ),
    936936            'renderNoncePostKey'    => self::RENDER_NONCE_POST_KEY,
    937             'requestUri'            => '/',
     937            'requestUri'            => empty( $_SERVER['REQUEST_URI'] ) ? home_url( '/' ) : esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
    938938            'theme'                 => array(
    939939                'stylesheet' => $this->manager->get_stylesheet(),
     
    944944        );
    945945
    946         if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
    947             $exports['requestUri'] = esc_url_raw( home_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
    948         }
    949 
    950946        printf( '<script>var _wpCustomizePreviewNavMenusExports = %s;</script>', wp_json_encode( $exports ) );
    951947    }
Note: See TracChangeset for help on using the changeset viewer.