How to Remove Version Number In WordPress
As we speak, i we are going to present you take away model quantity in WordPress. This text offers you easy instance of take away model quantity in WordPress. you’ll study take away model quantity in WordPress. So let’s comply with few step to create instance of take away model quantity in WordPress.
Instance 1
Take away WordPress model quantity from WP_Head
<?php operate remove_or_hide_wordpress_version_number() { return ''; } add_filter('the_generator', 'remove_or_hide_wordpress_version_number'); ?>
Instance 2
Removes WordPress model quantity from all enqueued or included CSS and JS recordsdata
<?php operate remove_or_hide_wordpress_version_number( $src ) { if ( strpos( $src, 'ver=" ) ) $src = remove_query_arg( "ver', $src ); return $src; } add_filter( 'style_loader_src', 'remove_or_hide_wordpress_version_number', 9999 ); add_filter( 'script_loader_src', 'remove_or_hide_wordpress_version_number', 9999 ); ?>
Instance 3
Take away all wordpress model quantity from all enqueued.
<?php operate remove_or_hide_wordpress_version_number( $src ) { if ( strpos( $src, 'ver=" . get_bloginfo( "model' ) ) ) $src = remove_query_arg( 'ver', $src ); return $src; } add_filter( 'style_loader_src', 'remove_or_hide_wordpress_version_number', 9999 ); add_filter( 'script_loader_src', 'remove_or_hide_wordpress_version_number', 9999 ); ?>
Komentar
Posting Komentar