Make WordPress Core

Changeset 6425


Ignore:
Timestamp:
12/20/2007 12:48:49 AM (16 years ago)
Author:
ryan
Message:

Update term counts when future posts are published. fixes #4913 #5488

File:
1 edited

Legend:

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

    r6407 r6425  
    11691169    wp_transition_post_status('publish', $old_status, $post);
    11701170
     1171    // Update counts for the post's terms.
     1172    foreach ( get_object_taxonomies('post') as $taxonomy ) {
     1173        $terms = wp_get_object_terms($post_id, $taxonomy, 'fields=tt_ids');
     1174        wp_update_term_count($terms, $taxonomy);
     1175    }
     1176
    11711177    do_action('edit_post', $post_id, $post);
    11721178    do_action('save_post', $post_id, $post);
Note: See TracChangeset for help on using the changeset viewer.