Created
January 12, 2018 22:26
-
-
Save brynzovskii/f8575f8840a4d59ed229d25a3a15f11d to your computer and use it in GitHub Desktop.
Remove WP Version From Styles
This file contains 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
<?php | |
// Remove WP Version From Styles | |
add_filter( 'style_loader_src', 'sdt_remove_ver_css_js', 9999 ); | |
// Remove WP Version From Scripts | |
add_filter( 'script_loader_src', 'sdt_remove_ver_css_js', 9999 ); | |
// Function to remove version numbers | |
function sdt_remove_ver_css_js( $src ) { | |
if ( strpos( $src, 'ver=' ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment