Last active
October 7, 2018 20:31
-
-
Save rdimascio/a5058c788201fa20510330114b23628f to your computer and use it in GitHub Desktop.
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 | |
/* | |
Plugin Name: Fix WPHead | |
Plugin URI: https://ryan.dimasc.io/wp/plugins | |
Description: Removes unnecessary clutter from WPHead. | |
Version: 1.0.0 | |
Author: Ryan DiMascio | |
Author URI: https://ryan.dimasc.io | |
*/ | |
// Remove RSD, XMLRPC, WLW, WP Generator, ShortLink, Comment Feed, and Prev/Next article links*/ | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'wp_shortlink_wp_head'); | |
remove_action( 'wp_head', 'feed_links', 2 ); | |
remove_action('wp_head', 'feed_links_extra', 3 ); | |
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); | |
// Remove WP Emoji | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment