rest_endpoints

FILTER wp-includes\rest-api\class-wp-rest-server.php (ligne 973) github
Filters the array of available REST API endpoints.

Paramètres

Entrée :
$endpoints
Sortie :
@param array $endpoints The available endpoints. An array of matching regex patterns, each mapped

Utilisation

// Modifier la valeur avec le filtre 'rest_endpoints'
add_filter('rest_endpoints', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($endpoints) {
    // Modifier la valeur
    return $endpoints;
}

Actualités

Chargement des actualités...