Changeset 21037 for trunk/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 06/10/2012 12:32:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-setting.php
r20936 r21037 368 368 } 369 369 } 370 371 /** 372 * A setting that is used to filter a value, but will not save the results. 373 * 374 * Results should be properly handled using another setting or callback. 375 */ 376 class WP_Customize_Filter_Setting extends WP_Customize_Setting { 377 public function update() {} 378 } 379 380 /** 381 * A setting that is used to filter a value, but will not save the results. 382 * 383 * Results should be properly handled using another setting or callback. 384 */ 385 class WP_Customize_Header_Image_Setting extends WP_Customize_Setting { 386 public $id = 'header_image_data'; 387 388 public function update( $value ) { 389 global $custom_image_header; 390 391 // If the value doesn't exist (removed or random), 392 // use the header_image value. 393 if ( ! $value ) 394 $value = $this->manager->get_setting('header_image')->post_value(); 395 396 if ( is_array( $value ) && isset( $value['choice'] ) ) 397 $custom_image_header->set_header_image( $value['choice'] ); 398 else 399 $custom_image_header->set_header_image( $value ); 400 } 401 }
Note: See TracChangeset
for help on using the changeset viewer.