Set the screen for add-tag ajax requests. see #13783

git-svn-id: http://svn.automattic.com/wordpress/trunk@15178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2010-06-09 16:52:25 +00:00
parent 10b86ca5f7
commit 2439833a7e
3 changed files with 12 additions and 1 deletions

View File

@@ -3909,8 +3909,15 @@ function set_current_screen( $id = '' ) {
$current_screen = str_replace('-add', '', $current_screen);
$current_screen = array('id' => $current_screen, 'base' => $current_screen);
} else {
if ( false !== strpos($id, '-') )
$id = sanitize_key($id);
if ( false !== strpos($id, '-') ) {
list( $id, $typenow ) = explode('-', $id, 2);
if ( is_taxonomy($typenow) ) {
$id = 'edit-tags';
$taxnow = $typenow;
$typenow = '';
}
}
$current_screen = array('id' => $id, 'base' => $id);
}