Opened 17 years ago
Closed 16 years ago
#7846 closed defect (bug) (wontfix)
do_action and apply_filter should report if the user function is missing
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
do_action/apply_filters tell me somehow that I the user function doesn't exists. For example I have entered the action name wrong and there is no proper way to debug it other from luck and guessing.
Fixing do_action is easy -- it can just return false or WP_Error. The problem is with apply_filters -- it's return value is dependent on the user function and we can't interfere with it in no way.
Change History (3)
Note: See
TracTickets for help on using
tickets.
You can call has_filter() to check if a function has been registered for a filter/action hook, Infact, calling that will require less code than checking for a error condition being returned.