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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2011-01-16 05:38:44 +00:00
parent f020f81261
commit e5a88166a9
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;