Changeset 32535 for trunk/src/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 05/21/2015 10:04:29 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-setting.php
r32034 r32535 134 134 public function is_current_blog_previewed() { 135 135 if ( ! isset( $this->_previewed_blog_id ) ) { 136 return null;136 return; 137 137 } 138 138 return ( get_current_blog_id() === $this->_previewed_blog_id ); … … 276 276 * @since 3.4.0 277 277 * 278 * @param mixed$value The value to sanitize.279 * @return mixedNull if an input isn't valid, otherwise the sanitized value.278 * @param string|array $value The value to sanitize. 279 * @return string|array|null Null if an input isn't valid, otherwise the sanitized value. 280 280 */ 281 281 public function sanitize( $value ) { … … 332 332 * 333 333 * @param mixed $value The value to update. 334 * @return mixed The result of saving the value.335 334 */ 336 335 protected function _update_theme_mod( $value ) { 337 336 // Handle non-array theme mod. 338 if ( empty( $this->id_data[ 'keys' ] ) ) 339 return set_theme_mod( $this->id_data[ 'base' ], $value ); 340 337 if ( empty( $this->id_data[ 'keys' ] ) ) { 338 set_theme_mod( $this->id_data[ 'base' ], $value ); 339 return; 340 } 341 341 // Handle array-based theme mod. 342 342 $mods = get_theme_mod( $this->id_data[ 'base' ] ); 343 343 $mods = $this->multidimensional_replace( $mods, $this->id_data[ 'keys' ], $value ); 344 if ( isset( $mods ) ) 345 return set_theme_mod( $this->id_data[ 'base' ], $mods ); 344 if ( isset( $mods ) ) { 345 set_theme_mod( $this->id_data[ 'base' ], $mods ); 346 } 346 347 } 347 348 … … 352 353 * 353 354 * @param mixed $value The value to update. 354 * @return bool |nullThe result of saving the value.355 * @return bool The result of saving the value. 355 356 */ 356 357 protected function _update_option( $value ) {
Note: See TracChangeset
for help on using the changeset viewer.