mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 15:16:59 +00:00
Shiny Updates: Add ajax-y updates to the plugin list page, and ajax-y updates and installs to the plugin card page.
This also includes JS architecture that can be expanded to support theme, core and language pack updates. Props pento, ericlewis, lgladdy, adamsilverstein, DrewAPicture See #29820 git-svn-id: https://develop.svn.wordpress.org/trunk@31333 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -276,14 +276,15 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
||||
$wp_list_table = _get_list_table('WP_Plugins_List_Table');
|
||||
|
||||
if ( is_network_admin() || !is_multisite() ) {
|
||||
echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
|
||||
$active_class = ( is_plugin_active( $plugin_data['plugin'] ) ) ? ' active' : '';
|
||||
echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
|
||||
|
||||
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 );
|
||||
} elseif ( empty($r->package) ) {
|
||||
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 update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
|
||||
} 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">update now</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" class="update-link">update now</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 ) );
|
||||
}
|
||||
/**
|
||||
* Fires at the end of the update message container in each
|
||||
|
||||
Reference in New Issue
Block a user