http_allowed_safe_ports

http_allowed_safe_ports

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('http_allowed_safe_ports') is found 1 times:

  • /wp-includes/http.php line 631
    	 * @param int[]  $allowed_ports Array of integers for valid ports.
    	 * @param string $host          Host name of the requested URL.
    	 * @param string $url           Requested URL.
    	 */
    	$allowed_ports = apply_filters( 'http_allowed_safe_ports', array( 80, 443, 8080 ), $host, $url );
    	if ( is_array( $allowed_ports ) && in_array( $port, $allowed_ports, true ) ) {
    		return $url;
    	}
    
    	if ( $parsed_home && $same_host && isset( $parsed_home['port'] ) && $parsed_home['port'] === $port ) {
    		return $url;