From 6f1bfe6f0e9e4420da18b90df2f6298a2c93380d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 20 Feb 2010 08:19:44 +0000 Subject: [PATCH] Allow class/method array pair in wp_iframe() when checking callback name in determining whether to include media stylessheet. Props technosailor, fixes #11976 git-svn-id: https://develop.svn.wordpress.org/trunk@13243 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index d6ce1e84a7..8ca8f96062 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -306,7 +306,8 @@ function wp_iframe($content_func /* ... */) { wp_enqueue_style( 'global' ); wp_enqueue_style( 'wp-admin' ); wp_enqueue_style( 'colors' ); -if ( 0 === strpos( $content_func, 'media' ) ) +// Check callback name for 'media' +if ( ( is_array( $content_func ) && ! empty( $content_func[1] ) && 0 === strpos( (string) $content_func[1], 'media' ) ) || 0 === strpos( $content_func, 'media' ) ) wp_enqueue_style( 'media' ); wp_enqueue_style( 'ie' ); ?>