print_column_headers example

public function display() {
        $singular = $this->_args['singular'];

        $this->display_tablenav( 'top' );

        $this->screen->render_screen_reader_content( 'heading_list' );
        ?> <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>"> <?php $this->print_table_description(); ?> <thead> <tr> <?php $this->print_column_headers(); ?> </tr> </thead> <tbody id="the-list" <?php         if ( $singular ) {
            echo " data-wp-lists='list:$singular'";
        }
        ?> > <?php $this->display_rows_or_placeholder(); ?>
/** * Prints column headers for a particular screen. * * @since 2.7.0 * * @param string|WP_Screen $screen The screen hook name or screen object. * @param bool $with_id Whether to set the ID attribute or not. */
function print_column_headers( $screen$with_id = true ) {
    $wp_list_table = new _WP_List_Table_Compat( $screen );

    $wp_list_table->print_column_headers( $with_id );
}
// In the initial view, Comments are ordered by comment's date but there's no column for that.             echo '<caption class="screen-reader-text">' .
            /* translators: Hidden accessibility text. */
            __( 'Ordered by Comment Date, descending.' ) .
            '</caption>';
        } else {
            $this->print_table_description();
        }
        ?> <thead> <tr> <?php $this->print_column_headers(); ?> </tr> </thead> <tbody id="the-comment-list" data-wp-lists="list:comment"> <?php $this->display_rows_or_placeholder(); ?> </tbody> <tbody id="the-extra-comment-list" data-wp-lists="list:comment" style="display: none;"> <?php             /* * Back up the items to restore after printing the extra items markup. * The extra items may be empty, which will prevent the table nav from displaying later. */
Home | Imprint | This part of the site doesn't use cookies.