Last active
October 7, 2021 14:07
-
-
Save itsHall/f4054455132cc123b79580d7e9484c1d to your computer and use it in GitHub Desktop.
Remove WP Injected Links/Scripts
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 Unnecessary Header Code // | |
//--------------------------------// | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wp_shortlink_wp_head'); | |
remove_action('wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
remove_action('wp_head', 'wp_oembed_add_discovery_links', 10 ); | |
remove_action('wp_head', 'wp_oembed_add_host_js'); | |
remove_action('rest_api_init', 'wp_oembed_register_route'); | |
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See here: https://wordpress.stackexchange.com/a/214449