rest_handle_deprecated_argument( string $function, string $message, string $version )
Handles _deprecated_argument() errors.
Description Description
Parameters Parameters
- $function
-
(string) (Required) The function that was called.
- $message
-
(string) (Required) A message regarding the change.
- $version
-
(string) (Required) Version.
Source Source
File: wp-includes/rest-api.php
function rest_handle_deprecated_argument( $function, $message, $version ) { if ( ! WP_DEBUG || headers_sent() ) { return; } if ( ! empty( $message ) ) { /* translators: 1: Function name, 2: WordPress version number, 3: Error message. */ $string = sprintf( __( '%1$s (since %2$s; %3$s)' ), $function, $version, $message ); } else { /* translators: 1: Function name, 2: WordPress version number. */ $string = sprintf( __( '%1$s (since %2$s; no alternative available)' ), $function, $version ); } header( sprintf( 'X-WP-DeprecatedParam: %s', $string ) ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |