#50821 closed defect (bug) (fixed)
plugin_auto_update_debug_string does not receive plugin file path
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.5 | Priority: | normal |
| Severity: | normal | Version: | 5.5 |
| Component: | Upgrade/Install | Keywords: | 2nd-opinion has-patch commit dev-reviewed |
| Focuses: | Cc: |
Description
This filter receives plugin information but no indication of the plugin file. For example:
Array
(
[Name] => Akismet Anti-Spam
[PluginURI] => https://akismet.com/
[Version] => 4.1.6
[Description] => Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. T
o get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
[Author] => Automattic
[AuthorURI] => https://automattic.com/wordpress-plugins/
[TextDomain] => akismet
[DomainPath] =>
[Network] =>
[RequiresWP] =>
[RequiresPHP] =>
[Title] => Akismet Anti-Spam
[AuthorName] => Automattic
)
We have a WordPress.com use case where sites can have both platform-managed and user-installed plugins. The user-installed plugins can be auto updated by the site, but the platform-managed plugins cannot.
The auto_update_plugin and plugin_auto_update_setting_html both receive objects with a reference to the plugin file, and we use that information to look at the plugin on disk and determine whether the plugin is auto-updatable. The plugin_auto_update_debug_string filter does not provide this information, making it difficult to provide useful auto update debug strings for the Site Health page.
Attachments (1)
Change History (12)
#2
@
6 years ago
- Keywords needs-patch 2nd-opinion added
- Milestone changed from Awaiting Review to 5.5
Moving to 5.5 for visibility.
#3
@
6 years ago
Thanks for the report @bpayton !
Agree with @pbiron. While it's a very interesting input, I'd suggest to address this in the next minor. By the way, I'd defer to the release coordinator for the final decision.
#4
@
6 years ago
In the off-chance that the release coordinator thinks this should land in 5.5, 50821.diff adds the param.
Note: as far as I can tell, an equivalent change is not needed for the theme_auto_update_debug_string filter, since that is a passed a WP_Theme object which has methods to get the equivalent info for a theme.
#5
@
6 years ago
- Keywords has-patch added; needs-patch removed
Whatever the final decision is, the patch is good on my side and I can make an update to the exiting devnote. Thanks for the patch @pbiron.
Let's pass the baton to @whyisjake and @SergeyBiryukov for final decision, as Release coordinator and Tech lead for WP 5.5 :)
Thanx for the report.
I can definitely see the usefulness of passing the plugin filename to that filter (and parity with
plugin_auto_update_setting_htmlwould be good thing).It is very late in release cycle (with RC1 already released), but since this is a new filter in 5.5 maybe adding that param would be OK...and if we wait for 5.5.1/5.6 to add it then the order of the params of those 2 filters would be different and could possibly cause confusion for developers.
I'm leaning towards adding it in a future release. What do you think @clorith, @audrasjb ?