Changeset 48320
- Timestamp:
- 07/05/2020 02:44:37 PM (5 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r48200 r48320 399 399 * @param string $option Name of option to add. Expected to not be SQL-escaped. 400 400 * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped. 401 * @return bool False if option was not added and true if option was added.401 * @return bool True if the option was added, false otherwise. 402 402 */ 403 403 function add_blog_option( $id, $option, $value ) { … … 426 426 * @param int $id A blog ID. Can be null to refer to the current blog. 427 427 * @param string $option Name of option to remove. Expected to not be SQL-escaped. 428 * @return bool True , if option is successfully deleted. False on failure.428 * @return bool True if the option was deleted, false otherwise. 429 429 */ 430 430 function delete_blog_option( $id, $option ) { … … 455 455 * @param mixed $value The option value. 456 456 * @param mixed $deprecated Not used. 457 * @return bool True on success, false on failure.457 * @return bool True if the value was updated, false otherwise. 458 458 */ 459 459 function update_blog_option( $id, $option, $value, $deprecated = null ) { -
trunk/src/wp-includes/option.php
r48193 r48320 24 24 * @global wpdb $wpdb WordPress database abstraction object. 25 25 * 26 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped.26 * @param string $option Name of the option to retrieve. Expected to not be SQL-escaped. 27 27 * @param mixed $default Optional. Default value to return if the option does not exist. 28 28 * @return mixed Value set for the option. … … 298 298 * @global wpdb $wpdb WordPress database abstraction object. 299 299 * 300 * @param string $option Option name. Expected to not be SQL-escaped.300 * @param string $option Name of the option to update. Expected to not be SQL-escaped. 301 301 * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. 302 302 * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. For existing options, … … 304 304 * Accepts 'yes'|true to enable or 'no'|false to disable. For non-existent options, 305 305 * the default value is 'yes'. Default null. 306 * @return bool False if value was not updated and true if value was updated.306 * @return bool True if the value was updated, false otherwise. 307 307 */ 308 308 function update_option( $option, $value, $autoload = null ) { … … 458 458 * @global wpdb $wpdb WordPress database abstraction object. 459 459 * 460 * @param string $option Name of option to add. Expected to not be SQL-escaped.460 * @param string $option Name of the option to add. Expected to not be SQL-escaped. 461 461 * @param mixed $value Optional. Option value. Must be serializable if non-scalar. 462 462 * Expected to not be SQL-escaped. … … 464 464 * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. 465 465 * Default is enabled. Accepts 'no' to disable for legacy reasons. 466 * @return bool False if option was not added and true if option was added.466 * @return bool True if the option was added, false otherwise. 467 467 */ 468 468 function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) { … … 566 566 * @global wpdb $wpdb WordPress database abstraction object. 567 567 * 568 * @param string $option Name of option to remove. Expected to not be SQL-escaped.569 * @return bool True , if option is successfully deleted. False on failure.568 * @param string $option Name of the option to delete. Expected to not be SQL-escaped. 569 * @return bool True if the option was deleted, false otherwise. 570 570 */ 571 571 function delete_option( $option ) { … … 642 642 * 643 643 * @param string $transient Transient name. Expected to not be SQL-escaped. 644 * @return bool true if successful, false otherwise644 * @return bool True if the transient was deleted, false otherwise. 645 645 */ 646 646 function delete_transient( $transient ) { … … 769 769 * Expected to not be SQL-escaped. 770 770 * @param int $expiration Optional. Time until expiration in seconds. Default 0 (no expiration). 771 * @return bool False if value was not set and true if value was set.771 * @return bool True if the value was set, false otherwise. 772 772 */ 773 773 function set_transient( $transient, $value, $expiration = 0 ) { … … 991 991 * @param string $name The name of the setting. 992 992 * @param string $default Optional default value to return when $name is not set. 993 * @return mixed the last saved user setting or the default value/false if it doesn't exist.993 * @return mixed The last saved user setting or the default value/false if it doesn't exist. 994 994 */ 995 995 function get_user_setting( $name, $default = false ) { … … 1010 1010 * @param string $name The name of the setting. 1011 1011 * @param string $value The value for the setting. 1012 * @return bool|null True if set successfully, false if not. Null if the current user can't be established. 1012 * @return bool|null True if set successfully, false otherwise. 1013 * Null if the current user is not a member of the site. 1013 1014 */ 1014 1015 function set_user_setting( $name, $value ) { … … 1033 1034 * 1034 1035 * @param string $names The name or array of names of the setting to be deleted. 1035 * @return bool|null True if deleted successfully, false if not. Null if the current user can't be established. 1036 * @return bool|null True if deleted successfully, false otherwise. 1037 * Null if the current user is not a member of the site. 1036 1038 */ 1037 1039 function delete_user_setting( $names ) { … … 1065 1067 * @global array $_updated_user_settings 1066 1068 * 1067 * @return array the last saved user settings or empty array.1069 * @return array The last saved user settings or empty array. 1068 1070 */ 1069 1071 function get_all_user_settings() { … … 1108 1110 * 1109 1111 * @param array $user_settings User settings. 1110 * @return bool|null False if the current user can't be found, null if the current1111 * user is not a super admin or a member of the site, otherwise true.1112 * @return bool|null True if set successfully, false if the current user could not be found. 1113 * Null if the current user is not a member of the site. 1112 1114 */ 1113 1115 function wp_set_all_user_settings( $user_settings ) { … … 1166 1168 * @see get_network_option() 1167 1169 * 1168 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped.1169 * @param mixed $default Optional value to return ifoption doesn't exist. Default false.1170 * @param string $option Name of the option to retrieve. Expected to not be SQL-escaped. 1171 * @param mixed $default Optional. Value to return if the option doesn't exist. Default false. 1170 1172 * @param bool $deprecated Whether to use cache. Multisite only. Always set to true. 1171 1173 * @return mixed Value set for the option. … … 1185 1187 * @see add_network_option() 1186 1188 * 1187 * @param string $option Name of option to add. Expected to not be SQL-escaped.1189 * @param string $option Name of the option to add. Expected to not be SQL-escaped. 1188 1190 * @param mixed $value Option value, can be anything. Expected to not be SQL-escaped. 1189 * @return bool False if the option was not added. True if the option was added.1191 * @return bool True if the option was added, false otherwise. 1190 1192 */ 1191 1193 function add_site_option( $option, $value ) { … … 1201 1203 * @see delete_network_option() 1202 1204 * 1203 * @param string $option Name of option to remove. Expected to not be SQL-escaped.1204 * @return bool True , if succeed. False, if failure.1205 * @param string $option Name of the option to delete. Expected to not be SQL-escaped. 1206 * @return bool True if the option was deleted, false otherwise. 1205 1207 */ 1206 1208 function delete_site_option( $option ) { … … 1216 1218 * @see update_network_option() 1217 1219 * 1218 * @param string $option Name of option. Expected to not be SQL-escaped.1220 * @param string $option Name of the option. Expected to not be SQL-escaped. 1219 1221 * @param mixed $value Option value. Expected to not be SQL-escaped. 1220 * @return bool False if value was not updated. True if value was updated.1222 * @return bool True if the value was updated, false otherwise. 1221 1223 */ 1222 1224 function update_site_option( $option, $value ) { … … 1234 1236 * 1235 1237 * @param int $network_id ID of the network. Can be null to default to the current network ID. 1236 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped.1238 * @param string $option Name of the option to retrieve. Expected to not be SQL-escaped. 1237 1239 * @param mixed $default Optional. Value to return if the option doesn't exist. Default false. 1238 1240 * @return mixed Value set for the option. … … 1368 1370 * 1369 1371 * @param int $network_id ID of the network. Can be null to default to the current network ID. 1370 * @param string $option Name of option to add. Expected to not be SQL-escaped.1372 * @param string $option Name of the option to add. Expected to not be SQL-escaped. 1371 1373 * @param mixed $value Option value, can be anything. Expected to not be SQL-escaped. 1372 * @return bool False if option was not added and true if option was added.1374 * @return bool True if the option was added, false otherwise. 1373 1375 */ 1374 1376 function add_network_option( $network_id, $option, $value ) { … … 1493 1495 * 1494 1496 * @param int $network_id ID of the network. Can be null to default to the current network ID. 1495 * @param string $option Name of option to remove. Expected to not be SQL-escaped.1496 * @return bool True , if succeed. False, if failure.1497 * @param string $option Name of the option to delete. Expected to not be SQL-escaped. 1498 * @return bool True if the option was deleted, false otherwise. 1497 1499 */ 1498 1500 function delete_network_option( $network_id, $option ) { … … 1586 1588 * 1587 1589 * @param int $network_id ID of the network. Can be null to default to the current network ID. 1588 * @param string $option Name of option. Expected to not be SQL-escaped.1590 * @param string $option Name of the option. Expected to not be SQL-escaped. 1589 1591 * @param mixed $value Option value. Expected to not be SQL-escaped. 1590 * @return bool False if value was not updated and true if value was updated.1592 * @return bool True if the value was updated, false otherwise. 1591 1593 */ 1592 1594 function update_network_option( $network_id, $option, $value ) { … … 1714 1716 * 1715 1717 * @param string $transient Transient name. Expected to not be SQL-escaped. 1716 * @return bool True if successful, false otherwise1718 * @return bool True if the transient was deleted, false otherwise. 1717 1719 */ 1718 1720 function delete_site_transient( $transient ) { … … 1842 1844 * @param mixed $value Transient value. Expected to not be SQL-escaped. 1843 1845 * @param int $expiration Optional. Time until expiration in seconds. Default 0 (no expiration). 1844 * @return bool False if value was not set and true if value was set.1846 * @return bool True if the value was set, false otherwise. 1845 1847 */ 1846 1848 function set_site_transient( $transient, $value, $expiration = 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.