Timeline for Custom Taxonomy Invalid in REST API
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 12, 2021 at 6:37 | vote | accept | stoi2m1 | ||
Mar 12, 2021 at 6:37 | history | edited | stoi2m1 | CC BY-SA 4.0 |
[Edit removed during grace period]
|
Mar 11, 2021 at 4:28 | comment | added | stoi2m1 |
I was completely aware of the need to use current docs, I registered this custom taxonomy at least 6 years ago or more when I built the site. It was a recent need to create a new sub blog in the WPMU network and using the API to obtain data. It was the disconnect in time that made this frustrating. That last comment is great, I had no idea the switch_to_blog() would not switch active theme or plugins, but it did cross my mind and that's why I moved the registration to a mu-plugin. Thanks for the feedback and info.
|
|
Mar 10, 2021 at 7:22 | comment | added | Jacob Peattie |
Also, note that switch_to_blog() does not change the active plugins or themes, so if a post type is only registered on one blog, it will be not be registered by running switch_to_blog() to that blog.
|
|
Mar 10, 2021 at 7:21 | comment | added | Jacob Peattie | Note that the REST API has been v2 since 2015, and merged into WordPress core since 2016, so make sure you're looking at up-to-date documentation by starting with the official docs: developer.wordpress.org/rest-api And ignoring any docs that refer to the API as a plugin. | |
Mar 9, 2021 at 14:37 | history | answered | stoi2m1 | CC BY-SA 4.0 |