AnsPress_Process_Form::non_ajax_form()

Description #

For non ajax form.

Source #

File: includes/process-form.php

	public function non_ajax_form() {
		$form_action = ap_isset_post_value( 'ap_form_action' );
		$ajax_action = ap_isset_post_value( 'ap_ajax_action' );

		// return if ap_form_action is not set, probably its not our form.
		if ( ! $form_action || $ajax_action ) {
			return;
		}

		$this->request = $_REQUEST; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
		$this->process_form();

		if ( ! empty( $this->redirect ) ) {
			wp_redirect( $this->redirect ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
			exit;
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment