Make WordPress Core


Ignore:
Timestamp:
05/23/2012 05:56:42 PM (13 years ago)
Author:
nacin
Message:

Customize API shuffling.

  • Rename WP_Customize to WP_Customize_Manager.
  • Move customize-controls.php to wp-admin/customize.php.
  • Make customize.php the formal entry point, rather than admin.php?customize=on.
  • Rename is_current_theme_active() to is_theme_active().
  • Add getters for the theme, settings, controls, and sections properties.
  • Allow customize.php (no ?theme=) to load the active theme. Not used yet.

see #20736.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r20802 r20852  
    15671567
    15681568/**
    1569  * Includes and instantiates the WP_Customize class.
     1569 * Includes and instantiates the WP_Customize_Manager class.
    15701570 *
    15711571 * Fires when ?customize=on.
     
    15751575function _wp_customize_include() {
    15761576    // Load on themes.php or ?customize=on
    1577     if ( ! ( isset( $_REQUEST['customize'] ) && 'on' == $_REQUEST['customize'] ) )
     1577    if ( ! ( ( isset( $_REQUEST['customize'] ) && 'on' == $_REQUEST['customize'] ) || 'customize.php' == basename( $_SERVER['PHP_SELF'] ) ) )
    15781578        return;
    15791579
    1580     require( ABSPATH . WPINC . '/class-wp-customize.php' );
     1580    require( ABSPATH . WPINC . '/class-wp-customize-manager.php' );
    15811581    // Init Customize class
    1582     $GLOBALS['wp_customize'] = new WP_Customize;
     1582    $GLOBALS['wp_customize'] = new WP_Customize_Manager;
    15831583}
    15841584add_action( 'plugins_loaded', '_wp_customize_include' );
     
    16051605 */
    16061606function wp_customize_url( $stylesheet ) {
    1607     return esc_url( admin_url( 'admin.php' ) . '?customize=on&theme=' . $stylesheet );
    1608 }
     1607    return esc_url( admin_url( 'customize.php' ) . '?theme=' . $stylesheet );
     1608}
Note: See TracChangeset for help on using the changeset viewer.