Make WordPress Core


Ignore:
Timestamp:
11/14/2010 06:00:09 PM (15 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/class-wp-posts-list-table.php

    r16337 r16368  
    704704        }
    705705
    706         list( $columns, $hidden ) = $this->get_column_info();
    707 
    708         $col_count = count( $columns ) - count( $hidden );
    709706        $m = ( isset( $mode ) && 'excerpt' == $mode ) ? 'excerpt' : 'list';
    710707        $can_publish = current_user_can( $post_type_object->cap->publish_posts );
     
    721718        <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="inline-edit-row inline-edit-row-<?php echo "$hclass inline-edit-$screen->post_type ";
    722719            echo $bulk ? "bulk-edit-row bulk-edit-row-$hclass bulk-edit-$screen->post_type" : "quick-edit-row quick-edit-row-$hclass inline-edit-$screen->post_type";
    723         ?>" style="display: none"><td colspan="<?php echo $col_count; ?>">
     720        ?>" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
    724721
    725722        <fieldset class="inline-edit-col-left"><div class="inline-edit-col">
    726723            <h4><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></h4>
    727 
    728 
    729724    <?php
    730725
     
    977972
    978973    <?php
     974        list( $columns ) = $this->get_column_info();
     975
    979976        foreach ( $columns as $column_name => $column_display_name ) {
    980977            if ( isset( $core_columns[$column_name] ) )
Note: See TracChangeset for help on using the changeset viewer.