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.

Revisions

  1. @KeSch KeSch created this gist Aug 10, 2014.
    24 changes: 24 additions & 0 deletions clean_wordpress_header.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    <?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' );