Last active
April 19, 2022 17:36
-
-
Save sinanisler/10a2551bc7ca8d0b982e23157bee760d to your computer and use it in GitHub Desktop.
cleaning wp_head and wp_footer and 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
<?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