Make WordPress Core


Ignore:
Timestamp:
06/19/2007 12:33:44 AM (19 years ago)
Author:
ryan
Message:

Add some taxonomy validation. Rearrange funcs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r5716 r5726  
    361361        if ( $in_same_cat ) {
    362362                $join = " INNER JOIN $wpdb->term_relationships AS tr ON $wpdb->posts.ID = tr.object_id ";
    363                 $cat_array = get_object_terms($post->ID, 'category', 'fields=tt_ids');
     363                $cat_array = wp_get_object_terms($post->ID, 'category', 'fields=tt_ids');
    364364                $join .= ' AND (tr.term_taxonomy_id = ' . intval($cat_array[0]);
    365365                for ( $i = 1; $i < (count($cat_array)); $i++ ) {
    … …  
    394394        if ( $in_same_cat ) {
    395395                $join = " INNER JOIN $wpdb->term_relationships AS tr ON $wpdb->posts.ID = tr.object_id ";
    396                 $cat_array = get_object_terms($post->ID, 'category', 'fields=tt_ids');
     396                $cat_array = wp_get_object_terms($post->ID, 'category', 'fields=tt_ids');
    397397                $join .= ' AND (tr.term_taxonomy_id = ' . intval($cat_array[0]);
    398398                for ( $i = 1; $i < (count($cat_array)); $i++ ) {
Note: See TracChangeset for help on using the changeset viewer.