WordPress/wp-includes/customize/class-wp-customize-background-image-setting.php
hellofromTonya 6a19a16872 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 14:48:55 +00:00

29 lines
545 B
PHP

<?php
/**
* Customize API: WP_Customize_Background_Image_Setting class
*
* @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 {
public $id = 'background_image_thumb';
/**
* @since 3.4.0
*
* @param mixed $value The value to update. Not used.
*/
public function update( $value ) {
remove_theme_mod( 'background_image_thumb' );
}
}