do_action( 'rest_api_init', WP_REST_Server $wp_rest_server )

Fires when preparing to serve an API request.


Description Description

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


Parameters Parameters

$wp_rest_server

(WP_REST_Server) Server object.


Top ↑

Source Source

File: wp-includes/rest-api.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.