Created
February 23, 2016 19:01
-
-
Save seoagentur-hamburg/aceadf06b5e4431dc33d to your computer and use it in GitHub Desktop.
Den Header von WordPress bereinigen
This file contains hidden or 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 | |
//emoji aus dem header entfernen | |
function disable_emoji_dequeue_script() { | |
wp_dequeue_script( 'emoji' ); | |
} | |
add_action( 'wp_print_scripts', 'disable_emoji_dequeue_script', 100 ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
// Header Links entfernen | |
add_action('init', 'remheadlink'); | |
function remheadlink() | |
{ | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'index_rel_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'feed_links', 2); | |
remove_action('wp_head', 'feed_links_extra', 3); | |
remove_action('wp_head', 'parent_post_rel_link', 10, 0); | |
remove_action('wp_head', 'start_post_rel_link', 10, 0); | |
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0); | |
remove_action('wp_head', 'wp_shortlink_header', 10, 0); | |
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kann mich der Frage v. neulaender nur anschließen.