[wp-trac] [WordPress Trac] #25566: Popular tags edit links do not respect current post type

WordPress Trac noreply at wordpress.org
Fri Oct 11 00:42:40 UTC 2013


#25566: Popular tags edit links do not respect current post type
--------------------------+-----------------------------
 Reporter:  mordauk       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 When a post type registers a non-hierarchical taxonomy, there is a
 "Popular Tags" section displayed on that taxonomies overview. Each of the
 terms included in the popular tags Tag Cloud is linked to an edit page for
 that term, but when clicking on the edit link, the current post type isn't
 respected, meaning the admin menu goes from having the current post type
 highlighted to having the standard Posts menu highlighted.

 For example, the URL for the edit link of a popular "Download Tag" from my
 Easy Digital Downloads plugin is:
  `/wp-admin/edit-tags.php?action=edit&taxonomy=download_tag&tag_ID=6`

 Since `&post_type=download` is not included in the URL, the dashboard menu
 highlight changes to Posts.

 To fix this, a couple of things are needed:

 1. `post_type` needs to be passed as an argument to `wp_tag_cloud()` in
 `wp-admin/edit-tags.php` if the current user can edit the term.

 2, The `wp_tag_cloud()` function should call `get_edit_term_link()`
 instead of `get_edit_tag_link()` when the `link` parameter is set to
 `edit`. The `post_type` arg passed should also be passed as the third
 parameter to `get_edit_term_link()`, for the object type.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25566>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list