Changeset 20276
- Timestamp:
- 03/24/2012 01:02:29 AM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-setting.php
r20263 r20276 15 15 public $label = ''; 16 16 public $control = 'text'; 17 public $control_params = array(); 17 18 public $type = 'theme_mod'; 18 19 public $choices = array(); -
trunk/wp-includes/class-wp-customize.php
r20274 r20276 535 535 // With custom value 536 536 $this->add_setting( 'header_image', array( 537 'label' => 'Header Image', 538 'section' => 'header', 539 'control' => 'upload', 540 'default' => get_theme_support( 'custom-header', 'default-image' ), 537 'label' => 'Header Image', 538 'section' => 'header', 539 'control' => 'upload', 540 'default' => get_theme_support( 'custom-header', 'default-image' ), 541 'control_params' => array( 542 'context' => 'custom-header', 543 ), 541 544 ) ); 542 545 … … 559 562 560 563 $this->add_setting( 'background_image', array( 561 'label' => 'Background Image', 562 'section' => 'background', 563 'control' => 'upload', 564 'default' => get_theme_support( 'custom-background', 'default-image' ), 564 'label' => 'Background Image', 565 'section' => 'background', 566 'control' => 'upload', 567 'default' => get_theme_support( 'custom-background', 'default-image' ), 568 'control_params' => array( 569 'context' => 'custom-background', 570 ), 565 571 ) ); 566 572 -
trunk/wp-includes/customize-controls.php
r20266 r20276 104 104 'value' => $setting->value(), 105 105 'control' => $setting->control, 106 'params' => $setting->control_params, 106 107 ); 107 108 -
trunk/wp-includes/js/customize-controls.dev.js
r20274 r20276 11 11 var name = '[name="' + api.settings.prefix + id + '"]'; 12 12 13 this.params = {}; 13 14 api.Value.prototype.initialize.call( this, value, options ); 14 15 … … 91 92 92 93 this.bind( this.removerVisibility ); 94 95 if ( this.params.context ) 96 control.uploader.param( 'post_data[context]', this.params.context ); 93 97 }, 94 98 removerVisibility: function( on ) { … … 241 245 242 246 control = api.add( id, new constructor( id, data.value, { 247 params: data.params, 243 248 previewer: previewer 244 249 } ) ); … … 275 280 control.method = 'postMessage'; 276 281 }); 277 278 api( 'background_image', function( control ) {279 control.uploader.param( 'post_data[context]', 'custom-background' );280 });281 282 api( 'header_image', function( control ) {283 control.uploader.param( 'post_data[context]', 'custom-header' );284 });285 282 }); 286 283
Note: See TracChangeset
for help on using the changeset viewer.