Make WordPress Core

Ticket #25234: 25234.diff

File 25234.diff, 1.3 KB (added by johnbillion, 13 years ago)
  • wp-admin/includes/taxonomy.php

    diff --git wp-admin/includes/taxonomy.php wp-admin/includes/taxonomy.php
    index fdc6d64..6ab4c09 100644
    function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {  
    235235
    236236        return $tags_to_edit;
    237237}
    238 
    239 /**
    240  * {@internal Missing Short Description}}
    241  *
    242  * @since 2.8.0
    243  *
    244  * @param unknown_type $tag_name
    245  * @return unknown
    246  */
    247 function wp_create_term($tag_name, $taxonomy = 'post_tag') {
    248         if ( $id = term_exists($tag_name, $taxonomy) )
    249                 return $id;
    250 
    251         return wp_insert_term($tag_name, $taxonomy);
    252 }
  • wp-includes/taxonomy.php

    diff --git wp-includes/taxonomy.php wp-includes/taxonomy.php
    index 93df284..6d7ccd3 100644
    function wp_insert_term( $term, $taxonomy, $args = array() ) {  
    21592159}
    21602160
    21612161/**
     2162 * {@internal Missing Short Description}}
     2163 *
     2164 * @since 2.8.0
     2165 *
     2166 * @param unknown_type $tag_name
     2167 * @return unknown
     2168 */
     2169function wp_create_term($tag_name, $taxonomy = 'post_tag') {
     2170        if ( $id = term_exists($tag_name, $taxonomy) )
     2171                return $id;
     2172
     2173        return wp_insert_term($tag_name, $taxonomy);
     2174}
     2175
     2176/**
    21622177 * Create Term and Taxonomy Relationships.
    21632178 *
    21642179 * Relates an object (post, link etc) to a term and taxonomy type. Creates the