Add PHP Code to create your own Shortcodes, Actions and Filters.
添加PHP代码以创建自己的简码,操作和过滤器。 p>
Can import your shortcodes from Shortcode Exec PHP plugin (which is no longer supported).
可以从Shortcode Exec PHP插件(不再支持)中导入您的短代码。 p>
Provides a place to add your code that is more convenient than putting it in your theme’s functions.php file.
提供了一个添加代码的位置,该位置比将其放入主题的functions.php文件中更为方便。 p>
Add your code in the Dashboard -> Tools -> Shortcodes, Actions and Filters
在控制台中添加代码-> 工具 strong>-> 短代码,操作和过滤器 strong>
but this is only available to users with Administrator role.
但这仅对具有管理员角色的用户可用。 p>
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:
这不是一个好主意,因为: p>
- If you upgrade your theme, this file can be overwritten and
- 如果您升级主题,则此文件可以被覆盖 li>
- if you change your theme then you need to add the same code to that theme as well.
- 如果您更改主题,则还需要向该主题添加相同的代码。 li>
ul>
Your code additions should not have to be artificially tied to your theme.
您添加的代码不必与您的主题相关。
This plugin frees you from that constraint.
该插件使您摆脱了约束。 p>