get_comment_id

過濾鉤子
apply_filters( 'get_comment_ID', $comment_ID, $comment )
引數
  • (string) $comment_ID The current comment ID as a numeric string.
    Required:
  • (WP_Comment) $comment The comment object.
    Required:
定義位置
相關勾子
get_commentget_comment_linkget_comment_dateget_comment_timeget_comments_link
相關方法
get_comment_idget_comment_guidget_commentget_comment_dateget_comment_timeget_comment_link
引入
4.1.0
棄用
-

get_comment_id函式返回一個給定評論的ID。它接受一個評論物件作為引數,並返回該評論的ID。

過濾返回的評論ID。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_comment_ID', $comment_ID, $comment ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
return apply_filters( 'get_comment_ID', $comment_ID, $comment ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
return apply_filters( 'get_comment_ID', $comment_ID, $comment );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase

常見問題

FAQs
檢視更多 >