简体   繁体   中英

How to convert WordPress plugins to use WP REST API

I've been reading about WP API and I love the idea however is it far enough along to use? For instance I want to build a custom react front end but use the WP API. My concern is that I won't have access to certain plugin information. Is it possible to hook in and create a custom end point for plugins that do not support WP API?

That is indeed possible. You can for example add values to the response , add support for custom post types or add fully custom endpoints .

Please note that v1 will be replaced by v2 of the API. v2 is still a work in progress - has been for a while - and will introduce a lot of breaking changes, so it would be better to use the latest beta version of the API .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM