wpcf7_doing_it_wrong()CF7 1.0

Marks something as being incorrectly called.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wpcf7_doing_it_wrong( $function_name, $message, $version );
$function_name(строка) (обязательный)
The function that was called.
$message(строка) (обязательный)
A message explaining what has been done incorrectly.
$version(строка) (обязательный)
The version of Contact Form 7 where the message was added.

Код wpcf7_doing_it_wrong() CF7 5.9.3

function wpcf7_doing_it_wrong( $function_name, $message, $version ) {
	if ( WP_DEBUG ) {
		if ( function_exists( '__' ) ) {
			if ( $version ) {
				$version = sprintf(
					/* translators: %s: Contact Form 7 version number. */
					__( '(This message was added in Contact Form 7 version %s.)', 'contact-form-7' ),
					$version
				);
			}

			trigger_error(
				sprintf(
					/* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Contact Form 7 version number. */
					__( 'Function %1$s was called incorrectly. %2$s %3$s', 'contact-form-7' ),
					$function_name,
					$message,
					$version
				),
				E_USER_NOTICE
			);
		} else {
			if ( $version ) {
				$version = sprintf(
					'(This message was added in Contact Form 7 version %s.)',
					$version
				);
			}

			trigger_error(
				sprintf(
					'Function %1$s was called incorrectly. %2$s %3$s',
					$function_name,
					$message,
					$version
				),
				E_USER_NOTICE
			);
		}
	}
}