[wp-trac] [WordPress Trac] #44831: apply_filters_deprecated() and do_action_deprecated() should only trigger a notice when a callback is hooked

WordPress Trac noreply at wordpress.org
Wed Aug 22 19:12:34 UTC 2018


#44831: apply_filters_deprecated() and do_action_deprecated() should only trigger a
notice when a callback is hooked
--------------------------+----------------------
 Reporter:  johnbillion   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Plugins       |     Version:  4.6
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:  docs
--------------------------+----------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch 2nd-opinion =>


Comment:

 > Add a check for `has_filter()`/`has_action()` inside
 `apply_filters_deprecated()`/`do_action_deprecated()` so the notice is
 only triggered when a callback is hooked.

 For reference, re-reading [37861], it looks like that's already the case.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44831#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list