Make WordPress Core

Ticket #27952: 27952.3.diff

File 27952.3.diff, 476 bytes (added by pento, 10 years ago)
  • src/wp-includes/ms-blogs.php

     
    917917 * @param int $post_id Post ID.
    918918 */
    919919function _update_posts_count_on_delete( $post_id ) {
    920         if ( 'publish' !== get_post_field( 'post_status', $post_id ) ) {
     920        $post = get_post( $post_id );
     921
     922        if ( 'publish' !== $post->post_status ) {
    921923                return;
    922924        }
    923925