PUM_Model_Popup::reset_counts()
Log and reset popup open count to 0.
Description Description
Source Source
File: classes/Model/Popup.php
public function reset_counts() { // Log the reset time and count. add_post_meta( $this->ID, 'popup_count_reset', array( 'timestamp' => current_time( 'timestamp', 0 ), 'opens' => absint( $this->get_event_count( 'open', 'current' ) ), 'conversions' => absint( $this->get_event_count( 'conversion', 'current' ) ), ) ); foreach ( array( 'open', 'conversion' ) as $event ) { $keys = PUM_Analytics::event_keys( $event ); $this->update_meta( 'popup_' . $keys[0] . '_count', 0 ); $this->update_meta( 'popup_last_' . $keys[1], 0 ); } }
Expand full source code Collapse full source code View on Trac