Opened 9 years ago
Closed 5 years ago
#33530 closed defect (bug) (worksforme)
get_taxonomy_labels() conflicts with the admin bar on archive/taxonomy page
Reported by: | drebbits.web | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Taxonomy | Keywords: | close |
Focuses: | template | Cc: |
Description
The get_taxonomy_labels()
is in conflict with the edit term/taxonomy link on the admin bar on archive/taxonomy page. The object has been casted into array in the process but it never goes back to being object after.
Change History (8)
#2
@
9 years ago
Thanks @SergeyBiryukov!
I'm referring to $tax
object that is used both in taxonomy.php line 488 and admin-bar.php line 580.
To replicate the issue, add $taxonomy_labels = get_taxonomy_labels( get_taxonomy('category') );
in the archive.php of twentyfifteen theme. When you're logged-in, you should see a PHP notice in the admin-bar.php and it breaks the edit taxonomy link that is supposed to be in the admin bar.
#5
@
9 years ago
+1
Also discovered this issue. Seems like there is some type casting from object to array (back and forth) inside of get_taxonomy_labels() and _get_custom_object_labels().
Hi @drebbits.web, welcome to Trac!
Could you clarify which object you are referring to and provide the steps to reproduce the issue on a clean install?