_deprecated_argument
_deprecated_argument ( $function_name, $version, $message = '' )
Parameters:- (string) function_name The function that was called.
- (string) version The version of WordPress that deprecated the argument used.
- (string) message Optional. A message regarding the change. Default empty string.
Defined at:Change Log: - Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Description
Marks a function argument as deprecated and inform when it has been used.This function is to be used whenever a deprecated function argument is used.
Before this function is called, the argument must be checked for whether it was
used by comparing it to its default value or evaluating whether it is empty.
For example:
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '3.0.0' );
}
There is a {@see 'deprecated_argument_run'} hook that will be called that can be used
to get the backtrace up to what file and function used the deprecated argument.
The current behavior is to trigger a user error if WP_DEBUG is true.