deleted_comment

動作鉤子
do_action( 'deleted_comment', $comment_id, $comments[ $comment_id ] )
定義位置
  • wp-content/plugins/akismet/class.akismet.php , line 441
相關勾子
delete_commentrest_delete_commentget_commentdeleted_postmetaedit_comment
相關方法
wp_delete_commentdelete_comment_metaget_commentthe_commentdelete_metawp_ajax_delete_comment
引入
n/a
棄用
-

deleted_comment: 當一個評論被刪除時,這個動作會在WordPress中被觸發。該動作將評論ID作為引數傳遞,並可用於在評論被刪除後執行額外的動作,如刪除相關後設資料或傳送通知。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'deleted_comment', $comment_id, $comments[ $comment_id ] );
do_action( 'deleted_comment', $comment_id, $comments[ $comment_id ] );
do_action( 'deleted_comment', $comment_id, $comments[ $comment_id ] );

常見問題

FAQs
檢視更多 >