diff --git a/wp-includes/customize/class-wp-customize-selective-refresh.php b/wp-includes/customize/class-wp-customize-selective-refresh.php index 23d5a94885..6c04a73698 100644 --- a/wp-includes/customize/class-wp-customize-selective-refresh.php +++ b/wp-includes/customize/class-wp-customize-selective-refresh.php @@ -324,10 +324,13 @@ final class WP_Customize_Selective_Refresh { */ if ( ! is_customize_preview() ) { wp_send_json_error( 'expected_customize_preview', 403 ); - } else if ( ! isset( $_POST['partials'] ) ) { + } elseif ( ! isset( $_POST['partials'] ) ) { wp_send_json_error( 'missing_partials', 400 ); } + // Ensure that doing selective refresh on 404 template doesn't result in fallback rendering behavior (full refreshes). + status_header( 200 ); + $partials = json_decode( wp_unslash( $_POST['partials'] ), true ); if ( ! is_array( $partials ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 9c96a7b665..4c423757f7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40315'; +$wp_version = '4.8-alpha-40316'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.