Message info
 
To:wp-svn@lists.automattic.com From:m@wordpress.org Subject:[wp-svn] [20890] trunk/wp-includes: Theme Customizer: Fix hash-based loader fallbacks. Date:Thu, 24 May 2012 22:45:27 +0000 (UTC)
 

Revision
20890
Author
koopersmith
Date
2012-05-24 22:45:27 +0000 (Thu, 24 May 2012)

Log Message

Theme Customizer: Fix hash-based loader fallbacks. see #20736, #19910, [20886].

Modified Paths

Diff

Modified: trunk/wp-includes/js/customize-loader.dev.js (20889 => 20890)


--- trunk/wp-includes/js/customize-loader.dev.js	2012-05-24 21:40:40 UTC (rev 20889)
+++ trunk/wp-includes/js/customize-loader.dev.js	2012-05-24 22:45:27 UTC (rev 20890)
@@ -40,8 +40,10 @@
 			if ( $.support.history )
 				this.window.on( 'popstate', Loader.popstate );
 
-			if ( $.support.hashchange )
+			if ( $.support.hashchange ) {
 				this.window.on( 'hashchange', Loader.hashchange );
+				this.window.triggerHandler( 'hashchange' );
+			}
 		},
 
 		popstate: function( e ) {
@@ -56,7 +58,7 @@
 			var hash = window.location.toString().split('#')[1];
 
 			if ( hash && 0 === hash.indexOf( 'customize=on' ) )
-				Loader.open( wpCustomizeLoaderL10n.url + '?' + hash );
+				Loader.open( Loader.settings.url + '?' + hash );
 
 			if ( ! hash && ! $.support.history )
 				Loader.close();
@@ -97,7 +99,7 @@
 			if ( $.support.history && window.location.href !== src )
 				history.pushState( { customize: src }, '', src );
 			else if ( ! $.support.history && $.support.hashchange && hash )
-				window.location.hash = hash;
+				window.location.hash = 'customize=on&' + hash;
 
 			this.trigger( 'open' );
 		},

Modified: trunk/wp-includes/theme.php (20889 => 20890)


--- trunk/wp-includes/theme.php	2012-05-24 21:40:40 UTC (rev 20889)
+++ trunk/wp-includes/theme.php	2012-05-24 22:45:27 UTC (rev 20890)
@@ -1596,7 +1596,7 @@
 	$cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
 
 	$settings = array(
-		'url'           => esc_url( admin_url( 'admin.php' ) ),
+		'url'           => esc_url( admin_url( 'customize.php' ) ),
 		'isCrossDomain' => $cross_domain,
 	);