Changeset 32613
- Timestamp:
- 05/26/2015 10:16:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r32481 r32613 19 19 * @since 1.5.0 20 20 * 21 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. 22 * @param mixed $default Optional. Default value to return if the option does not exist. 21 * @global wpdb $wpdb 22 * 23 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. 24 * @param mixed $default Optional. Default value to return if the option does not exist. 23 25 * @return mixed Value set for the option. 24 26 */ … … 154 156 * @since 2.2.0 155 157 * 158 * @global wpdb $wpdb 159 * 156 160 * @return array List of all options. 157 161 */ … … 185 189 * @since 3.0.0 186 190 * 191 * @global wpdb $wpdb 192 * 187 193 * @param int $site_id Optional site ID for which to query the options. Defaults to the current site. 188 194 */ … … 222 228 * @since 1.0.0 223 229 * @since 4.2.0 The `$autoload` parameter was added. 230 * 231 * @global wpdb $wpdb 224 232 * 225 233 * @param string $option Option name. Expected to not be SQL-escaped. … … 363 371 * @since 1.0.0 364 372 * 373 * @global wpdb $wpdb 374 * 365 375 * @param string $option Name of option to add. Expected to not be SQL-escaped. 366 376 * @param mixed $value Optional. Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. … … 457 467 * 458 468 * @since 1.2.0 469 * 470 * @global wpdb $wpdb 459 471 * 460 472 * @param string $option Name of option to remove. Expected to not be SQL-escaped. … … 779 791 * @since 2.7.0 780 792 * 781 * @param string $name The name of the setting.793 * @param string $name The name of the setting. 782 794 * @param string $default Optional default value to return when $name is not set. 783 795 * @return mixed the last saved user setting or the default value/false if it doesn't exist. … … 797 809 * @since 2.8.0 798 810 * 799 * @param string $name The name of the setting.811 * @param string $name The name of the setting. 800 812 * @param string $value The value for the setting. 801 * @return null|booltrue if set successfully/false if not.813 * @return bool|void true if set successfully/false if not. 802 814 */ 803 815 function set_user_setting( $name, $value ) { 804 805 816 if ( headers_sent() ) { 806 817 return false; … … 822 833 * 823 834 * @param string $names The name or array of names of the setting to be deleted. 824 * @return null|booltrue if deleted successfully/false if not.835 * @return bool|void true if deleted successfully/false if not. 825 836 */ 826 837 function delete_user_setting( $names ) { 827 828 838 if ( headers_sent() ) { 829 839 return false; … … 853 863 * @since 2.7.0 854 864 * 865 * @global array $_updated_user_settings 866 * 855 867 * @return array the last saved user settings or empty array. 856 868 */ … … 891 903 * @since 2.8.0 892 904 * 905 * @global array $_updated_user_settings 906 * 893 907 * @param array $user_settings 894 * @return null|bool908 * @return bool|void 895 909 */ 896 910 function wp_set_all_user_settings( $user_settings ) { … … 945 959 * @see get_option() 946 960 * 947 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. 948 * @param mixed $default Optional value to return if option doesn't exist. Default false. 949 * @param bool $use_cache Whether to use cache. Multisite only. Default true. 961 * @global wpdb $wpdb 962 * 963 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. 964 * @param mixed $default Optional value to return if option doesn't exist. Default false. 965 * @param bool $use_cache Whether to use cache. Multisite only. Default true. 950 966 * @return mixed Value set for the option. 951 967 */ … … 1040 1056 * @see add_option() 1041 1057 * 1058 * @global wpdb $wpdb 1059 * 1042 1060 * @param string $option Name of option to add. Expected to not be SQL-escaped. 1043 * @param mixed $valueOptional. Option value, can be anything. Expected to not be SQL-escaped.1061 * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped. 1044 1062 * @return bool False if option was not added and true if option was added. 1045 1063 */ … … 1128 1146 * 1129 1147 * @see delete_option() 1148 * 1149 * @global wpdb $wpdb 1130 1150 * 1131 1151 * @param string $option Name of option to remove. Expected to not be SQL-escaped. … … 1193 1213 * @see update_option() 1194 1214 * 1215 * @global wpdb $wpdb 1216 * 1195 1217 * @param string $option Name of option. Expected to not be SQL-escaped. 1196 * @param mixed $valueOption value. Expected to not be SQL-escaped.1218 * @param mixed $value Option value. Expected to not be SQL-escaped. 1197 1219 * @return bool False if value was not updated and true if value was updated. 1198 1220 */
Note: See TracChangeset
for help on using the changeset viewer.