Last active
August 29, 2015 14:06
-
-
Save natehefner/6ab958917a35d1f9db3b to your computer and use it in GitHub Desktop.
WordPress Theme Security
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
function remove_header_info() { | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
remove_action( 'wp_head', 'rsd_link' ); | |
remove_action( 'wp_head', 'wlwmanifest_link' ); | |
remove_action( 'wp_head', 'wp_generator' ); | |
remove_action( 'wp_head', 'start_post_rel_link' ); | |
remove_action( 'wp_head', 'index_rel_link' ); | |
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); | |
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); | |
} | |
add_action('init', 'remove_header_info'); | |
function remove_wp_ver_css_js( $src ) { | |
if ( strpos( $src, 'ver=' ) ) { | |
$src = remove_query_arg( 'ver', $src ); | |
} | |
return $src; | |
} | |
add_filter( 'style_loader_src', 'remove_wp_ver_css_js', 9999 ); | |
add_filter( 'script_loader_src', 'remove_wp_ver_css_js', 9999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment