WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/02/2017 03:08:18 AM (2 years ago)
Author:
jeremyfelt
Message:

Multisite: Only update a site's post count when post types of post are updated.

Previously, the query to update the count of published posts would run every time any post type transitioned between a publish/non-published status or was deleted.

Props sboisvert, JPry, spacedmonkey.
Fixes #42021.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-default-filters.php

    r41625 r41665  
    5555add_action( 'delete_post', '_update_blog_date_on_post_delete' );
    5656add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
    57 add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 2 );
     57add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 3 );
    5858
    5959// Counts
Note: See TracChangeset for help on using the changeset viewer.