[wp-trac] [WordPress Trac] #46635: Improve identifying of non–trivial callbacks in hooks

WordPress Trac noreply at wordpress.org
Thu Apr 4 07:23:35 UTC 2019


#46635: Improve identifying of non–trivial callbacks in hooks
-------------------------+-------------------------------
 Reporter:  Rarst        |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  coding-standards
-------------------------+-------------------------------

Comment (by Rarst):

 I'd like to reiterate that introducing a new opt-in behavior does not
 address what this issue is trying to address. That is convenience of
 removing advanced callbacks that are already being added (for many years
 now) with current API.

 > They are not easily removable, and developers know that, and probably
 use it just because of it.
 > All of a sudden turning non-removable code into removable code is the BC
 break that causes the users to need to change their existing plugin/theme
 code.

 I disagree with this take. The API had **never** intended or advertised
 any callbacks as being unremovable explicitly or implicitly.

 ''All'' of advanced callbacks, closures included, can ''currently'' be
 removed ''by API'' with access to original instance.

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


More information about the wp-trac mailing list