rest_handle_deprecated_argument( string $function, string $message, string $version )
Handles _deprecated_argument() errors.
Parameters
- $function
-
(Required) The function that was called.
- $message
-
(Required) A message regarding the change.
- $version
-
(Required) Version.
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: ClassicPress or WordPress version number, 3: error message */
$string = sprintf( __( '%1$s (since %2$s; %3$s)' ), $function, $version, $message );
} else {
/* translators: 1: function name, 2: ClassicPress or WordPress version number */
$string = sprintf( __( '%1$s (since %2$s; no alternative available)' ), $function, $version );
}
header( sprintf( 'X-WP-DeprecatedParam: %s', $string ) );
}
Changelog
Version | Description |
---|---|
WP-4.4.0 | Introduced. |