From 6c9e82de0abdd5d64a0ff44238138317ad688c6e Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 1 Nov 2011 21:36:04 +0000 Subject: [PATCH] Use more obvious variables in WP_Screen. see #18785. git-svn-id: http://svn.automattic.com/wordpress/trunk@19108 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/screen.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php index 0009a68435..a68cabc634 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -419,18 +419,17 @@ final class WP_Screen { $id = sanitize_key( $id ); if ( post_type_exists( $id ) ) { - $post_type = $id; $id = 'post'; // changes later. ends up being $base. + $post_type = $id; } elseif ( false !== strpos( $id, '-' ) ) { - list( $id, $second ) = explode( '-', $id, 2 ); + list( $first, $second ) = explode( '-', $id, 2 ); if ( taxonomy_exists( $second ) ) { $id = 'edit-tags'; $taxonomy = $second; } elseif ( post_type_exists( $second ) ) { + $id = $first; $post_type = $second; - } else { - $id .= '-' . $second; - } + } } }