REST API: Ensure depracation errors are called while preloading data with the REST API.
Fixes #50318. Props dlh, TimothyBlynJacobs. Built from https://develop.svn.wordpress.org/trunk@48150 git-svn-id: http://core.svn.wordpress.org/trunk@47919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
517f6501df
commit
d4f243d9a0
|
@ -178,11 +178,13 @@ function rest_api_register_rewrites() {
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
*/
|
*/
|
||||||
function rest_api_default_filters() {
|
function rest_api_default_filters() {
|
||||||
|
if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
|
||||||
// Deprecated reporting.
|
// Deprecated reporting.
|
||||||
add_action( 'deprecated_function_run', 'rest_handle_deprecated_function', 10, 3 );
|
add_action( 'deprecated_function_run', 'rest_handle_deprecated_function', 10, 3 );
|
||||||
add_filter( 'deprecated_function_trigger_error', '__return_false' );
|
add_filter( 'deprecated_function_trigger_error', '__return_false' );
|
||||||
add_action( 'deprecated_argument_run', 'rest_handle_deprecated_argument', 10, 3 );
|
add_action( 'deprecated_argument_run', 'rest_handle_deprecated_argument', 10, 3 );
|
||||||
add_filter( 'deprecated_argument_trigger_error', '__return_false' );
|
add_filter( 'deprecated_argument_trigger_error', '__return_false' );
|
||||||
|
}
|
||||||
|
|
||||||
// Default serving.
|
// Default serving.
|
||||||
add_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
|
add_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-alpha-48149';
|
$wp_version = '5.5-alpha-48150';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue