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

Code Prettify Syntax Highlighter

描述

English:

This plugin to select blocks of code takes advantage of JavaScript-library ‘google-code-prettify’. If it is for his work simply insert frame <pre> tag with class ‘prettyprint’.

*** Tip: In order to optimize the use of resources, try to use only one option – ‘Automatically replace the tags <pre> to <pre class=”prettyprint linenums”> before saving post.’

Russian:

Данный плагин для выделения блоков кода использует возможности JavaScript-библиотеки ‘google-code-prettify’. При это для его работы достаточно просто обрамлять вставки тегом <pre> с классом ‘prettyprint’.

***Совет: в целях оптимизации потребления ресурсов старайтесь использовать только 1 флажок – ‘Автоматически заменять <pre> на <pre class=”prettyprint linenums”> перед сохранением записи.’

屏幕截图

  • This frontend.
  • This administration page.
  • This post editing page.

安装

  1. Unzip files.
  2. Upload ‘cpsh’ to the ‘/wp-content/plugins/’ directory.
  3. Activate the plugin through the ‘Plugins’ menu in WordPress.
  4. Go to your ‘Writing’.
  5. Go to your ‘Highlighting code with «google-code-prettify»’.

常见问题

  • Syntax highlighting is not working?

Try disabling JQuery in your theme. Or comment the 33rd line of code plugin: wp_enqueue_script (‘jquery’);

  • How do I block a themed code?

Specify the path to an arbitrary CSS file in the plugin settings. Examples of these, see the catalog ‘http://example.com/wordpress/wp-content/plugins/cpsh/google-code-prettify/prettify.css’.

评价

此插件暂无评价。

贡献者及开发者

“Code Prettify Syntax Highlighter” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

更新日志

1.0

  • The first version of the plugin.