wpcf7_control_init()CF7 1.0

Handles a submission in non-Ajax mode.

Хуков нет.

Возвращает

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

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

wpcf7_control_init();

Код wpcf7_control_init() CF7 6.0.1

function wpcf7_control_init() {
	if ( WPCF7_Submission::is_restful() ) {
		return;
	}

	if ( isset( $_POST['_wpcf7'] ) ) {
		$contact_form = wpcf7_contact_form( (int) $_POST['_wpcf7'] );

		if ( $contact_form ) {
			$contact_form->submit();
		}
	}
}