From 268626d06131a372a60798ef442ef4bd020f986c Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 13 Nov 2015 05:25:28 +0000 Subject: [PATCH] Customize: Exclude `referer` URL from being used for Close link if it is `customize.php`. This fixes an edge case where the Close button could never link the user out of the Customizer, if the user initially accessed it without a `url` param and then clicked a link (provided by a plugin) that took them to another `customize.php` URL. See #32637. Built from https://develop.svn.wordpress.org/trunk@35635 git-svn-id: http://core.svn.wordpress.org/trunk@35599 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index fcc9697fd6..baa50dfa62 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -1476,7 +1476,7 @@ final class WP_Customize_Manager { $referer = wp_get_referer(); if ( $this->return_url ) { $return_url = $this->return_url; - } else if ( $referer ) { + } else if ( $referer && 'customize.php' !== basename( parse_url( $referer, PHP_URL_PATH ) ) ) { $return_url = $referer; } else if ( $this->preview_url ) { $return_url = $this->preview_url; diff --git a/wp-includes/version.php b/wp-includes/version.php index a963f32b5d..b924cbc3f7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta4-35634'; +$wp_version = '4.4-beta4-35635'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.