wppaste
WordPress

WP_REST_Server

Since
4.4.0
Source
wp-includes/rest-api/class-wp-rest-server.php:15
Core class used to implement the WordPress REST API server.

Compatibility

WordPress
since 4.4.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 24

Every hook that fires from inside WP_REST_Server, in the order it appears in the class, grouped by the method that fires it.

Properties · 5

$namespacesarrayprotected
Namespaces registered to the server.
$endpointsarrayprotected
Endpoints registered to the server.
$route_optionsarrayprotected
Options defined for the routes.
$embed_cachearrayprotected
Caches embedded requests.
$dispatching_requestsarrayprotected
Stores request objects that are currently being handled.

Methods · 37

Source code

#[AllowDynamicProperties]class WP_REST_Server { 	/**	 * Alias for GET transport method.	 *	 * @since 4.4.0	 * @var string	 */	const READABLE = 'GET'; 	/**	 * Alias for POST transport method.	 *	 * @since 4.4.0	 * @var string	 */	const CREATABLE = 'POST'; 	/**	 * Alias for POST, PUT, PATCH transport methods together.	 *	 * @since 4.4.0	 * @var string	 */	const EDITABLE = 'POST, PUT, PATCH'; 	/**	 * Alias for DELETE transport method.	 *	 * @since 4.4.0	 * @var string	 */	const DELETABLE = 'DELETE'; 	/**	 * Alias for GET, POST, PUT, PATCH & DELETE transport methods together.	 *	 * @since 4.4.0	 * @var string	 */	const ALLMETHODS = 'GET, POST, PUT, PATCH, DELETE'; 	/**	 * Namespaces registered to the server.	 *	 * @since 4.4.0	 * @var array	 */	protected $namespaces = array(); 	/**	 * Endpoints registered to the server.	 *	 * @since 4.4.0	 * @var array	 */	protected $endpoints = array(); 	/**	 * Options defined for the routes.	 *	 * @since 4.4.0	 * @var array	 */	protected $route_options = array(); 	/**	 * Caches embedded requests.	 *	 * @since 5.4.0	 * @var array	 */	protected $embed_cache = array(); 	/**	 * Stores request objects that are currently being handled.	 *	 * @since 6.5.0	 * @var array

Changelog

Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/rest-api/class-wp-rest-server.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.