Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/taxonomy.php

    r15220 r17071  
    1414 * {@internal Missing Short Description}}
    1515 *
    16  * @since unknown
     16 * @since 2.0.0
    1717 *
    1818 * @param unknown_type $cat_name
     
    2929 * {@internal Missing Short Description}}
    3030 *
    31  * @since unknown
     31 * @since 2.0.0
    3232 *
    3333 * @param unknown_type $id
     
    4242 * {@internal Missing Short Description}}
    4343 *
    44  * @since unknown
     44 * @since 2.0.0
    4545 *
    4646 * @param unknown_type $cat_name
     
    5858 * {@internal Missing Short Description}}
    5959 *
    60  * @since unknown
     60 * @since 2.0.0
    6161 *
    6262 * @param unknown_type $categories
     
    8181
    8282/**
    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 /**
    10283 * Updates an existing Category or creates a new Category.
    10384 *
     
    193174 * {@internal Missing Short Description}}
    194175 *
    195  * @since unknown
     176 * @since 2.3.0
     177 *
     178 * @param unknown_type $tag_name
     179 * @return unknown
     180 */
     181function 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 */
     193function 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
    196201 *
    197202 * @param unknown_type $post_id
     
    205210 * {@internal Missing Short Description}}
    206211 *
    207  * @since unknown
     212 * @since 2.8.0
    208213 *
    209214 * @param unknown_type $post_id
     
    235240 * {@internal Missing Short Description}}
    236241 *
    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
    262243 *
    263244 * @param unknown_type $tag_name
Note: See TracChangeset for help on using the changeset viewer.