WordPress at a glance
function is not described

WP_REST_Controller::register_routes() public WP 4.7.0

Registers the routes for the objects of the controller.

{} It's a method of the class: WP_REST_Controller{}

No Hooks.

Return

Null. Nothing.

Usage

$WP_REST_Controller = new WP_REST_Controller();
$WP_REST_Controller->register_routes();

Notes

  • See: register_rest_route()

Changelog

Since 4.7.0 Introduced.

Code of WP_REST_Controller::register_routes() WP 5.5.1

<?php
public function register_routes() {
	_doing_it_wrong(
		'WP_REST_Controller::register_routes',
		/* translators: %s: register_routes() */
		sprintf( __( "Method '%s' must be overridden." ), __METHOD__ ),
		'4.7'
	);
}