Created
July 1, 2014 13:47
-
-
Save hasinhayder/1e0f7bb23c8a2fdb3920 to your computer and use it in GitHub Desktop.
Replace uploaded image urls by CDN
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 change_to_cdn_url() { | |
return 'http://your.cdn.url/wp-content/uploads'; | |
} | |
add_filter( 'pre_option_upload_url_path', 'change_to_cdn_url' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment