graphql_comment_update_requires_moderation
apply_filters( 'graphql_comment_update_requires_moderation', $requires_moderation, $comment_args, $raw_comment_args );
Filters whether an edited comment is sent back for moderation. Applied after WordPress’s own pre_comment_approved filter, which has already decided the default outcome. Return false to let the comment keep its approved status whatever that decision was. This does not run for every edit. A comment that is not already approved keeps the status it has, unchanged content is not re-checked, and the author of the node the comment was left on is exempt, the same exemption WordPress applies. In those cases no decision is made and neither filter is reached.
- Type: filter
- Group: Model Layer
- Since: 2.24.1
- Source File:
plugins/wp-graphql/src/Mutation/CommentUpdate.php
Parameters
$requires_moderation(bool): Whether the comment will be held for review.$comment_args(array<string,mixed>): The comment args about to be saved.$raw_comment_args(array<string,mixed>): The comment as it is currently stored.
Source
apply_filters( 'graphql_comment_update_requires_moderation', $requires_moderation, $comment_args, $raw_comment_args );
Related
CommentUpdate::maybe_hold_for_moderation()inplugins/wp-graphql/src/Mutation/CommentUpdate.php:428