Remove wp version number from scripts, styles & head & RSS

PHOTO EMBED

Thu Jul 22 2021 22:00:52 GMT+0000 (Coordinated Universal Time)

Saved by @Alz #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 );


// remove wp version number from head and rss
function artisansweb_remove_version() {
    return '';
}
add_filter('the_generator', 'artisansweb_remove_version');
content_copyCOPY