WP_HEAD info bloat ? - Disable some :-)
WordPress (and ClassiPress) includes some bloat that you might not need.
The following snippets could be included to your theme functions.php file to control what is activated.
I suggest using a plugin such as Code Snippets by Shea Bunge to create a permanent file that is not erased when doing updates.
function rational_head_clean() {
remove_action( 'wp_head', 'cp_generator' );
remove_action( 'wp_head', 'cp_pingback_header' );
remove_action( 'wp_head', 'cp_alternate_rss' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 );
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
remove_action( 'wp_head', 'rest_output_link_wp_head' );
remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
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( 'tiny_mce_plugins', 'rational_tiny_mce_plugins_clean' );
}
add_action( 'init', 'rational_head_clean' );
function rational_tiny_mce_plugins( $plugins ) {
if ( is_array( $plugins ) )
return array_diff( $plugins, array( 'wpemoji' ) );
else
return array();
}
add_filter( 'the_generator', '__return_empty_string' );
function shapeSpace_remove_version_scripts_styles($src) {
if (strpos($src, 'ver=')) {
$src = remove_query_arg('ver', $src);
}
return $src;
}
add_filter( 'style_loader_src', 'shapeSpace_remove_version_scripts_styles', 9999 );
add_filter( 'script_loader_src', 'shapeSpace_remove_version_scripts_styles', 9999 );
End Note -- only disable what you don't need -- published as info only -- Cheers Roald