Answers for "Remove Version from CSS and JS"

PHP
0

Remove Version from CSS and JS

<?php
// remove wp version number from scripts and styles
function remove_css_js_version( $src ) {
    if( strpos( $src, '?ver=' ) )
        $src = remove_query_arg( 'ver', $src );
    return $src;
}
add_filter( 'style_loader_src', 'remove_css_js_version', 9999 );
add_filter( 'script_loader_src', 'remove_css_js_version', 9999 );
Posted by: Guest on August-05-2021

Code answers related to "Remove Version from CSS and JS"

Browse Popular Code Answers by Language