pronamic / wp-pronamic-events

Pronamic Events is a basic plugin to add some Events functionality.

Home Page:http://www.pronamic.eu/plugins/pronamic-events/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pronamic Events is a basic plugin to add some Events functionality.

WordPress Query

$query = new WP_Query(
    array(
        'post_type'                 => 'pronamic_event',
        'pronamic_event_date_after' => strtotime( 'today' ), // default
        'orderby'                   => 'pronamic_event_start_date', // default
    )
);
$query = new WP_Query(
    array(
        'post_type'                 => 'pronamic_event',
        'pronamic_event_date_after' => strtotime( '-1 month' ),
        'orderby'                   => 'date',
    )
);
$query = new WP_Query(
    array(
        'post_type'                 => 'pronamic_event',
        'pronamic_event_date_after' => false,
        'orderby'                   => 'pronamic_event_start_date',
    )
);
$query = new WP_Query(
    array(
        'post_type'                 => 'pronamic_event',
        'pronamic_event_date_after' => false,
        'orderby'                   => 'pronamic_event_start_date',
        'order'                     => 'ASC',
        'meta_query'                => array(
            array(
                'key'     => '_pronamic_end_date',
                'value'   => array(
                    strtotime( '01-01-2016' ),
                    strtotime( '01-05-2016' ),
                ),
                'compare' => 'BETWEEN',
                'type'    => 'NUMERIC',
            ),
        ),
    )
);

Parameters

pronamic_event_date_after

Type: int
Default: strtotime( 'today' )

orderby

Type: string
Default: pronamic_event_start_date

WordPress Filters

pronamic_events_date_offset

function prefix_pronamic_events_date_offset( $offset = 'today' ) {
	$offset = '-2 days';
	
	return $offset;
}

add_filter( 'pronamic_events_date_offset', 'prefix_pronamic_events_date_offset' );

Post Class

The Pronamic Events will automatic add the event-ended post class if an event is ended.

Multi-block plugin

Resources

About

Pronamic Events is a basic plugin to add some Events functionality.

http://www.pronamic.eu/plugins/pronamic-events/


Languages

Language:PHP 66.8%Language:CSS 28.9%Language:JavaScript 4.3%