@@ -45,7 +45,6 @@ private function __construct() {
4545
4646 add_action ( 'init ' , array ( $ this , 'register_events ' ), 9 );
4747 add_action ( 'init ' , array ( $ this , 'store_cookie ' ) );
48-
4948 }
5049
5150 /**
@@ -74,11 +73,11 @@ public function get_client_settings() {
7473 return apply_filters (
7574 'llms_events_get_client_settings ' ,
7675 array (
77- 'nonce ' => wp_create_nonce ( 'llms-tracking ' ),
78- 'events ' => $ events ,
76+ 'nonce ' => wp_create_nonce ( 'llms-tracking ' ),
77+ 'events ' => $ events ,
78+ 'saving_frequency ' => get_option ( 'lifterlms_tracked_event_saving_frequency ' , 'minimum ' ),
7979 )
8080 );
81-
8281 }
8382
8483 /**
@@ -104,7 +103,6 @@ public function get_registered_events() {
104103 protected function is_event_valid ( $ event ) {
105104
106105 return array_key_exists ( $ event , $ this ->get_registered_events () );
107-
108106 }
109107
110108 /**
@@ -149,7 +147,6 @@ public function prepare_event( $raw_event = array() ) {
149147 }
150148
151149 return $ prepared ;
152-
153150 }
154151
155152 /**
@@ -221,7 +218,6 @@ public function record( $args = array() ) {
221218 }
222219
223220 return $ llms_event ;
224-
225221 }
226222
227223 /**
@@ -260,7 +256,6 @@ public function record_many( $events = array() ) {
260256 $ wpdb ->query ( 'COMMIT ' );
261257
262258 return $ recorded ;
263-
264259 }
265260
266261 /**
@@ -297,7 +292,6 @@ public function register_events() {
297292 * @param array $events Array of events. Array key is the event name and array value is used to determine if the key is a client-side event.
298293 */
299294 $ this ->registered_events = apply_filters ( 'llms_get_registered_events ' , $ events );
300-
301295 }
302296
303297 /**
@@ -333,7 +327,6 @@ protected function sanitize_raw_event( $raw ) {
333327 }
334328
335329 return $ clean ;
336-
337330 }
338331
339332 /**
@@ -391,7 +384,6 @@ protected function should_track_client_events() {
391384 * @param string[] $post_types Array of post types that should be tracked.
392385 */
393386 return apply_filters ( 'llms_tracking_should_track_client_events ' , $ ret , $ post_types );
394-
395387 }
396388
397389 /**
@@ -419,7 +411,6 @@ public function store_cookie() {
419411
420412 // Cookie reset.
421413 llms_setcookie ( 'llms-tracking ' , '' , time () - 60 , COOKIEPATH ? COOKIEPATH : '/ ' , COOKIE_DOMAIN , llms_is_site_https () && is_ssl () );
422-
423414 }
424415
425416 /**
@@ -453,5 +444,4 @@ public function store_tracking_events( $tracking ) {
453444
454445 return true ;
455446 }
456-
457447}
0 commit comments