[wp-trac] [WordPress Trac] #12270: Incorrect menu active for edit custom taxonomy form
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 19 05:25:08 UTC 2010
#12270: Incorrect menu active for edit custom taxonomy form
----------------------------+-----------------------------------------------
Reporter: jfarthing84 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Administration | Version: 3.0
Severity: normal | Keywords: needs-patch
----------------------------+-----------------------------------------------
Comment(by jfarthing84):
{{{
if ( empty($post_type) || !in_array( $post_type, get_post_types(
array('show_ui' => true) ) ) )
$post_type = 'post';
if ( 'post' != $post_type ) {
$parent_file = "edit.php?post_type=$post_type";
$submenu_file = "edit-
tags.php?taxonomy=$taxonomy&post_type=$post_type";
} else {
$parent_file = 'edit.php';
$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
}
}}}
Because of that, when editing a term, the post_type is always post because
the post_type is not passed via the query. So, $parent_file will always
evaluate to 'edit.php' and $submenu_file to 'edit-
tags.php?taxonomy=$taxonomy', thus highlighting the incorrect menus.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12270#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list