Make WordPress Core


Ignore:
Timestamp:
02/21/2009 02:12:00 AM (18 years ago)
Author:
azaozz
Message:

Add CodePress syntax highlighting to Theme and Plugin editors (first run), props beaulebens, see #9173

File:
1 edited

Legend:

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

    r10607 r10614  
    7878                wp_die('<p>'.__('You do not have sufficient permissions to edit themes for this blog.').'</p>');
    7979
     80        wp_enqueue_script( 'codepress' );
     81        add_action( 'admin_print_footer_scripts', 'codepress_footer_js' );
    8082        require_once('admin-header.php');
    8183
    … …  
    101103
    102104                $content = htmlspecialchars( $content );
     105                $codepress_lang = codepress_get_lang($real_file);
    103106        }
    104107
    … …  
    195198        <form name="template" id="template" action="theme-editor.php" method="post">
    196199        <?php wp_nonce_field('edit-theme_' . $file . $theme) ?>
    197                  <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>
     200                 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
    198201                 <input type="hidden" name="action" value="update" />
    199202                 <input type="hidden" name="file" value="<?php echo $file ?>" />
Note: See TracChangeset for help on using the changeset viewer.