Skip to content

Commit c665fab

Browse files
Docs: Correct DocBlock formatting for pre_site_option filter.
Includes bringing some consistency with the `pre_option` filter DocBlock. . Follow-up to [54145], [54948], [60959]. Props mukesh27, SergeyBiryukov. See #37930, #63166. git-svn-id: https://develop.svn.wordpress.org/trunk@60978 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6adca97 commit c665fab

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/wp-includes/option.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function get_option( $option, $default_value = false ) {
132132
$pre = apply_filters( "pre_option_{$option}", false, $option, $default_value );
133133

134134
/**
135-
* Filters the value of all existing options before it is retrieved.
135+
* Filters the value of any existing option before it is retrieved.
136136
*
137137
* Returning a value other than false from the filter will short-circuit retrieval
138138
* and return that value instead.
@@ -2038,21 +2038,21 @@ function get_network_option( $network_id, $option, $default_value = false ) {
20382038
$pre = apply_filters( "pre_site_option_{$option}", false, $option, $network_id, $default_value );
20392039

20402040
/**
2041-
* Filters the value of an existing network options before it is retrieved.
2041+
* Filters the value of any existing network option before it is retrieved.
20422042
*
20432043
* Returning a value other than false from the filter will short-circuit retrieval
20442044
* and return that value instead.
20452045
*
20462046
* @since 6.9.0
20472047
*
2048-
* @param mixed $pre The value to return instead of the network option value. This differs
2049-
* from `$default`, which is used as the fallback value in the event
2050-
* the option doesn't exist elsewhere in get_network_option().
2051-
* Default false (to skip past the short-circuit).
2052-
* @param string $option Name of the option.
2053-
* @param int $network_id ID of the network.
2054-
* @param mixed $default_value The fallback value to return if the option does not exist.
2055-
* Default false.
2048+
* @param mixed $pre_option The value to return instead of the network option value. This differs
2049+
* from `$default_value`, which is used as the fallback value in the event
2050+
* the option doesn't exist elsewhere in get_network_option().
2051+
* Default false (to skip past the short-circuit).
2052+
* @param string $option Name of the option.
2053+
* @param int $network_id ID of the network.
2054+
* @param mixed $default_value The fallback value to return if the option does not exist.
2055+
* Default false.
20562056
*/
20572057
$pre = apply_filters( 'pre_site_option', $pre, $option, $network_id, $default_value );
20582058

0 commit comments

Comments
 (0)