rest_index

FILTER wp-includes\rest-api\class-wp-rest-server.php (ligne 1415) github
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.

Paramètres

Entrée :
$response, $request
Sortie :
@param WP_REST_Response $response Response data.
@param WP_REST_Request  $request  Request data.

Utilisation

// 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;
}

Actualités

Chargement des actualités...