mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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' );
|
||||
|
||||
Reference in New Issue
Block a user