Introduce new theme customizer to replace theme preview. Rough first pass. props koopersmith, ocean90. see #19910.

Merges in http://plugins.svn.wordpress.org/gandalf/branches/dev/ rev 510148.

git-svn-id: https://develop.svn.wordpress.org/trunk@19995 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2012-02-25 04:12:43 +00:00
parent 8ba7abcdef
commit 9f29c06954
18 changed files with 2396 additions and 0 deletions

View File

@@ -2082,3 +2082,15 @@ function check_theme_switched() {
update_option( 'theme_switched', false );
}
}
function wp_customize_load() {
// Load on themes.php or ?customize=on
if ( ! ( isset( $_REQUEST['customize'] ) && 'on' == $_REQUEST['customize'] ) && 'themes.php' != $GLOBALS['pagenow'] )
return;
require( ABSPATH . WPINC . '/class-wp-customize.php' );
// Init Customize class
// @todo Dependency injection instead
$GLOBALS['customize'] = new WP_Customize;
}
add_action( 'plugins_loaded', 'wp_customize_load' );