[wp-trac] [WordPress Trac] #19321: get_search_form() function calls an action and a filter with the same hook.
WordPress Trac
wp-trac at lists.automattic.com
Tue Nov 22 01:01:11 UTC 2011
#19321: get_search_form() function calls an action and a filter with the same hook.
--------------------------+-----------------------------
Reporter: marquex | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version: 3.3
Severity: normal | Keywords:
--------------------------+-----------------------------
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.
Cheers
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19321>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list