mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
687642fead
commit
6c9e82de0a
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user