From 03b59ce449ab6b13b9f3cf8eab22abc75e88f6b7 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Thu, 18 Nov 2021 00:20:59 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@52202 git-svn-id: http://core.svn.wordpress.org/trunk@51794 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/upgrade.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 7a10de7e1e..54188738df 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -250,7 +250,9 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : ) ); - update_option( 'post_count', 1 ); + if ( is_multisite() ) { + update_posts_count(); + } $wpdb->insert( $wpdb->term_relationships, diff --git a/wp-includes/version.php b/wp-includes/version.php index e220485a3a..4292dd31e5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52201'; +$wp_version = '5.9-alpha-52202'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.