From b9638e6b00ed2cc03dc3ee8cc0c5cc987bc2db23 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 17 Jan 2024 09:09:15 +0000 Subject: [PATCH] Docs: Fix var types of parameters in `sanitize_option()` and `sanitize_option_{$option}`. The related docblocks were previously defining `$value` and `$original_value` as if they were of type `string`, but they can also be of other types, like `array`. Props gerardreches, crstauf, mukesh27. Fixes #60214. See #59651. Built from https://develop.svn.wordpress.org/trunk@57302 git-svn-id: http://core.svn.wordpress.org/trunk@56808 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 83938306b0..05b103e6f7 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4846,8 +4846,8 @@ function wp_make_link_relative( $link ) { * @global wpdb $wpdb WordPress database abstraction object. * * @param string $option The name of the option. - * @param string $value The unsanitized value. - * @return string Sanitized value. + * @param mixed $value The unsanitized value. + * @return mixed Sanitized value. */ function sanitize_option( $option, $value ) { global $wpdb; @@ -5119,9 +5119,9 @@ function sanitize_option( $option, $value ) { * @since 2.3.0 * @since 4.3.0 Added the `$original_value` parameter. * - * @param string $value The sanitized option value. + * @param mixed $value The sanitized option value. * @param string $option The option name. - * @param string $original_value The original value passed to the function. + * @param mixed $original_value The original value passed to the function. */ return apply_filters( "sanitize_option_{$option}", $value, $option, $original_value ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 65dd36a07b..4aa979d68e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57301'; +$wp_version = '6.5-alpha-57302'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.