get_column_count example

protected function extra_tablenav( $which ) {}

    /** * Generates the tbody element for the list table. * * @since 3.1.0 */
    public function display_rows_or_placeholder() {
        if ( $this->has_items() ) {
            $this->display_rows();
        } else {
            echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
            $this->no_items();
            echo '</td></tr>';
        }
    }

    /** * Generates the table rows. * * @since 3.1.0 */
    public function display_rows() {
        
$compatible_php = is_php_version_compatible( $requires_php );
        $notice_type    = $compatible_php ? 'notice-warning' : 'notice-error';

        printf(
            '<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' .
            '<td colspan="%s" class="plugin-update colspanchange">' .
            '<div class="update-message notice inline %s notice-alt"><p>',
            $active_class,
            esc_attr( $plugin_slug . '-update' ),
            esc_attr( $plugin_slug ),
            esc_attr( $file ),
            esc_attr( $wp_list_table->get_column_count() ),
            $notice_type
        );

        if ( ! current_user_can( 'update_plugins' ) ) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ),
                $plugin_name,
                esc_url( $details_url ),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    

    public function display_rows_or_placeholder() {
        $taxonomy = $this->screen->taxonomy;

        $number = $this->callback_args['number'];
        $offset = $this->callback_args['offset'];

        // Convert it to table rows.         $count = 0;

        if ( empty( $this->items ) || ! is_array( $this->items ) ) {
            echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
            $this->no_items();
            echo '</td></tr>';
            return;
        }

        if ( is_taxonomy_hierarchical( $taxonomy ) && ! isset( $this->callback_args['orderby'] ) ) {
            if ( ! empty( $this->callback_args['search'] ) ) {// Ignore children on searches.                 $children = array();
            } else {
                $children = _get_term_hierarchy( $taxonomy );
            }

            
echo '</td>';
            }
        }

        echo '</tr>';

        if ( ! $compatible_php || ! $compatible_wp ) {
            printf(
                '<tr class="plugin-update-tr">' .
                '<td colspan="%s" class="plugin-update colspanchange">' .
                '<div class="update-message notice inline notice-error notice-alt"><p>',
                esc_attr( $this->get_column_count() )
            );

            if ( ! $compatible_php && ! $compatible_wp ) {
                _e( 'This plugin does not work with your versions of WordPress and PHP.' );
                if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
                    printf(
                        /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
                        ' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
                        self_admin_url( 'update-core.php' ),
                        esc_url( wp_get_update_php_url() )
                    );
                    
if ( ! $wp_list_table ) {
        if ( 'single' === $mode ) {
            $wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table' );
        } else {
            $wp_list_table = _get_list_table( 'WP_Comments_List_Table' );
        }
    }

    ?> <form method="get"> <?php if ( $table_row ) : ?> <table style="display:none;"><tbody id="com-reply"><tr id="replyrow" class="inline-edit-row" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange"> <?php else : ?> <div id="com-reply" style="display:none;"><div id="replyrow" style="display:none;"> <?php endif; ?> <fieldset class="comment-reply"> <legend> <span class="hidden" id="editlegend"><?php _e( 'Edit Comment' ); ?></span> <span class="hidden" id="replyhead"><?php _e( 'Reply to Comment' ); ?></span> <span class="hidden" id="addhead"><?php _e( 'Add new Comment' ); ?></span> </legend> <div id="replycontainer"> <label for="replycontent" class="screen-reader-text">
$inline_edit_classes = "inline-edit-row inline-edit-row-$hclass";
        $bulk_edit_classes   = "bulk-edit-row bulk-edit-row-$hclass bulk-edit-{$screen->post_type}";
        $quick_edit_classes  = "quick-edit-row quick-edit-row-$hclass inline-edit-{$screen->post_type}";

        $bulk = 0;

        while ( $bulk < 2 ) :
            $classes  = $inline_edit_classes . ' ';
            $classes .= $bulk ? $bulk_edit_classes : $quick_edit_classes;
            ?> <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="<?php echo $classes; ?>" style="display: none"> <td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange"> <div class="inline-edit-wrapper" role="region" aria-labelledby="<?php echo $bulk ? 'bulk' : 'quick'; ?>-edit-legend"> <fieldset class="inline-edit-col-left"> <legend class="inline-edit-legend" id="<?php echo $bulk ? 'bulk' : 'quick'; ?>-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend> <div class="inline-edit-col"> <?php if ( post_type_supports( $screen->post_type, 'title' ) ) : ?> <?php if ( $bulk ) : ?> <div id="bulk-title-div"> <div id="bulk-titles"></div> </div>
Home | Imprint | This part of the site doesn't use cookies.