Commit Graph

2 Commits

Author SHA1 Message Date
Dion Hulse 5789e5f074 Taxonomy: Disallow overriding the `name` property when registering a taxonomy.
Props wpfo for initial patch, swissspidy.
Merges [40049] to the 4.7 branch.
Fixes #39308.

Built from https://develop.svn.wordpress.org/branches/4.7@40083


git-svn-id: http://core.svn.wordpress.org/branches/4.7@40020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-20 06:16:53 +00:00
Pascal Birchler ef8f9168b6 Taxonomy: Introduce `WP_Taxonomy` and use it in `register_taxonomy()` and `unregister_taxonomy()`.
This changes the global `$wp_taxonomies` to an array of `WP_Taxonomy ` objects. `WP_Taxonomy ` includes methods to handle rewrite rules and hooks.
Each taxonomy argument becomes a property of `WP_Taxonomy`. Introducing such a class makes further improvements in the future much more feasible.

Props boonebgorges for review.
Fixes #36224. See #36217.
Built from https://develop.svn.wordpress.org/trunk@38747


git-svn-id: http://core.svn.wordpress.org/trunk@38690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 17:12:29 +00:00