_deprecated_argument

The timeline below displays how wordpress function _deprecated_argument has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.4

/**
 * 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.
 *
 * @since 3.0.0
 * @since 5.4.0 This function is no longer marked as "private".
 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE).
 *
 * @param string $function_name The function that was called.
 * @param string $version       The version of WordPress that deprecated the argument used.
 * @param string $message       Optional. A message regarding the change. Default empty string.
 */
function _deprecated_argument($function_name, $version, $message = '')
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function_name The function that was called.
     * @param string $message       A message regarding the change.
     * @param string $version       The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function_name, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if ($message) {
                $message = sprintf(
                    /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
                    __('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'),
                    $function_name,
                    $version,
                    $message
                );
            } else {
                $message = sprintf(
                    /* translators: 1: PHP function name, 2: Version number. */
                    __('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'),
                    $function_name,
                    $version
                );
            }
        } else if ($message) {
            $message = sprintf('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function_name, $version, $message);
        } else {
            $message = sprintf('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function_name, $version);
        }
        wp_trigger_error('', $message, E_USER_DEPRECATED);
    }
}

WordPress Version: 6.2

/**
 * 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 hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @since 5.4.0 This function is no longer marked as "private".
 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE).
 *
 * @param string $function_name The function that was called.
 * @param string $version       The version of WordPress that deprecated the argument used.
 * @param string $message       Optional. A message regarding the change. Default empty string.
 */
function _deprecated_argument($function_name, $version, $message = '')
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function_name The function that was called.
     * @param string $message       A message regarding the change.
     * @param string $version       The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function_name, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if ($message) {
                trigger_error(sprintf(
                    /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
                    __('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'),
                    $function_name,
                    $version,
                    $message
                ), E_USER_DEPRECATED);
            } else {
                trigger_error(sprintf(
                    /* translators: 1: PHP function name, 2: Version number. */
                    __('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'),
                    $function_name,
                    $version
                ), E_USER_DEPRECATED);
            }
        } else if ($message) {
            trigger_error(sprintf('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function_name, $version, $message), E_USER_DEPRECATED);
        } else {
            trigger_error(sprintf('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function_name, $version), E_USER_DEPRECATED);
        }
    }
}

WordPress Version: 6.1

/**
 * 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 hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @since 5.4.0 This function is no longer marked as "private".
 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE).
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default empty.
 */
function _deprecated_argument($function, $version, $message = '')
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if ($message) {
                trigger_error(sprintf(
                    /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
                    __('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'),
                    $function,
                    $version,
                    $message
                ), E_USER_DEPRECATED);
            } else {
                trigger_error(sprintf(
                    /* translators: 1: PHP function name, 2: Version number. */
                    __('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'),
                    $function,
                    $version
                ), E_USER_DEPRECATED);
            }
        } else if ($message) {
            trigger_error(sprintf('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message), E_USER_DEPRECATED);
        } else {
            trigger_error(sprintf('Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version), E_USER_DEPRECATED);
        }
    }
}

WordPress Version: 5.5

/**
 * Mark 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 hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @since 5.4.0 This function is no longer marked as "private".
 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE).
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default empty.
 */
function _deprecated_argument($function, $version, $message = '')
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if ($message) {
                trigger_error(sprintf(
                    /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
                    __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'),
                    $function,
                    $version,
                    $message
                ), E_USER_DEPRECATED);
            } else {
                trigger_error(sprintf(
                    /* translators: 1: PHP function name, 2: Version number. */
                    __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'),
                    $function,
                    $version
                ), E_USER_DEPRECATED);
            }
        } else if ($message) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message), E_USER_DEPRECATED);
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version), E_USER_DEPRECATED);
        }
    }
}

WordPress Version: 5.4

/**
 * Mark 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 hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @since 5.4.0 This function is no longer marked as "private".
 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE).
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default null.
 */
function _deprecated_argument($function, $version, $message = null)
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                trigger_error(sprintf(
                    /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
                    __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'),
                    $function,
                    $version,
                    $message
                ), E_USER_DEPRECATED);
            } else {
                trigger_error(sprintf(
                    /* translators: 1: PHP function name, 2: Version number. */
                    __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'),
                    $function,
                    $version
                ), E_USER_DEPRECATED);
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message), E_USER_DEPRECATED);
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version), E_USER_DEPRECATED);
        }
    }
}

WordPress Version: 5.3

/**
 * Mark 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 hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @access private
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default null.
 */
function _deprecated_argument($function, $version, $message = null)
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message));
            } else {
                /* translators: 1: PHP function name, 2: Version number. */
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version));
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message));
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version));
        }
    }
}

WordPress Version: 5.1

/**
 * Mark 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 hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @access private
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default null.
 */
function _deprecated_argument($function, $version, $message = null)
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                /* translators: 1: PHP function name, 2: version number, 3: optional message regarding the change */
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message));
            } else {
                /* translators: 1: PHP function name, 2: version number */
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version));
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message));
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version));
        }
    }
}

WordPress Version: 4.7

/**
 * Mark 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 hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @access private
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default null.
 */
function _deprecated_argument($function, $version, $message = null)
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                /* translators: 1: PHP function name, 2: version number, 3: optional message regarding the change */
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message));
            } else {
                /* translators: 1: PHP function name, 2: version number */
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version));
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message));
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version));
        }
    }
}

WordPress Version: 4.6

/**
 * Mark 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 hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @access private
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default null.
 */
function _deprecated_argument($function, $version, $message = null)
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filters whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message));
            } else {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version));
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message));
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version));
        }
    }
}

WordPress Version: 4.1

/**
 * Mark 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' );
 *     }
 *
 *
 * There is a hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @access private
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default null.
 */
function _deprecated_argument($function, $version, $message = null)
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filter whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message));
            } else {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version));
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message));
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version));
        }
    }
}

WordPress Version: 4.0

/**
 * Mark 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:
 * <code>
 * if ( ! empty( $deprecated ) ) {
 * 	_deprecated_argument( __FUNCTION__, '3.0' );
 * }
 * </code>
 *
 * There is a hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @access private
 *
 * @param string $function The function that was called.
 * @param string $version  The version of WordPress that deprecated the argument used.
 * @param string $message  Optional. A message regarding the change. Default null.
 */
function _deprecated_argument($function, $version, $message = null)
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filter whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message));
            } else {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version));
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message));
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version));
        }
    }
}

WordPress Version: 3.9

/**
 * Marks a function argument as deprecated and informs 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:
 * <code>
 * if ( !empty($deprecated) )
 * 	_deprecated_argument( __FUNCTION__, '3.0' );
 * </code>
 *
 * There is a hook deprecated_argument_run 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.
 *
 * @since 3.0.0
 * @access private
 *
 * @param string $function The function that was called
 * @param string $version The version of WordPress that deprecated the argument used
 * @param string $message Optional. A message regarding the change.
 */
function _deprecated_argument($function, $version, $message = null)
{
    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action('deprecated_argument_run', $function, $message, $version);
    /**
     * Filter whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message));
            } else {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version));
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message));
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version));
        }
    }
}

WordPress Version: 3.7

/**
 * Marks a function argument as deprecated and informs 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:
 * <code>
 * if ( !empty($deprecated) )
 * 	_deprecated_argument( __FUNCTION__, '3.0' );
 * </code>
 *
 * There is a hook deprecated_argument_run 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.
 *
 * @package WordPress
 * @subpackage Debug
 * @since 3.0.0
 * @access private
 *
 * @uses do_action() Calls 'deprecated_argument_run' and passes the function name, a message on the change,
 *   and the version in which the argument was deprecated.
 * @uses apply_filters() Calls 'deprecated_argument_trigger_error' and expects boolean value of true to do
 *   trigger or false to not trigger error.
 *
 * @param string $function The function that was called
 * @param string $version The version of WordPress that deprecated the argument used
 * @param string $message Optional. A message regarding the change.
 */
function _deprecated_argument($function, $version, $message = null)
{
    do_action('deprecated_argument_run', $function, $message, $version);
    // Allow plugin to filter the output error trigger
    if (WP_DEBUG && apply_filters('deprecated_argument_trigger_error', true)) {
        if (function_exists('__')) {
            if (!is_null($message)) {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message));
            } else {
                trigger_error(sprintf(__('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version));
            }
        } else if (!is_null($message)) {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message));
        } else {
            trigger_error(sprintf('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version));
        }
    }
}