Changeset 17002 for trunk/wp-admin/includes/class-wp-list-table.php
- Timestamp:
- 12/16/2010 07:05:14 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/class-wp-list-table.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-list-table.php
r16992 r17002 648 648 649 649 /** 650 * Display the table or a message if there are no items650 * Display the table 651 651 * 652 652 * @since 3.1.0 … … 654 654 */ 655 655 function display() { 656 if ( $this->has_items() ) {657 $this->display_table();658 } else {659 ?>660 <br class="clear" />661 <p><?php $this->no_items(); ?></p>662 <?php663 }664 }665 666 /**667 * Get a list of CSS classes for the <table> tag668 *669 * @since 3.1.0670 * @access protected671 *672 * @return array673 */674 function get_table_classes() {675 return array( 'widefat', 'fixed', $this->_args['plural'] );676 }677 678 /**679 * Display the full table680 *681 * @since 3.1.0682 * @access public683 */684 function display_table() {685 656 extract( $this->_args ); 686 657 … … 702 673 703 674 <tbody id="the-list"<?php if ( $singular ) echo " class='list:$singular'"; ?>> 704 <?php $this->display_rows (); ?>675 <?php $this->display_rows_or_placeholder(); ?> 705 676 </tbody> 706 677 </table> 707 678 <?php 708 709 679 $this->display_tablenav( 'bottom' ); 680 } 681 682 /** 683 * Get a list of CSS classes for the <table> tag 684 * 685 * @since 3.1.0 686 * @access protected 687 * 688 * @return array 689 */ 690 function get_table_classes() { 691 return array( 'widefat', 'fixed', $this->_args['plural'] ); 710 692 } 711 693 … … 746 728 /** 747 729 * Generate the <tbody> part of the table 730 * 731 * @since 3.1.0 732 * @access protected 733 */ 734 function display_rows_or_placeholder() { 735 if ( $this->has_items() ) { 736 $this->display_rows(); 737 } else { 738 echo '<tr class="no-items"><td colspan="2">'; 739 $this->no_items(); 740 echo '</td></tr>'; 741 } 742 } 743 744 /** 745 * Generate the table rows 748 746 * 749 747 * @since 3.1.0 … … 823 821 824 822 ob_start(); 825 $this->display_rows ();823 $this->display_rows_or_placeholder(); 826 824 $rows = ob_get_clean(); 827 825
Note: See TracChangeset
for help on using the changeset viewer.