From 583a13344c31a526692f24ae71d8ab214978fc33 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Wed, 8 Apr 2015 17:37:38 +0000 Subject: [PATCH] Disable shiny updates from modal based on parent window The QS method added in [32067] and modified in [32080] doesn't work when the user changes the tab inside the modal. Instead, let's use the parent window's location. Fixes #31739 git-svn-id: https://develop.svn.wordpress.org/trunk@32082 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/updates.js | 2 +- src/wp-admin/update-core.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/js/updates.js b/src/wp-admin/js/updates.js index 1c15f8d495..9a3dd7646a 100644 --- a/src/wp-admin/js/updates.js +++ b/src/wp-admin/js/updates.js @@ -481,7 +481,7 @@ window.wp = window.wp || {}; target = window.parent == window ? null : window.parent, $.support.postMessage = !! window.postMessage; - if ( $.support.postMessage === false || target === null || window.location.search.indexOf( 'parent=update-core' ) !== -1 ) + if ( $.support.postMessage === false || target === null || window.parent.location.pathname.indexOf( 'update-core.php' ) !== -1 ) return; e.preventDefault(); diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 538b7ca3b1..c469120f81 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -264,7 +264,7 @@ function list_plugin_updates() { $upgrade_notice = ''; } - $details_url = self_admin_url('plugin-install.php?tab=plugin-information&parent=update-core&plugin=' . $plugin_data->update->slug . '§ion=changelog&TB_iframe=true&width=640&height=662'); + $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_data->update->slug . '§ion=changelog&TB_iframe=true&width=640&height=662'); $details_text = sprintf(__('View version %1$s details'), $plugin_data->update->new_version); $details = sprintf('%3$s.', esc_url($details_url), esc_attr($plugin_data->Name), $details_text);