#50663 closed defect (bug) (fixed)
Add filter for the plugin/theme auto-update message in the Info tab of Site health
Reported by: | pbiron | Owned by: | whyisjake |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Site Health | Keywords: | has-patch has-dev-note |
Focuses: | Cc: |
Description
#50052 introduced a new UI for managing auto-updates for plugins/themes.
That UI can be disabled with the (plugins|themes)_auto_update_enabled
filters. When the UI is not disabled, additional information about whether auto-updates are enabled/disabled for specific plugins/themes are added in the debug info in the Site Health tool.
#50280 introduced the (theme|plugin)_auto_update_setting_html
and theme_auto_update_setting_template
filters that allow plugins to control what is presented in the UI for specific plugins/themes (e.g., by displaying a text message that "Auto-updates are not available for this plugin.").
We should introduce equivalent filters so that the debug info auto-update message can similarly be filtered.
Without these additional new filters, the debug message could be incorrect/misleading.
Attachments (4)
Change History (16)
#2
@
4 years ago
- Keywords needs-dev-note added
@audrasjb Is this still on your list for 5.5? Also, I tagged as needs-dev-note
for the new filters.
#3
@
4 years ago
Yes @davidbaumwald it's on my list for 5.5, my patch is almost ready, just need a quick review before sending.
This ticket was mentioned in Slack in #core by whyisjake. View the logs.
4 years ago
#5
@
4 years ago
- Keywords has-patch added; needs-patch removed
To test this patch, you can use the following snippet:
<?php function jba_plugin_auto_update_debug_str( $str, $plugin, $enabled ) { if ( in_array( $plugin['Name'], [ 'Hello Dolly', 'Reusable Blocks Extended', 'GDPR Data Request Form' ], true ) ) { $str = __( 'Auto-updates are not available for this plugin' ); } return $str; } add_filter( 'plugin_auto_update_debug_str', 'jba_plugin_auto_update_debug_str', 10, 3 ); function jba_theme_auto_update_debug_str( $str, $theme, $enabled ) { if ( in_array( $theme->name, [ 'Twenty Twenty', 'Twenty Nineteen', 'Twenty Eleven' ], true ) ) { $str = __( 'Auto-updates are not available for this theme' ); } return $str; } add_filter( 'theme_auto_update_debug_str', 'jba_theme_auto_update_debug_str', 10, 3 );
Of course, don't forget to replace the plugin names :-)
Cheers,
jb
#6
@
4 years ago
50663.diff LGTM, thanx!
#7
@
4 years ago
- Owner set to whyisjake
- Resolution set to fixed
- Status changed from new to closed
In 48546:
Thanks @pbiron
Let's add this ticket in milestone 5.5 as it is a small and self contained change related to auto-updates feature :)