[wordpress插件] Digthis Show Action HookDigthis Show动作挂钩

wordpress 插件 文章 2020-04-17 07:01 538 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Ever had that feeling where you hook into and action or a filter and for some reason your code isn’t working?

您是否曾经感觉过您在哪里挂上钩子并进行操作或过滤,并且由于某种原因您的代码无法正常工作?

well 9 / 10 the reason is your hook is in a lower priority(in case of filters) and it can simply be determined by searching through the code for that particular filer?

9/10井的原因是您的钩子的优先级较低(如果使用过滤器),并且可以通过在代码中搜索特定文件管理器来简单地确定钩子?

Seems, a tedious amount of time doesn’t it?

似乎是很乏味的时间吗?

I’ve created a plugin for just that reason but it lists all hooks and filters and allows you to search through them to see whats being hooked.

出于这个原因,我创建了一个插件,但是它列出了所有的挂钩和过滤器,并允许您搜索它们以查看被挂钩的内容。

To do this i’ve used a helper class from Query Monitor where I initially saw this being used, i’ve extended it to be more user friendly.

为此,我使用了Query Monitor中的一个帮助器类,我最初看到它是在使用它,我将其扩展为更加用户友好。

安装步骤

    1. Upload the plugin files to the /wp-content/plugins/digthis-action-filters directory, or install the plugin through the WordPress plugins screen directly.
    2. 将插件文件上传到 / wp-content / plugins / digthis-action-filters 目录,或直接通过WordPress插件屏幕安装插件。

    3. Activate the plugin through the ‘Plugins’ screen in WordPress
    4. 通过WordPress中的“插件”屏幕激活插件

    5. Go to “View Filters” from the menu in the front end or alternatively use the “Show Filters” button to trigger a popup on the front end
    6. 从前端菜单中转到“查看过滤器”,或者使用“显示过滤器”按钮触发前端弹出窗口

    7. Type the name of “Action Hook” or “Filter Hook” you want to see and it will display functions attached to those.

    8. 键入要查看的“动作挂钩”或“过滤挂钩”的名称,它将显示附加到这些动作的功能。

      ex: init, the_content etc

    9. 例如:init,the_content等

下载地址
https://downloads.wordpress.org/plugin/digthis-action-filters.1.0.1.zip
-EOF-

AI助手支持GPT4.0