Changeset 42343 for trunk/src/wp-admin/customize.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/customize.php
r42150 r42343 52 52 * By opening an Ajax request, this is avoided and the changeset is published. See #39221. 53 53 */ 54 $nonces = $wp_customize->get_nonces();54 $nonces = $wp_customize->get_nonces(); 55 55 $request_args = array( 56 'nonce' => $nonces['save'],57 'customize_changeset_uuid' => $wp_customize->changeset_uuid(),58 'wp_customize' => 'on',56 'nonce' => $nonces['save'], 57 'customize_changeset_uuid' => $wp_customize->changeset_uuid(), 58 'wp_customize' => 'on', 59 59 'customize_changeset_status' => 'publish', 60 60 ); … … 97 97 } 98 98 99 $registered = $wp_scripts->registered;100 $wp_scripts = new WP_Scripts;99 $registered = $wp_scripts->registered; 100 $wp_scripts = new WP_Scripts; 101 101 $wp_scripts->registered = $registered; 102 102 103 add_action( 'customize_controls_print_scripts', 104 add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts' 105 add_action( 'customize_controls_print_styles', 103 add_action( 'customize_controls_print_scripts', 'print_head_scripts', 20 ); 104 add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts' ); 105 add_action( 'customize_controls_print_styles', 'print_admin_styles', 20 ); 106 106 107 107 /** … … 124 124 125 125 // Let's roll. 126 @header( 'Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));126 @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); 127 127 128 128 wp_user_settings(); … … 134 134 $body_class .= ' mobile'; 135 135 136 ?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=1.2" /><?php 136 ?> 137 <meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=1.2" /> 138 <?php 137 139 endif; 138 140 … … 148 150 $admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading…' ) ); 149 151 150 ?><title><?php echo $admin_title; ?></title> 152 ?> 153 <title><?php echo $admin_title; ?></title> 151 154 152 155 <script type="text/javascript"> … … 203 206 <div id="customize-info" class="accordion-section customize-info"> 204 207 <div class="accordion-section-title"> 205 <span class="preview-notice"><?php 208 <span class="preview-notice"> 209 <?php 206 210 echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name', 'display' ) . '</strong>' ); 207 ?></span> 211 ?> 212 </span> 208 213 <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button> 209 214 </div> 210 <div class="customize-panel-description"><?php 215 <div class="customize-panel-description"> 216 <?php 211 217 _e( 'The Customizer allows you to preview changes to your site before publishing them. You can navigate to different pages on your site within the preview. Edit shortcuts are shown for some editable elements.' ); 212 ?></div> 218 ?> 219 </div> 213 220 </div> 214 221 … … 234 241 } 235 242 $active = ! empty( $settings['default'] ); 236 $class = 'preview-' . $device;243 $class = 'preview-' . $device; 237 244 if ( $active ) { 238 245 $class .= ' active'; 239 246 } 240 247 ?> 241 <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ) ?>" data-device="<?php echo esc_attr( $device ); ?>">248 <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ); ?>" data-device="<?php echo esc_attr( $device ); ?>"> 242 249 <span class="screen-reader-text"><?php echo esc_html( $settings['label'] ); ?></span> 243 250 </button>
Note: See TracChangeset
for help on using the changeset viewer.