mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Don't show plugin update notifications outside of the network admin. props PeteMall, see #14435.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
80873094fe
commit
111ac18ada
@ -192,6 +192,7 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
|||||||
|
|
||||||
$details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
|
$details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
|
||||||
|
|
||||||
|
if ( is_network_admin() || !is_multisite() ) {
|
||||||
echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
|
echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
|
||||||
if ( ! current_user_can('update_plugins') )
|
if ( ! current_user_can('update_plugins') )
|
||||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
|
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
|
||||||
@ -199,6 +200,7 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
|||||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic upgrade is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
|
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic upgrade is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
|
||||||
else
|
else
|
||||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">upgrade automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) );
|
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">upgrade automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) );
|
||||||
|
}
|
||||||
|
|
||||||
do_action( "in_plugin_update_message-$file", $plugin_data, $r );
|
do_action( "in_plugin_update_message-$file", $plugin_data, $r );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user