- File:
-
- 1 edited
-
trunk/wp-admin/includes/taxonomy.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/taxonomy.php
r15220 r17071 14 14 * {@internal Missing Short Description}} 15 15 * 16 * @since unknown16 * @since 2.0.0 17 17 * 18 18 * @param unknown_type $cat_name … … 29 29 * {@internal Missing Short Description}} 30 30 * 31 * @since unknown31 * @since 2.0.0 32 32 * 33 33 * @param unknown_type $id … … 42 42 * {@internal Missing Short Description}} 43 43 * 44 * @since unknown44 * @since 2.0.0 45 45 * 46 46 * @param unknown_type $cat_name … … 58 58 * {@internal Missing Short Description}} 59 59 * 60 * @since unknown60 * @since 2.0.0 61 61 * 62 62 * @param unknown_type $categories … … 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 * … … 193 174 * {@internal Missing Short Description}} 194 175 * 195 * @since unknown 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 196 201 * 197 202 * @param unknown_type $post_id … … 205 210 * {@internal Missing Short Description}} 206 211 * 207 * @since unknown212 * @since 2.8.0 208 213 * 209 214 * @param unknown_type $post_id … … 235 240 * {@internal Missing Short Description}} 236 241 * 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 242 * @since 2.8.0 262 243 * 263 244 * @param unknown_type $tag_name
Note: See TracChangeset
for help on using the changeset viewer.