WordPress.org

Make WordPress Core

Changeset 32744


Ignore:
Timestamp:
06/12/2015 10:53:39 PM (4 years ago)
Author:
westonruter
Message:

Customizer: Allow sections and panels to be exported to JS.

Also fix param docs for customize_dynamic_setting_class filter, and use require_once for class-wp-customize-manager.php in bootstrap function _wp_customize_include().

See #30737, #32576.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r32658 r32744  
    910910             * @param string $setting_class WP_Customize_Setting or a subclass.
    911911             * @param string $setting_id    ID for dynamic setting, usually coming from `$_POST['customized']`.
    912              * @param string $setting_args  WP_Customize_Setting or a subclass.
     912             * @param array $setting_args  WP_Customize_Setting or a subclass.
    913913             */
    914914            $setting_class = apply_filters( 'customize_dynamic_setting_class', $setting_class, $setting_id, $setting_args );
     
    12061206
    12071207        foreach ( $this->sections as $section ) {
    1208             if ( ! $section->check_capabilities() || ! $section->controls ) {
     1208            if ( ! $section->check_capabilities() ) {
    12091209                continue;
    12101210            }
     
    12291229
    12301230        foreach ( $this->panels as $panel ) {
    1231             if ( ! $panel->check_capabilities() || ! $panel->sections ) {
     1231            if ( ! $panel->check_capabilities() ) {
    12321232                continue;
    12331233            }
  • trunk/src/wp-includes/theme.php

    r32650 r32744  
    19931993        return;
    19941994
    1995     require( ABSPATH . WPINC . '/class-wp-customize-manager.php' );
    1996     // Init Customize class
    1997     $GLOBALS['wp_customize'] = new WP_Customize_Manager;
     1995    require_once ABSPATH . WPINC . '/class-wp-customize-manager.php';
     1996    $GLOBALS['wp_customize'] = new WP_Customize_Manager();
    19981997}
    19991998
Note: See TracChangeset for help on using the changeset viewer.