WordPress.org

Make WordPress Core

Changeset 19995


Ignore:
Timestamp:
02/25/2012 04:12:43 AM (6 years ago)
Author:
koopersmith
Message:

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.

Location:
trunk/wp-includes
Files:
16 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/script-loader.php

    r19992 r19995  
    290290    $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), 'r6', 1 );
    291291
     292    $scripts->add( 'customize-loader', "/wp-includes/js/customize-loader$suffix.js",   array( 'jquery' ), false, 1 );
     293    $scripts->add( 'customize-base', "/wp-includes/js/customize-base$suffix.js",       array( 'jquery-postmessage', 'json2' ), false, 1 );
     294    $scripts->add( 'customize-controls', "/wp-includes/js/customize-controls$suffix.js", array( 'customize-base' ), false, 1 );
     295    $scripts->add( 'customize-preview', "/wp-includes/js/customize-preview$suffix.js",  array( 'customize-base' ), false, 1 );
     296
    292297    if ( is_admin() ) {
    293298        $scripts->add( 'ajaxcat', "/wp-admin/js/cat$suffix.js", array( 'wp-lists' ) );
     
    465470    $styles->add( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css" );
    466471    $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css" );
     472    $styles->add( 'customize-loader', "/wp-includes/css/customize-loader$suffix.css" );
     473    $styles->add( 'customize-controls', "/wp-includes/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie' ) );
    467474
    468475    foreach ( $rtl_styles as $rtl_style ) {
  • trunk/wp-includes/theme.php

    r19969 r19995  
    20832083    }
    20842084}
     2085
     2086function wp_customize_load() {
     2087    // Load on themes.php or ?customize=on
     2088    if ( ! ( isset( $_REQUEST['customize'] ) && 'on' == $_REQUEST['customize'] ) && 'themes.php' != $GLOBALS['pagenow'] )
     2089        return;
     2090
     2091    require( ABSPATH . WPINC . '/class-wp-customize.php' );
     2092    // Init Customize class
     2093    // @todo Dependency injection instead
     2094    $GLOBALS['customize'] = new WP_Customize;
     2095}
     2096add_action( 'plugins_loaded', 'wp_customize_load' );
Note: See TracChangeset for help on using the changeset viewer.