[wp-trac] [WordPress Trac] #53546: Incorrect documentation for the 'upgrader_pre_install' filter

WordPress Trac noreply at wordpress.org
Mon Jun 28 22:38:37 UTC 2021


#53546: Incorrect documentation for the 'upgrader_pre_install' filter
-----------------------------+----------------------------------------
 Reporter:  SergeyBiryukov   |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  5.9
Component:  Upgrade/Install  |    Version:
 Severity:  normal           |   Keywords:  needs-patch good-first-bug
  Focuses:  docs             |
-----------------------------+----------------------------------------
 The `upgrader_pre_install` filter description says:
 > Returning a truthy value, or one that could be evaluated as a WP_Error
 will effectively short-circuit the installation, returning that value
 instead.

 As far as I can tell, only the second part is true. Returning a WP_Error
 object does indeed [source:tags/5.7.2/src/wp-admin/includes/class-wp-
 upgrader.php?marks=492-494#L477 short-circuit the installation]. Returning
 a truthy value, on the other hand, does nothing.

 The description should be adjusted to remove the incorrect statement.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53546>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list