WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/06/2012 10:48:07 PM (8 years ago)
Author:
koopersmith
Message:

Theme Customizer: Add a Control object to better encapsulate different UI elements and make it easy to switch between hard refreshes and postMessage. see #19910.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/customize-controls.php

    r20110 r20128  
    5050        <input type="hidden" id="customize-template" name="template" value="<?php echo esc_attr( $theme['Template'] ); ?>" />
    5151        <input type="hidden" id="customize-stylesheet" name="stylesheet" value="<?php echo esc_attr( $theme['Stylesheet'] ); ?>" />
    52        
     52
    5353        <div id="customize-header-actions" class="customize-section">&nbsp;</div>
    5454
     
    9595    $scheme = is_ssl() ? 'https' : 'http';
    9696    $settings = array(
    97         'preview' => esc_url( home_url( '/', $scheme ) ),
    98         'values' => array(),
    99         'prefix'  => WP_Customize_Setting::name_prefix,
     97        'preview'  => esc_url( home_url( '/', $scheme ) ),
     98        'controls' => array(),
     99        'prefix'   => WP_Customize_Setting::name_prefix,
    100100    );
    101101
    102102    foreach ( $this->settings as $id => $setting ) {
    103         $settings['values'][ $id ] = $setting->value();
     103        $settings['controls'][ $id ] = array(
     104            'value'   => $setting->value(),
     105            'control' => $setting->control,
     106        );
    104107    }
    105108
Note: See TracChangeset for help on using the changeset viewer.