View unhide_old_tickets_url.php
/**
* Unhides the tickets button for past events.
*
* @param string $html
* @param WPT_Event $event
* @return string
*/
function unhide_old_tickets_url( $html, $event ) {
ob_start();
View red_ticket_buttons.css
.wp_theatre_event_tickets_url {
background-color: #d9534f;
color: #fff;
border: 1px solid #b52b27 !important;
text-decoration: none;
display: inline-block;
padding: 12px 20px;
border-radius: 2px;
}
.wp_theatre_event_tickets_url:hover {
View set_default_month.php
<?php
/**
* Sets the default month for the events page to the first month.
*
* @return void
*/
public function set_default_month() {
global $wp_query;
global $wp_theatre;
if (
View theregal_import_PreShowStartTime.php
<?php
/**
* Changes the event date of Veezi films from 'FeatureStartTime' to 'PreShowStartTime'.
*
* @param array $event_args The current event arguments.
* @param object $veezi_event The event from the Veezi feed.
* @param int $production_id The ID of the parent production.
* @return array The updated event arguments.
*/
function theregal_import_PreShowStartTime( $event_args, $veezi_event, $production_id ) {
View add_class_to_tickets_buttons.php
<?php
/**
* Adds an 'art-button' CSS class to the tickets buttons of events.
*
* @param array $classes The current CSS classes of tickets buttons.
* @param WPT_Event $event The event that the button belongs to.
* @return array The new CSS classes.
*/
function add_class_to_tickets_buttons( $classes, $event ) {
View get_current_event_html.php
<?php
/**
* Get the HTML to display the current event.
*
* @param array $args The shortcode arguments.
* @param string $template The shortcode template.
* @return string
*/
function get_current_event_html( $args, $template = false ) {
global $wp_theatre;
View wpt_structured_data_set_location_name.php
<?php
/**
* Sets the venue to a fixed value inside structured event data.
*
* @param string $name The original venue value.
* @param WPT_Event $event The event.
* @return string The new venue value.
*/
function wpt_structured_data_set_location_name($name, $event) {
View replace-venue-input-with-dropdown.php
<?php
/**
* Replaces the venue input in the event editor with a dropdown.
*
* @param string $html The default venue input HTML.
* @param mixed $field The venue field.
* @param int $event_id The ID of the event.
* @return string The vnue dropwdown HTML.
*/
function wpt_event_editor_get_venue_dropdown_html($html, $field, $event_id) {
View import-activetickets-longtext.php
<?php
/**
* Imports the 'LongText' for a newly created production from ActiveTickets.
*
* By default, ActiveTicket for WordPress only imports the 'ShortText'.
* Importing the 'LongText' requires an extra API call for every production during the import,
* which may cause a higher load on the server.
*
* @param WPT_Production $production The production.
* @param object $activetickets_program The production data from ActiveTickets.
View wpt_add_long_excerpt.php
<?php
/*
* Increase the size of generated excerpts to 50 characters.
* @param string $excerpt The current excerpt.
* @param WPT_Production $production The production.
* @return string The updated excerpt.
*/
function wpt_excerpt_long($excerpt, $production) {
$excerpt = $production->post()->post_excerpt;
if (empty($excerpt)) {