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.


TABLE OF CONTENTS


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

FilterDescriptionArguments
xdgp_calendar_display_event_linkModify 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.4Modify 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_openModify / 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_closeModify / 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_openModify / 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_closeModify / 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)
xdgp_presale_redirect_to_detailFilter Buy Buttons based on presale or other event & performance states$formatted_link = HTML of the formatted purchase button link
$event_id - current Event ID
$hide - (boolean) whether to entirely hide the link if presale mode is active. Default false.
$before - HTML prefix for the current context
$after - HTML suffix for the current context
$performance - Current Performance, or false if no single performance in this context (e.g. for a general ticket url)


Monthly Calendar

FilterDescriptionArguments
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

FilterDescriptionArguments
xdgp_calendar_display_mini_hover_dateModify / 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_jsModify / Replace Javascript that controls the mini calendar Next / Previous Navigation$output - the assembled default Javascript


Grid Calendar

FilterDescriptionArguments
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


FilterDescriptionArguments
xdgp_calendar_display_event_linkModify 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_linkAdd 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_loopModify / 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
xdgp_caldav_performance_url
SINCE 1.5.5
Modify the URL for performances that appears in iCal and gCal events$link = default URL for event instance
$current_perf - The Performance object
$event_id - the related Event ID
xdgp_caldav_performance_location
SINCE 1.5.5
Modify the Location text for performacnes that appear in iCal and gCal events$location = default text for event instance, defaults to venue Title and address.
$current_perf - The Performance object
$event_id - the related Event ID#
xdgp_display_add_to_calendar_links
SINCE 1.5.5
Modify or hide the Add to Calendar dropdown based on Event or Performance context$output - formatted Add to calendar dropdown HTML for the performance
$event_id - related Event ID
$performance - related Performance


Genre and Venue Filters

FilterDescriptionArguments
xdgp_before_filter_navInsert content before the beginning of the filter navigation.  Only displays if either show_genre or show_venue_filters is enabled.none
xdgp_after_filter_navInsert content after the end of the filter navigation. Only displays if either show_genre or show_venue_filters is enabled.none


Event and Venue Post Type Configuration

FilterDescriptionArguments
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_argumentsModify 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.
xdgp_post_type_columns_addedAdd custom columns by Post Type.  Test for a Post Type match.$columns_added - array of meta value => label combinations
$post_type
xdgp_post_type_columns_removedRemove meta columns by Post Type.  Test for a Post Type match.$columns_added - array of meta value => label combinations
$post_type


Utility Filters

FilterDescriptionArguments
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


FilterDescriptionArguments
xdgp_sponsor_post_argumentsArguments 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

FilterDescriptionArguments
xdgp_season_post_argumentsArguments for registering the Season Post Type$args - default arguments for the Season Post Type
Use arguments defined by register_post_type() 
xdgp_events_seasons_argumentsArguments 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

FilterDescriptionArguments
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

FilterDescriptionArguments
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()
xdgp_age_range_argumentsModify Arguments for Age Range Taxonomy$args - default taxonomy arguments
xdgp_curriculum_argumentsModify Arguments for Curricula Post Type$args - default Post Type arguments
xdgp_cart_product_fields
SINCE 1.5.0
Modify the array of fields displayed for each product in the cart.
Default: display_dates_long,event_schedule
$product_fields - default array of postmeta keys

xdgp_edu_class_instance_id_disable_closed

SINCE 1.5.4
Disable automatic checks confirming that the class isn't closed before passing a class ID to the cart$disable_closed - default TRUE