Title: Syntax Highlighter Compress
Author: agmorpheus
Published: <strong>2010 年 4 月 24 日</strong>
Last modified: 2011 年 11 月 28 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/syntax-highlighter-compress.svg)

# Syntax Highlighter Compress

 作者：[agmorpheus](https://profiles.wordpress.org/agmorpheus/)

[下载](https://downloads.wordpress.org/plugin/syntax-highlighter-compress.zip)

 * [详情](https://cn.wordpress.org/plugins/syntax-highlighter-compress/#description)
 * [评价](https://cn.wordpress.org/plugins/syntax-highlighter-compress/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/syntax-highlighter-compress/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/syntax-highlighter-compress/#developers)

 [支持](https://wordpress.org/support/plugin/syntax-highlighter-compress/)

## 描述

Syntax Highlighter ComPress is a simple WordPress plugin, that is based on the latest
[Alex Gorbatchev’s SyntaxHighlighter Script](http://alexgorbatchev.com/wiki/SyntaxHighlighter).
Code and source text of different mark-up or programming languages can be highlighted
in WordPress.

There are other WordPress plugin based on the SyntaxHighlighter Script but these
cause long page loading times and they are difficult to handle. The advantage of
Syntax Highlighter ComPress is that only necessary brush files will be loaded dynamically.
Another advantage is that your code can easily pasted into your posts, no need to
replace all ‘`<`‘ with ‘`&lt;`‘.

Supported mark-up or programming are: AppleScript, ActionScript3, Bash/shell, Coldfusion,
C#, C++, CSS, Delphi, Diff, Erlang, Groovy, JavaScript, Java, JavaFX, Perl, PHP,
Plain Text, Python, Ruby, Scala, SQL, Visual Basic and XML.

The plugin is localized in English, German and Romanian.

## 屏幕截图

[⌊Examples (for a live demo, see the plugin's homepage)⌉⌊Examples (for a live demo,
see the plugin's homepage)⌉[

Examples (for a live demo, see the plugin’s homepage)

[⌊TinyMCE Button and Popup for easy code pasting⌉⌊TinyMCE Button and Popup for easy
code pasting⌉[

TinyMCE Button and Popup for easy code pasting

[⌊Settings menu⌉⌊Settings menu⌉[

Settings menu

## 安装

This plugin requires WordPress 2.6 or later.

 1. Unzip and upload the files to your ‘wp-content/plugins/’ directory.
 2. Activate the plugin by logging into your WordPress administration panel, going 
    to ‘Plugins’, then clicking the ‘Activate’ button for ‘Syntax Highlighter Compress’.
 3. Done, enjoy it.

#### Usage

Usage with the TinyMCE button:

 1. Create a new post or page in WordPress or open an existing post/page.
 2. Place the cursor into the main textarea where you want to insert the code.
 3. Click on the new TinyMCE button, you can find after the activation of the plugin.
 4. Paste your code into the textarea of the popup and choose which syntax/brush (PHP,
    JavaScript, …) you want to use.
 5. Click on the ‘Insert’ button. That’s all.

Usage without TinyMCE button:

 1. Take your code and replace all ‘`<`‘ with ‘`&lt;`‘ (Seach & Replace).
 2. Then enclose your code with the pre Tag like this:
 3.     ```
          <pre class="brush:[code-alias]"> [Your Code Here] </pre>
        ```
    
 4. For the ‘[code-alias]’ segment you have to choose the right syntax/brush alias.
    For all the available brush aliases check out [Alex Gorbatchev’s Webpage](http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes).
    PHP code should look like this:
 5.     ```
          <pre class="brush:php">
                &lt;?php
                  $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
                  $rand_keys = array_rand($input, 2);
                  echo $input[$rand_keys[0]] . "\n";
                ?>
                </pre>
        ```
    
 6. Paste final code into the main textarea of WordPress. Be sure, that you do this
    in the HTML view.`

## 常见问题

  Which browsers are supported?

The most common browsers are supported.

  Which version of wordPress do I need?

You need WordPress 2.6 or later.

## 评价

![](https://secure.gravatar.com/avatar/e5eb6d58f49baaf553b34e9e9b561a349e3f450f0bf8c47783ede06880fb2b48?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work on 4.8 due to deprecated calls to TinyMCE API](https://wordpress.org/support/topic/doesnt-work-on-4-8-due-to-deprecated-calls-to-tinymce-api/)󠁿

 [orlov0562](https://profiles.wordpress.org/orlov0562/) 2017 年 6 月 14 日

One of the oldest plugin that I’m using. Unfortunately after latest updates doesn’t
work due to has deprecated calls to TinyMCE API. Any case thank you for 5 good years
of stable work

 [ 阅读所有6条评价 ](https://wordpress.org/support/plugin/syntax-highlighter-compress/reviews/)

## 贡献者及开发者

「Syntax Highlighter Compress」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ agmorpheus ](https://profiles.wordpress.org/agmorpheus/)

[帮助将「Syntax Highlighter Compress」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/syntax-highlighter-compress)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/syntax-highlighter-compress/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/syntax-highlighter-compress/)，或
通过[RSS](https://plugins.trac.wordpress.org/log/syntax-highlighter-compress/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/syntax-highlighter-compress/)。

## 更新日志

#### 3.0.83.3

 * Added Romanian translation (THX to Alexander Ovsov – [Web Geek Sciense](http://webhostinggeeks.com/science/))

#### 3.0.83.2

 * Fixed problem with the tab-size input field
 * Fixed some bugs in the autoload script
 * Cleaner settings menu code

#### 3.0.83.1

 * Upgraded Syntax Highlighter script (version 3.0.83)
 * New Dynamic brush loading: only necessary brush files get loaded
 * Added settings menu where you can change the theme and other options

#### 2.1.364.1

 * First release, nothing changed so far

## 额外信息

 *  版本 **3.0.83.3**
 *  最后更新：**15 年前**
 *  活跃安装数量 **90+**
 *  WordPress 版本 ** 2.6 或更高版本 **
 *  已测试的最高版本为 **3.2.1**
 *  语言
 * [English (US)](https://wordpress.org/plugins/syntax-highlighter-compress/)
 * 标签
 * [code](https://cn.wordpress.org/plugins/tags/code/)[Highlight](https://cn.wordpress.org/plugins/tags/highlight/)
   [highlighter](https://cn.wordpress.org/plugins/tags/highlighter/)[syntax](https://cn.wordpress.org/plugins/tags/syntax/)
   [SyntaxHighlighter](https://cn.wordpress.org/plugins/tags/syntaxhighlighter/)
 *  [高级视图](https://cn.wordpress.org/plugins/syntax-highlighter-compress/advanced/)

## 评级

 4.8 星（最高 5 星）。

 *  [  4 条 5 星评价     ](https://wordpress.org/support/plugin/syntax-highlighter-compress/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/syntax-highlighter-compress/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/syntax-highlighter-compress/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/syntax-highlighter-compress/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/syntax-highlighter-compress/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/syntax-highlighter-compress/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/syntax-highlighter-compress/reviews/)

## 贡献者

 *   [ agmorpheus ](https://profiles.wordpress.org/agmorpheus/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/syntax-highlighter-compress/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.phodana.de/wordpress/wp-plugin-syntax-highlighter-compress/)