Skip to content

Instantly share code, notes, and snippets.

@ai2ik
Created December 23, 2018 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ai2ik/cf2fa10aad265b869f709fc95a87989d to your computer and use it in GitHub Desktop.
Save ai2ik/cf2fa10aad265b869f709fc95a87989d to your computer and use it in GitHub Desktop.
remove_action('wp_head', 'rsd_link'); //removes EditURI/RSD (Really Simple Discovery) link.
remove_action('wp_head', 'wlwmanifest_link'); //removes wlwmanifest (Windows Live Writer) link.
remove_action('wp_head', 'wp_generator'); //removes meta name generator.
remove_action('wp_head', 'wp_shortlink_wp_head'); //removes shortlink.
remove_action('wp_head', 'feed_links', 2 ); //removes feed links.
remove_action('wp_head', 'feed_links_extra', 3 ); //removes comments feed.
remove_action('wp_head', 'wp_resource_hints', 2 ); // remove WP 4.9+ dns-prefetch
remove_action('wp_head', 'print_emoji_detection_script', 7 ); // remove WP 4.2+ emoji
remove_action('admin_print_scripts', 'print_emoji_detection_script' ); // remove WP 4.2+ emoji
remove_action('wp_print_styles', 'print_emoji_styles' ); // remove WP 4.2+ emoji
remove_action('admin_print_styles', 'print_emoji_styles' ); // remove WP 4.2+ emoji
remove_action('wp_head', 'rest_output_link_wp_head');
remove_action('wp_head', 'wp_oembed_add_discovery_links');
remove_action('template_redirect', 'rest_output_link_header', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment