Opened 8 years ago
Last modified 3 weeks ago
#34986 new enhancement
Add Upgrade Notice for Themes
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
There is upgrade notice for plugins that displays on the core update page if $transient->upgrade_notice
is set in the pre_set_site_transient_update_{plugins|themes}
filter, but there is no corresponding upgrade notice used or available for themes.
I propose adding a similar usage for themes as currently exists for plugins.
Use case, when theme upgrades are pending a notice of what changes, etc. will be available from the main update page.
Attachments (1)
Change History (13)
This ticket was mentioned in Slack in #core-upgrade-install by costdev. View the logs.
3 months ago
#6
@
3 months ago
- Keywords needs-testing needs-testing-info added
@afragen Can you drop some testing info so that the patch can be tested? Thanks!
Additional props: @pbiron
This ticket was mentioned in PR #4238 on WordPress/wordpress-develop by @afragen.
3 months ago
#8
- Keywords needs-refresh removed
Updated PR for adding an upgrade notice to theme updates in update-core.php as there is for plugin updates.
Trac ticket: https://core.trac.wordpress.org/ticket/34986
#9
@
3 months ago
You can test the PR with the following plugin code. Obviously this would need to be added by the theme dev.
<?php /** * Plugin Name: Test #34986 * Description: Testing Trac Ticket #34986 * Author: WP Core Contributors * Version: 0.1 */ add_filter( 'site_transient_update_themes', 'add_upgrade_notice_34986', 20, 1 ); function add_upgrade_notice_34986($transient){ $theme_slug = 'twentytwentythree'; if ( isset($transient->response[$theme_slug])){ $transient->response[$theme_slug]['upgrade_notice'] = 'Test of upgrade notice, #34986.'; } return $transient; }
To test, decrease the local version number of the Twenty Twenty Three theme so that it shows an update.
#10
@
3 months ago
Above is for testing. I'm pretty sure all the dev needs to do is add a section == Upgrade Notice ==
to their readme.txt
for the specific update and the readme parser in dot org will add the data to the update transient.
Any comments?