From bf8b057f0418c257c71f9a83a5def67c110a5381 Mon Sep 17 00:00:00 2001 From: Pete Mall Date: Wed, 1 Dec 2010 18:53:37 +0000 Subject: [PATCH] Set IFRAME_REQUEST for theme/plugin information iframe. Props SergeyBiryukov, fixes #15509 git-svn-id: https://develop.svn.wordpress.org/trunk@16658 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/network/plugin-install.php | 3 +++ wp-admin/network/theme-install.php | 3 +++ wp-admin/plugin-install.php | 4 ++-- wp-admin/theme-install.php | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wp-admin/network/plugin-install.php b/wp-admin/network/plugin-install.php index abfef634f7..5c6243f1cf 100644 --- a/wp-admin/network/plugin-install.php +++ b/wp-admin/network/plugin-install.php @@ -7,6 +7,9 @@ * @since 3.1.0 */ +if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) + define( 'IFRAME_REQUEST', true ); + /** Load WordPress Administration Bootstrap */ require_once( './admin.php' ); diff --git a/wp-admin/network/theme-install.php b/wp-admin/network/theme-install.php index 4cec1914ab..bc4e6269aa 100644 --- a/wp-admin/network/theme-install.php +++ b/wp-admin/network/theme-install.php @@ -7,6 +7,9 @@ * @since 3.1.0 */ +if ( isset( $_GET['tab'] ) && ( 'theme-information' == $_GET['tab'] ) ) + define( 'IFRAME_REQUEST', true ); + /** Load WordPress Administration Bootstrap */ require_once( './admin.php' ); diff --git a/wp-admin/plugin-install.php b/wp-admin/plugin-install.php index cbdb055cd6..55fc9f6cee 100644 --- a/wp-admin/plugin-install.php +++ b/wp-admin/plugin-install.php @@ -6,8 +6,8 @@ * @subpackage Administration */ // TODO route this pages via a specific iframe handler instead of the do_action below -if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) - define('IFRAME_REQUEST' , true); +if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) + define( 'IFRAME_REQUEST', true ); /** WordPress Administration Bootstrap */ require_once('./admin.php'); diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index f4b6301970..779a0374ee 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -6,7 +6,7 @@ * @subpackage Administration */ -if ( isset( $_GET['tab'] ) && ( 'theme-information' == $_GET['tab'] ) ) +if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'theme-information' == $_GET['tab'] ) ) define( 'IFRAME_REQUEST', true ); /** WordPress Administration Bootstrap */