wp_rest_server_class WordPress Filter Hook

The wp_rest_server_class WordPress hook is used to modify the REST server class used by WordPress. This can be used to change the default behavior of the WordPress REST API.

apply_filters( 'wp_rest_server_class', string $class_name ) #

Filters the REST Server Class.


Description

This filter allows you to adjust the server class used by the REST API, using a different class to handle requests.


Top ↑

Parameters

$class_name

(string)The name of the server class. Default 'WP_REST_Server'.


Top ↑

Source

File: wp-includes/rest-api.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.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.

Show More