Created
August 3, 2017 15:01
-
-
Save joshapgar/a11515a0c60256685fbaafbe791c9fb3 to your computer and use it in GitHub Desktop.
Remove version from styles and scripts, and add time version to style.css
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
// remove WP version from css | |
add_filter( 'style_loader_src', 'bones_remove_wp_ver_css_js', 9999 ); | |
// remove WP version from scripts | |
function bones_remove_wp_ver_css_js( $src ) { | |
if ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; | |
} | |
// register main stylesheet | |
wp_register_style( 'bones-stylesheet', get_stylesheet_directory_uri() . '/library/css/style.css', array(), time(), 'all' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment