Append -network or -user suffix in convert_to_screen(). props kawauso. fixes #16238

git-svn-id: https://develop.svn.wordpress.org/trunk@17318 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2011-01-16 05:38:44 +00:00
parent 4615ef1fa3
commit 4c70887da7
1 changed files with 6 additions and 0 deletions

View File

@ -1661,6 +1661,12 @@ function _post_states($post) {
*/
function convert_to_screen( $screen ) {
$screen = str_replace( array('.php', '-new', '-add' ), '', $screen);
if ( is_network_admin() )
$screen .= '-network';
elseif ( is_user_admin() )
$screen .= '-user';
$screen = (string) apply_filters( 'screen_meta_screen', $screen );
$screen = (object) array('id' => $screen, 'base' => $screen);
return $screen;