Changeset 15690 for trunk/wp-admin/includes/taxonomy.php
- Timestamp:
- 10/03/2010 07:29:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/taxonomy.php
r15688 r15690 81 81 82 82 /** 83 * Deletes one existing category.84 *85 * @since 2.0.086 *87 * @param int $cat_ID88 * @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.89 */90 function wp_delete_category($cat_ID) {91 $cat_ID = (int) $cat_ID;92 $default = get_option('default_category');93 94 // Don't delete the default cat95 if ( $cat_ID == $default )96 return 0;97 98 return wp_delete_term($cat_ID, 'category', array('default' => $default));99 }100 101 /**102 83 * Updates an existing Category or creates a new Category. 103 84 *
Note: See TracChangeset
for help on using the changeset viewer.