wpcf7_deprecated_function()CF7 1.0

Marks a function as deprecated and informs when it has been used.

Хуков нет.

Возвращает

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() CF7 5.6.4

function wpcf7_deprecated_function( $function_name, $version, $replacement ) {
	if ( WP_DEBUG ) {
		if ( function_exists( '__' ) ) {
			trigger_error(
				sprintf(
					/* translators: 1: PHP function name, 2: version number, 3: alternative function name */
					__( 'Function %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ),
					$function_name, $version, $replacement
				),
				E_USER_DEPRECATED
			);
		} else {
			trigger_error(
				sprintf(
					'Function %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.',
					$function_name, $version, $replacement
				),
				E_USER_DEPRECATED
			);
		}
	}
}