wp_get_current_commenter()函數(shù)可以獲取當(dāng)前的評(píng)論者姓名、郵箱和URL的值,可以用在fields表單內(nèi)的value字段顯示
語(yǔ)法
<?php wp_get_current_commenter() ?>
參數(shù)
返回一個(gè)數(shù)組
Array (
['comment_author']
=> 'name',
['comment_author_email']
=> 'email',
['comment_author_url']
=> 'url'
)
comments_template ()函數(shù)用來(lái)加載評(píng)論模板。只能用于單篇文章或頁(yè)面來(lái)顯示評(píng)論,如果不是這些頁(yè)面,將沒(méi)辦法顯示。
語(yǔ)法結(jié)構(gòu)
<?php comments_template( $file, $separate_comments ); ?>
參數(shù)
$file (字符串string) (可選) 要加載的文件 默認(rèn): comments.php
$separate_comments (布爾值boolean) (可選) 是否根據(jù)評(píng)論的類(lèi)型劃分評(píng)論 默認(rèn): false