Noptin_Ajax::log_form_impression()
Logs a form view
Return Return
(void)
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.1.1 | Introduced. |