Engineering
WordPress Hooks Encyclopedia
Identifies the right WordPress action and filter hooks for any customization with usage examples and priority guidance.
By Syed Balkhi·Engineering·WP Mail SMTP·1.6.0·Updated 1 months ago
Identify and document the correct WordPress hooks for any customization task.
## For Every Hook Recommendation
1. **Hook name** — Exact action or filter name
2. **Type** — Action (do something) or Filter (modify something)
3. **When it fires** — Where in the WordPress lifecycle
4. **Parameters** — What data is passed to the callback
5. **Priority** — Recommended priority and why (default 10)
6. **Example** — Working code snippet
## Selection Criteria
- Prefer the most specific hook available (e.g., `save_post_{post_type}` over `save_post`)
- Prefer filters over actions when you need to modify data
- Consider hook availability across WordPress versions (note minimum version)
- Flag deprecated hooks and suggest modern alternatives
## Common Patterns
- `init` → Register post types, taxonomies, shortcodes
- `wp_enqueue_scripts` → Frontend assets (never `wp_head`)
- `admin_enqueue_scripts` → Admin assets (check `$hook_suffix`)
- `rest_api_init` → Register REST routes
- `pre_get_posts` → Modify main query (check `is_main_query()`)
- `the_content` → Modify post content (check `in_the_loop()`)Tags
#wordpress#hooks#actions#filters#customization#php
npx skills add motiveskills/wordpress-hooks-encyclopediaSkill Score
641
Rating: 4.2
Installs: 1,450
Upvotes: 138
npx skills add motiveskills/wordpress-hooks-encyclopediaSkill Score
641
Rating: 4.2
Installs: 1,450
Upvotes: 138