Make WordPress Core

Changeset 59940


Ignore:
Timestamp:
03/05/2025 10:57:23 PM (3 months ago)
Author:
audrasjb
Message:

Docs: Update $network_id parameter type to int|null in Network Option methods.

Props maikelraow, im3dabasia1, audrasjb, mukesh27.
Fixes #62735.
See #62281.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r59865 r59940  
    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 */
     
    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 */
     
    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 */
     
    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 */
     
    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 */
Note: See TracChangeset for help on using the changeset viewer.