diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 67a9b23962..d5cb14b526 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -1806,32 +1806,35 @@ final class WP_Customize_Manager { * from the current changeset post and from the incoming post data. * * @since 3.4.0 - * @since 4.1.1 Introduced the `$default` parameter. - * @since 4.6.0 `$default` is now returned early when the setting post value is invalid. + * @since 4.1.1 Introduced the `$default_value` parameter. + * @since 4.6.0 `$default_value` is now returned early when the setting post value is invalid. * * @see WP_REST_Server::dispatch() * @see WP_REST_Request::sanitize_params() * @see WP_REST_Request::has_valid_params() * - * @param WP_Customize_Setting $setting A WP_Customize_Setting derived object. - * @param mixed $default Value returned $setting has no post value (added in 4.2.0) - * or the post value is invalid (added in 4.6.0). - * @return string|mixed Sanitized value or the $default provided. + * @param WP_Customize_Setting $setting A WP_Customize_Setting derived object. + * @param mixed $default_value Value returned if `$setting` has no post value (added in 4.2.0) + * or the post value is invalid (added in 4.6.0). + * @return string|mixed Sanitized value or the `$default_value` provided. */ - public function post_value( $setting, $default = null ) { + public function post_value( $setting, $default_value = null ) { $post_values = $this->unsanitized_post_values(); if ( ! array_key_exists( $setting->id, $post_values ) ) { - return $default; + return $default_value; } + $value = $post_values[ $setting->id ]; $valid = $setting->validate( $value ); if ( is_wp_error( $valid ) ) { - return $default; + return $default_value; } + $value = $setting->sanitize( $value ); if ( is_null( $value ) || is_wp_error( $value ) ) { - return $default; + return $default_value; } + return $value; } @@ -2232,13 +2235,13 @@ final class WP_Customize_Manager { * @since 3.4.0 * @deprecated 4.7.0 * - * @param mixed $return Value passed through for {@see 'wp_die_handler'} filter. + * @param mixed $callback Value passed through for {@see 'wp_die_handler'} filter. * @return mixed Value passed through for {@see 'wp_die_handler'} filter. */ - public function remove_preview_signature( $return = null ) { + public function remove_preview_signature( $callback = null ) { _deprecated_function( __METHOD__, '4.7.0' ); - return $return; + return $callback; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index c77b51cec9..a9a838175b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta2-53241'; +$wp_version = '6.0-beta2-53242'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.