Un motore di ricerca WordPress per sviluppatori e autori di temi



rest_pre_insert_comment ›

Da4.8.0
Deprecaton/a
apply_filters( 'rest_pre_insert_comment', $prepared_comment, $request )
Parametri: (2)
  • (array|WP_Error) $prepared_comment The prepared comment data for wp_insert_comment().
    Richiesto:
  • (WP_REST_Request) $request Request used to insert the comment.
    Richiesto:
Definito a:
Codex:

Filters a comment before it is inserted via the REST API.

Allows modification of the comment right before it is inserted via wp_insert_comment(). Returning a WP_Error value from the filter will shortcircuit insertion and allow skipping further processing.





Sorgenti

$prepared_comment = apply_filters( 'rest_pre_insert_comment', $prepared_comment, $request );