Aprendendo a desenvolver software no ecossistema WordPress – parte III: anotações do curso “Beginner WordPress Developer” da plataforma WordPress.org – seção 4 – “WordPress Hooks”
Lista geral de todos os HOOKS do WordPress (há aproximadamente 2670 hooks existentes aqui) a partir da página da comunidade oficial. Uma das questões mais importantes ao trabalhar com Hooks é saber qual usar e como usar de maneira a garantir o comportamento esperado. Algumas informações de referência podem ajudar no estudo inicial e mesmo de apoio/suporte ao desenvolvimento contínuo:
- O que são Hooks – página do plugin handbook;
- Lista de referência de ACTIONS;
- Lista de referência de FILTERS.
- Essas duas listas de referência apresentam os HOOKS na ordem em que eles são executados em determinados eventos estratégicos listados como seções na página. Vale levar isso em consideração para avaliar que tipo de hook e em que sequência algo deve ser executado.





Hooks run in numerical order of priority, starting at 1. It’s usually safe to leave the priority to the default of 10, unless you specifically want to change the order in which your callback function is run.
For example, in the after_setup_theme example in the actions lesson, you may want to make sure that the registered callback function is only run after any callbacks registered by WordPress core are run.
Because WordPress core registers any hook callbacks with the default priority of 10, if you specify a priority of 11, you can make sure my callback function is run after any core callbacks have completed.
Alternatively, if you want to make sure the callback is run before WordPress core’s, you would set a lower priority, say 9.
Often you might see callbacks being registered with a high priority, like 99, or 9999.
This is because the plugin or theme developer wants to be sure that this callback is run after all other callback functions. However, one can never know at what priority other third-party plugins or themes might register their callbacks.