220 ?> |
220 ?> |
221 </h2> |
221 </h2> |
222 </div> |
222 </div> |
223 <div class="alignright"> |
223 <div class="alignright"> |
224 <form action="theme-editor.php" method="get"> |
224 <form action="theme-editor.php" method="get"> |
225 <strong><label for="theme"><?php _e( 'Select theme to edit:' ); ?> </label></strong> |
225 <label for="theme" id="theme-plugin-editor-selector"><?php _e( 'Select theme to edit:' ); ?> </label> |
226 <select name="theme" id="theme"> |
226 <select name="theme" id="theme"> |
227 <?php |
227 <?php |
228 foreach ( wp_get_themes( array( 'errors' => null ) ) as $a_stylesheet => $a_theme ) { |
228 foreach ( wp_get_themes( array( 'errors' => null ) ) as $a_stylesheet => $a_theme ) { |
229 if ( $a_theme->errors() && 'theme_no_stylesheet' === $a_theme->errors()->get_error_code() ) { |
229 if ( $a_theme->errors() && 'theme_no_stylesheet' === $a_theme->errors()->get_error_code() ) { |
230 continue; |
230 continue; |
299 <div> |
299 <div> |
300 <div class="editor-notices"> |
300 <div class="editor-notices"> |
301 <?php if ( is_child_theme() && $theme->get_stylesheet() === get_template() ) : ?> |
301 <?php if ( is_child_theme() && $theme->get_stylesheet() === get_template() ) : ?> |
302 <div class="notice notice-warning inline"> |
302 <div class="notice notice-warning inline"> |
303 <p> |
303 <p> |
304 <?php if ( is_writeable( $file ) ) : ?> |
304 <?php if ( is_writable( $file ) ) : ?> |
305 <strong><?php _e( 'Caution:' ); ?></strong> |
305 <strong><?php _e( 'Caution:' ); ?></strong> |
306 <?php endif; ?> |
306 <?php endif; ?> |
307 <?php _e( 'This is a file in your current parent theme.' ); ?> |
307 <?php _e( 'This is a file in your current parent theme.' ); ?> |
308 </p> |
308 </p> |
309 </div> |
309 </div> |
310 <?php endif; ?> |
310 <?php endif; ?> |
311 </div> |
311 </div> |
312 <?php if ( is_writeable( $file ) ) : ?> |
312 <?php if ( is_writable( $file ) ) : ?> |
313 <p class="submit"> |
313 <p class="submit"> |
314 <?php submit_button( __( 'Update File' ), 'primary', 'submit', false ); ?> |
314 <?php submit_button( __( 'Update File' ), 'primary', 'submit', false ); ?> |
315 <span class="spinner"></span> |
315 <span class="spinner"></span> |
316 </p> |
316 </p> |
317 <?php else : ?> |
317 <?php else : ?> |
318 <p><em> |
318 <p> |
319 <?php |
319 <?php |
320 printf( |
320 printf( |
321 /* translators: %s: Documentation URL. */ |
321 /* translators: %s: Documentation URL. */ |
322 __( 'You need to make this file writable before you can save your changes. See <a href="%s">Changing File Permissions</a> for more information.' ), |
322 __( 'You need to make this file writable before you can save your changes. See <a href="%s">Changing File Permissions</a> for more information.' ), |
323 __( 'https://wordpress.org/support/article/changing-file-permissions/' ) |
323 __( 'https://wordpress.org/support/article/changing-file-permissions/' ) |
324 ); |
324 ); |
325 ?> |
325 ?> |
326 </em></p> |
326 </p> |
327 <?php endif; ?> |
327 <?php endif; ?> |
328 </div> |
328 </div> |
329 |
329 |
330 <?php wp_print_file_editor_templates(); ?> |
330 <?php wp_print_file_editor_templates(); ?> |
331 </form> |
331 </form> |