get_search_form() function calls an action and a filter with the same hook.
|Reported by:||marquex||Owned by:||SergeyBiryukov|
|Severity:||normal||Keywords:||has-patch needs-codex commit|
The get_search_form() functions starts calling the action 'get_search_form', and its ends applying the filter 'get_search_form' if a searchform.php file doesn't exists.
So if a function is hooked in 'get_search_form' action, it is also called by the filter, as long as do_action and apply_filters grab the functions from the same array.
If I add an action in 'get_search_form' I would like to be called just once. Maybe the best thing to do here is to change the action hook name.
Change History (15)
- Milestone changed from 2.7 to Awaiting Review
- Version changed from 3.3 to 2.7
comment:5 follow-ups: ↓ 6 ↓ 8 SergeyBiryukov — 9 months ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.6