single_row_columns example

the_post();

            if ( $this->is_trash && 'trash' !== $post->post_status
                || ! $this->is_trash && 'trash' === $post->post_status
            ) {
                continue;
            }

            $post_owner = ( get_current_user_id() === (int) $post->post_author ) ? 'self' : 'other';
            ?> <tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>"> <?php $this->single_row_columns( $post ); ?> </tr> <?php         endwhile;
    }

    /** * Gets the name of the default primary column. * * @since 4.3.0 * * @return string Name of the default primary column, in this case, 'title'. */
$this->level = $level;

        if ( $tag->parent ) {
            $count = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
            $level = 'level-' . $count;
        } else {
            $level = 'level-0';
        }

        echo '<tr id="tag-' . $tag->term_id . '" class="' . $level . '">';
        $this->single_row_columns( $tag );
        echo '</tr>';
    }

    /** * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Term $item Term object. * @return string */
    public function column_cb( $item ) {
        // Restores the more descriptive, specific name for use within this method.

        do_action( 'manage_link_custom_column', $column_name$item->link_id );
    }

    public function display_rows() {
        foreach ( $this->items as $link ) {
            $link                = sanitize_bookmark( $link );
            $link->link_name     = esc_attr( $link->link_name );
            $link->link_category = wp_get_link_cats( $link->link_id );
            ?> <tr id="link-<?php echo $link->link_id; ?>"> <?php $this->single_row_columns( $link ); ?> </tr> <?php         }
    }

    /** * Generates and displays row action links. * * @since 4.3.0 * @since 5.9.0 Renamed `$link` to `$item` to match parent class for PHP 8 named parameter support. * * @param object $item Link being acted upon. * @param string $column_name Current column name. * @param string $primary Primary column name. * @return string Row actions output for links, or an empty string * if the current column is not the primary column. */
$class = '';
            reset( $this->status_list );

            foreach ( $this->status_list as $status => $col ) {
                if ( '1' === $blog[ $status ] ) {
                    $class = " class='{$col[0]}'";
                }
            }

            echo "<tr{$class}>";

            $this->single_row_columns( $blog );

            echo '</tr>';
        }
    }

    /** * Determines whether to output comma-separated site states. * * @since 5.3.0 * * @param array $site */


        $the_comment_class = implode( ' ', get_comment_class( $the_comment_class$comment$comment->comment_post_ID ) );

        if ( $comment->comment_post_ID > 0 ) {
            $post = get_post( $comment->comment_post_ID );
        }

        $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID );

        echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
        $this->single_row_columns( $comment );
        echo "</tr>\n";

        unset( $GLOBALS['post']$GLOBALS['comment'] );
    }

    /** * Generates and displays row actions links. * * @since 4.3.0 * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support. * * @global string $comment_status Status for the current listed comments. * * @param WP_Comment $item The comment object. * @param string $column_name Current column name. * @param string $primary Primary column name. * @return string Row actions output for comments. An empty string * if the current column is not the primary column, * or if the current user cannot edit the comment. */
    }

    /** * Generates content for a single row of the table. * * @since 5.6.0 * * @param array $item The current item. */
    public function single_row( $item ) {
        echo '<tr data-uuid="' . esc_attr( $item['uuid'] ) . '">';
        $this->single_row_columns( $item );
        echo '</tr>';
    }

    /** * Gets the name of the default primary column. * * @since 5.6.0 * * @return string Name of the default primary column, in this case, 'name'. */
    protected function get_default_primary_column_name() {
        
'deleted' => 'site-deleted',
            );

            foreach ( $status_list as $status => $col ) {
                if ( $user->$status ) {
                    $class .= " $col";
                }
            }

            ?> <tr class="<?php echo trim( $class ); ?>"> <?php $this->single_row_columns( $user ); ?> </tr> <?php         }
    }

    /** * Gets the name of the default primary column. * * @since 4.3.0 * * @return string Name of the default primary column, in this case, 'username'. */
$class = ! $allowed ? 'inactive' : 'active';
        if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) {
            $class .= ' update';
        }

        printf(
            '<tr class="%s" data-slug="%s">',
            esc_attr( $class ),
            esc_attr( $stylesheet )
        );

        $this->single_row_columns( $theme );

        echo '</tr>';

        if ( $this->is_site_themes ) {
            remove_action( "after_theme_row_$stylesheet", 'wp_theme_update_row' );
        }

        /** * Fires after each row in the Multisite themes list table. * * @since 3.1.0 * * @param string $stylesheet Directory name of the theme. * @param WP_Theme $theme Current WP_Theme object. * @param string $status Status of the theme. */
$classes .= ' wp-locked';
        }

        if ( $post->post_parent ) {
            $count    = count( get_post_ancestors( $post->ID ) );
            $classes .= ' level-' . $count;
        } else {
            $classes .= ' level-0';
        }
        ?> <tr id="post-<?php echo $post->ID; ?>" class="<?php echo implode( ' ', get_post_class( $classes$post->ID ) ); ?>"> <?php $this->single_row_columns( $post ); ?> </tr> <?php         $GLOBALS['post'] = $global_post;
    }

    /** * Gets the name of the default primary column. * * @since 4.3.0 * * @return string Name of the default primary column, in this case, 'title'. */


    /** * Generates content for a single row of the table. * * @since 3.1.0 * * @param object|array $item The current item */
    public function single_row( $item ) {
        echo '<tr>';
        $this->single_row_columns( $item );
        echo '</tr>';
    }

    /** * @param object|array $item * @param string $column_name */
    protected function column_default( $item$column_name ) {}

    /** * @param object|array $item */
/** * Generates content for a single row of the table, * * @since 4.9.6 * * @param WP_User_Request $item The current item. */
    public function single_row( $item ) {
        $status = $item->status;

        echo '<tr id="request-' . esc_attr( $item->ID ) . '" class="status-' . esc_attr( $status ) . '">';
        $this->single_row_columns( $item );
        echo '</tr>';
    }

    /** * Embeds scripts used to perform actions. Overridden by children. * * @since 4.9.6 */
    public function embed_scripts() {}
}
Home | Imprint | This part of the site doesn't use cookies.