[wordpress插件] Code Markup代码标记

wordpress 插件 文章 2020-03-26 15:40 416 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Code Markup is a WordPress plugin that makes it easy to include program code samples in your posts.

代码标记是一个WordPress插件,可轻松在您的帖子中包含程序代码示例。

You can even include HTML markup in the code sample;

您甚至可以在代码示例中包含HTML标记;

Code Markup magically knows which characters should be displayed as code and which should be rendered as HTML.

代码标记神奇地知道哪些字符应显示为代码,哪些字符应显示为HTML。

The plugin works by escaping most special HTML tags and characters so they display exactly as typed, but leaving certain ones alone so they will render as normal HTML.

该插件的工作原理是转义大多数特殊的HTML标签和字符,以便它们按键入时的样子显示,但不留某些内容,因此它们将以普通HTML形式呈现。

The default set of allowed tags is the standard formatting tags like em, strong, span and so on.

默认的允许标签集是标准格式标签,例如em,strong,span等。

You can control this explicitly, or implicitly by specifying the language of the code block.

您可以通过指定代码块的语言来显式或隐式地控制它。

For example, in a normal code block, will be rendered as emphasised text, but in an HTML code block, will be displayed as .

例如,在普通代码块中,将被呈现为强调文本,而在HTML代码块中,将被显示为

(I have to use square brackets instead of angle brackets because of the WordPress Extend site formatting.)

(由于WordPress Extend网站格式的原因,我必须使用方括号而不是尖括号。)

USAGE

用法

    1. Enclose any code inside a block.

      将任何代码括在块内。

    2. Use to specify appearance of code.

      使用指定代码的外观。

安装步骤

    1. Copy code-markup.php into your WordPress plugins directory (wp-content/plugins).
    2. 将code-markup.php复制到您的WordPress插件目录(wp-content / plugins)中。

    3. Log in to WordPress Admin.

    4. 登录WordPress管理员。

      Go to the Plugins page and click Activate for Code Markup.

    5. 转到“插件”页面,然后单击“激活代码标记”。

    6. Go to the Options page and click Writing.

    7. 转到“选项”页面,然后单击“编写”。

      Make sure “WordPress should correct invalidly nested XHTML automatically” is NOT checked.

      确保未选中“ WordPress应该自动更正无效的嵌套XHTML”。

      (Otherwise it may do funny things to your code listings.)

    8. (否则,它可能会对您的代码清单产生影响。)

下载地址
https://downloads.wordpress.org/plugin/code-markup.1.3.zip
-EOF-

AI助手支持GPT4.0