[WordPress] 外掛分享: Simply Show Hooks

首頁外掛目錄 › Simply Show Hooks
WordPress 外掛 Simply Show Hooks 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
4,000+
安裝啟用
★★★★★
5/5 分(63 則評價)
3429 天前
最後更新
問題解決
v1.2.1 上架:2015-03-30

內容簡介

迄今為止,主題和外掛開發人員尋找用於 add_action() 和 add_filter() 函式的接口位置方法是搜尋WordPress代碼庫或在Codex中找到接口的參考。

Simply Show Hooks 的作用是以內嵌方式在您所在的頁面上顯示這些接口,讓您更輕鬆地查看。然後只需複製需要的接口,並將其粘貼到 add_action 和 add_filter 函式中,如下所示:
add_action( ‘wp_enqueue_scripts’, ‘my_enqueue_scripts_action’ );
add_filter( ‘the_title’, ‘my_the_title_filter’ );

我製作了這個外掛程式,以便更快地找到WordPress接口,我自己也一直在使用,所以我想分享給大家,看看它是否能夠幫助到您。

享受它吧!

請注意,在某些情況下,由於動作和過濾器的性質,插件可能會在某個位置顯示接口,進而干擾您網站的顯示 - 在這種情況下,我們總是顯示“Hide Hooks”按鈕,以便您關閉它。這將不會對其他人造成網站外觀上的干擾,所以請不要擔心。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Simply Show Hooks」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Up until now the way theme and plugin developers find where to hook into with their add_action() and add_filter() functions is either to search through the WordPress code base, or find find a reference to the hook in the codex.
What Simply Show Hooks does is give you a simpler way to see these hooks by displaying them in-line on the page that you are on. All that’s left to do then is copy the hook you need, and paste it in to your add_action and add_filter functions like this:
add_action( ‘wp_enqueue_scripts’, ‘my_enqueue_scripts_action’ );
add_filter( ‘the_title’, ‘my_the_title_filter’ );
I made this plugin so I could find WordPress hooks quicker and I use it all the time, so I thought I’d share it and see if it could help others.
Enjoy!
Please note that in odd cases, due to the nature of actions and filters, the plugin may display a hook in place that disrupts the display of your site – in which case we always display the ‘Hide Hooks’ button so you can switch it back off. This won’t disrupt the look of you site to anyone but you so don’t worry.

延伸相關外掛

文章
Filter
Mastodon