Skip to content

Instantly share code, notes, and snippets.

@Pross
Created June 16, 2014 13:59
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 Pross/af696c0b04e5db9109e9 to your computer and use it in GitHub Desktop.
Save Pross/af696c0b04e5db9109e9 to your computer and use it in GitHub Desktop.
<?php // only add this if there isnt one already, its only here to make highlighting work
add_filter( 'pless_vars', 'make_cdn_vars' );
function make_cdn_vars( $vars ) {
$vars['plSectionsRoot'] = str_replace( 'www', 'cdn', $vars['plSectionsRoot'] );
$vars['plRoot'] = str_replace( 'www', 'cdn', $vars['plRoot'] );
$vars['plCrossRoot'] = str_replace( 'www', 'cdn', $vars['plCrossRoot'] );
return $vars;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment