From 7119d7429ee9dc2a813b363ec773d873903a2d6a Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 4 Oct 2010 16:28:01 +0000 Subject: [PATCH] Restore wp_delete_category. props blepoxp, fixes #15008. git-svn-id: http://svn.automattic.com/wordpress/trunk@15712 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index df4a18f01..9b1487172 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1519,6 +1519,20 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) { return true; } +/* + * Deletes one existing category. + * + * @since 2.0.0 + * @uses wp_delete_term() + * + * @param int $cat_ID + * @return mixed Returns true if completes delete action; false if term doesnt exist; + * Zero on attempted deletion of default Category; WP_Error object is also a possibility. + */ +function wp_delete_category( $cat_ID ) { + return wp_delete_term( $cat_ID, 'category' ); +} + /** * Retrieves the terms associated with the given object(s), in the supplied taxonomies. *