Admin bar edit action is affected by query_posts, tax_query
|Reported by:||kanuck54||Owned by:||ryan|
I don't know if this part is a bug, but I'm guessing yes:
If I run query_posts() in a custom post type's template, I lose the admin bar's "edit" action.
This part, however, is definitely a bug:
If I include a tax_query in my query_posts(), my edit link actually changes to an edit link for the last item in the array that was given to the tax_query, with the label "Edit Category."
Here's the minimum offending code to reproduce, placed into a custom post type template:
query_posts( array( 'post_type' => 'fp_toy', 'tax_query' => array( array( 'taxonomy' => 'fp_gender', 'field' => 'ID', 'terms' => array(14) ) ), ) );
Now my "Edit Toy" button says "Edit Category" instead, and points to edit-tags.php?action=edit&taxonomy=fp_gender&tag_ID=14.
Ideally I would expect the admin bar's edit action to be unaffected by what happens inside the template. And I definitely don't expect a completely unrelated action to show up instead!
Change History (12)
- Milestone changed from Awaiting Review to 3.3