Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
andrasguseo / functions.php
Last active October 31, 2023 23:00
TEC > Add the WordPress time zone and the TEC time zone mode to the admin bar
<?php
/*
* Add the WordPress time zone, the TEC time zone mode, and the TEC editor mode to the admin bar.
* Change the TEC time zone or the editor mode in the admin bar.
* Intended for use on test sites or staging sites only.
*
* Plugins required: The Events Calendar (for the TEC related part)
* Author: Andras Guseo
* Created: October 31, 2023
* Last updated: October 31, 2023
@andrasguseo
andrasguseo / convert-csv-to-block-editor.php
Last active May 2, 2024 10:18
TEC > CSV imports > Convert imported event content to block editor
<?php
/**
* When importing events via CSV import convert imported event content to block editor.
*
* Plugins required: The Events Calendar
* Author: Andras Guseo
* Created: October 16, 2023
* Last updated: October 17, 2023
*/
@andrasguseo
andrasguseo / custom-times-in-timepicker.js
Last active October 13, 2023 21:04
TEC > Limit timepicker date to certain times only when creating an event.
// Add the time strings you want to keep in this array as they appear in the timepicker.
const savedTimes = [ '2:00pm', '7:30pm' ];
// Set the default value how many days ahead the weekly recurrence should end.
const daysAhead = 30;
// Get current date
let currentDate = new Date();
// Add 'daysAhead' number of days to the current date
@andrasguseo
andrasguseo / tickets_commerce_attendees.php
Last active October 16, 2023 23:15
ET+ > Dashboard for all Tickets Commerce attendees
<?php
/**
* Show the page in the dashboard for all tickets sold (all attendees) through the Tickets Commerce integration.
* It will add an 'All Attendees' submenu under 'Events'.
*
* Plugins required: Event Tickets
* Author: Andras Guseo
* Last updated: October 9, 2023
*
* @version 5.6.5.1
@andrasguseo
andrasguseo / checkbox.php
Created October 9, 2023 22:04
[TEC] Template override to get rid of unwanted checkbox items in Filter Bar
<?php
/**
* View: Checkbox Component
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe/events-filterbar/v2_1/components/checkbox.php
*
* See more documentation about our views templating system.
*
* @link http://evnt.is/1aiy
@andrasguseo
andrasguseo / checkbox.php
Created October 9, 2023 22:04
[TEC] Template override to get rid of unwanted checkbox items in Filter Bar
<?php
/**
* View: Checkbox Component
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe/events-filterbar/v2_1/components/checkbox.php
*
* See more documentation about our views templating system.
*
* @link http://evnt.is/1aiy
@andrasguseo
andrasguseo / dropdown.php
Last active October 5, 2023 23:06 — forked from lelandf/dropdown.php
[TEC] Template override to get rid of unwanted filter bar categories
<?php
/**
* View: Dropdown Component
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe/events-filterbar/v2_1/components/dropdown.php
*
* See more documentation about our views templating system.
*
* @link http://evnt.is/1aiy
@andrasguseo
andrasguseo / use-default-venue-for-ea-imports.php
Created September 21, 2023 20:19
EA > Replace the imported venue with the default venue (ECP).
<?php
/**
* Replace the imported venue with the default venue.
*
* Plugins required: The Events Calendar, Events Calendar Pro
* Author: Andras Guseo
* Last updated: September 21, 2023
* @version 6.2.1
*/
@andrasguseo
andrasguseo / ical-export-add-alarm-to-events.php
Last active August 9, 2023 20:33
TEC > iCal export > Add an alarm to events
<?php
/**
* Description: Add an alarm to events in the iCal feed.
* Usage: Copy the below snippet into your child theme's functions.php file
* or use a plugin like Code Snippets.
* Plugin: The Events Calendar
* Author: Andras Guseo
* Last updated: August 9, 2023
*/
@andrasguseo
andrasguseo / ea-global-import-date-range-limit.php
Created June 20, 2023 11:50
EA > Add 6 months as Import Date Range Limit
<?php
/**
* Description: Add six months as an Import Date Range Limit under Global Import SEttings.
* Usage: Copy the below snippet into your child theme's functions.php file
* or use a plugin like Code Snippets
* Plugin: The Events Calendar
* Author: Andras Guseo
* Last updated: June 20, 2023
*
* Important Notice: Using an import range longer than 3 months can lead to performance