mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Introduce WP_List_Table::get_column_count() and take care of update notice <tr>. Props ocean90 for initial patch. Fixes #15318
git-svn-id: https://develop.svn.wordpress.org/trunk@16368 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -192,8 +192,10 @@ 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');
|
||||
|
||||
$wp_list_table = get_list_table('WP_Plugins_List_Table');
|
||||
|
||||
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="' . $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 );
|
||||
else if ( empty($r->package) )
|
||||
@@ -266,7 +268,9 @@ function wp_theme_update_row( $theme_key, $theme ) {
|
||||
|
||||
$details_url = self_admin_url("theme-install.php?tab=theme-information&theme=$theme_key&TB_iframe=true&width=600&height=400");
|
||||
|
||||
echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
|
||||
$wp_list_table = get_list_table('WP_MS_Themes_List_Table');
|
||||
|
||||
echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
|
||||
if ( ! current_user_can('update_themes') )
|
||||
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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r->new_version );
|
||||
else if ( empty( $r['package'] ) )
|
||||
|
||||
Reference in New Issue
Block a user