Skip to content

Instantly share code, notes, and snippets.

@twitnic
Forked from KeSch/clean_wordpress_header.php
Created February 4, 2016 10:02
Show Gist options
  • Save twitnic/b36a2628b814c00ab20a to your computer and use it in GitHub Desktop.
Save twitnic/b36a2628b814c00ab20a to your computer and use it in GitHub Desktop.
Toolbox-Modul um nicht benötigte Links aus dem WordPress-Header zu entfernen.
<?php
/*
Module Name: WordPress-Header aufräumen
Description: Entfernt nicht benötigte Links aus dem WordPress-Header. [Frontend]
Author: Kevin Schludermann
Author URI: http://kevinschludermann.com
*/
/* Sicherheitsabfrage */
if ( !class_exists('Toolbox') ) {
die();
}
/* EditURI-Link entfernen (wird von div. Blog-Clients genutzt) */
remove_action( 'wp_head', 'rsd_link' );
/* wlmanifest-Link entfernen (wird vom Windows Live Writer verwendet) */
remove_action( 'wp_head', 'wlwmanifest_link' );
/* shortlink entfernen (wie z.B. "http://example.com/?p=41") */
remove_action( 'wp_head', 'wp_shortlink_wp_head' );
/* WordPress Generator inkl. Versionsnummer entfernen */
remove_action( 'wp_head', 'wp_generator' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment