Skip to content

Instantly share code, notes, and snippets.

@thomasvt1
Last active February 1, 2019 07:49
Show Gist options
  • Save thomasvt1/e6c5be88b47a6c4096660bfe87bbc6ce to your computer and use it in GitHub Desktop.
Save thomasvt1/e6c5be88b47a6c4096660bfe87bbc6ce to your computer and use it in GitHub Desktop.
Wordpress demo plugin
<?php
/*
Plugin Name: Your plugin name goes here.
Plugin URI: Your website/blog address goes here.
Description: Removes unnecessary clutter from WPHead.
Version: 1.0.0
Author: Your name goes here.
Author URI: Your website/blog address goes here.
*/
/*Removes RSD, XMLRPC, WLW, WP Generator, ShortLink and Comment Feed 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 );
/*Removes prev and next article links*/
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment