Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
andrasguseo / change-all-day-recurring-tooltip.php
Last active July 20, 2017 15:35
Change the tooltip text on the single event page for all day repeating events
<?php
/* Change the tooltip text on the single event page for all day repeating events.
*
* Plugins: The Events Calendar, Events Calendar PRO
* Author: Andras Guseo
* Last Updated: July 20, 2017
*/
add_filter( 'tribe_get_recurrence_text', function( $default_tooltip ) {
if ( tribe_event_is_all_day() && strpos ( $default_tooltip, " that begins at 12:00am" ) ) {
@andrasguseo
andrasguseo / title-restructuring.php
Created August 14, 2017 13:23
Title for Maddie
<?php ?>
<title>
<?php
global $page, $paged;
wp_title('|', true, 'right');
$site_description = get_bloginfo('description', 'display');
// If it's home of front page...
@andrasguseo
andrasguseo / .user.js
Last active September 1, 2017 23:14
Autofill ticket data for WooCommerce Tickets in Event Tickets Plus
// ==UserScript==
// @name Autofill Ticket Data
// @namespace test
// @description Autofill ticket data for WooCommerce Tickets in Event Tickets Plus
// It will add a blue button to the top right of the screen (Add new event / Edit event).
// If you click that then ticket data will be automatically filled based on what you have in the script.
//
// @IMPORTANT: Change the domain name to yours in the below line, otherwise it will not work.
//
// @include https://yourdomain.com/wp-admin/post-new.php?post_type=tribe_events
@andrasguseo
andrasguseo / reformat-event-schedule-details.php
Created September 6, 2017 20:31
Reformats the output of the event schedule details on the list view
<?php
/*
* Reformats the output of the event schedule details on the list view
*
* Plugins: The Events Calendar
* Author: Andras Guseo
* Last updated: September 6, 2017
* Last version checked: The Events Calendar 4.5.11
*/
@andrasguseo
andrasguseo / dequeue-script.php
Created September 14, 2017 13:23
An example for how to dequeue a script
<?php
/**
* An example for how to dequeue a script
*
* Obtain the handle of your script by searching through the code, and then
* add a wp_deregister_script() function call for that handle.
*/
function tribe_dequeue_script_example() {
wp_deregister_script( 'tribe-events-jquery-resize' );
}
@andrasguseo
andrasguseo / tec-datepicker-format.php
Last active October 2, 2017 10:31
Changes the date format in the header of the calendar datepicker
<?php
/**
* Plugin name: Datepicker Date Format for The Events Calendar
* Description: Changes the date format of the calendar datepicker header (for The Events Calendar). Please read the instructions in the file and change the settings in the code as per your requirements.
* Download and copy the file to your wp-content/plugins folder and activate it.
*
* Required plugins: The Events Calendar
* Version: 2017-10-01
* Author: Barry Hughes
*/
@andrasguseo
andrasguseo / ical-export-years-events.php
Last active November 1, 2017 09:35
iCal export of this year's events
<?php
/**
* Description: This snippet will enable you to have an iCal export of all this year's events
* when using this url:
* http://example.com/events/?ical=1&tribe_display=year
*
* Paste the code in your (child) theme's functions.php file
*
* Required plugins: The Events Calendar
* Last updated: 2017-10-20
@andrasguseo
andrasguseo / functions.php
Created November 1, 2017 20:24 — forked from cliffordp/functions.php
BCC site admin email on all Event Tickets' RSVP ticket emails so they get a copy of it too
<?php
/**
* BCC site admin email on all Event Tickets' RSVP ticket emails so they get a copy of it too
*
* From https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182
*
* Reference: https://developer.wordpress.org/reference/functions/wp_mail/#using-headers-to-set-from-cc-and-bcc-parameters
*
*/
function cliff_et_rsvp_bcc_admin_ticket() {
@andrasguseo
andrasguseo / functions.php
Created November 1, 2017 21:25 — forked from cliffordp/functions.php
BCC multiple email addresses, including the site admin email address, on all Event Tickets' RSVP ticket emails so they get a copy of it too
<?php
/**
* BCC multiple email addresses, including the site admin email address, on all Event Tickets' RSVP ticket emails so they get a copy of it too
*
* From https://gist.github.com/cliffordp/c4fb2ea8fb5ca44973ff06e6facc9742
* A fork of https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182
* For https://theeventscalendar.com/support/forums/topic/event-tickets-free-not-plus-rsvp-notifications/#post-1272819
*
* @link https://developer.wordpress.org/reference/functions/wp_mail/#comment-349
*/
@andrasguseo
andrasguseo / merge-duplicate-organizers-venues.php
Created November 2, 2017 21:30
Makes the 'Merge Duplicates' button appear and stick in The Events Calendar
<?php
/*
* Description: Makes the 'Merge Duplicates' button appear and stick
* under Events > Settings > General tab
*
* Plugins: The Events Calendar
* Author: Barry Hughes
* Last updated: November 2, 2017
*/