Make WordPress Core


Ignore:
Timestamp:
06/06/2006 05:04:41 AM (20 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/wp-includes/functions-post.php

    r3843 r3849  
    162162        }
    163163
    164         wp_set_post_cats('', $post_ID, $post_category);
     164        wp_set_post_categories($post_ID, $post_category);
    165165
    166166        if ( 'page' == $post_type ) {
    … …  
    349349        }
    350350
    351         wp_set_post_cats('', $post_ID, $post_category);
     351        wp_set_post_categories($post_ID, $post_category);
    352352
    353353        if ( $file )
    … …  
    412412        // Set categories
    413413        if($mode == OBJECT) {
    414                 $post->post_category = wp_get_post_cats('',$postid);
     414                $post->post_category = wp_get_post_categories($postid);
    415415        }
    416416        else {
    417                 $post['post_category'] = wp_get_post_cats('',$postid);
     417                $post['post_category'] = wp_get_post_categories($postid);
    418418        }
    419419
    … …  
    487487}
    488488
    489 function wp_get_post_cats($blogid = '1', $post_ID = 0) {
     489function wp_get_post_categories($post_ID = 0) {
    490490        global $wpdb;
    491491
    … …  
    505505}
    506506
    507 function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
     507function wp_set_post_categories($post_ID = 0, $post_categories = array()) {
    508508        global $wpdb;
    509509        // If $post_categories isn't already an array, make it one:
    … …  
    556556                wp_cache_delete($cat_id, 'category');
    557557        }
    558 }       // wp_set_post_cats()
     558}       // wp_set_post_categories()
    559559
    560560function wp_delete_post($postid = 0) {
    … …  
    571571
    572572        if ( 'publish' == $post->post_status && 'post' == $post->post_type ) {
    573                 $categories = wp_get_post_cats('', $post->ID);
     573                $categories = wp_get_post_categories($post->ID);
    574574                if( is_array( $categories ) ) {
    575575                        foreach ( $categories as $cat_id ) {
Note: See TracChangeset for help on using the changeset viewer.