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 / change-event-url.php
Created July 20, 2017 15:33
Change the event url to the external url
<?php
/* Change the event url to the external url.
*
* Plugins: The Events Calendar
* Author: Barry Hughes
* Last updated: July 20, 2017
add_filter( 'tribe_get_event_link', function( $default_url ) {
$website_url = tribe_get_event_website_url();
return empty( $website_url ) ? $default_url : $website_url;
@andrasguseo
andrasguseo / alter-browser-title.php
Last active March 2, 2018 21:27
Alter the browser title for all Events Calendar pages
<?php
/* Alter the browser title for all Events Calendar pages
* Note: This is a solution for a specific theme.
* Might not work with all of them.
*
* Plugins: The Events Calendar
* Author: Andras Guseo
* Last Updated: March 2, 2018
*/
function filter_events_title( $title ) {
@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 / rsvp-redirect.php
Created August 18, 2017 20:53
Page redirection on submitting an RSVP
<?php
/* When submitting an RSVP, then instead of the default message the user will be redirected to the given page.
*
* Plugins: Event Tickets
* Author: Barry Hughes
* Last updated: August 18, 2017
*/
add_action( 'event_tickets_rsvp_tickets_generated_for_product', function() {
add_filter( 'wp_redirect', function() {
@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 / single-event.php
Last active January 18, 2023 13:53
TEC > German formatting for venue data for legacy views (v1) - DEPRECATED
<?php
/**
* THIS OVERRIDE WORKS ONLY WITH THE EVENTS CALENDAR 5.16 AND LOWER!!!
*
* List View Single Event
* This file contains one event in the list view
*
* This is a template override for the venue meta data
* Venue data is formatted for Germany
*