[wp-trac] [WordPress Trac] #26511: Introduce a locale-switching function
WordPress Trac
noreply at wordpress.org
Sun Sep 25 10:21:09 UTC 2016
#26511: Introduce a locale-switching function
--------------------------------------+------------------------
Reporter: johnbillion | Owner:
Type: feature request | Status: reviewing
Priority: normal | Milestone: 4.7
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------
Comment (by swissspidy):
Actually, [attachment:26511.6.diff] won't work for post type labels
(though I want to keep the new methods).
`_get_custom_object_labels()` has some logic to add specific labels, like
`name_admin_bar`. If that label isn't set during post type registration,
it falls back to `singular_name`. However, it is set for all the built-in
post types. This means it gets lost when simply calling
`$post_type->labels = get_post_type_labels( $post_type ); `
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26511#comment:64>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list