add_category
add_category is an action that is fired when a new category is created by wp_insert_category(). The ID of the category is passed. The create_category hook does the exact same thing (but only works in WP 2.0 and higher).
Context:
File: wp-admin/admin-db.php
wp_cache_delete($cat_ID, 'category');
if ($update) {
do_action('edit_category', $cat_ID);
} else {
wp_cache_delete('all_category_ids', 'category');
do_action('create_category', $cat_ID);
do_action('add_category', $cat_ID);
}
return $cat_ID;
This hook is an action which means that it primarily acts as an event trigger, instead of a content filter. This is a semantic difference, but it will help you to remember what this hook does if you use it like this: add_action('add_category', 'your_function');