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被删除后触发。

do_action( 'rest_delete_comment', $comment, $response, $request );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 20:33:00

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: