rest_jsonp_enabled WordPress Filter Hook

The rest_jsonp_enabled hook enables JSONP for the REST API. When this hook is called, it will add the ?callback=? to the REST API URL. This will allow WordPress to make requests to the REST API using JSONP.

apply_filters( 'rest_jsonp_enabled', bool $jsonp_enabled ) #

Filters whether JSONP is enabled for the REST API.


Parameters

$jsonp_enabled

(bool)Whether JSONP is enabled. Default true.


Top ↑

Source

File: wp-includes/rest-api/class-wp-rest-server.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.