跳到内容

CC-Syntax-Highlight

v1.2.4

Clearcode · 2016年9月29日 上架

This plugin allows you very simply syntax highlight source code in your content using highlight.js or google-code-prettify libraries.

正在使用
60+
评分
5.0 / 5
累计下载
5,358
最近更新
2026年10月6日
1 条评价需要 WordPress 4.6.1+已测试到 7.1.5PHP 7.0+

截图

CC-Syntax-Highlight Settings - Visit the 'Settings > Syntax Highlight' page, select your preferred options and save them.
CC-Syntax-Highlight Settings - Visit the 'Settings > Syntax Highlight' page, select your preferred options and save them.

The CC-Syntax-Highlight plugin supports syntax highlighting of Posts, Pages, and any public Custom Post Types.
It uses highlight.js or google-code-prettify libraries.
Additionally it can use the clipboard.js library to add a button that copies text to the clipboard and highlightjs-line-numbers.js plugin to add line numbers.
It is delivered with support for shortcode (default [code] – you can change it on the settings page) which automatically converts all special characters to HTML entities.
This plugin is compatible with Multisite WordPress installations.

How does it work?

  1. Go to the ‘Settings > Syntax Highlight’ page, select your preferred options and save them.
  2. Simply add the source code to your post (or other selected public Custom Post Type) wrapped with:
    <pre><code>Your source code</code></pre>
    or if you would like to automatically convert all special characters to HTML entities, use shortcode wrapper instead (default [code] – you can change it on the settings page):
    <pre>[code]Your source code[/code]</pre>

Plugin’s js scripts and css styles files only load if the source code occurs on displaying page.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums