diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 1dbf0c9..ac2ded9 100644
a
|
b
|
function wp_queue_posts_for_term_meta_lazyload( $posts ) { |
6186 | 6186 | * @param WP_Post $post Post object. |
6187 | 6187 | */ |
6188 | 6188 | function _update_term_count_on_transition_post_status( $new_status, $old_status, $post ) { |
6189 | | // Update counts for the post's terms. |
6190 | | foreach ( (array) get_object_taxonomies( $post->post_type ) as $taxonomy ) { |
6191 | | $tt_ids = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'tt_ids' ) ); |
6192 | | wp_update_term_count( $tt_ids, $taxonomy ); |
| 6189 | if ( $new_status !== $old_status ) { |
| 6190 | // Update counts for the post's terms. |
| 6191 | foreach ( (array) get_object_taxonomies( $post->post_type ) as $taxonomy ) { |
| 6192 | $tt_ids = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'tt_ids' ) ); |
| 6193 | wp_update_term_count( $tt_ids, $taxonomy ); |
| 6194 | } |
6193 | 6195 | } |
6194 | 6196 | } |
6195 | 6197 | |