CalendarWP is the next chapter of Calendarize it! For existing customers →

Developers / CalendarWP

Hook reference

These hooks are present in core 1.0.58-rc137. Parameter lists below are in callback order. The first parameter of a filter is the value you must return. Paths identify files in the editable source package, not public web endpoints.

Upcoming Events

Source: includes/packages/class-rhc-package-upcoming-events.php.

Filter Callback parameters Return
calendarwp_upcoming_events_event_url $url, $event_id, $occurrence, $attributes URL string
calendarwp_upcoming_events_item_meta $meta, $event_id, $occurrence, $attributes Array of HTML strings
calendarwp_upcoming_events_item_html $html, $event_id, $occurrence, $attributes Complete card HTML string
calendarwp_upcoming_events_tax_query $tax_query, $attributes WordPress taxonomy-query array
calendarwp_upcoming_events_occurrences $rows, $attributes, $now, $horizon Array of occurrence rows

Occurrence rows contain post_id, event_start, event_end, allday and number. $now and $horizon are date objects from the query. Preserve those fields if filtering rows. The renderer checks public visibility after the occurrence filter; that does not make arbitrary replacement HTML or metadata safe.

Example: add a public note to each matching card

add_filter( 'calendarwp_upcoming_events_item_meta', 'acme_cwp_card_note', 10, 4 );

function acme_cwp_card_note( $meta, $event_id, $occurrence, $attributes ) {
    $note = get_post_meta( $event_id, '_acme_cwp_public_note', true );
    if ( is_array( $meta ) && is_string( $note ) && '' !== trim( $note ) ) {
        $meta[] = '<span class="acme-cwp-note">' . esc_html( $note ) . '</span>';
    }
    return $meta;
}

The note must be explicitly public. This example reads an existing field; it does not create an editor control or save handler. The complete example add-on adds those pieces.

Event and term overlays

Source: includes/REST/class-rhc-rest.php.

Filter Callback parameters Return
calendarwp_event_overlay_content $content, $post, $occurrence HTML string
calendarwp_term_overlay_content $content, $term HTML string

$post is a WP_Post; $term is a WP_Term. Overlay occurrence context is resolved by the REST controller and is not the same contract as an Upcoming Events index row. Do not copy an assumed timestamp format between them. Append escaped content or return the original content unchanged. These filters change overlays, not every single-event template.

Public event knowledge

Source: includes/class-calendarwp-event-knowledge.php.

calendarwp_event_knowledge_public_sections( $sections, $event_id ) returns an array keyed by a stable, prefixed identifier. Each item must contain non-empty title and text strings.

add_filter( 'calendarwp_event_knowledge_public_sections', 'acme_cwp_knowledge', 10, 2 );

function acme_cwp_knowledge( $sections, $event_id ) {
    $note = get_post_meta( $event_id, '_acme_cwp_public_note', true );
    if ( is_array( $sections ) && is_string( $note ) && '' !== trim( $note ) ) {
        $sections['acme-public-note'] = array(
            'title' => __( 'Visitor note', 'acme-calendarwp-note' ),
            'text'  => wp_strip_all_tags( $note ),
        );
    }
    return $sections;
}

The core checks public-event eligibility before collection. Your callback is still responsible for contributing only public facts. Do not include remaining capacity, attendee records, credentials or instructions for the AI to follow. Knowledge is reference data, not a system prompt, and adding a fact does not guarantee its use in every answer.

Ordinary event metadata changes queue refreshes. When an external source owned by your add-on changes public facts across events, signal do_action( 'calendarwp_public_knowledge_changed' ); once after the actual change, not on every page load. The listener in includes/class-calendarwp-knowledge-builder.php restarts a bounded background scan. No callback arguments are required.

Occurrence updates

calendarwp_event_occurrences_updated( $event_id ) is an action emitted after occurrence regeneration in includes/class-rhc-save-post-generate-event-meta.php.

Use it to invalidate your own derived data or enqueue bounded work. It can run repeatedly for an event. Make handlers idempotent and avoid updating the same event recursively. It is not a booking-confirmation event.

Add-on registration

calendarwp_options_addons_registry( $addons ) returns add-on definitions keyed by an ID. See includes/admin/class-rhc-admin-options.php and Build an add-on.

Use a unique ID rather than replacing a built-in entry. Built-in commercial entries retain their package and entitlement metadata; installed add-ons can augment their navigation links but cannot redefine those catalog rules through this filter.

Advanced boundaries

Other hooks exist, including integration-provider registration, options schemas and permission filters. Their presence alone is not a complete integration contract. This guide intentionally does not provide examples that bypass event visibility, licensing or booking locks. Verify the corresponding source and tests before depending on those internals.

Coming soon · Community Events

Make room for your community.

Give your members a place to share what’s happening and help your calendar grow together. Community Events is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

Coming soon · Compass

Their next great plan starts with a search.

Help visitors discover the events that speak to them, right on your WordPress site. Compass is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

Coming soon · RSVP

Turn interest into a place on the guest list.

Make it easy for people to say they’re coming, and keep your event attendance organized. RSVP is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

Coming soon · Scheduler

Make time for what comes next.

Bring your availability and bookings together in an experience built around your time. Scheduler is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

Coming soon · Event Gallery

Let your photos tell the story and give visitors a glimpse of what awaits. Event Gallery is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

Coming soon · Event Countdown

Something worth counting down to.

Build anticipation for your next event. Event Countdown is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

Coming soon · Events Map

Put their next experience on the map.

Help visitors discover what’s happening and where to find it. Events Map is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

Coming soon · Personal Calendars

A calendar that feels like theirs.

Give signed-in members a dedicated view of the events assigned to them. Personal Calendars is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

Coming soon · Google Calendar Sync

Your plans. A wider audience.

Bring events from Google Calendar into your WordPress site, with one-way synchronization. Google Calendar Sync is one of nine add-ons coming with CalendarWP.

We’re putting the finishing touches on it. The full reveal is coming soon.

CalendarWP help

Use ↑ and ↓ to explore results. Enter opens a result. Escape closes search.

Browse all guides →

Scheduler screenshot