diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 12256d2173..4e66070292 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -1175,6 +1175,20 @@ final class WP_Customize_Manager { $changeset_data = array(); if ( $this->changeset_post_id() ) { + /* + * Don't re-import starter content into a changeset saved persistently. + * This will need to be revisited in the future once theme switching + * is allowed with drafted/scheduled changesets, since switching to + * another theme could result in more starter content being applied. + * However, when doing an explicit save it is currently possible for + * nav menus and nav menu items specifically to lose their starter_content + * flags, thus resulting in duplicates being created since they fail + * to get re-used. See #40146. + */ + if ( 'auto-draft' !== get_post_status( $this->changeset_post_id() ) ) { + return; + } + $changeset_data = $this->get_changeset_post_data( $this->changeset_post_id() ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index e4a59c4aaf..1617bc48c2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-RC1-42106'; +$wp_version = '4.9-RC1-42107'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.