Return to Snippet

Revision: 50749
at September 1, 2011 09:31 by ethicka


Initial Code
<?php
if (!is_admin()) wp_deregister_script('jquery');
wp_deregister_script('l10n');
if (function_exists('automatic_feed_links')) {
	automatic_feed_links();
} else {
	return;
}
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);
function blog_favicon() {
	echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_bloginfo('wpurl').'/favicon.ico" />';
}
add_action('wp_head', 'blog_favicon');
function theme_admin_bar_render() {
	global $wp_admin_bar;
	$wp_admin_bar->remove_menu('comments');
	$wp_admin_bar->remove_menu('appearance');
}
add_action( 'wp_before_admin_bar_render', 'theme_admin_bar_render' );

Initial URL

                                

Initial Description
I use this to toss all the junk from the header, add a favicon, remove useless admin elements, and block WordPress' ancient jQuery file from embedding.

Initial Title
WordPress functions.php Boilerplate

Initial Tags
wordpress, theme

Initial Language
PHP