Make WordPress Core

Changeset 52202


Ignore:
Timestamp:
11/18/2021 12:19:32 AM (5 years ago)
Author:
audrasjb
Message:

Posts, Post Types: Increment post_count option value only on multisite installations.

Avoid the post_count option to be created on single-site installations.

Follow-up to [52201].

Props dlh, henry.wright.
Fixes #54462.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r52201 r52202  
    251251                );
    252252
    253                 update_option( 'post_count', 1 );
     253                if ( is_multisite() ) {
     254                        update_posts_count();
     255                }
    254256
    255257                $wpdb->insert(
Note: See TracChangeset for help on using the changeset viewer.