首页 WordPress函数大全 comment_class()

comment_class()

2020-05-01 / 5307阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

comment_class( string|array $class = '', int|WP_Comment $comment = null, int|WP_Post $post_id = null, bool $echo = true )

Generates semantic classes for each comment element.

描述

参数

$class

(string|array)
(Optional)
>Default value: ''

$comment

(int|WP_Comment)
(Optional)
Comment ID or WP_Comment object. Default current comment.

Default value: null

$post_id

(int|WP_Post)
(Optional)
Post ID or WP_Post object. Default current post.

Default value: null

$echo

(bool)
(Optional)
Whether to echo or return the output.

Default value: true

返回

(void|string) Void if $echo argument is true, comment classes if $echo is false.

大家谈论
    我的见解