comment_closed

動作鉤子
do_action( 'comment_closed', $comment_post_id )
引數
  • (int) $comment_post_id Post ID.
    Required:
定義位置
相關勾子
comment_classcomment_postcomment_urlcomment_post_redirectcomment_link
相關方法
comment_classcomment_idget_comment_classcomment_datecomment_textcomment_footer_die
引入
1.5.0
棄用
-

comment_closed – 這個動作鉤子在評論表單被關閉,不再接受文章的評論時被觸發。

當試圖對已關閉評論的文章進行評論時,會發生觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'comment_closed', $comment_post_id );
do_action( 'comment_closed', $comment_post_id );
do_action( 'comment_closed', $comment_post_id );

常見問題

FAQs
檢視更多 >