adding a media submenu issues
-
There is a slight usability issue with 3.1/3.2 regarding some plugins that depend on wp-admin\edit_tags.php.
For example, let’s say the plugin defines Media->Media-Tags. Clicking on ‘Media-Tags’ submenu does not keep the context in the ‘Media’ section but it jumps up to the ‘Posts’ section instead. The reason is ‘edit_tags.php’ does not handle $parent_file == <media>
I’ve hacked the offending code here: edit_tags.php ~ li26 [RC3]
if ( 'post' != $post_type ) { $parent_file = "edit.php?post_type=$post_type"; $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; } else if ( 'link_category' == $tax->name ) { $parent_file = 'link-manager.php'; $submenu_file = 'edit-tags.php?taxonomy=link_category'; //// [alx359] fix when adding a 'media' submenu } else if ( false !== strpos($tax->name, 'media') ) { $parent_file = 'upload.php'; $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; //// } else { $parent_file = 'edit.php'; $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; }
I’m aware this is not a robust enough fix (shouldn’t depend on the ‘media’ piece on the title, and should be menu-neutral). At least hope the devs would do it better.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘adding a media submenu issues’ is closed to new replies.