wpseek.com
WordPress开发者和主题制作者的搜索引擎



http_allowed_safe_ports › WordPress过滤钩子

Since5.9.0
已弃用n/a
apply_filters( 'http_allowed_safe_ports', array( 80, 443, 8080 )
参数: (3)
  • (int[]) $allowed_ports Array of integers for valid ports.
    Required: Yes
  • (string) $host Host name of the requested URL.
    Required: Yes
  • (string) $url Requested URL.
    Required: Yes
定义在:
文档:

Controls the list of ports considered safe in HTTP API.

Allows to change and allow external requests for the HTTP request.





源码

$allowed_ports = apply_filters( 'http_allowed_safe_ports', array( 80, 443, 8080 ), $host, $url );