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"
@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;
}
<?php
$args = [
'ends_after' => 'now',
'event_category_not_in' => [ 'seasonal-services', 'facility-schedule' ],
'posts_per_page' => 2,
];
$orm = tribe_events()->by_args( $args );
$events = $orm->all();
?>
<?php
/**
* Plugin Name: Tribe Events Extension: Test Translations
* Version: 1.0.0
* Author: Modern Tribe, Inc.
* License: GPL version 3 or any later version
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
*
* This plugin is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by