Filters a comment added via the REST API after it is prepared for insertion into the database. Allows modification of the comment right after it is prepared for the database.
$prepared_comment, $request
Sortie :
@param array $prepared_comment The prepared comment data for `wp_insert_comment`. @param WP_REST_Request $request The current request.
// Modifier la valeur avec le filtre 'rest_preprocess_comment'
add_filter('rest_preprocess_comment', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($prepared_comment) {
// Modifier la valeur
return $prepared_comment;
}
Chargement des actualités...