Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WPCOM merge: list post type taxonomies endpoint (Automattic#9428)
* REST API: CPT: Preserve custom taxonomy registrations when localizing This revision seeks to resolve an issue where localized requests for taxonomies for themes where custom taxonomy associations exist will not preserve those associations. For example, themes where "featured-content" is supported (e.g. Sketch) register the "post_tag" taxonomy for "page" types. If a request is issued with locale specified for this site to retrieve page taxonomies, previously the "post_tag" taxonomy was not returned. The fix here is to track taxonomies for the requested post type before calling this method, then reapplying them after create_initial_taxonomies is called. We need to call create_initial_taxonomies because it runs very early in the page lifecycle, before localization has had a chance to take effect. See: Automattic/wp-calypso#6934 (comment) Differential Revision: D3465 Merges r146417-wpcom. * Moved post type taxonomies lister endpoint instantiation to the file that defines it. Details: https://[private link] Merges r161691-wpcom.
- Loading branch information