2007. 7. 10. 15:12

WordPress Code Highlight Plugin

PHP:
  1. <!--p<br--> /*
  2. Plugin Name: CodeHighlight
  3. Plugin URI:
  4. <a href="http://www.chroder.com/archives/2005/04/16/wordpress-codehighlight-plugin/">http://www.chroder.com/archives/2005/04/16/wordpress-codehighlight-plugin/</a>
  5. Description: Adds syntax highlighting to your code, or simply allows you to post
  6. workable code not affected by the WordPress text replacement features.
  7. Version: 1.0 Beta 3.1.1
  8. Author: Chroder
  9. Author URI: <a href="http://www.chroder.com/">http://www.chroder.com/</a>
  10. */
  11.  
  12. //===========================================================
  13. // Get the PEAR path, and include the highlighter
  14. //===========================================================
  15.  
  16. $pear_dir = ABSPATH . 'wp-content/plugins/CodeHighlight/PEAR';
  17.  
  18. if(is_dir($pear_dir))
  19.     ini_set("include_path", ini_get("include_path") . PATH_SEPARATOR . $pear_dir);
  20.  
  21. require_once 'Text/Highlighter.php';
  22.  
  23. ?&gt;