Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
Created November 4, 2012 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WebEndevSnippets/4012671 to your computer and use it in GitHub Desktop.
Save WebEndevSnippets/4012671 to your computer and use it in GitHub Desktop.
Plugin: Disable W3 Total Cache CDN on HTPS pages only (for SSL)
/**
* Disable W3 Total Cache CDN on HTTPS pages only (for SSL)
*/
add_action('wp_head','we_nocdn_on_ssl_page');
function we_nocdn_on_ssl_page() {
if ( $_SERVER['HTTPS'] == "on" ) {
define( 'DONOTCDN', true );
}
}
@williejackson
Copy link

This function is no longer needed, FYI. The functionality has been exposed through the UI ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment