get_commentdata

函式
get_commentdata ( $comment_ID, $no_cache = 0, $include_unapproved = false )
引數
  • (int) $comment_ID The ID of the comment
    Required:
  • (int) $no_cache Whether to use the cache (cast to bool)
    Required:
  • (bool) $include_unapproved Whether to include unapproved comments
    Required:
    Default: false
返回值
  • (array) The comment data
相關
  • get_comment()
定義位置
相關方法
get_comment_dateget_commentget_comment_metaget_comment_idget_metadata
引入
0.71
棄用
2.7.0

get_commentdata: 這個函式用來檢索評論的資料,是一個關聯陣列。評論資料包括諸如評論作者、電子郵件、網站、評論內容、評論型別等資訊。

檢索關於評論$comment_ID的評論資料陣列。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
_deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' );
return get_comment($comment_ID, ARRAY_A);
}
function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { _deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' ); return get_comment($comment_ID, ARRAY_A); }
function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
	_deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' );
	return get_comment($comment_ID, ARRAY_A);
}

常見問題

FAQs
檢視更多 >