When is WP_REST_Server available?
-
At what point during the execution of a WordPress plugin, admin or front-end, are static methods of WP_REST_Server available? I’m trying to extract information about the REST setup (such as endpoints and namespaces) for a given site by using functions in WP_REST_Server but end up with errors in the log file.
Surely, WP must know about its REST environment at a rather early point of a request since it knows how to determine if it’s a REST request or not?
I’d rather not make an actual REST request to “myself” for things that the REST API already knows and should be able to give me directly.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘When is WP_REST_Server available?’ is closed to new replies.