Last active
August 29, 2015 14:13
-
-
Save donaldG/d382d6f5939029b94f4e to your computer and use it in GitHub Desktop.
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 | |
function filter_image_url($url){ | |
$liveurl = 'http://www.siteurl.com/'; | |
$localurl = 'http://localhost/yourURL/'; | |
$url = str_replace($localurl, $liveurl, $url); | |
return $url; | |
} | |
add_filter('wp_get_attachment_url', 'filter_image_url'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don gaines so cool.