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 | |
/** | |
* Block: Tickets | |
* | |
* This template override will hide the tickets block, if the logged in user | |
* has already purchased a ticket for the given event. | |
* For it to work the following setting has to be enabled: | |
* Tickets > Settings > General > Require users to log in before they purchase tickets | |
* | |
* This is a template ovverride for the following file: |
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 | |
/** | |
* Limit ticket quantity counter to 1. | |
* | |
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets. | |
* | |
* @author: Andras Guseo | |
* | |
* Plugins required: Event Tickets | |
* Created: February 7, 2024 |
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 | |
/** | |
* Make a ticket quantity selector step by 2. | |
* | |
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets. | |
* | |
* @author: Andras Guseo | |
* | |
* Plugins required: Event Tickets | |
* Created: February 7, 2024 |
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 | |
/** | |
* Set a target for the event title. | |
* The code adds a custom field for events where you can select the link target. | |
* A template override for each calendar view is needed where you want this implemented. | |
* | |
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets | |
* | |
* @author: Andras Guseo | |
* |
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 | |
/** | |
* Show Attendee Registration Field for first attendee only. | |
* (Hide field for subsequent attendees.) | |
* Can handle multiple fields. | |
* | |
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets. | |
* | |
* @author: Andras Guseo | |
* |
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 | |
/** | |
* Show input fields for lat/long coordinates on the venue editing page in Community Events. | |
* | |
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets. | |
* | |
* @author: Andras Guseo | |
* | |
* Plugins required: The Events Calendar, Events Calendar Pro, Community Events | |
* Created: January 29, 2024 |
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 | |
/** | |
* Open the Filter Bar on mobile on initial pageload. | |
* | |
* By default, Filter Bar is closed on mobile regardless of the setting. | |
* With this snippet Filter Bar will show on pageload when using the horizontal setup. | |
* | |
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets. | |
* | |
* @author: Andras Guseo |
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 | |
/** | |
* Remove the Event URL when it's the same as the source URL. | |
* | |
* When importing from OtherURL and the EventURL field is empty, it will be filled with the | |
* URL of the source site by default. This snippet makes sure it stays empty. | |
* | |
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets. | |
* | |
* @param array $event Event data to save |
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 | |
/** | |
* Customize the Ticket Email heading to account for singular and plural versions. | |
* | |
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets. | |
* | |
* @param array $event Which Event data was sent | |
* | |
* @param string $heading The email heading. | |
* @param string $id The email id. |
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 | |
class MyCustomEventStatuses { | |
/** | |
* Constructor. | |
*/ | |
public function __construct() { | |
add_filter( 'tec_event_statuses', [ $this, 'my_custom_statuses' ], 20, 2 ); | |
add_filter( 'tribe_events_single_event_title_html', [ $this, 'tec_custom_status_on_single_classic' ], 10, 2 ); |