X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/16b9f61a8ab25bd6c9fbfd0cea00c7bda22f6a71..a5227bf01edbe6660486c9f5c0f0ed7b7fea3130:/wp-admin/theme-editor.php diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 1d1b95ab..72cb117d 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -7,14 +7,28 @@ */ /** WordPress Administration Bootstrap */ -require_once('admin.php'); +require_once('./admin.php'); if ( !current_user_can('edit_themes') ) - wp_die('

'.__('You do not have sufficient permissions to edit templates for this blog.').'

'); + wp_die('

'.__('You do not have sufficient permissions to edit templates for this site.').'

'); $title = __("Edit Themes"); $parent_file = 'themes.php'; +$help = '

' . __('You can use the Theme Editor to edit the individual CSS and PHP files which make up your theme.') . '

'; +$help .= '

' . __('Begin by choosing a theme to edit from the dropdown menu and clicking Select. A list then appears of all the template files. Clicking once on any file name causes the file to appear in the large Editor box.') . '

'; +$help .= '

' . __('For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Lookup takes you to a web page with reference material about that particular function.') . '

'; +$help .= '

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

'; +$help .= '

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

'; +$help .= '

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

'; +$help .= '

' . __('For more information:') . '

'; +$help .= '

' . __('Documentation on Theme Development') . '

'; +$help .= '

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

'; +$help .= '

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

'; +$help .= '

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

'; +$help .= '

' . __('Support Forums') . '

'; +add_contextual_help($current_screen, $help); + wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme', 'dir')); wp_admin_css( 'theme-editor' ); @@ -37,9 +51,9 @@ if (empty($file)) { } else { $file = stripslashes($file); if ( 'theme' == $dir ) { - $file = dirname(dirname($themes[$theme]['Template Dir'])) . $file ; + $file = dirname(dirname($themes[$theme]['Template Dir'])) . $file ; } else if ( 'style' == $dir) { - $file = dirname(dirname($themes[$theme]['Stylesheet Dir'])) . $file ; + $file = dirname(dirname($themes[$theme]['Stylesheet Dir'])) . $file ; } } @@ -79,7 +93,7 @@ break; default: - require_once('admin-header.php'); + require_once('./admin-header.php'); update_recently_edited($file); @@ -102,12 +116,11 @@ default: } $content = htmlspecialchars( $content ); - $codepress_lang = codepress_get_lang($file); } ?> -

+

$description (
-

-

+

-

+