From ea89aeee0bf0465bd68ff45f723c52163f180319 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 26 May 2015 22:17:25 +0000 Subject: [PATCH] Fix doc blocks for `option.php`. See #32444. Built from https://develop.svn.wordpress.org/trunk@32613 git-svn-id: http://core.svn.wordpress.org/trunk@32583 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/option.php | 50 +++++++++++++++++++++++++++++------------ wp-includes/version.php | 2 +- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index 5149f4c598..5ba890ec6c 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -18,8 +18,10 @@ * * @since 1.5.0 * - * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. - * @param mixed $default Optional. Default value to return if the option does not exist. + * @global wpdb $wpdb + * + * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. + * @param mixed $default Optional. Default value to return if the option does not exist. * @return mixed Value set for the option. */ function get_option( $option, $default = false ) { @@ -153,6 +155,8 @@ function form_option( $option ) { * * @since 2.2.0 * + * @global wpdb $wpdb + * * @return array List of all options. */ function wp_load_alloptions() { @@ -184,6 +188,8 @@ function wp_load_alloptions() { * * @since 3.0.0 * + * @global wpdb $wpdb + * * @param int $site_id Optional site ID for which to query the options. Defaults to the current site. */ function wp_load_core_site_options( $site_id = null ) { @@ -222,6 +228,8 @@ function wp_load_core_site_options( $site_id = null ) { * @since 1.0.0 * @since 4.2.0 The `$autoload` parameter was added. * + * @global wpdb $wpdb + * * @param string $option Option name. Expected to not be SQL-escaped. * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. For existing options, @@ -362,6 +370,8 @@ function update_option( $option, $value, $autoload = null ) { * * @since 1.0.0 * + * @global wpdb $wpdb + * * @param string $option Name of option to add. Expected to not be SQL-escaped. * @param mixed $value Optional. Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. * @param string $deprecated Optional. Description. Not used anymore. @@ -457,6 +467,8 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) * * @since 1.2.0 * + * @global wpdb $wpdb + * * @param string $option Name of option to remove. Expected to not be SQL-escaped. * @return bool True, if option is successfully deleted. False on failure. */ @@ -778,7 +790,7 @@ function wp_user_settings() { * * @since 2.7.0 * - * @param string $name The name of the setting. + * @param string $name The name of the setting. * @param string $default Optional default value to return when $name is not set. * @return mixed the last saved user setting or the default value/false if it doesn't exist. */ @@ -796,12 +808,11 @@ function get_user_setting( $name, $default = false ) { * * @since 2.8.0 * - * @param string $name The name of the setting. + * @param string $name The name of the setting. * @param string $value The value for the setting. - * @return null|bool true if set successfully/false if not. + * @return bool|void true if set successfully/false if not. */ function set_user_setting( $name, $value ) { - if ( headers_sent() ) { return false; } @@ -821,10 +832,9 @@ function set_user_setting( $name, $value ) { * @since 2.7.0 * * @param string $names The name or array of names of the setting to be deleted. - * @return null|bool true if deleted successfully/false if not. + * @return bool|void true if deleted successfully/false if not. */ function delete_user_setting( $names ) { - if ( headers_sent() ) { return false; } @@ -852,6 +862,8 @@ function delete_user_setting( $names ) { * * @since 2.7.0 * + * @global array $_updated_user_settings + * * @return array the last saved user settings or empty array. */ function get_all_user_settings() { @@ -890,8 +902,10 @@ function get_all_user_settings() { * * @since 2.8.0 * + * @global array $_updated_user_settings + * * @param array $user_settings - * @return null|bool + * @return bool|void */ function wp_set_all_user_settings( $user_settings ) { global $_updated_user_settings; @@ -944,9 +958,11 @@ function delete_all_user_settings() { * * @see get_option() * - * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. - * @param mixed $default Optional value to return if option doesn't exist. Default false. - * @param bool $use_cache Whether to use cache. Multisite only. Default true. + * @global wpdb $wpdb + * + * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. + * @param mixed $default Optional value to return if option doesn't exist. Default false. + * @param bool $use_cache Whether to use cache. Multisite only. Default true. * @return mixed Value set for the option. */ function get_site_option( $option, $default = false, $use_cache = true ) { @@ -1039,8 +1055,10 @@ function get_site_option( $option, $default = false, $use_cache = true ) { * * @see add_option() * + * @global wpdb $wpdb + * * @param string $option Name of option to add. Expected to not be SQL-escaped. - * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped. + * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped. * @return bool False if option was not added and true if option was added. */ function add_site_option( $option, $value ) { @@ -1128,6 +1146,8 @@ function add_site_option( $option, $value ) { * * @see delete_option() * + * @global wpdb $wpdb + * * @param string $option Name of option to remove. Expected to not be SQL-escaped. * @return bool True, if succeed. False, if failure. */ @@ -1192,8 +1212,10 @@ function delete_site_option( $option ) { * * @see update_option() * + * @global wpdb $wpdb + * * @param string $option Name of option. Expected to not be SQL-escaped. - * @param mixed $value Option value. Expected to not be SQL-escaped. + * @param mixed $value Option value. Expected to not be SQL-escaped. * @return bool False if value was not updated and true if value was updated. */ function update_site_option( $option, $value ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 865bbb19b4..9c2c96e935 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32612'; +$wp_version = '4.3-alpha-32613'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.