wp_create_category
wp_create_category ( $cat_name, $parent = 0 )
Parameters:- (int|string) cat_name
- (int) parent
Returns:Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Add a new category to the database if it does not already exist.