diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index da594f3e08..ac422b27aa 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -178,11 +178,13 @@ function rest_api_register_rewrites() { * @since 4.4.0 */ function rest_api_default_filters() { - // Deprecated reporting. - add_action( 'deprecated_function_run', 'rest_handle_deprecated_function', 10, 3 ); - add_filter( 'deprecated_function_trigger_error', '__return_false' ); - add_action( 'deprecated_argument_run', 'rest_handle_deprecated_argument', 10, 3 ); - add_filter( 'deprecated_argument_trigger_error', '__return_false' ); + if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { + // Deprecated reporting. + add_action( 'deprecated_function_run', 'rest_handle_deprecated_function', 10, 3 ); + add_filter( 'deprecated_function_trigger_error', '__return_false' ); + add_action( 'deprecated_argument_run', 'rest_handle_deprecated_argument', 10, 3 ); + add_filter( 'deprecated_argument_trigger_error', '__return_false' ); + } // Default serving. add_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index b71e32fc60..4a3f6055d0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @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.