| 开发者 |
Joseph Brzezowski
thedeafjoe |
|---|---|
| 更新时间 | 2025年9月26日 14:05 |
| 捐献地址: | 去捐款 |
| PHP版本: | 6.0 及以上 |
| WordPress版本: | 6.8.2 |
| 版权: | GPLv3 |
| 版权网址: | 版权信息 |
<head> section and headers of your WordPress site.
It removes outdated tags, redundant links, bloated scripts, and unnecessary headers that WordPress adds by default. The result: cleaner source code, faster page loads, less information leakage, and fewer HTTP requests.
What gets removed (and why it matters):
remove_action('wp_head', 'rsd_link');\
Used for Really Simple Discovery (old remote editing). Not needed anymore.remove_action('wp_head', 'wp_generator');\
Hides your WP version. Avoids advertising it to bots/hackers.remove_action('wp_head', 'feed_links', 2);\
remove_action('wp_head', 'feed_links_extra', 3);\
Removes auto-added RSS/Atom feed links. If you don’t use feeds, these are pointless.remove_action('wp_head', 'index_rel_link');\
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', 'adjacent_posts_rel_link_wp_head', 10, 0);\
Removes old “previous/next” link metadata almost no browsers or crawlers use.remove_action('wp_head', 'wlwmanifest_link');\
Dead tool support. Safe to remove.remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);\
remove_action('template_redirect', 'wp_shortlink_header', 11);\
Shortlink system is obsolete. Removing reduces clutter.remove_action('wp_head', 'rest_output_link_wp_head', 10);\
REST API still works, but no longer broadcast in headers.remove_action('wp_head', 'wp_oembed_add_discovery_links', 10);\
remove_action('wp_head', 'wp_oembed_add_host_js');\
Prevents WordPress from advertising oEmbed endpoints and loading extra JS.remove_action('wp_head', 'wp_resource_hints', 2);\
Stops WP from auto-inserting DNS hints you may not control.remove_action('wp_head', 'print_emoji_detection_script', 7);\
remove_action('wp_print_styles', 'print_emoji_styles');\
Removes redundant emoji JS/CSS. Browsers already handle emojis natively.remove_action('wp_head', 'wp_enqueue_global_styles', 1);\
Prevents WP from injecting default CSS that bloats your source.add_filter('xmlrpc_enabled', '__return_false');\
Blocks XML-RPC protocol (commonly abused in brute force/DDoS attacks).add_filter('wp_headers', function($headers) { unset($headers['X-Pingback']); return $headers; });\
Stops WP from advertising its pingback URL.@ini_set('expose_php', 'off');\
Prevents PHP version disclosure in server headers.<head>/wp-content/plugins/header-junk-remover, or install via the WordPress Plugins screen.