[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
Sat Feb 22 17:26:59 UTC 2020


#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:  closed
 Priority:  normal                       |   Milestone:
Component:  Themes                       |     Version:  5.3
 Severity:  normal                       |  Resolution:  wontfix
 Keywords:  has-patch close 2nd-opinion  |     Focuses:  coding-standards
-----------------------------------------+-------------------------------
Changes (by SergeyBiryukov):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  5.4 =>


Comment:

 Thanks for the patch!

 I agree with comment:4. Looking at [source:tags/5.3.2/src/wp-
 admin/includes/class-theme-upgrader.php?marks=212,233#L201
 Theme_Upgrader::install()] the priority is only passed to the
 `add_filter()` call so that the number of arguments (3) could be passed
 next.

 Since 10 is the default priority, adding it to the `remove_filter()` call
 doesn't seem to provide any benefit or affect consistency here.

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


More information about the wp-trac mailing list