remove wp version number from scripts and styles

PHOTO EMBED

Wed May 12 2021 22:38:09 GMT+0000 (UTC)

Saved by @Alz #php #wordpress

// 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 );
content_copyCOPY