Skip to content

Instantly share code, notes, and snippets.

@skpy
Created March 7, 2018 14:05
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 skpy/b48f6e0b437e62b3ee56db4c8d444fde to your computer and use it in GitHub Desktop.
Save skpy/b48f6e0b437e62b3ee56db4c8d444fde to your computer and use it in GitHub Desktop.
add_action( 'wp_head', 'remove_default_wp_actions', 11 );
function remove_default_wp_actions(){
remove_action('wp_head', 'rsd_link' );
remove_action('wp_head', 'wlwmanifest_link' );
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10);
remove_action('wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'rel_canonical' );
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10);
}
@skpy
Copy link
Author

skpy commented Mar 22, 2018

remove_action('wp_head', 'wp_generator' );
remove_action('wp_head', 'rsd_link' );
remove_action('wp_head', 'wlwmanifest_link' );
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10);
remove_action('wp_head', 'print_emoji_detection_script', 7 );
remove_action('wp_head', 'rel_canonical' );
remove_action('wp_head', 'wp_shortlink_wp_head', 10);
remove_action('wp_head', 'wp_resource_hints', 2);
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'wp_print_styles', 8);
remove_action('wp_head', 'rest_output_link_wp_head', 10);
remove_action('wp_head', 'wp_oembed_add_discovery_links');
remove_action('wp_head', 'wp_oembed_add_host_js');
add_filter('emoji_svg_url', '__return_false');
add_filter('show_recent_comments_widget_style', '__return_false', 99);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment