[wp-trac] [WordPress Trac] #15837: Custom Taxonomy: Admin Menu Not Selecting Current Item
WordPress Trac
wp-trac at lists.automattic.com
Sun Jan 9 14:01:43 UTC 2011
#15837: Custom Taxonomy: Admin Menu Not Selecting Current Item
--------------------------+------------------------------
Reporter: sterlo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.0.3
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by duck_):
This problem is caused by:
{{{
if ( empty( $post_type ) || !in_array( $post_type, get_post_types( array(
'public' => true ) ) ) )
$post_type = 'post';
}}}
In WP_Terms_List_Table for 3.1 and edit-tags.php for 3.0.x
By only checking against public it resets $post_type to post in the
backend so that the $parent_file gets set to `edit.php` instead of
`edit.php?post_type=$post_type`
Quick fix to confirm this was to just go with `get_post_types()`, no
parameters, but someone with a bit more time needs to look into the
history of why it's currently public. A quick look got references to
[13215] and #9674
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15837#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list