2015-10-24 14:11:24 -04:00
|
|
|
<?php
|
|
|
|
/**
|
2015-10-24 14:21:25 -04:00
|
|
|
* Customize API: WP_Customize_Background_Image_Setting class
|
2015-10-24 14:11:24 -04:00
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Customize
|
|
|
|
* @since 4.4.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Customizer Background Image Setting class.
|
|
|
|
*
|
|
|
|
* @since 3.4.0
|
|
|
|
*
|
|
|
|
* @see WP_Customize_Setting
|
|
|
|
*/
|
|
|
|
final class WP_Customize_Background_Image_Setting extends WP_Customize_Setting {
|
2022-05-18 11:24:14 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Unique string identifier for the setting.
|
|
|
|
*
|
|
|
|
* @since 3.4.0
|
|
|
|
* @var string
|
|
|
|
*/
|
2015-10-24 14:11:24 -04:00
|
|
|
public $id = 'background_image_thumb';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 3.4.0
|
|
|
|
*
|
Code Modernization: Fix parameter name mismatches for parent/child classes in `WP_Customize_Setting::update()`.
In each child class: renames the parameter to match the parent's method signature.
Why? PHP 8 introduces the ability to pass named arguments to function/method calls. This means the child and parent method signatures (i.e. parameter names) need to match.
Changes for readability:
- `@since` clearly specifies the original parameter name and its new name as well as why the change happened.
- In methods longer than a single line, the generic parameter is reassigned to the original parameter restoring it for context for use within the method. An inline comment is added to explain why this reassignment is made.
Follow-up to [19995], [21037], [21053], [21354], [38829], [51298].
Props jrf, hellofromTonya, sergeybiryukov, azaozz, desrosj, johnbillion.
See #51553.
Built from https://develop.svn.wordpress.org/trunk@51784
git-svn-id: http://core.svn.wordpress.org/trunk@51391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-09 10:48:55 -04:00
|
|
|
* @param mixed $value The value to update. Not used.
|
2015-10-24 14:11:24 -04:00
|
|
|
*/
|
|
|
|
public function update( $value ) {
|
|
|
|
remove_theme_mod( 'background_image_thumb' );
|
|
|
|
}
|
|
|
|
}
|