X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be15bd505d66a91e2c80062190b13e315a04a9..849f15aeed7a5e39314057bdc0064d8edd60dd7d:/wp-admin/theme-editor.php diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 8f95cab1..d0ecee48 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -7,7 +7,7 @@ */ /** WordPress Administration Bootstrap */ -require_once('./admin.php'); +require_once( dirname( __FILE__ ) . '/admin.php' ); if ( is_multisite() && ! is_network_admin() ) { wp_redirect( network_admin_url( 'theme-editor.php' ) ); @@ -30,7 +30,7 @@ get_current_screen()->add_help_tab( array(

' . __('In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key.') . '

' . __('After typing in your edits, click Update File.') . '

' . __('Advice: think very carefully about your site crashing if you are live-editing the theme currently in use.') . '

-

' . __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a child theme instead.') . '

' . +

' . sprintf( __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a child theme instead.'), __('http://codex.wordpress.org/Child_Themes') ) . '

' . ( is_network_admin() ? '

' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '

' : '' ) ) ); @@ -40,7 +40,7 @@ get_current_screen()->set_help_sidebar( '

' . __('Documentation on Using Themes') . '

' . '

' . __('Documentation on Editing Files') . '

' . '

' . __('Documentation on Template Tags') . '

' . - '

' . __('Support Forums') . '

' + '

' . __('Support Forums') . '

' ); wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) ); @@ -81,7 +81,7 @@ case 'update': $newcontent = wp_unslash( $_POST['newcontent'] ); $location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto; if ( is_writeable( $file ) ) { - //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable + // is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable $f = fopen( $file, 'w+' ); if ( $f !== false ) { fwrite( $f, $newcontent ); @@ -92,7 +92,6 @@ case 'update': } wp_redirect( $location ); exit; -break; default: @@ -122,8 +121,7 @@ default: $content = esc_textarea( $content ); } - ?> - + if ( isset( $_GET['updated'] ) ) : ?>

(' . $file_show . ')'; ?>
-