untrash_comment

動作鉤子
do_action( 'untrash_comment', $comment->comment_ID, $comment )
引數
  • (string) $comment_id The comment ID as a numeric string.
    Required:
  • (WP_Comment) $comment The comment to be untrashed.
    Required:
定義位置
相關勾子
untrashed_commenttrash_commenttrashed_commentunspam_commentwp_count_comments
相關方法
wp_untrash_commentwp_trash_commentwp_untrash_post_commentsthe_commentwp_trash_post_commentswp_count_comments
引入
4.9.0
棄用
-

“untrash_comment”是一個過濾器鉤子,允許開發人員在執行之前修改取消回收過程的結果。 這可用於修改儲存在評論中的資料,或執行與回收過程相關的其他操作。

在評論從回收站中恢復之前立即觸發。

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

常見問題

FAQs
檢視更多 >