From 3853a250f94665fc9168c784adf9448a2c2406b3 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 11 Sep 2017 17:50:44 +0000 Subject: [PATCH] Customize: Align behavior of `WP_Customize_Manager::save_changeset_post()` with `wp_insert_post()` by setting status to `future` if supplied status is `publish` but date is future. Props dlh. Fixes #41336. Built from https://develop.svn.wordpress.org/trunk@41372 git-svn-id: http://core.svn.wordpress.org/trunk@41205 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 31d9d355d3..1bb832396a 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -2272,6 +2272,10 @@ final class WP_Customize_Manager { } } + if ( ! empty( $is_future_dated ) && 'publish' === $args['status'] ) { + $args['status'] = 'future'; + } + // The request was made via wp.customize.previewer.save(). $update_transactionally = (bool) $args['status']; $allow_revision = (bool) $args['status']; diff --git a/wp-includes/version.php b/wp-includes/version.php index 0b10643c6f..325c512242 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41371'; +$wp_version = '4.9-alpha-41372'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.