Filters the REST API root index data. This contains the data describing the API. This includes information about supported authentication schemes, supported namespaces, routes available on the API, and a small amount of data about the site.
$response, $request
Sortie :
@param WP_REST_Response $response Response data. @param WP_REST_Request $request Request data.
// Modifier la valeur avec le filtre 'rest_index'
add_filter('rest_index', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($response) {
// Modifier la valeur
return $response;
}
Chargement des actualités...