WP_REST_Controller::register_routes() WordPress Method

The register_routes() method is used to register the routes for a REST controller. This method is called by the Wordpress REST API when initializing the REST API.

WP_REST_Controller::register_routes() #

Registers the routes for the objects of the controller.


Description

Top ↑

See also


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-controller.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.0'
		);
	}


Top ↑

Changelog

Changelog
VersionDescription
4.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.