Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update $network_id Parameter Type to int|null for Network Option Methods #8038

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/wp-includes/option.php
Original file line number Diff line number Diff line change
Expand Up @@ -1283,9 +1283,9 @@ function delete_option( $option ) {
* @since 6.6.0
* @access private
*
* @param string $option The name of the option.
* @param mixed $value The value of the option to check its autoload value.
* @param mixed $serialized_value The serialized value of the option to check its autoload value.
* @param string $option The name of the option.
* @param mixed $value The value of the option to check its autoload value.
* @param mixed $serialized_value The serialized value of the option to check its autoload value.
* @param bool|null $autoload The autoload value to check.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param mixed $serialized_value The serialized value of the option to check its autoload value.
* @param bool|null $autoload The autoload value to check.
* @param mixed $serialized_value The serialized value of the option to check its autoload value.
* @param bool|null $autoload The autoload value to check.

Alignments

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mukeshpanchal27, thanks for the review. I have fixed the alignment issue; please check again.

* Accepts 'on'|true to enable or 'off'|false to disable, or
* 'auto-on', 'auto-off', or 'auto' for internal purposes.
Expand Down Expand Up @@ -1972,9 +1972,9 @@ function update_site_option( $option, $value ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option to retrieve. Expected to not be SQL-escaped.
* @param mixed $default_value Optional. Value to return if the option doesn't exist. Default false.
* @param int|null $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option to retrieve. Expected to not be SQL-escaped.
* @param mixed $default_value Optional. Value to return if the option doesn't exist. Default false.
* @return mixed Value set for the option.
*/
function get_network_option( $network_id, $option, $default_value = false ) {
Expand Down Expand Up @@ -2233,8 +2233,8 @@ function add_network_option( $network_id, $option, $value ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option to delete. Expected to not be SQL-escaped.
* @param int|null $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option to delete. Expected to not be SQL-escaped.
* @return bool True if the option was deleted, false otherwise.
*/
function delete_network_option( $network_id, $option ) {
Expand Down Expand Up @@ -2337,9 +2337,9 @@ function delete_network_option( $network_id, $option ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option. Expected to not be SQL-escaped.
* @param mixed $value Option value. Expected to not be SQL-escaped.
* @param int|null $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option. Expected to not be SQL-escaped.
* @param mixed $value Option value. Expected to not be SQL-escaped.
* @return bool True if the value was updated, false otherwise.
*/
function update_network_option( $network_id, $option, $value ) {
Expand Down
Loading