From 43d0bc1ed7990811697bde78dd8e0fc10ce3e7e3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 24 Sep 2012 13:20:51 +0000 Subject: [PATCH] Fix CPT links in Theme Options list. Props SergeyBiryukov, JarretC. fixes #21655 git-svn-id: http://core.svn.wordpress.org/trunk@21969 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/themes.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 757d4bb96e..4807336269 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -174,7 +174,10 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na else $options[] = "{$item[0]}"; } else if ( current_user_can($item[1]) ) { - if ( file_exists(ABSPATH . 'wp-admin/' . $item[2]) ) { + $menu_file = $item[2]; + if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) + $menu_file = substr( $menu_file, 0, $pos ); + if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) { $options[] = "{$item[0]}"; } else { $options[] = "{$item[0]}";