pre_option_upload_url_path For CDN No Longer Working
-
I have the following code in my functions.php to redirect the URL of all media attachments to the Amazon CDN. It used to work perfect, and still works on a mirror test site, but suddenly stopped on the master site.
Uploads WILL go to it; however, it won’t return the proper path in, for example, the Media Library.
I tried adding it to the default theme and no luck there either. I’ve tried de-activating all plugins and, too, not luck. So, I’m left to believe it’s something in WordPress’s core interfering.
I even tried restoring some backups from when it was working… nothing.
Is there somewhere known that would cause this not to work?
// Change Media Uploads To Amazon Cloudfare CDN function cdn_url() { return 'https://d2w3ygkvuq5sxd.cloudfront.net/blogs/wp-content/uploads'; } add_filter( 'pre_option_upload_url_path', 'cdn_url' );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘pre_option_upload_url_path For CDN No Longer Working’ is closed to new replies.