Changeset 41859 for trunk/src/wp-admin/theme-editor.php
- Timestamp:
- 10/13/2017 08:55:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/theme-editor.php
r41851 r41859 291 291 $dismissed_pointers = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ); 292 292 if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) : 293 // Get a back URL 294 $referer = wp_get_referer(); 295 $excluded_referer_basenames = array( 'theme-editor.php', 'wp-login.php' ); 296 297 if ( $referer && ! in_array( basename( parse_url( $referer, PHP_URL_PATH ) ), $excluded_referer_basenames, true ) ) { 298 $return_url = $referer; 299 } else { 300 $return_url = admin_url( '/' ); 301 } 293 302 ?> 294 303 <div id="file-editor-warning" class="notification-dialog-wrap file-editor-warning hide-if-no-js"> … … 301 310 echo sprintf( 302 311 /* translators: %s is a link to Custom CSS section in the Customizer. */ 303 __( 'You appear to be making direct edits to your theme in the WordPress Dashboard. We recommend that you don’t! Editing this code directly is dangerous, and can leave you unable to log back in to WordPress and undo changes. There’s no need to change your CSS here — you can edit and live preview CSS changes in WordPress’s <a href="%s">built in CSS editor</a>.' ),312 __( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing this code directly is dangerous, and can leave you unable to log back in to WordPress and undo changes. There’s no need to change your CSS here — you can edit and live preview CSS changes in WordPress’s <a href="%s">built in CSS editor</a>.' ), 304 313 esc_url( add_query_arg( 'autofocus[section]', 'custom_css', admin_url( 'customize.php' ) ) ) 305 314 ); … … 307 316 </p> 308 317 <p><?php _e( 'If you decide to go ahead with direct edits anyway, make sure to back up all your site’s files before making changes so you can restore a functional version if something goes wrong.' ); ?></p> 309 <p><button type="button" class="file-editor-warning-dismiss button-primary"><?php _e( 'I understand' ); ?></button></p> 318 <p> 319 <a class="button file-editor-warning-go-back" href="<?php echo esc_url( $return_url ); ?>"><?php _e( 'Go back' ); ?></a> 320 <button type="button" class="file-editor-warning-dismiss button button-primary"><?php _e( 'I understand' ); ?></button> 321 </p> 310 322 </div> 311 323 </div>
Note: See TracChangeset
for help on using the changeset viewer.