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

WordPress Trac noreply at wordpress.org
Sun Nov 14 20:35:52 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     |     Focuses:  docs
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * version:  trunk => 2.2


Comment:

 Hi there, thanks for the PR!

 It looks like this was introduced in [5142] / #3852 for WordPress 2.2 and
 adjusted in [34566] / #34032. Setting the version accordingly.

 Just noting that there are currently 77 instances of `@param callable` in
 22 files in core, so changing it just for these two functions seems
 inconsistent.

 I think, while `callable` can technically be represented as a string or an
 array, it's not quite the same, as it's not just any string or array but
 specifically a [https://www.php.net/manual/en/language.types.callable.php
 callable function]. So I think the current documentation makes sense, and
 changing it to `callable|string|array` could cause more confusion.

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


More information about the wp-trac mailing list