Changeset 35305 for trunk/src/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 10/20/2015 09:18:04 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-setting.php
r35302 r35305 144 144 // Other setting types can opt-in to aggregate multidimensional explicitly. 145 145 $this->aggregate_multidimensional(); 146 147 // Allow option settings to indicate whether they should be autoloaded. 148 if ( 'option' === $this->type && isset( $args['autoload'] ) ) { 149 self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload'] = $args['autoload']; 150 } 146 151 } 147 152 } … … 174 179 */ 175 180 protected function aggregate_multidimensional() { 176 if ( empty( $this->id_data['keys'] ) ) {177 return;178 }179 180 181 $id_base = $this->id_data['base']; 181 182 if ( ! isset( self::$aggregated_multidimensionals[ $this->type ] ) ) { … … 189 190 ); 190 191 } 191 $this->is_multidimensional_aggregated = true; 192 193 if ( ! empty( $this->id_data['keys'] ) ) { 194 $this->is_multidimensional_aggregated = true; 195 } 192 196 } 193 197 … … 503 507 $id_base = $this->id_data['base']; 504 508 if ( 'option' === $this->type ) { 505 return update_option( $id_base, $value ); 509 $autoload = true; 510 if ( isset( self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload'] ) ) { 511 $autoload = self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload']; 512 } 513 return update_option( $id_base, $value, $autoload ); 506 514 } else if ( 'theme_mod' ) { 507 515 set_theme_mod( $id_base, $value );
Note: See TracChangeset
for help on using the changeset viewer.