Remove feeds from head on theme level
-
Hello,
during cleaning up my functions.php I found out one curious thing:
In functions.php I haveadd_theme_support( 'automatic-feed-links' );and few lines below I added big “cleaning blog”:function itsme_disable_feed() { wp_die( __( 'No feed available', 'madrid' ) ); } add_action('do_feed', 'itsme_disable_feed', 1); add_action('do_feed_rdf', 'itsme_disable_feed', 1); add_action('do_feed_rss', 'itsme_disable_feed', 1); add_action('do_feed_rss2', 'itsme_disable_feed', 1); add_action('do_feed_atom', 'itsme_disable_feed', 1); add_action('do_feed_rss2_comments', 'itsme_disable_feed', 1); add_action('do_feed_atom_comments', 'itsme_disable_feed', 1); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'start_post_rel_link', 10, 0); remove_action('wp_head', 'parent_post_rel_link', 10, 0); remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); remove_action('wp_head', 'wp_shortlink_wp_head'); remove_action('wp_head', 'rest_output_link_wp_head', 10 ); remove_action('wp_head', 'wp_oembed_add_discovery_links', 10 ); remove_action('wp_head', 'print_emoji_detection_script', 7 ); remove_action('admin_print_scripts', 'print_emoji_detection_script' ); remove_action('wp_print_styles', 'print_emoji_styles' ); remove_action('admin_print_styles', 'print_emoji_styles' ); remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); add_filter( 'emoji_svg_url', '__return_false' ); add_filter( 'xmlrpc_enabled', '__return_false' ); function fl_wp_footer_action() { wp_dequeue_script( 'wp-embed' ); } add_action( 'wp_footer', 'fl_wp_footer_action', 9 ); add_filter('the_generator', '__return_empty_string'); add_filter( 'edit_post_link', '__return_false' );Because I didnd found out any info what exactly
add_theme_support( 'automatic-feed-links' );is doing, Im curious if I removeadd_theme_support( 'automatic-feed-links' );what should I remove from my “cleaning blog” because of duplicity? Or there inst connection?Thanks you
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Remove feeds from head on theme level’ is closed to new replies.