Noptin_Ajax::log_form_impression()

Logs a form view


Return Return

(void)


Top ↑

Source Source

File: includes/class-noptin-ajax.php

	public function log_form_impression() {

		// Verify nonce.
		check_ajax_referer( 'noptin' );

		if ( ! empty( $_POST['form_id'] ) ) {
			$form_id = intval( $_POST['form_id'] );
			$count   = (int) get_post_meta( $form_id, '_noptin_form_views', true );
			update_post_meta( $form_id, '_noptin_form_views', $count + 1 );
		}
		exit;

	}

Top ↑

Changelog Changelog

Changelog
VersionDescription
1.1.1Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation