[wp-trac] Re: [WordPress Trac] #9553: Allow plugins to add info to
the "new version" message
WordPress Trac
wp-trac at lists.automattic.com
Sat May 2 13:42:28 GMT 2009
#9553: Allow plugins to add info to the "new version" message
----------------------------+-----------------------------------------------
Reporter: JohnLamansky | Owner: anonymous
Type: enhancement | Status: reopened
Priority: normal | Milestone: 2.8
Component: Administration | Version: 2.7.1
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+-----------------------------------------------
Changes (by JohnLamansky):
* status: closed => reopened
* resolution: invalid =>
* milestone: => 2.8
Comment:
There's currently no way to add upgrade-related information directly into
the same row as the "There is a new version of (plugin name) available"
message.
As I stated in the ticket:
I know it's possible to add another <tr></tr> row using the existing
after_plugin_row action, but it would look cleaner to include all upgrade-
related information in the same row.
Here's a hypothetical usage example:
Plugin code:
{{{
function myplugin_update_reminder( $file ) {
if ( 'my_file' == $file )
echo "\n\n<br />Remember to backup this plugin’s
custom files <a href='(url)'>here</a> before upgrading.";
}
add_action( 'after_plugin_update_message', 'myplugin_update_reminder' );
}}}
Output example:
{{{
<tr><td colspan="5" class="plugin-update">
There is a new version of (plugin name) available. <a href="(url)"
class="thickbox">View version 2.0 Details</a> or <a href="(url)">upgrade
automatically</a>.
<br />Remember to backup this plugin’s custom files <a
href='(url)'>here</a> before upgrading.
</td></tr>
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9553#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list