wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



rest_api_init › Hooks de Ações WordPress

Desde4.4.0
Obsoleton/a
do_action( 'rest_api_init', $wp_rest_server )
Parâmetros:
  • (WP_REST_Server) $wp_rest_server Server object.
    Required: Yes
Definido em:
Codex:

Fires when preparing to serve a REST API request.

Endpoint objects should be created and register their hooks on this action rather than another action to ensure they're only loaded when needed.





Fonte

do_action( 'rest_api_init', $wp_rest_server );