#16172 closed defect (bug) (fixed)
No label property for post_format taxonomy.
Reported by: | mfields | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Taxonomy | Keywords: | dev-feedback |
Focuses: | Cc: |
Description
All core taxonomies except post_format have a non-empty value set for the label property.
The following code will dump all registered taxonomies in the administration panels.
function mfields_get_taxonomies() { var_dump( get_taxonomies( array(), 'objects' ) ); } add_action( 'admin_notices', 'mfields_get_taxonomies' );
A dump of all core taxonomies on my installation of 3.1RC2 can be viewed here:
http://wordpress.pastebin.com/U2kbH3wM
Attachments (2)
Change History (11)
#2
@
14 years ago
There are empty values in create_initial_taxonomies()
for some reason:
register_taxonomy( 'post_format', 'post', array( 'public' => true, 'hierarchical' => false, 'labels' => array( 'name' => '', 'singular_name' => '', ),
Patch included. However though “Format” is an existing string, “Formats” isn't. Not sure if we should use singular name for both fields. Perhaps this is the second actual i18n-change
?
#3
@
14 years ago
We can always just kill 'labels' and default to 'post_format'. It's not shown in the UI currently. 'Format' seems fine for both for now.
#5
@
14 years ago
- Cc michael@… added
Would it make sense to to set label directly? All other core taxonomies have this property set and it is very easy to pull out of the objects created by get_taxonomies(). I reported this because, while updating my Taxonomy Widget plugin to add support for post formats, I noticed that the label was missing. While this taxonomy is not part of the core administration panels, I think it would be great if plugins could easily add it to their UI's.
BTW, I used to get emails from all of the tickets that I posted here, but I have to manually subscribe to them now. Does this have something to do with the upgrade?
#7
@
14 years ago
- Milestone changed from Awaiting Review to 3.1
- Resolution set to fixed
- Status changed from new to closed
Let's leave this like this for now. You can only have one format anyway, so get_the_taxonomies() showing "Format:" rather than "Formats:" isn't the end of the world.
Michael, can you check your trac preferences to see ig your email is configured?
#8
@
14 years ago
My bad, This is a perfect solution! I must have been tired when I wrote my last post and confused the arguments in register_taxonomy() with the properties of the object created by it :)
My email is configured, but, if I remember correctly, there used to be an option to get emailed on all tickets you create which I selected a while back but seems to have stopped working. Is the a better channel to address these concerns? Thanks!
#9
@
14 years ago
Perhaps read this and comment here: http://wpdevel.wordpress.com/2011/01/08/i-know-trac-is-not-always-the-most-intui/
We can use 'Format' as an existing string for now.
Looks like _get_custom_object_labels() isn't doing its job properly.