Ticket #33499: 33499.patch
File 33499.patch, 1.4 KB (added by , 9 years ago) |
---|
-
src/wp-includes/class-wp-customize-setting.php
355 355 * @return bool The result of saving the value. 356 356 */ 357 357 protected function _update_option( $value ) { 358 /** 359 * Filter the `$autoload` parameter value to use when updating the option. 360 * 361 * The dynamic portion of the hook name, `$this->id_date['base']`, 362 * refers to the base slug of the setting name. 363 * 364 * @see update_option(). 365 * 366 * @since x.y.z 367 * 368 * @param mixed $autoload The parameter value. Default null. 369 */ 370 $autoload = apply_filters( 'customize_autoload_' . $this->id_data['base'], null ); 371 358 372 // Handle non-array option. 359 373 if ( empty( $this->id_data[ 'keys' ] ) ) 360 return update_option( $this->id_data[ 'base' ], $value );374 return update_option( $this->id_data[ 'base' ], $value, $autoload ); 361 375 362 376 // Handle array-based options. 363 377 $options = get_option( $this->id_data[ 'base' ] ); 364 378 $options = $this->multidimensional_replace( $options, $this->id_data[ 'keys' ], $value ); 365 379 if ( isset( $options ) ) 366 return update_option( $this->id_data[ 'base' ], $options );380 return update_option( $this->id_data[ 'base' ], $options, $autoload ); 367 381 } 368 382 369 383 /**