[wp-trac] [WordPress Trac] #53546: Incorrect documentation for the 'upgrader_pre_install' filter
WordPress Trac
noreply at wordpress.org
Mon Jun 28 22:41:16 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: 3.9
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug | Focuses: docs
----------------------------------------+---------------------
Changes (by SergeyBiryukov):
* version: => 3.9
Old description:
> 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.
New description:
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.
Introduced in [27673].
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53546#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list