Changeset 56177 for trunk/src/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 07/09/2023 08:15:03 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r55990 r56177 272 272 } 273 273 274 // The theme and messenger_channel should be supplied via $args, 275 // but they are also looked at in the $_REQUEST global here for back-compat. 274 /* 275 * The theme and messenger_channel should be supplied via $args, 276 * but they are also looked at in the $_REQUEST global here for back-compat. 277 */ 276 278 if ( ! isset( $args['theme'] ) ) { 277 279 if ( isset( $_REQUEST['customize_theme'] ) ) { … … 566 568 add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ) ); 567 569 } else { 568 // If the requested theme is not the active theme and the user doesn't have 569 // the switch_themes cap, bail. 570 /* 571 * If the requested theme is not the active theme and the user doesn't have 572 * the switch_themes cap, bail. 573 */ 570 574 if ( ! current_user_can( 'switch_themes' ) ) { 571 575 $this->wp_die( -1, __( 'Sorry, you are not allowed to edit theme options on this site.' ) ); … … 906 910 public function wp_loaded() { 907 911 908 // Unconditionally register core types for panels, sections, and controls 909 // in case plugin unhooks all customize_register actions. 912 /* 913 * Unconditionally register core types for panels, sections, and controls 914 * in case plugin unhooks all customize_register actions. 915 */ 910 916 $this->register_panel_type( 'WP_Customize_Panel' ); 911 917 $this->register_panel_type( 'WP_Customize_Themes_Panel' ); … … 5270 5276 ); 5271 5277 5272 // Input type: checkbox. 5273 // With custom value. 5278 // Input type: checkbox, with custom value. 5274 5279 $this->add_control( 5275 5280 'display_header_text', … … 5294 5299 ); 5295 5300 5296 // Input type: color. 5297 // With sanitize_callback. 5301 // Input type: color, with sanitize_callback. 5298 5302 $this->add_setting( 5299 5303 'background_color', … … 5603 5607 ); 5604 5608 5605 // If the theme is using the default background callback, we can update 5606 // the background CSS using postMessage. 5609 /* 5610 * If the theme is using the default background callback, we can update 5611 * the background CSS using postMessage. 5612 */ 5607 5613 if ( get_theme_support( 'custom-background', 'wp-head-callback' ) === '_custom_background_cb' ) { 5608 5614 foreach ( array( 'color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment' ) as $prop ) {
Note: See TracChangeset
for help on using the changeset viewer.