Filters the publicly-visible data for REST API routes. This data is exposed on indexes and can be used by clients or developers to investigate the site and find out how to use it. It acts as a form of self-documentation.
$available, $routes
Sortie :
@param array[] $available Route data to expose in indexes, keyed by route. @param array $routes Internal route data as an associative array.
// Modifier la valeur avec le filtre 'rest_route_data'
add_filter('rest_route_data', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($available) {
// Modifier la valeur
return $available;
}
Chargement des actualités...