From 831ffc54832bd49b7c0c56b7d741b630e8b8276e Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 2 Dec 2010 00:50:23 +0000 Subject: [PATCH] Return true if not is_admin. Tidy. see #14903. git-svn-id: http://svn.automattic.com/wordpress/trunk@16677 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 6df4a8848f..fcbcefcf85 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1478,14 +1478,11 @@ function remove_custom_image_header() { _remove_theme_support( 'custom-header' ); remove_theme_support( 'custom-header-uploads' ); - if ( ! is_admin() ) - return; + if ( is_admin() ) { + remove_action( 'admin_menu', array( &$GLOBALS['custom_image_header'], 'init' ) ); + unset( $GLOBALS['custom_image_header'] ); + } - global $custom_image_header; - - remove_action( 'admin_menu', array( &$custom_image_header, 'init' ) ); - - unset( $GLOBALS['custom_image_header'] ); return true; }