Make WordPress Core


Ignore:
Timestamp:
11/14/2010 06:00:09 PM (14 years ago)
Author:
scribu
Message:

Introduce WP_List_Table::get_column_count() and take care of update notice <tr>. Props ocean90 for initial patch. Fixes #15318

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update.php

    r16141 r16368  
    193193    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
    194194
     195    $wp_list_table = get_list_table('WP_Plugins_List_Table');
     196
    195197    if ( is_network_admin() || !is_multisite() ) {
    196         echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
     198        echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
    197199        if ( ! current_user_can('update_plugins') )
    198200            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 );
     
    267269    $details_url = self_admin_url("theme-install.php?tab=theme-information&theme=$theme_key&TB_iframe=true&width=600&height=400");
    268270
    269     echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
     271    $wp_list_table = get_list_table('WP_MS_Themes_List_Table');
     272
     273    echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
    270274    if ( ! current_user_can('update_themes') )
    271275        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 );
Note: See TracChangeset for help on using the changeset viewer.