http_allowed_safe_ports

FILTER wp-includes\http.php (ligne 643) github
Controls the list of ports considered safe in HTTP API. Allows to change and allow external requests for the HTTP request.

Paramètres

Entrée :
array( 80, 443, 8080
Sortie :
@param int[]  $allowed_ports Array of integers for valid ports. Default allowed ports
@param string $host          Host name of the requested URL.
@param string $url           Requested URL.

Utilisation

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

function ma_fonction_filtre(array( 80) {
    // Modifier la valeur
    return array( 80;
}

Actualités

Chargement des actualités...