Make WordPress Core


Ignore:
Timestamp:
05/22/2007 05:12:38 AM (19 years ago)
Author:
ryan
Message:

Very rough initial commit of taxonomy for everyone's hacking pleasure. There be dragons. see #4189

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r5404 r5510  
    665665                return false;
    666666
    667         $tags = $wpdb->get_results( "
    668                      SELECT category_id, cat_name
    669                      FROM $wpdb->categories, $wpdb->post2cat
    670                      WHERE $wpdb->post2cat.category_id = cat_ID AND $wpdb->post2cat.post_id = '$post_id' AND rel_type = 'tag'
    671                      " );
     667        $tags = wp_get_post_tags($post_id);
     668
    672669        if ( !$tags )
    673670                return false;
    674671
    675672        foreach ( $tags as $tag )
    676                 $tag_names[] = $tag->cat_name;
     673                $tag_names[] = $tag->name;
    677674        $tags_to_edit = join( ', ', $tag_names );
    678675        $tags_to_edit = attribute_escape( $tags_to_edit );
Note: See TracChangeset for help on using the changeset viewer.