[wp-trac] [WordPress Trac] #54440: Make remove_filter param type more inclusive

WordPress Trac noreply at wordpress.org
Sun Nov 14 21:47:50 UTC 2021


#54440: Make remove_filter param type more inclusive
-----------------------------------+------------------------------
 Reporter:  malthert               |       Owner:  (none)
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Plugins                |     Version:  2.2
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  docs
-----------------------------------+------------------------------

Comment (by malthert):

 As John correctly says: for remove_filter the "callable" does not actually
 have to be callable. A string/array is fine (e.g. if your theme sets
 remove_action for a plugin that is not activated, the callback is NOT
 actually callable, but the code is still valid and runs without error)

 For all other instances (e.g. add_action) it has to be callable, otherwise
 you will get a PHP error when it runs.

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


More information about the wp-trac mailing list