LLMS_Sessions::get_session_events( LLMS_Event $start, array $args = array() )
Retrieve an array of events which occurred during a session.
Parameters Parameters
- $start
-
(LLMS_Event) (Required) Event record for the session.start event.
- $args
-
(array) (Optional) Array of additional arguments to pass to the LLMS_Events_Query.
Default value: array()
Return Return
(LLMS_Event[])
Source Source
File: includes/class-llms-sessions.php
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | public function get_session_events( $start , $args = array () ) { $end = $this ->get_session_end( $start ); $args = wp_parse_args( $args , array ( 'date_after' => $start ->get( 'date' ), 'exclude' => array ( $start ->get( 'id' ) ), 'actor' => $start ->get( 'actor_id' ), 'sort' => array ( 'date' => 'ASC' , ), 'per_page' => 10, ) ); if ( $end ) { $args [ 'date_before' ] = $end ->get( 'date' ); $args [ 'exclude' ][] = $end ->get( 'id' ); } $query = new LLMS_Events_Query( $args ); return $query ->get_events(); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.36.0 | Introduced. |