View wp-theatre-venue-city-filter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds venue and city filters to the default options for event listings. | |
* | |
* @param array $defaults The current defaults. | |
* @return array The defaults with venue and city added. | |
*/ | |
function add_venue_filter_to_events($defaults) { | |
$defaults['venue'] = false; | |
$defaults['city'] = false; | |
return $defaults; |
View wp-theatre-add-doors-open-field.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds a 'Doors open' field to the event editor. | |
* | |
* Prepends the new field by filtering the current fields of the event editor | |
* using the 'wpt/event_editor/fields' hook. | |
* | |
* @param array $fields The current fields of the event editor. | |
* @param int $event_id The ID of the event being edited. | |
* @return array The new fields of the event editor. | |
*/ |
View wp-theatre-remove-event-editor-fields.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Removes 'End time' and all tickets fields from the event editor. | |
* | |
* @param array $fields The current fields of the event editor. | |
* @param int $event_id The event being edited. | |
* @return array The new fields of the event editor. | |
*/ | |
function remove_event_editor_fields($fields, $event_id) { | |
$new_fields = array(); |
View wp-theatre-show-production-events-dates-prices.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Show dates and prices for the events of this production. | |
*/ | |
if ( is_singular( 'wp_theatre_prod' ) ) { | |
$production = new WPT_Production(); | |
echo '<ul>'; | |
foreach ( $production->events() as $event ) { | |
echo '<li>'.$event->startdate_html().$event->prices_html().'</li>'; | |
} |
View theater-012-demo.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wpt_listing .wp_theatre_event .theater-012-demo { | |
position: relative; | |
margin: 0; | |
} | |
.wpt_listing .wp_theatre_event .theater-012-demo .event-info { | |
bottom: 0; | |
background-color: rgba(0, 0, 0, 0.2); | |
color: #fff; | |
width: 100%; | |
padding: 10px; |
View wp-theatre-remove-enclogins-divs-from-date-and-time.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Removes the enclosing div from the event startdate HTML. | |
* | |
* @param string $html The HTML. | |
* @param array $filters The template filters. | |
* @param WPT_Event $event The event. | |
* @return string The HTML without enclosing divs. | |
*/ | |
function wpt_remove_startdate_divs($html, $filters, $event) { |
View wpt_event_editor_add_venue_url.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Adds a new 'Venue URL' field to the event editor. | |
* | |
* @param array $fields The current fields of the event editor. | |
* @return array The new fields of the event editor. | |
*/ | |
function wpt_event_editor_add_venue_url_field($fields) { | |
$new_fields = array(); | |
foreach($fields as $field) { |
View wpt_escape_from_iframe.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* escape from iframe, when returning from ActiveTickets */ | |
if (window.self !== window.top) { | |
top.location.href = location.href; | |
} |
View wpt_activetickets_subtitle_field.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Adds the subtitle ActiveTickets field to a production on import. | |
* | |
* You can show the subtitle in your listings like this: | |
* [wpt_events]{{title|permalink}}{{subtitle}}[/wpt_events] | |
* | |
* You can add the subtitle to your template like this: | |
* $production = new WPT_Production(); |
View wpt_change_events_on_production_page_header.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Changes the default Events header on the production details page. | |
* | |
* @param string $header The default Events header. | |
* @return string The new Events header. | |
*/ | |
function wpt_change_events_on_production_page_header($header) { | |
return '<h4>Showtimes</h4>'; | |
} |
OlderNewer