Make WordPress Core


Ignore:
Timestamp:
02/21/2009 02:12:00 AM (17 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/plugin-editor.php

    r10607 r10614  
    7575    }
    7676
     77    wp_enqueue_script( 'codepress' );
     78    add_action( 'admin_print_footer_scripts', 'codepress_footer_js' );
    7779    require_once('admin-header.php');
    7880
     
    9799       
    98100        $content = htmlspecialchars( $content );
     101        $codepress_lang = codepress_get_lang($real_file);
    99102    }
    100103
     
    146149    <form name="template" id="template" action="plugin-editor.php" method="post">
    147150    <?php wp_nonce_field('edit-plugin_' . $file) ?>
    148         <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>
     151        <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
    149152        <input type="hidden" name="action" value="update" />
    150153        <input type="hidden" name="file" value="<?php echo $file ?>" />
Note: See TracChangeset for help on using the changeset viewer.