Skip to content

Commit 935f4d1

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@57302 602fd350-edb4-49c9-b593-d223f7449a82
1 parent bb1c19f commit 935f4d1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/wp-includes/formatting.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4846,8 +4846,8 @@ function wp_make_link_relative( $link ) {
48464846
* @global wpdb $wpdb WordPress database abstraction object.
48474847
*
48484848
* @param string $option The name of the option.
4849-
* @param string $value The unsanitized value.
4850-
* @return string Sanitized value.
4849+
* @param mixed $value The unsanitized value.
4850+
* @return mixed Sanitized value.
48514851
*/
48524852
function sanitize_option( $option, $value ) {
48534853
global $wpdb;
@@ -5119,9 +5119,9 @@ function sanitize_option( $option, $value ) {
51195119
* @since 2.3.0
51205120
* @since 4.3.0 Added the `$original_value` parameter.
51215121
*
5122-
* @param string $value The sanitized option value.
5122+
* @param mixed $value The sanitized option value.
51235123
* @param string $option The option name.
5124-
* @param string $original_value The original value passed to the function.
5124+
* @param mixed $original_value The original value passed to the function.
51255125
*/
51265126
return apply_filters( "sanitize_option_{$option}", $value, $option, $original_value );
51275127
}

0 commit comments

Comments
 (0)