Changeset 31628 for trunk/src/wp-includes/option.php
- Timestamp:
- 03/05/2015 07:13:00 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r31473 r31628 222 222 * 223 223 * @since 1.0.0 224 * 225 * @param string $option Option name. Expected to not be SQL-escaped. 226 * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. 224 * @since 4.2.0 The `$autoload` parameter was added. 225 * 226 * @param string $option Option name. Expected to not be SQL-escaped. 227 * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. 228 * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. Accepts 'yes' or true to 229 * enable, 'no' or false to disable. Default is enabled. 227 230 * @return bool False if value was not updated and true if value was updated. 228 231 */ 229 function update_option( $option, $value ) {232 function update_option( $option, $value, $autoload = 'yes' ) { 230 233 global $wpdb; 231 234 … … 270 273 271 274 /** This filter is documented in wp-includes/option.php */ 272 if ( apply_filters( 'default_option_' . $option, false ) === $old_value ) 273 return add_option( $option, $value ); 275 if ( apply_filters( 'default_option_' . $option, false ) === $old_value ) { 276 return add_option( $option, $value, '', $autoload ); 277 } 274 278 275 279 $serialized_value = maybe_serialize( $value );
Note: See TracChangeset
for help on using the changeset viewer.