內容簡介
你曾經有這樣的感覺嗎:你鉤取了一個動作或過濾器,但你的程式碼不起作用,原因是你的鈎子位於較低的優先級(在過濾器的情況下)?通過搜索特定的過濾器,這個原因可以很容易地確定嗎?這看起來很繁瑣,對吧?我為這個原因創建了一個外掛,它列出了所有的鈎子和過濾器,並允許您搜索它們以查看被掛鈎的內容。
為了實現這一功能,我使用了Query Monitor中的一個幫助類別,在這裡我最初看到了它的使用,我擴展了它,使其更加用戶友好。
外掛標籤
開發者團隊
原文外掛簡介
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? 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.
