Hide Plugin Update count

In case you need to hide the plugin update count (can’t/don’t want to update yet) you can hide it with this. Can be especially useful if you don’t want clients to wander over the the update area.

add_action('admin_menu', 'remove_plugin_update_count');
function remove_plugin_update_count(){
    global $menu, $submenu;
    $menu[65][0] = 'Plugins';
    $submenu['index.php'][10][0] = 'Updates';
}

Remove Title Attribute from Featured Image

If you have featured images (formerly post thumbnails) that aren’t named as well as they could be, it’s nice to remove the title attribute so that things like “header-large” don’t appear in the tool tips.

add_filter('post_thumbnail_html', 'remove_feat_img_title');
function remove_feat_img_title($img) {
    $img = preg_replace('/title="(.*?)"/','',$img);
    return $img; 
}

Custom Taxonomies

When you need more than just ‘categories’ and ‘tags’ use custom taxonomies.

Especially useful in combination with custom post types.

add_action('init', 'my_new_taxonomies');
function my_new_taxonomies() {

	$labels = array(
	'name' => __( 'Action Hooks' ),
	'singular_name' => __( 'Action Hook' ),
	'search_items' =>  __( 'Search Action Hooks' ),
	'popular_items' => __( 'Popular Action Hooks' ),
	'all_items' => __( 'All Action Hooks' ),
	'parent_item' => null,
	'parent_item_colon' => null,
	'edit_item' => __( 'Edit Action Hook' ),
	'update_item' => __( 'Update Action Hook' ),
	'add_new_item' => __( 'Add New Action Hook' ),
	'new_item_name' => __( 'New Action Hook' ),
	'separate_items_with_commas' => __( 'Separate hooks with commas' ),
	'add_or_remove_items' => __( 'Add or remove hooks' ),
	'choose_from_most_used' => __( 'Choose from the most used hooks' ),
	'menu_name' => __( 'Action Hooks' ),
	); 

	register_taxonomy('action_hook','post',array(
	'hierarchical' => false,
	'labels' => $labels,
	'show_ui' => true,
	'query_var' => true,
	'rewrite' => array( 'slug' => 'action_hook' ),
	));
}