Created
June 20, 2012 09:17
-
-
Save mjangda/2958980 to your computer and use it in GitHub Desktop.
Adding additional origins to the WordPress Origin API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'allowed_http_origins', 'my_add_origins' ); | |
function my_add_origins( $origins ) { | |
$origins[] = 'http://www.example.com'; // this will add www.example.com to the list of allowed origins when send_origin_headers() is called | |
return $origins; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment