2020-05-02 / 3947阅 / 悠然
注册REST API路由。
注意:请勿在“ rest_api_init”钩子之前使用。
(string)
(Required)
The first URL segment after core prefix. Should be unique to your package/plugin.
(string)
(Required)
The base URL for route you are adding.
(array)
(Optional)
Either an array of options for the endpoint, or an array of arrays for multiple methods.
Default value: array()
(bool)
(Optional)
If the route already exists, should we override it? True overrides, false merges (with newer overriding if duplicate keys exist).
Default value: false
(bool) True on success, false on error.