rest_url

FUNCTION wp-includes\rest-api.php (ligne 552) github
Filters the REST URL. Use this filter to adjust the url returned by the get_rest_url() function.

Paramètres

Entrée :
$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

// Utilisation de la fonction rest_url
$result = rest_url($path = '', $scheme = 'rest');

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...