Skip to content

Commit 6f1628d

Browse files
committed
Docs: Update $network_id parameter type to int|null in Network Option methods.
Props maikelraow, im3dabasia1, audrasjb, mukesh27. Fixes #62735. See #62281. git-svn-id: https://develop.svn.wordpress.org/trunk@59940 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9c2527a commit 6f1628d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/wp-includes/option.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ function wp_prime_site_option_caches( array $options ) {
689689
*
690690
* @global wpdb $wpdb WordPress database abstraction object.
691691
*
692-
* @param int $network_id ID of the network. Can be null to default to the current network ID.
692+
* @param int|null $network_id ID of the network. Can be null to default to the current network ID.
693693
* @param string[] $options An array of option names to be loaded.
694694
*/
695695
function wp_prime_network_option_caches( $network_id, array $options ) {
@@ -1993,9 +1993,9 @@ function update_site_option( $option, $value ) {
19931993
*
19941994
* @global wpdb $wpdb WordPress database abstraction object.
19951995
*
1996-
* @param int $network_id ID of the network. Can be null to default to the current network ID.
1997-
* @param string $option Name of the option to retrieve. Expected to not be SQL-escaped.
1998-
* @param mixed $default_value Optional. Value to return if the option doesn't exist. Default false.
1996+
* @param int|null $network_id ID of the network. Can be null to default to the current network ID.
1997+
* @param string $option Name of the option to retrieve. Expected to not be SQL-escaped.
1998+
* @param mixed $default_value Optional. Value to return if the option doesn't exist. Default false.
19991999
* @return mixed Value set for the option.
20002000
*/
20012001
function get_network_option( $network_id, $option, $default_value = false ) {
@@ -2127,9 +2127,9 @@ function get_network_option( $network_id, $option, $default_value = false ) {
21272127
*
21282128
* @global wpdb $wpdb WordPress database abstraction object.
21292129
*
2130-
* @param int $network_id ID of the network. Can be null to default to the current network ID.
2131-
* @param string $option Name of the option to add. Expected to not be SQL-escaped.
2132-
* @param mixed $value Option value, can be anything. Expected to not be SQL-escaped.
2130+
* @param int|null $network_id ID of the network. Can be null to default to the current network ID.
2131+
* @param string $option Name of the option to add. Expected to not be SQL-escaped.
2132+
* @param mixed $value Option value, can be anything. Expected to not be SQL-escaped.
21332133
* @return bool True if the option was added, false otherwise.
21342134
*/
21352135
function add_network_option( $network_id, $option, $value ) {
@@ -2254,8 +2254,8 @@ function add_network_option( $network_id, $option, $value ) {
22542254
*
22552255
* @global wpdb $wpdb WordPress database abstraction object.
22562256
*
2257-
* @param int $network_id ID of the network. Can be null to default to the current network ID.
2258-
* @param string $option Name of the option to delete. Expected to not be SQL-escaped.
2257+
* @param int|null $network_id ID of the network. Can be null to default to the current network ID.
2258+
* @param string $option Name of the option to delete. Expected to not be SQL-escaped.
22592259
* @return bool True if the option was deleted, false otherwise.
22602260
*/
22612261
function delete_network_option( $network_id, $option ) {
@@ -2358,9 +2358,9 @@ function delete_network_option( $network_id, $option ) {
23582358
*
23592359
* @global wpdb $wpdb WordPress database abstraction object.
23602360
*
2361-
* @param int $network_id ID of the network. Can be null to default to the current network ID.
2362-
* @param string $option Name of the option. Expected to not be SQL-escaped.
2363-
* @param mixed $value Option value. Expected to not be SQL-escaped.
2361+
* @param int|null $network_id ID of the network. Can be null to default to the current network ID.
2362+
* @param string $option Name of the option. Expected to not be SQL-escaped.
2363+
* @param mixed $value Option value. Expected to not be SQL-escaped.
23642364
* @return bool True if the value was updated, false otherwise.
23652365
*/
23662366
function update_network_option( $network_id, $option, $value ) {

0 commit comments

Comments
 (0)