Make WordPress Core


Ignore:
Timestamp:
05/23/2007 06:07:53 PM (17 years ago)
Author:
ryan
Message:

Set and get post cats to taxonomy. see #4189

File:
1 edited

Legend:

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

    r5528 r5529  
    225225        $in_taxonomies = "'" . implode("', '", $taxonomies) . "'";
    226226        $old_terms = $wpdb->get_col("SELECT tr.term_taxonomy_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($in_taxonomies) AND tr.object_id = '$object_id'");
     227        if ( empty($old_terms) )
     228            $old_terms = array();
    227229    }
    228230
     
    263265    global $wpdb;
    264266    $taxonomies = ($single_taxonomy = !is_array($taxonomy)) ? array($taxonomy) : $taxonomy;
     267    // TODO cast to int
    265268    $object_ids = ($single_object = !is_array($object_id)) ? array($object_id) : $object_id;
    266269
Note: See TracChangeset for help on using the changeset viewer.