Skip to content

Instantly share code, notes, and snippets.

View bordoni's full-sized avatar
:shipit:
Working on The Events Calendar

Gustavo Bordoni bordoni

:shipit:
Working on The Events Calendar
View GitHub Profile
@bordoni
bordoni / fix-module-assets.php
Last active November 14, 2023 05:52
Resolves a problem that surfaced between Event Tickets and WordPress version `6.4.1`.
add_filter( 'script_loader_tag', static function( $tag, $handle ) {
if ( ! class_exists( 'Tribe__Assets', false ) ) {
return $tag;
}
$assets = Tribe__Assets::instance();
$asset = $this->get( $handle );
// Only filter for own filters.
if ( ! $asset ) {
  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"
<?php
/*
* If you already have something in your functions.php, please remove these first few lines
*/
// Usage tribe_is_past_event( $event_id )
function tribe_is_past_event( $event = null ){
if ( ! tribe_is_event( $event ) ){
return false;
}
$event = tribe_events_get_event( $event );
@bordoni
bordoni / functions.php
Created February 5, 2015 04:37
How to add the Venue on The Events Calendar Month Tooltip
<?php
/*
* If you already have something in your functions.php, please remove these first few lines
*/
function tec_forum_939516( $json, $event, $additional ){
$venue = tribe_get_venue_id( $event );
if ( $venue ){
$json['venue'] = $venue;
@bordoni
bordoni / remove-datepicker-day-list.php
Last active March 9, 2020 01:05
Remove Datepicker for Day and List view
<?php
add_filter( 'tribe_template_html:events/v2/list/top-bar/datepicker', '__return_false' );
add_filter( 'tribe_template_html:events/v2/day/top-bar/datepicker', '__return_false' );
<?php
add_action( 'init', function() {
if ( ! is_tax() ) {
return;
}
if ( is_admin() ) {
return;
}
add_filter( 'tribe_query_can_inject_date_field', '__return_false', 25 );
} );
<?php
add_filter( 'tribe_events_ajax_response', function( $response ) {
if ( empty( $response['markers'] ) ) {
return $response;
}
foreach ( $response['markers'] as $index => $marker ) {
$zip = tribe_get_zip( $marker['event_id'] );
if (
empty( $marker['lat'] )
<?php
/**
* Plugin Name: The Events Calendar Extension: Missing Events Single JSON-LD
* Plugin URI: https://theeventscalendar.com/extensions/---the-extension-article-url---/
* GitHub Plugin URI: https://github.com/mt-support/tribe-ext-extension-template
* Description: Makes sure JSON-LD is present on Single Event for V2.
* Version: 1.0.0
* Author: Modern Tribe, Inc.
* Author URI: http://m.tri.be/1971
* License: GPL version 3 or any later version
@bordoni
bordoni / style.css
Last active February 6, 2020 15:41
.tribe-events .tribe-events-c-search__input-control--keyword input[type="text"].tribe-events-c-search__input,
.tribe-events .tribe-events-c-search__input-control--keyword input[type="text"].tribe-events-c-search__input:focus {
background: transparent;
background-repeat:no-repeat;
}
.tribe-common .tribe-events-c-view-selector--tabs .tribe-events-c-view-selector__list {
margin-top: 0;
margin-bottom: 0;
}