Changeset 20295 for trunk/wp-includes/customize-controls.php
- Timestamp:
- 03/28/2012 04:14:09 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/customize-controls.php
r20276 r20295 96 96 $settings = array( 97 97 'preview' => esc_url( home_url( '/', $scheme ) ), 98 'settings' => array(), 98 99 'controls' => array(), 99 100 'prefix' => WP_Customize_Setting::name_prefix, … … 101 102 102 103 foreach ( $this->settings as $id => $setting ) { 103 $settings[' controls'][ $id ] = array(104 $settings['settings'][ $id ] = array( 104 105 'value' => $setting->value(), 105 'control' => $setting->control,106 'params' => $setting->control_params,107 106 ); 107 } 108 108 109 if ( $setting->visibility ) { 110 if ( is_string( $setting->visibility ) ) { 109 foreach ( $this->controls as $id => $control ) { 110 $settings['controls'][ $id ] = $control->json(); 111 112 if ( $control->visibility ) { 113 if ( is_string( $control->visibility ) ) { 111 114 $settings['controls'][ $id ]['visibility'] = array( 112 'id' => $ setting->visibility,115 'id' => $control->visibility, 113 116 'value' => true, 114 117 ); 115 118 } else { 116 119 $settings['controls'][ $id ]['visibility'] = array( 117 'id' => $ setting->visibility[0],118 'value' => $ setting->visibility[1],120 'id' => $control->visibility[0], 121 'value' => $control->visibility[1], 119 122 ); 120 123 }
Note: See TracChangeset
for help on using the changeset viewer.