thoughtis / cata-co-authors-plus

Common functions, configuration and compatibility fixes for Co-Authors Plus when used in Cata child themes. Not a fork or replacement for CAP.
GNU General Public License v3.0
0 stars 0 forks source link

Compat with CoAuthors Plus 3.5+ #26

Closed douglas-johnson closed 2 years ago

douglas-johnson commented 2 years ago

Co-Authors Plus 3.5 introduced block editor compatibility. https://github.com/Automattic/Co-Authors-Plus/releases/tag/3.5

To do that, the taxonomy used by Co-Authors Plus was opened up to the WordPress REST API. Well, that's what our plugin does too. CAP made some similar decisions, but they're not all identical.

For example, we used the rest_base coauthor and they used coauthors

We'll need to

There are likely to be other fixes as well. I will report them here after testing.

douglas-johnson commented 2 years ago

After removing our custom rest_base I tested these endpoints successfully:

GET /wp-json/wp/v2/coauthors/?search=:slug
GET /wp-json/wp/v2/coauthors/?order=desc&orderby=id
DEL /wp-json/wp/v2/coauthors/:id/?force=true
POST Create /wp-json/wp/v2/coauthors/
POST Update /wp-json/wp/v2/coauthors/:id/

I tested activating and deactivating our plugin, Co-Authors Plus worked normally in the editor for users with author, editor and admin permissions.