[wordpress插件] Add Shortcodes Actions And Filters添加简码操作和过滤器

wordpress 插件 文章 2020-01-29 09:20 503 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

Add PHP Code to create your own Shortcodes, Actions and Filters.

添加PHP代码以创建自己的简码,操作和过滤器。

Can import your shortcodes from Shortcode Exec PHP plugin (which is no longer supported).

可以从Shortcode Exec PHP插件(不再支持)中导入您的短代码。

Provides a place to add your code that is more convenient than putting it in your theme’s functions.php file.

提供了一个添加代码的位置,该位置比将其放入主题的functions.php文件中更为方便。

Add your code in the Dashboard -> Tools -> Shortcodes, Actions and Filters

在控制台中添加代码-> 工具-> 短代码,操作和过滤器

but this is only available to users with Administrator role.

但这仅对具有管理员角色的用户可用。

Why this plugin?

为什么要使用此插件?

Existing WordPress documentation suggests adding your own shortcodes, action and filters in the theme’s functions.php file.

现有的WordPress文档建议在主题的functions.php文件中添加您自己的简码,操作和过滤器。

This is not a good idea because:

这不是一个好主意,因为:

    • If you upgrade your theme, this file can be overwritten and
    • 如果您升级主题,则此文件可以被覆盖

    • if you change your theme then you need to add the same code to that theme as well.
    • 如果您更改主题,则还需要向该主题添加相同的代码。

    Your code additions should not have to be artificially tied to your theme.

    您添加的代码不必与您的主题相关。

    This plugin frees you from that constraint.

    该插件使您摆脱了约束。

安装步骤

    1. From the Dashboard:
    2. 在仪表板上:

    3. Plugins
    4. 插件

    5. Add New
    6. 添加新

    7. Search “Add Shortcodes, Actions And Filters”
    8. 搜索“添加简码,操作和过滤器”

    9. Install Now
    10. 立即安装

    11. Activate
    12. 激活

    13. Go to Tools -> Shortcodes, Actions And Filters
    14. 转到工具->简码,操作和过滤器

下载地址

https://downloads.wordpress.org/plugin/add-actions-and-filters.2.0.9.zip

https://downloads.wordpress.org/plugin/add-actions-and-filters.2.0.9.zip

-EOF-

AI助手支持GPT4.0