Use more obvious variables in WP_Screen. see #18785.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-11-01 21:36:04 +00:00
parent 687642fead
commit 6c9e82de0a
1 changed files with 4 additions and 5 deletions

View File

@ -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;
}
}
}
}