allowed_http_origins filter-hookWP 3.4.0

Change the origin types allowed for HTTP requests.


add_filter( 'allowed_http_origins', 'wp_kama_allowed_http_origins_filter' );

 * Function for `allowed_http_origins` filter-hook.
 * @param string[] $allowed_origins Array of default allowed HTTP origins.
 * @return string[]
function wp_kama_allowed_http_origins_filter( $allowed_origins ){

	// filter...
	return $allowed_origins;

Array of default allowed HTTP origins.

  • 0(string)
    Non-secure URL for admin origin.

  • 1(string)
    Secure URL for admin origin.

  • 2(string)
    Non-secure URL for home origin.

  • 3(string)
    Secure URL for home origin.


Since 3.4.0 Introduced.

Where the hook is called

wp-includes/http.php 447
return apply_filters( 'allowed_http_origins', $allowed_origins );

Where the hook is used in WordPress

Usage not found.