Groundplan Pro can be further customized using a number of hooks and filters throughout the plugin to modify the basic HTML output created by the plugin. Each filter can be modified using callbacks with the add_filter() function.


This feature is intended for developers.  Please refer to documentation in the Groundplan plugin for further information.


Helper Filters

FilterDescriptionArguments
xdgp_event_general_ticket_url
SINCE 1.3.8

Modify the processed General Ticket URL in the xdgp_event_general_ticket_url() helper function.$ticket_url - the processed ticket URL
$event - the Event Post Object


Event Block Filters

Filter
Description
Arguments
xdgp_calendar_display_event_link
Modify or apply alternate logic to the link to the Event
or Event-level ticketing when $priority = 'tickets' 
$link - (url) the default link for the Event Block
$event - the Event Post Object
$performance - the current Performance Object
xdgp_calendar_display_event_short_title
SINCE 1.0.15
Modify the Event Short Title
$title - calculated Short Title
$event - Event Post Object
xdgp_calendar_display_event_classes SINCE 0.8.4
Modify or append additional classes applied to the Event Block
$c - (string) default classes for the event, typically 'no-image' or 'event-image'
$event - the Event Post Object
xdgp_calendar_display_month_event_block_open
Modify / Replace the DOM for the Event block container that wraps performances for the Monthly calendar only
$output - the assembled default Event block opening wrapper.
$event - the Event Post Object
$performance_group - array of Performances in the current Event Block
$config - configuration arguments for the calendar
$classes - Classes (string) for the current event block
$event_image - Calendar image (array) for current event
$genre_list - Genres (string) for current event. Typically appended to classes
$link - calculated link for the event block (Event permalink or Ticketing URL)
$hide_event_block (boolean) - If true, hide the current event block upon page load with display: none;
xdgp_calendar_display_month_event_block_close
Modify / Replace the DOM for the Event block container that wraps performances for the Monthly calendar only
$output - the assembled default Event block closing wrapper.
$event - the Event Post Object
$performance_group - array of Performances in the current Event Block
$config - configuration arguments for the calendar
$classes - Classes (string) for the current event block
$event_image - Calendar image (array) for current event
$genre_list - Genres (string) for current event. Typically appended to classes
$link - calculated link for the event block (Event permalink or Ticketing URL)
$hide_event_block (boolean) - If true, hide the current event block upon page load with display: none;
xdgp_calendar_display_agenda_event_block_open
Modify / Replace the DOM for the Event block container that wraps performances for the Agenda calendar only
$output - the assembled default Event block closing wrapper.
$event - the Event Post Object
$performance_group - array of Performances in the current Event Block
$config - configuration arguments for the calendar
$event_image_class - Classes (string) for the current event block
$event_image - Calendar image (array) for current event
$genre_list - Genres (string) for current event. Typically appended to classes
$link - calculated link for the event block (Event permalink or Ticketing URL)
$display_date (string) - Date string for current event block
xdgp_calendar_display_agenda_event_block_close
Modify / Replace the DOM for the Event block container that wraps performances for the Agenda calendar only
$output - the assembled default Event block closing wrapper.
$event - the Event Post Object
$performance_group - array of Performances in the current Event Block
$config - configuration arguments for the calendar
$event_image_class - Classes (string) for the current event block
$event_image - Calendar image (array) for current event
$genre_list - Genres (string) for current event. Typically appended to classes
$link - calculated link for the event block (Event permalink or Ticketing URL)
$display_date (string) - Date string for current event block
xdgp_performance_labels
SINCE 1.1.0
Modify the Labels for each Performance, including ticketing URLs and Buy Button text
$performance (object)


Monthly Calendar

Filter
Description
Arguments
xdgp_calendar_display_monthly_day_heading
1.1.12

Modify / Replace DOM of date headings on the Monthly Calendar
$day_header - assembled desktop and mobile header for date
$date(timestamp) - Timestamp of active date



Mini Calendar

Filter
Description
Arguments
xdgp_calendar_display_mini_hover_date
Modify / Replace DOM of details for a single date of events in the Mini Calendar (Hover block)
$day_content - assembled default performances and links for the current date
$date_info(array) - Array of 'classes' (array) and 'performances' (array) for the current date
$date (timestamp) - First second of current date (localtime)
xdgp_calendar_echo_mini_nav_js
Modify / Replace Javascript that controls the mini calendar Next / Previous Navigation
$output - the assembled default Javascript


Grid Calendar

Filter
Description
Arguments
xdgp_calendar_grid_dimensions
SINCE 1.1.0
Modify / Replace calculated Dimensions of the Grid Calendar
$dimensions (array) - Array of calculated height and width arguments for different calendar dimensions, including:
'current_date' - timestamp of the first date displayed in the calendar
'start_hour' - timestamp of the first hour of the first day to be displayed
'end_hour' - timestamp of the last hour of the first day to be displayed
'end_date' - timestamp of the first hour of the last day to be displayed
'nav_date_count' - number of days in the calendar
'nav_date_width' - width of each date label in the calendar in pixels
'nav_track_width' - width of the full track of the grid, defaults to 100%
'venue_count' - number of venues displayed on the grid
'venue_width' - width of each venue column in pixels.
'window_height' - height of the grid area within the scroll area based on height and number of hours and number of days.
'all_venues_width' - Total width, (in %) of all venues, to determine scroll width.
$days (array) - Days displayed in the calendar
$venues (array) - Venues displayed in the calendar
xdgp_calendar_grid_event_detail
SINCE 1.1.0

Modify the DOM for the event Detail Popup
$output (html) - the default DOM for the event detail popup.
xdgp_calendar_grid_mobile_event_detail
SINCE 1.2.17

Modify the DOM for the Mobile version of the Event Detail
$output (html) - the default rendered DOM for mobile details
$extra_buttons (html) - extra buttons to be appended after the Ticketing button
$performance (object) - Performance and event Data
$ticket_link (url) - Filtered Ticket Link after logic has been applied
$calendar_args (array) - Configuration arguments for the calendar
xdgp_calendar_grid_event_block_header
SINCE 1.1.0
Add additional content to the Event Block Header
$content (text) default false - the additional HTML to add
$performance (object) - Performance object including event information
xdgp_calendar_grid_event_block_settings
SINCE 1.1.0
Modify / Replace calculated settings and positionings for each event block
$performance_atts (array) - Attributes of the Performance Block
'base_start' => timestamp of the start time for the day
'starttime' => timestamp of the start time for the performance
'length' => running time of performance in minutes
'base_height' => pixel count for base height per 5 minute increment
'event_id' => event ID for the performance
'endtime' => calculated timestamp of the end time of the performance
'offset_time => height offset calculated from running time
'length_px' => height in pixels for event block
'offset_height' => height in pixels offset from top of day

$performance (object) - Performance object including event information
xdgp_calendar_grid_performance_data
SINCE 1.1.0
Modify the event data included on the page before it is converted to JSON.  Useful for adding and modifying fields to the data.
$performance_simple (object) - Simplified performance Object for API output
$performance (object) - complete performance Object for reference
xdgp_calendar_grid_modal_display_js
SINCE 1.1.0
Used in conjunction with the xdgp_calendar_grid_performance_data filter, Allows to you add additional jQuery steps to the Modal show event in display_grid_calendar_js().
Example
modal.find('.event__series').html(event_details.event_taxonomy_display || '');

$additional_modal_js (javascript)
$calendar_args (array) - Arguments for this calendar

xdgp_calendar_grid_js
SINCE 1.1.0
Modify the Grid Calendar JS
$output - Default Grid Calendar JS
xdgp_calendar_grid_window_height
SINCE 1.1.0
Modify / set an alternate Grid Calendar Height
$height (int) - calculated height based on hourly range, minute height and padding


Performance-level DOM and Links

Filter
Description
Arguments
xdgp_calendar_display_event_link
Modify or apply alternate logic to the link to ticket sales for the performance.
This filter is only applied to on sale peformances: when the performance is on sale, in the future, and is not sold out.
$link - (url) the default link for the Event Block
$event - the Event Post Object
$performance - the current Performance Object
xdgp_calendar_additional_performance_link
Add additional HTML to the end of a Performance block (e.g. an additional button or link)
$extralink - empty
$current_perf - The Performance object
$event - the related Event Post object
$link - the ticketing link for the current performance
$calendar_args - an array of calendar config arguments


xdgp_calendar_performance_loop
Modify / Replace the DOM of the entire performance block
$output - the assembled default Performance block DOM
$extralink - output from xdgp_calendar_additional_performance_link
$current_perf - The Performance object
$event - the related Event Post object
$link - the ticketing link for the current performance
xdgp_calendar_public_performance_api_data
SINCE 1.2.9
Modify the public Performance API data with additional calculated fields, calculated in 
prepare_public_performance_api_data() and available in
XDGPCalendar::public_events_by_date

BETA Can be used to modify the $public_perf->description value which is custom HTML displayed in the mini calendar or JSON-queried performance details when present.
$public_perf - the filtered, simplified API data for a single performance
$performance - the full performance data, including related event and venue data


Genre and Venue Filters

Filter
Description
Arguments
xdgp_calendar_echo_genre_nav_js
Javascript that controls Genre Filters in either default or click to show mode
$output - the assembled default Javascript
xdgp_calendar_echo_venue_nav_js
Javascript that controls Venue Filters in either default or click to show mode
$output - the assembled default Javascript
xdgp_calendar_display_genre_nav
Modify / Replace the DOM of Genre filter HTML.
Applied in both default and dropdown modes.
$output - the assembled default Genre Filter DOM
xdgp_calendar_display_venue_nav
Modify / Replace the DOM of Venue filter HTML. 
Applied in both default and dropdown modes.
$output - the assembled default Venue Filter DOM
xdgp_genre_taxonomy_arguments
Modify Arguments for registering the Genre Taxonomy
$genre_args - default arguments for the Genre Taxonomy
Use arguments defined by register_taxonomy() 
xdgp_season_taxonomy_arguments
Modify Arguments for registering the Season Taxonomy
$season_args - default arguments for the Season Taxonomy
Use arguments defined by register_taxonomy() 
xdgp_calendar_consolidated_venues
SINCE 1.2.17
Modify the list of venues used for filters
$consolidated_venues (array of objects) - Venues grouped by Title
$venues (array of objects) - All system venues.
xdgp_calendar_venue_filter_slug
SINCE 1.2.17
Modify the slug for each event
(for use with xdgp_calendar_consolidated_venues to modify Venue filters)
$venue_title (text) - default Venue filter label (which is later modified by sanitize_title)
$venue (object) - the current venue


Event and Venue Post Type Configuration

Filter
Description
Arguments
xdgp_event_post_arguments

Modify Arguments for registering the Event Post Type
$args - default arguments for the Event Post Type
Use arguments defined by register_post_type() 
xdgp_related_posts_arguments
SINCE 1.1.6
Modify Arguments for registering the  Related Posts (events to posts) Post-to-Post Relationship
$args - default arguments for the Related Posts Relationship
Use arguments defined by p2p_register_connection_type()
xdgp_venue_post_arguments
Modify Arguments for registering the Venue Post Type
$args - default arguments for the Venue Post Type
Use arguments defined by register_post_type() 
xdgp_event_instance_arguments
SINCE 1.1.3
Modify Arguments for registering the Event Instance Post-to-Post Relationship
Includes settings for Performance Type Options.
$args - default arguments for the Event Instance Relationship
Use arguments defined by p2p_register_connection_type()
xdgp_enable_field_by_template
SINCE 1.2.13
Modify array of fields that are disabled except on specific event or venue templates.
Default, running time in minutes is hidden except events using the single-mc_event-festival.php template.
$enable_fields_on_templatearray(    'field_xdgp_event_running_time_minutes'=> 'single-mc_event-festival.php',  );
$enable_fields_on_template - array of ACF Field and template pairs which enable certain fields only in those contexts.
xdgp_disable_field_by_template
SINCE 1.2.13
Modify array of fields that are disabled only on a specific event or venue templates.
Default, running time in minutes is hidden except events using the single-mc_event-festival.php template.
$disable_fields_on_templatearray();
$disable_fields_on_template - array of ACF Field and template pairs which enable certain fields only in those contexts.


Utility Filters

Filter
Description
Arguments
xdgp_event_schema_image
SINCE 1.4.0
Specify a custom Image URL to include in the event's schema information
$image - default image
$event_id - Event ID


Sponsor Add-On Filters

Filter
Description
Arguments
xdgp_sponsor_post_arguments
Arguments for registering the Sponsor Post Type
$args - default arguments for the Sponsor Post Type
Use arguments defined by register_post_type() 
xdgp_events_sponsors_arguments
SINCE 1.1.6

Arguments for registering the Sponsor to Event Relationship
$args - default arguments for the Sponsor to Event Relationship
Use arguments defined by p2p_register_connection_type()


Season Post Type Add-On Filters

Filter
Description
Arguments
xdgp_season_post_arguments
Arguments for registering the Season Post Type
$args - default arguments for the Season Post Type
Use arguments defined by register_post_type() 
xdgp_events_seasons_arguments
Arguments for registering the Season to Event Relationship
$args - default arguments for the Season to Event Relationship
Use arguments defined by p2p_register_connection_type()

People Add-On Filters

Filter
Description
Arguments
xdgp_people_post_arguments

Arguments for registering the Person Post Type
$args - default arguments for the Person Post Type
Use arguments defined by register_post_type() 
xdgp_people_taxonomy_arguments

Arguments for registering the Person Type Taxonomy
$args - default arguments for the Person Type Taxonomy
Use arguments defined by register_taxonomy() 
xdgp_people_role_arguments
SINCE 1.1.6
Arguments for registering the People to Event Relationship (Role)
$args - default arguments for the People to Event Relationship
Use arguments defined by p2p_register_connection_type()


Education Add-On Filters

Filter
Description
Arguments
xdgp_classes_educators_arguments
SINCE 1.1.2
Modify Arguments for registering the Classes to Educators Post-to-Post Relationship
$args - default arguments for the Related Posts Relationship
Use arguments defined by p2p_register_connection_type()