mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Themes: Correct the documented types for theme mod values.
A theme mod value can be of any type, not just a string. See #53399 Built from https://develop.svn.wordpress.org/trunk@51578 git-svn-id: http://core.svn.wordpress.org/trunk@51189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
52137a090b
commit
72e66e8910
@ -997,15 +997,15 @@ function get_theme_mods() {
|
||||
/**
|
||||
* Retrieves theme modification value for the current theme.
|
||||
*
|
||||
* If the modification name does not exist, then the $default will be passed
|
||||
* through {@link https://www.php.net/sprintf sprintf()} PHP function with
|
||||
* the template directory URI as the first string and the stylesheet directory URI
|
||||
* as the second string.
|
||||
* If the modification name does not exist and `$default` is a string, then the
|
||||
* default will be passed through the {@link https://www.php.net/sprintf sprintf()}
|
||||
* PHP function with the template directory URI as the first value and the
|
||||
* stylesheet directory URI as the second value.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string $name Theme modification name.
|
||||
* @param string|false $default Optional. Theme modification default value. Default false.
|
||||
* @param string $name Theme modification name.
|
||||
* @param mixed $default Optional. Theme modification default value. Default false.
|
||||
* @return mixed Theme modification value.
|
||||
*/
|
||||
function get_theme_mod( $name, $default = false ) {
|
||||
@ -1021,7 +1021,7 @@ function get_theme_mod( $name, $default = false ) {
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @param string $current_mod The value of the current theme modification.
|
||||
* @param mixed $current_mod The value of the current theme modification.
|
||||
*/
|
||||
return apply_filters( "theme_mod_{$name}", $mods[ $name ] );
|
||||
}
|
||||
@ -1062,8 +1062,8 @@ function set_theme_mod( $name, $value ) {
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
* @param string $value The new value of the theme modification.
|
||||
* @param string $old_value The current value of the theme modification.
|
||||
* @param mixed $value The new value of the theme modification.
|
||||
* @param mixed $old_value The current value of the theme modification.
|
||||
*/
|
||||
$mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value );
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-51577';
|
||||
$wp_version = '5.9-alpha-51578';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user