Skip to content

Instantly share code, notes, and snippets.

@sinanisler
Last active April 19, 2022 17:36
Show Gist options
  • Save sinanisler/10a2551bc7ca8d0b982e23157bee760d to your computer and use it in GitHub Desktop.
Save sinanisler/10a2551bc7ca8d0b982e23157bee760d to your computer and use it in GitHub Desktop.
cleaning wp_head and wp_footer and security
<?php
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 );
remove_action ('wp_head', 'rsd_link');
remove_action ('wp_head', 'wlwmanifest_link');
remove_action ('wp_head', 'wp_generator');
remove_action( 'wp_head', 'wp_resource_hints', 2 );
function wps_deregister_styles() {
wp_dequeue_style( 'global-styles' );
}
add_action( 'wp_enqueue_scripts', 'wps_deregister_styles', 100 );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment