git-svn-id: http://core.svn.wordpress.org/trunk@20890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
29eb5af53f
commit
2f09b8d0a6
|
@ -40,8 +40,10 @@ if ( typeof wp === 'undefined' )
|
||||||
if ( $.support.history )
|
if ( $.support.history )
|
||||||
this.window.on( 'popstate', Loader.popstate );
|
this.window.on( 'popstate', Loader.popstate );
|
||||||
|
|
||||||
if ( $.support.hashchange )
|
if ( $.support.hashchange ) {
|
||||||
this.window.on( 'hashchange', Loader.hashchange );
|
this.window.on( 'hashchange', Loader.hashchange );
|
||||||
|
this.window.triggerHandler( 'hashchange' );
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
popstate: function( e ) {
|
popstate: function( e ) {
|
||||||
|
@ -56,7 +58,7 @@ if ( typeof wp === 'undefined' )
|
||||||
var hash = window.location.toString().split('#')[1];
|
var hash = window.location.toString().split('#')[1];
|
||||||
|
|
||||||
if ( hash && 0 === hash.indexOf( 'customize=on' ) )
|
if ( hash && 0 === hash.indexOf( 'customize=on' ) )
|
||||||
Loader.open( wpCustomizeLoaderL10n.url + '?' + hash );
|
Loader.open( Loader.settings.url + '?' + hash );
|
||||||
|
|
||||||
if ( ! hash && ! $.support.history )
|
if ( ! hash && ! $.support.history )
|
||||||
Loader.close();
|
Loader.close();
|
||||||
|
@ -97,7 +99,7 @@ if ( typeof wp === 'undefined' )
|
||||||
if ( $.support.history && window.location.href !== src )
|
if ( $.support.history && window.location.href !== src )
|
||||||
history.pushState( { customize: src }, '', src );
|
history.pushState( { customize: src }, '', src );
|
||||||
else if ( ! $.support.history && $.support.hashchange && hash )
|
else if ( ! $.support.history && $.support.hashchange && hash )
|
||||||
window.location.hash = hash;
|
window.location.hash = 'customize=on&' + hash;
|
||||||
|
|
||||||
this.trigger( 'open' );
|
this.trigger( 'open' );
|
||||||
},
|
},
|
||||||
|
|
|
@ -1596,7 +1596,7 @@ function _wp_customize_loader_settings() {
|
||||||
$cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
|
$cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
|
||||||
|
|
||||||
$settings = array(
|
$settings = array(
|
||||||
'url' => esc_url( admin_url( 'admin.php' ) ),
|
'url' => esc_url( admin_url( 'customize.php' ) ),
|
||||||
'isCrossDomain' => $cross_domain,
|
'isCrossDomain' => $cross_domain,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue