
wordpress建站中,如何利用comment_excerpt()函数显示当前评论的摘要,下面web建站小编给大家简单介绍一下!
函数原型:
comment_excerpt( int|WP_Comment $comment_id ) //$comment_id, 要打印摘录的评论的WP_Comment或ID。默认当前评论。
函数源码:
function comment_excerpt( $comment_id = 0 ) {
$comment = get_comment( $comment_id );
$comment_excerpt = get_comment_excerpt( $comment );
echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment->comment_ID );
}
包含钩子:
apply_filters( 'comment_excerpt', string $comment_excerpt, string $comment_id )
调用方法:
<p>Latest comment: <?php comment_excerpt(); ?></p>
标签: comment_excerpt, wordpress评论
上面是“wordpress技巧如何显示当前评论的摘要”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_4794.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

MX动漫官网:为动漫迷提供最新最快的在线观看动漫番剧资源
推荐一款优设网免费可商用字体——优设标题黑体
一款从单张图片秒变3D场景,革新3D内容创作的AI 3D场景生成技术——MIDI
Media2Face:多模态驱动的高逼真共语言面部动画生成工具
精选益智小游戏:提供丰富益智小游戏的在线平台,锻炼玩家的逻辑思维和反应能力
el-table表头(header)添加按钮(带触发事件)