-
-
Save DreamerKlim/1835a8f02630a73b1d784f43138185a1 to your computer and use it in GitHub Desktop.
бирает версию из скритов и стилей (jquery.js?ver=1.12.4)
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
/* -------------------------------------------------------------------------- | |
* Убирает версию из скритов и стилей (jquery.js?ver=1.12.4) | |
* -------------------------------------------------------------------------- */ | |
function _remove_script_version( $src ){ | |
$parts = explode( '?', $src ); | |
return $parts[0]; | |
} | |
//Фильтр для скриптов | |
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); | |
//Фильтр для стилей | |
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 ); | |
/* -------------------------------------------------------------------------- | |
* Убирает версию из скритов и стилей (jquery.js?ver=1.12.4) | |
* -------------------------------------------------------------------------- */ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment