Created
August 11, 2017 12:29
-
-
Save Fliktrax/dfcf7e2a0d2d263aeed9fe4fbd7d45a1 to your computer and use it in GitHub Desktop.
WordPress 4.7 CDN URL
This file contains hidden or 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
add_filter('upload_dir', 'cdn_upload_url'); | |
function cdn_upload_url($args) | |
{ | |
if (!is_admin()) { | |
$args['baseurl'] = 'https://your-awesome-cdn.net/wp-content/uploads'; | |
} | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment