From f5d4eb7dd3f45dbd58922109df1f3a715e623cff Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 20 Apr 2016 15:46:53 +0000 Subject: [PATCH] Docs: Clarify return descriptions in the DocBlocks for `set_user_setting()` and `delete_user_setting()`. See [32613]. See #30989. git-svn-id: https://develop.svn.wordpress.org/trunk@37264 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 72f6999184..253713f4bc 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -844,13 +844,14 @@ function get_user_setting( $name, $default = false ) { * Add or update user interface setting. * * Both $name and $value can contain only ASCII letters, numbers and underscores. + * * This function has to be used before any output has started as it calls setcookie(). * * @since 2.8.0 * * @param string $name The name of the setting. * @param string $value The value for the setting. - * @return bool|void true if set successfully/false if not. + * @return bool|null True if set successfully, false if not. Null if the current user can't be established. */ function set_user_setting( $name, $value ) { if ( headers_sent() ) { @@ -867,12 +868,13 @@ function set_user_setting( $name, $value ) { * Delete user interface settings. * * Deleting settings would reset them to the defaults. + * * This function has to be used before any output has started as it calls setcookie(). * * @since 2.7.0 * * @param string $names The name or array of names of the setting to be deleted. - * @return bool|void true if deleted successfully/false if not. + * @return bool|null True if deleted successfully, false if not. Null if the current user can't be established. */ function delete_user_setting( $names ) { if ( headers_sent() ) {