Created
March 3, 2014 05:07
-
-
Save jamiehs/9318743 to your computer and use it in GitHub Desktop.
Allows WordPress' importer to import media assets from one localhost site to another www.site1.dev to www.site2.dev (localhost sites). It seems that the WordPress wp_http_validate_url() function disallows the opening of URLs from the same host (127.0.0.1)
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( 'http_request_host_is_external', 'explicitly_allow_same_host_requests_for_import' ); | |
function explicitly_allow_same_host_requests_for_import(){ | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment