\WP_Stager_Integration\Event::get_upcoming_events(int $limit = 10): array[]

Description

Gets upcoming events.

Parameters:

ParameterTypeDescription
$limit int The maximum number of events to return.

Returns:

array[] List of raw Stager event arrays.

Information

Fileclass-event.php line 604

Full Code

/**
 * Gets upcoming events.
 *
 * @param int $limit   The maximum number of events to return.
 *
 * @return array[] List of raw Stager event arrays.
 */
public static function get_upcoming_events( $limit = 10 ) {

    // Type casting
    $limit = (int) $limit;

    // Get data
    $now = Calendar::calculate_timestamp_day_start( time() );

    return self::get_events_within_date_range( $now, null, $limit );
}

💡 If you ever get stuck or have a question, please check our FAQs, our Free Integration Service, our paid Full Integration Service, or reach out to us!

Get WP Stager Integration

🎁 Limited offer: Use code WELCOME26 to get your first month for free!