Filters the REST API response. Allows modification of the response data after inserting embedded data (if any) and before echoing the response data.
$result, $this, $request
Sortie :
@param array $result Response data to send to the client. @param WP_REST_Server $server Server instance. @param WP_REST_Request $request Request used to generate the response.
// Modifier la valeur avec le filtre 'rest_pre_echo_response'
add_filter('rest_pre_echo_response', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($result) {
// Modifier la valeur
return $result;
}
Chargement des actualités...