[wordpress插件] Code Snippets代码段

wordpress 插件 文章 2020-03-26 17:10 600 0 全屏看文

AI助手支持GPT4.0

评分
96
描述

Code Snippets is an easy, clean and simple way to run PHP code snippets on your site.

代码段是一种在您的站点上运行PHP代码段的简便,简洁的方法。

It removes the need to add custom snippets to your theme theme’s functions.php file.

无需在主题主题的 functions.php 文件中添加自定义片段。

A snippet is a small chunk of PHP code that you can use to extend the functionality of a WordPress-powered website;

摘要是一小段PHP代码,可用于扩展WordPress驱动的网站的功能;

essentially a mini-plugin with less load on your site.

本质上是一个迷你插件,可减轻您网站的负担。

Most snippet-hosting sites tell you to add snippet code to your active theme’s functions.php file, which can get rather long and messy after a while.

大多数代码段托管网站会告诉您将代码段添加到活动主题的 functions.php 文件中,该文件在一段时间后可能会变得很长且混乱。

Code Snippets changes that by providing a GUI interface for adding snippets and actually running them on your site just as if they were in your theme’s functions.php file.

代码片段通过提供一个GUI界面来添加和添加实际上在您的网站上运行它们,就像它们位于主题的 functions.php 文件中一样。

Code Snippets provides graphical interface, similar to the Plugins menu, for managing snippets.

代码段提供了类似于“插件”菜单的图形界面,用于管理代码段。

Snippets can can be activated and deactivated, just like plugins.

片段可以像插件一样被激活和停用。

The snippet editor includes fields for a name, a visual editor-enabled description, tags to allow you to categorize snippets, and a full-featured code editor.

片段编辑器包括名称字段,启用可视编辑器的描述,允许您对片段进行分类的标记以及功能全面的代码编辑器。

Snippets can be exported for transfer to another side, either in JSON for later importing by the Code Snippets plugin, or in PHP for creating your own plugin or theme.

可以以JSON形式导出代码段以传输到另一端,以供以后通过Code Snippets插件导入,也可以以PHP形式创建自己的插件或主题。

If you have any feedback, issues, or suggestions for improvements please leave a topic in the Support Forum,

如果您有任何反馈,问题或改进建议,请在支持论坛中保留一个主题,

or join the community on Facebook.

在Facebook上加入社区

If you like this plugin, or it is useful to you in some way, please consider reviewing it on

如果您喜欢此插件,或者对您有所帮助,请考虑在

WordPress.org.

WordPress.org 。

If you'd like to contribute to the plugin's code or translate it into another language, you can fork the

如果您想为插件的代码做出贡献或将其翻译成另一种语言,则可以分叉

plugin on GitHub.

GitHub上的插件。

Translations

翻译

Code Snippets can be used in these different languages thanks to the following translators:

借助以下翻译器,代码片段可用于这些不同的语言:

安装步骤

Automatic installation

自动安装

    1. Log into your WordPress admin
    2. 登录到WordPress管理员

    3. Click Plugins
    4. 点击插件

    5. Click Add New
    6. 点击添加新

    7. Search for Code Snippets
    8. 搜索代码段

    9. Click Install Now under “Code Snippets”
    10. 点击“代码段”下的立即安装

    11. Activate the plugin
    12. 激活插件

    Manual installation

    手动安装

      1. Download the plugin
      2. 下载插件

      3. Extract the contents of the zip file
      4. 提取zip文件的内容

      5. Upload the contents of the zip file to the wp-content/plugins/ folder of your WordPress installation
      6. 将zip文件的内容上传到WordPress安装的 wp-content / plugins / 文件夹中

      7. Activate the Code Snippets plugin from ‘Plugins’ page.
      8. 从“插件”页面激活代码片段插件。

      Network Activating Code Snippets through the Network Dashboard will enable a special interface for running snippets across the entire network.

      通过网络仪表板的网络激活代码段将为在整个网络上运行代码段提供特殊的界面。

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

AI助手支持GPT4.0