rest_delete_comment

動作鉤子
do_action( 'rest_delete_comment', $comment, $response, $request )
引數
  • (WP_Comment) $comment The deleted comment data.
    Required:
  • (WP_REST_Response) $response The response returned from the API.
    Required:
  • (WP_REST_Request) $request The request sent to the API.
    Required:
定義位置
相關勾子
delete_commentdeleted_commentrest_insert_commentrest_prepare_commentrest_delete_widget
相關方法
wp_delete_commentdelete_comment_metawp_ajax_delete_commentedit_commentthe_commentget_default_comment_status
引入
4.7.0
棄用
-

rest_delete_comment – 當一個評論通過WordPress REST API被刪除時,這個鉤子被呼叫。開發人員可以使用這個鉤子來執行額外的動作,例如在評論被刪除時傳送通知或更新網站的另一部分。

在一個評論通過REST API被刪除後觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'rest_delete_comment', $comment, $response, $request );
do_action( 'rest_delete_comment', $comment, $response, $request );
do_action( 'rest_delete_comment', $comment, $response, $request );

常見問題

FAQs
檢視更多 >