wp_head remove_action在WP3.0中不起作用

UXT*_*XTE 4 wordpress

我之前在Wordpress中使用了remove_action函数来删除wp_head注入的垃圾,但似乎在版本3.0中,某些标记没有被删除,如下所示:

remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );
Run Code Online (Sandbox Code Playgroud)

这应该删除prev链接标记但不是.谁知道原因?

UXT*_*XTE 10

感谢TheDeadMedic,我在"wp-includes/default-filters.php"中找到了解决方案.以下内容从wp_head中删除了next和prev链接:

remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
Run Code Online (Sandbox Code Playgroud)

这是从以下内容中删除所有"不必要的"元标记的完整脚本<head>:

//remove_action( 'wp_head',             'wp_enqueue_scripts',            1     );
remove_action( 'wp_head',             'feed_links',                    2     );
remove_action( 'wp_head',             'feed_links_extra',              3     );
remove_action( 'wp_head',             'rsd_link'                             );
remove_action( 'wp_head',             'wlwmanifest_link'                     );
remove_action( 'wp_head',             'index_rel_link'                       );
remove_action( 'wp_head',             'parent_post_rel_link',          10, 0 );
remove_action( 'wp_head',             'start_post_rel_link',           10, 0 );
remove_action( 'wp_head',             'adjacent_posts_rel_link_wp_head', 10, 0 );
remove_action( 'wp_head',             'locale_stylesheet'                    );
remove_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
//remove_action( 'wp_head',             'noindex',                       1     );
remove_action( 'wp_head',             'wp_print_styles',               8     );
remove_action( 'wp_head',             'wp_print_head_scripts',         9     );
remove_action( 'wp_head',             'wp_generator'                         );
//remove_action( 'wp_head',             'rel_canonical'                        );
remove_action( 'wp_footer',           'wp_print_footer_scripts'              );
remove_action( 'wp_head',             'wp_shortlink_wp_head',          10, 0 );
remove_action( 'template_redirect',   'wp_shortlink_header',           11, 0 );

add_action('widgets_init', 'my_remove_recent_comments_style');
function my_remove_recent_comments_style() {
    global $wp_widget_factory;
    remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));
}
Run Code Online (Sandbox Code Playgroud)