Changeset 32658 for trunk/src/wp-admin/customize.php
- Timestamp:
- 05/30/2015 12:02:13 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/customize.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/customize.php
r32649 r32658 176 176 <?php 177 177 178 // Render control templates. 178 // Render Panel, Section, and Control templates. 179 $wp_customize->render_panel_templates(); 180 $wp_customize->render_section_templates(); 179 181 $wp_customize->render_control_templates(); 180 182 … … 260 262 // Prepare Customize Setting objects to pass to JavaScript. 261 263 foreach ( $wp_customize->settings() as $id => $setting ) { 262 $settings['settings'][ $id ] = array( 263 'value' => $setting->js_value(), 264 'transport' => $setting->transport, 265 'dirty' => $setting->dirty, 266 ); 264 if ( $setting->check_capabilities() ) { 265 $settings['settings'][ $id ] = array( 266 'value' => $setting->js_value(), 267 'transport' => $setting->transport, 268 'dirty' => $setting->dirty, 269 ); 270 } 267 271 } 268 272 269 273 // Prepare Customize Control objects to pass to JavaScript. 270 274 foreach ( $wp_customize->controls() as $id => $control ) { 271 $settings['controls'][ $id ] = $control->json(); 275 if ( $control->check_capabilities() ) { 276 $settings['controls'][ $id ] = $control->json(); 277 } 272 278 } 273 279 274 280 // Prepare Customize Section objects to pass to JavaScript. 275 281 foreach ( $wp_customize->sections() as $id => $section ) { 276 $settings['sections'][ $id ] = $section->json(); 282 if ( $section->check_capabilities() ) { 283 $settings['sections'][ $id ] = $section->json(); 284 } 277 285 } 278 286 279 287 // Prepare Customize Panel objects to pass to JavaScript. 280 foreach ( $wp_customize->panels() as $id => $panel ) { 281 $settings['panels'][ $id ] = $panel->json(); 282 foreach ( $panel->sections as $section_id => $section ) { 283 $settings['sections'][ $section_id ] = $section->json(); 288 foreach ( $wp_customize->panels() as $panel_id => $panel ) { 289 if ( $panel->check_capabilities() ) { 290 $settings['panels'][ $panel_id ] = $panel->json(); 291 foreach ( $panel->sections as $section_id => $section ) { 292 if ( $section->check_capabilities() ) { 293 $settings['sections'][ $section_id ] = $section->json(); 294 } 295 } 284 296 } 285 297 }
Note:
See TracChangeset
for help on using the changeset viewer.