unspammed_comment

動作鉤子
do_action( 'unspammed_comment', $comment->comment_ID, $comment )
引數
  • (string) $comment_id The comment ID as a numeric string.
    Required:
  • (WP_Comment) $comment The comment unmarked as spam.
    Required:
定義位置
相關勾子
spammed_commentunspam_commentspam_commentuntrashed_commentedit_comment
相關方法
wp_unspam_commentwp_spam_commentseparate_commentsedit_commenthave_commentswp_insert_comment
引入
4.9.0
棄用
-

“unspamd_comment”是 WordPress 中的一個動作鉤子,在評論被取消垃圾郵件後執行。 在評論從垃圾郵件更改為已批准後,此鉤子可用於執行其他操作,例如傳送通知或更新資料庫。

在評論未被標記為垃圾郵件後立即觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'unspammed_comment', $comment->comment_ID, $comment );
do_action( 'unspammed_comment', $comment->comment_ID, $comment );
do_action( 'unspammed_comment', $comment->comment_ID, $comment );

常見問題

FAQs
檢視更多 >