comments_bubble example


    public function column_comments( $post ) {
        echo '<div class="post-com-count-wrapper">';

        if ( isset( $this->comment_pending_count[ $post->ID ] ) ) {
            $pending_comments = $this->comment_pending_count[ $post->ID ];
        } else {
            $pending_comments = get_pending_comments_num( $post->ID );
        }

        $this->comments_bubble( $post->ID, $pending_comments );

        echo '</div>';
    }

    /** * Handles output for the default column. * * @since 4.3.0 * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Post $item The current WP_Post object. * @param string $column_name Current column name. */
if ( $thumb ) {
                echo $thumb;
            }
        }

        echo $post_link;

        $post_type_object = get_post_type_object( $post->post_type );
        echo "<a href='" . get_permalink( $post->ID ) . "' class='comments-view-item-link'>" . $post_type_object->labels->view_item . '</a>';

        echo '<span class="post-com-count-wrapper post-com-count-', $post->ID, '">';
        $this->comments_bubble( $post->ID, $pending_comments );
        echo '</span> ';

        echo '</div>';
    }

    /** * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Comment $item The comment object. * @param string $column_name The custom column's name. */
    

    public function column_comments( $post ) {
        ?> <div class="post-com-count-wrapper"> <?php             $pending_comments = isset( $this->comment_pending_count[ $post->ID ] ) ? $this->comment_pending_count[ $post->ID ] : 0;

            $this->comments_bubble( $post->ID, $pending_comments );
        ?> </div> <?php     }

    /** * Handles the post author column output. * * @since 4.3.0 * * @param WP_Post $post The current WP_Post object. */
Home | Imprint | This part of the site doesn't use cookies.