142 if ( is_rtl() ) { |
142 if ( is_rtl() ) { |
143 $body_class .= ' rtl'; |
143 $body_class .= ' rtl'; |
144 } |
144 } |
145 $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) ); |
145 $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) ); |
146 |
146 |
|
147 if ( wp_use_widgets_block_editor() ) { |
|
148 $body_class .= ' wp-embed-responsive'; |
|
149 } |
|
150 |
147 $admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading…' ) ); |
151 $admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading…' ) ); |
148 |
152 |
149 ?> |
153 ?> |
150 <title><?php echo esc_html( $admin_title ); ?></title> |
154 <title><?php echo esc_html( $admin_title ); ?></title> |
151 |
155 |
182 <form id="customize-controls" class="wrap wp-full-overlay-sidebar"> |
186 <form id="customize-controls" class="wrap wp-full-overlay-sidebar"> |
183 <div id="customize-header-actions" class="wp-full-overlay-header"> |
187 <div id="customize-header-actions" class="wp-full-overlay-header"> |
184 <?php |
188 <?php |
185 $compatible_wp = is_wp_version_compatible( $wp_customize->theme()->get( 'RequiresWP' ) ); |
189 $compatible_wp = is_wp_version_compatible( $wp_customize->theme()->get( 'RequiresWP' ) ); |
186 $compatible_php = is_php_version_compatible( $wp_customize->theme()->get( 'RequiresPHP' ) ); |
190 $compatible_php = is_php_version_compatible( $wp_customize->theme()->get( 'RequiresPHP' ) ); |
|
191 $fse_safe = true; |
|
192 |
|
193 // Check if the theme requires the Gutenberg plugin to work correctly. |
|
194 $theme_tags = $wp_customize->theme()->get( 'Tags' ); |
|
195 |
|
196 if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! function_exists( 'gutenberg_is_fse_theme' ) ) { |
|
197 $fse_safe = false; |
|
198 } |
187 ?> |
199 ?> |
188 <?php if ( $compatible_wp && $compatible_php ) : ?> |
200 <?php if ( $compatible_wp && $compatible_php && $fse_safe ) : ?> |
189 <?php $save_text = $wp_customize->is_theme_active() ? __( 'Publish' ) : __( 'Activate & Publish' ); ?> |
201 <?php $save_text = $wp_customize->is_theme_active() ? __( 'Publish' ) : __( 'Activate & Publish' ); ?> |
190 <div id="customize-save-button-wrapper" class="customize-save-button-wrapper" > |
202 <div id="customize-save-button-wrapper" class="customize-save-button-wrapper" > |
191 <?php submit_button( $save_text, 'primary save', 'save', false ); ?> |
203 <?php submit_button( $save_text, 'primary save', 'save', false ); ?> |
192 <button id="publish-settings" class="publish-settings button-primary button dashicons dashicons-admin-generic" aria-label="<?php esc_attr_e( 'Publish Settings' ); ?>" aria-expanded="false" disabled></button> |
204 <button id="publish-settings" class="publish-settings button-primary button dashicons dashicons-admin-generic" aria-label="<?php esc_attr_e( 'Publish Settings' ); ?>" aria-expanded="false" disabled></button> |
193 </div> |
205 </div> |
240 </div> |
252 </div> |
241 </div> |
253 </div> |
242 </div> |
254 </div> |
243 |
255 |
244 <div id="customize-footer-actions" class="wp-full-overlay-footer"> |
256 <div id="customize-footer-actions" class="wp-full-overlay-footer"> |
245 <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php echo esc_attr( _x( 'Hide Controls', 'label for hide controls button without length constraints' ) ); ?>"> |
257 <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php echo esc_attr_x( 'Hide Controls', 'label for hide controls button without length constraints' ); ?>"> |
246 <span class="collapse-sidebar-arrow"></span> |
258 <span class="collapse-sidebar-arrow"></span> |
247 <span class="collapse-sidebar-label"><?php _ex( 'Hide Controls', 'short (~12 characters) label for hide controls button' ); ?></span> |
259 <span class="collapse-sidebar-label"><?php _ex( 'Hide Controls', 'short (~12 characters) label for hide controls button' ); ?></span> |
248 </button> |
260 </button> |
249 <?php $previewable_devices = $wp_customize->get_previewable_devices(); ?> |
261 <?php $previewable_devices = $wp_customize->get_previewable_devices(); ?> |
250 <?php if ( ! empty( $previewable_devices ) ) : ?> |
262 <?php if ( ! empty( $previewable_devices ) ) : ?> |