comment_id_fields

函式
comment_id_fields ( $post_id = 0 )
引數
  • (int) $post_id Optional. Post ID. Defaults to the current post ID.
    Required:
相關
  • get_comment_id_fields()
定義位置
相關方法
get_comment_id_fieldscomments_link_feedcomment_idis_comment_feedcomment_time
引入
2.7.0
棄用
-

comment_id_fields: 這個函式生成評論表單的隱藏欄位,包括 comment_post_ID 和 comment_parent 欄位。

輸出用於回覆評論的隱藏輸入HTML。

在評論表單中新增兩個隱藏的輸入,以確定執行緒評論的`comment_post_ID`和`comment_parent`值。

這個標籤必須在`comments.php`模板的部分。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function comment_id_fields( $post_id = 0 ) {
echo get_comment_id_fields( $post_id );
}
function comment_id_fields( $post_id = 0 ) { echo get_comment_id_fields( $post_id ); }
function comment_id_fields( $post_id = 0 ) {
	echo get_comment_id_fields( $post_id );
}

常見問題

FAQs
檢視更多 >