Make WordPress Core

Changeset 3849 for trunk/xmlrpc.php


Ignore:
Timestamp:
06/06/2006 05:04:41 AM (18 years ago)
Author:
ryan
Message:

Deprecate wp_get/set_post_cats() in favor of wp_get/set_post_categories().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r3517 r3849  
    243243      $post_data = wp_get_single_post($post_ID, ARRAY_A);
    244244
    245       $categories = implode(',', wp_get_post_cats(1, $post_ID));
     245      $categories = implode(',', wp_get_post_categories($post_ID));
    246246
    247247      $content  = '<title>'.stripslashes($post_data['post_title']).'</title>';
     
    286286     
    287287        $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
    288         $categories = implode(',', wp_get_post_cats(1, $entry['ID']));
     288        $categories = implode(',', wp_get_post_categories($entry['ID']));
    289289
    290290        $content  = '<title>'.stripslashes($entry['post_title']).'</title>';
     
    696696
    697697        $categories = array();
    698         $catids = wp_get_post_cats('', $post_ID);
     698        $catids = wp_get_post_categories($post_ID);
    699699        foreach($catids as $catid) {
    700700          $categories[] = get_cat_name($catid);
     
    756756        $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
    757757        $categories = array();
    758         $catids = wp_get_post_cats('', $entry['ID']);
     758        $catids = wp_get_post_categories($entry['ID']);
    759759        foreach($catids as $catid) {
    760760          $categories[] = get_cat_name($catid);
     
    959959
    960960      $categories = array();
    961       $catids = wp_get_post_cats('', intval($post_ID));
     961      $catids = wp_get_post_categories(intval($post_ID));
    962962      // first listed category will be the primary category
    963963      $isPrimary = true;
     
    997997      }
    998998
    999       wp_set_post_cats('', $post_ID, $catids);
     999      wp_set_post_categories($post_ID, $catids);
    10001000
    10011001      return true;
     
    10801080
    10811081      // retain old cats
    1082       $cats = wp_get_post_cats('',$post_ID);
     1082      $cats = wp_get_post_categories($post_ID);
    10831083      $postdata['post_category'] = $cats;
    10841084        $this->escape($postdata);
Note: See TracChangeset for help on using the changeset viewer.