Use more obvious variables in WP_Screen. see #18785.
git-svn-id: https://develop.svn.wordpress.org/trunk@19108 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
27cd634a96
commit
45c23f2fcf
@ -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…
x
Reference in New Issue
Block a user