[wp-trac] [WordPress Trac] #48246: Explicitly state priority in remove_filter on `remove_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ) )`

WordPress Trac noreply at wordpress.org
Tue Dec 17 22:10:10 UTC 2019


#48246: Explicitly state priority in remove_filter on `remove_filter(
'upgrader_post_install', array( $this, 'check_parent_theme_filter' ) )`
------------------------------------------------+--------------------------
 Reporter:  itowhid06                           |       Owner:  (none)
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:  5.4
Component:  Themes                              |     Version:  5.3
 Severity:  normal                              |  Resolution:
 Keywords:  has-patch commit close 2nd-opinion  |     Focuses:  coding-
                                                |  standards
------------------------------------------------+--------------------------
Changes (by garrett-eclipse):

 * keywords:  has-patch commit => has-patch commit close 2nd-opinion


Comment:

 Sorry, can't say I see the point of this?

 A priority is only added in the `remove_filter` if the original
 `add_filter` had a priority other than 10. When it uses the default
 there's no benefit. Throughout core I've only seen non-default priorities
 with the exception of some unit tests.

 Apologies if I'm completely overlooking something. If we do set this as a
 precedent would all remove_filter implementations in core then need to be
 updated to add the priority?

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


More information about the wp-trac mailing list