Filters the REST URL. Use this filter to adjust the url returned by the get_rest_url() function.
$path = '', $scheme = 'rest'
Sortie :
@param string $url REST URL. @param string $path REST route. @param int|null $blog_id Blog ID. @param string $scheme Sanitization scheme. @param string $path Optional. REST route. Default empty. @param string $scheme Optional. Sanitization scheme. Default 'rest'. @return string Full URL to the endpoint.
// Utilisation de la fonction rest_url
$result = rest_url($path = '', $scheme = 'rest');
if ($result) {
// Votre logique ici
}
Chargement des actualités...