Opened 15 years ago
Closed 13 years ago
#13414 closed enhancement (duplicate)
Custom Taxonomies are not shown for media in the admin menu
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Media | Keywords: | needs-patch |
Focuses: | Cc: |
Description
I've been working with adding this code to line 100 of menu.php:
$i = 25; foreach ( $wp_taxonomies as $tax ) { if ( ! $tax->show_ui || ! in_array('attachment:image', (array) $tax->object_type, true) ) continue; $submenu['upload.php'][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name ); } unset($tax);
but I cannot figure out yet how to at this point make it work for any attachment:.
Then it probably would be helpful to do the same for pages and new custom post types.
Change History (8)
#3
@
15 years ago
- Milestone changed from 3.0 to Future Release
- Summary changed from Custom Taxonomies only appear in menu is attached to 'post' to Custom Taxonomies are not shown for media in the admin menu
- Type changed from defect (bug) to enhancement
#5
@
14 years ago
So, Seems I've had this on my test install for the last 13 months, There's a bug in this, as expained here: #17973
#6
@
14 years ago
- Component changed from Administration to Media
I have just succumed to using the following:
add_submenu_page('upload.php', __('People'), __('People'), 'manage_options', 'edit-tags.php?taxonomy=people');
At this point it is just a would be nice. The issue in #17973 is not a problem with this method.
#7
@
14 years ago
The issue in #17973 is not a problem with this method.
Well actually, It is. The menu doesnt recieve the correct highlighting.
See http://wordpress.org/support/topic/adding-a-media-submenu-issuess?replies=6 for a method to give it the correct menu highlighting.
Since this code is not in core (yet), i'm changing the title and moving to future. Posts/Pages/Custom post types support taxonomies.
With the provided code, this works: