- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/taxonomy.php
r17071 r15220 14 14 * {@internal Missing Short Description}} 15 15 * 16 * @since 2.0.016 * @since unknown 17 17 * 18 18 * @param unknown_type $cat_name … … 29 29 * {@internal Missing Short Description}} 30 30 * 31 * @since 2.0.031 * @since unknown 32 32 * 33 33 * @param unknown_type $id … … 42 42 * {@internal Missing Short Description}} 43 43 * 44 * @since 2.0.044 * @since unknown 45 45 * 46 46 * @param unknown_type $cat_name … … 58 58 * {@internal Missing Short Description}} 59 59 * 60 * @since 2.0.060 * @since unknown 61 61 * 62 62 * @param unknown_type $categories … … 81 81 82 82 /** 83 * Deletes one existing category. 84 * 85 * @since 2.0.0 86 * 87 * @param int $cat_ID 88 * @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 cat 95 if ( $cat_ID == $default ) 96 return 0; 97 98 return wp_delete_term($cat_ID, 'category', array('default' => $default)); 99 } 100 101 /** 83 102 * Updates an existing Category or creates a new Category. 84 103 * … … 174 193 * {@internal Missing Short Description}} 175 194 * 176 * @since 2.3.0 177 * 178 * @param unknown_type $tag_name 179 * @return unknown 180 */ 181 function tag_exists($tag_name) { 182 return term_exists($tag_name, 'post_tag'); 183 } 184 185 /** 186 * {@internal Missing Short Description}} 187 * 188 * @since 2.3.0 189 * 190 * @param unknown_type $tag_name 191 * @return unknown 192 */ 193 function wp_create_tag($tag_name) { 194 return wp_create_term( $tag_name, 'post_tag'); 195 } 196 197 /** 198 * {@internal Missing Short Description}} 199 * 200 * @since 2.3.0 195 * @since unknown 201 196 * 202 197 * @param unknown_type $post_id … … 210 205 * {@internal Missing Short Description}} 211 206 * 212 * @since 2.8.0207 * @since unknown 213 208 * 214 209 * @param unknown_type $post_id … … 240 235 * {@internal Missing Short Description}} 241 236 * 242 * @since 2.8.0 237 * @since unknown 238 * 239 * @param unknown_type $tag_name 240 * @return unknown 241 */ 242 function tag_exists($tag_name) { 243 return term_exists($tag_name, 'post_tag'); 244 } 245 246 /** 247 * {@internal Missing Short Description}} 248 * 249 * @since unknown 250 * 251 * @param unknown_type $tag_name 252 * @return unknown 253 */ 254 function wp_create_tag($tag_name) { 255 return wp_create_term( $tag_name, 'post_tag'); 256 } 257 258 /** 259 * {@internal Missing Short Description}} 260 * 261 * @since unknown 243 262 * 244 263 * @param unknown_type $tag_name
Note: See TracChangeset
for help on using the changeset viewer.