wpcf7_deprecated_function()
Marks a function as deprecated and informs when it has been used.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wpcf7_deprecated_function( $function_name, $version, $replacement );
- $function_name(строка) (обязательный)
- The function that was called.
- $version(строка) (обязательный)
- The version of Contact Form 7 that deprecated the function.
- $replacement(строка) (обязательный)
- The function that should have been called.
Код wpcf7_deprecated_function() wpcf7 deprecated function CF7 6.1.6
function wpcf7_deprecated_function( $function_name, $version, $replacement ) {
if ( ! WP_DEBUG ) {
return;
}
if ( function_exists( '__' ) ) {
/* translators: 1: PHP function name, 2: version number, 3: alternative function name */
$message = __( 'Function %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' );
} else {
$message = 'Function %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.';
}
$message = sprintf( $message, $function_name, $version, $replacement );
wp_trigger_error( '', $message, E_USER_DEPRECATED );
}