Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/theme-editor.php

    r11673 r11530  
    2323} else {
    2424    $theme = stripslashes($theme);
    25 }
     25 }
     26
    2627
    2728if ( ! isset($themes[$theme]) )
     
    6566
    6667    $location = wp_kses_no_null($location);
    67     $strip = array('%0d', '%0a', '%0D', '%0A');
    68     $location = _deep_replace($strip, $location);
     68    $strip = array('%0d', '%0a');
     69    $location = str_replace($strip, '', $location);
    6970    header("Location: $location");
    7071    exit();
     
    7677    if ( !current_user_can('edit_themes') )
    7778        wp_die('<p>'.__('You do not have sufficient permissions to edit themes for this blog.').'</p>');
     79
     80    if ( use_codepress() )
     81        wp_enqueue_script( 'codepress' );
    7882
    7983    require_once('admin-header.php');
     
    114118<?php screen_icon(); ?>
    115119<h2><?php echo esc_html( $title ); ?></h2>
    116 
    117 <div class="fileedit-sub">
    118 <div class="alignleft">
    119 <big><?php echo sprintf($desc_header, $file_show); ?></big>
    120 </div>
    121 <div class="alignright">
    122     <form action="theme-editor.php" method="post">
     120<div class="bordertitle">
     121    <form id="themeselector" action="theme-editor.php" method="post">
    123122        <strong><label for="theme"><?php _e('Select theme to edit:'); ?> </label></strong>
    124123        <select name="theme" id="theme">
     
    136135    </form>
    137136</div>
     137<div class="tablenav">
     138<div class="alignleft">
     139<big><?php echo sprintf($desc_header, $file_show); ?></big>
     140</div>
    138141<br class="clear" />
    139142</div>
    140 
    141 <div id="templateside">
    142     <h3><?php _e("Theme Files"); ?></h3>
     143<br class="clear" />
     144    <div id="templateside">
     145    <h3 id="bordertitle"><?php _e("Theme Files"); ?></h3>
    143146
    144147<?php
     
    191194<?php endif; ?>
    192195</div>
    193 
    194 <?php if (!$error) { ?>
    195 <form name="template" id="template" action="theme-editor.php" method="post">
     196    <?php
     197    if (!$error) {
     198    ?>
     199    <form name="template" id="template" action="theme-editor.php" method="post">
    196200    <?php wp_nonce_field('edit-theme_' . $file . $theme) ?>
    197201         <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
     
    219223<?php endif; ?>
    220224        </div>
    221 </form>
    222 <?php
     225    </form>
     226    <?php
    223227    } else {
    224228        echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>';
    225229    }
    226 ?>
    227 <br class="clear" />
     230    ?>
     231<div class="clear"> &nbsp; </div>
    228232</div>
    229233<?php
     
    231235}
    232236
    233 include("admin-footer.php");
     237include("admin-footer.php") ?>
Note: See TracChangeset for help on using the changeset viewer.