Skip to content

Instantly share code, notes, and snippets.

View juanfra's full-sized avatar
🍕

Juan Aldasoro juanfra

🍕
View GitHub Profile
@juanfra
juanfra / tec-tickets-email-rsvp-organizers-bcc.php
Created July 10, 2023 12:25
BCC event organizers for the RSVP email.
<?php
//* Do NOT include the opening php tag
add_filter( 'tec_tickets_emails_dispatcher_rsvp_headers', 'my_add_bcc_email_organizers_headers', 10, 2 );
function my_add_bcc_email_organizers_headers( $headers, $dispatcher ) {
$email = $dispatcher->get_email();
$post_id = $email->get( 'post_id' );
if ( ! $post_id || ! function_exists( 'tribe_get_event' ) ) {
@juanfra
juanfra / tec-tickets-email-rsvp-bcc.php
Created July 10, 2023 11:08
Add a custom BCC for the RSVP email.
<?php
//* Do NOT include the opening php tag
/**
* BCC custom email on all Event Tickets' RSVP ticket emails
*/
add_filter( 'tec_tickets_emails_dispatcher_rsvp_headers', 'my_add_bcc_email_headers' );
function my_add_bcc_email_headers( $headers ) {
<h2 class="tribe-common-a11y-hidden" id="calendar-header"><?php printf( esc_html__( 'Calendar of %s', 'the-events-calendar' ), tribe_get_event_label_plural() ); ?></h2>
<div class="tribe-events-calendar-month__grid" role="grid" aria-labelledby="calendar-header" aria-readonly="true">
<header class="tribe-events-calendar-month__header" role="row">
<div class="tribe-events-calendar-month__header-column" role="columnheader" aria-label="Monday">M</div>
<div class="tribe-events-calendar-month__header-column" role="columnheader" aria-label="Tuesday">T</div>
<div class="tribe-events-calendar-month__header-column" role="columnheader" aria-label="Wednesday">W</div>
<div class="tribe-events-calendar-month__header-column" role="columnheader" aria-label="Thursday">T</div>
<div class="tribe-events-calendar-month__header-column" role="columnheader" aria-label="Friday">F</div>
<div class="tribe-events-calendar-month__header-column" role="columnheader" aria-label="Saturday">T</div>
<div class="tribe-events-cal
@juanfra
juanfra / events-list-view-v2.html
Created May 10, 2019 20:01
The HTML of the list view
<div class="tribe-events-calendar-list">
<div class="tribe-events-calendar-list__separator--month">
<span>May</span>
</div>
<div class="tribe-events-calendar-list__event">
<div class="tribe-events-calendar-list__event--featured-image">
<img /> <!-- the featured image -->
@juanfra
juanfra / events-top-bar-html.html
Created May 10, 2019 19:55
Events Top Bar HTML
<div class="tribe-events-calendar-top-bar">
<div class="tribe-events-calendar-top-bar--nav">
<nav>
<a href="#" class="tribe-common-c-btn-icon tribe-common-c-btn-icon--caret-left tribe-common-b3"></a>
<a href="#" class="tribe-common-c-btn-icon tribe-common-c-btn-icon--caret-right tribe-common-b3"></a>
</nav>
</div>
<div class="tribe-events-calendar-top-bar--today">
<a href="#" class="tribe-events-calendar-top-bar--today--button">Today</a>
@juanfra
juanfra / events-bar-html.html
Created May 10, 2019 19:53
HTML of the events bar
<div class="tribe-events-calendar-events-bar">
<h2 class="tribe-common-a11y-visual-hide">Events Search and Views Navigation</h2>
<div class="tribe-events-calendar-events-bar--form">
<form action="http://beta.local/events?post_type=tribe_events&#038;eventDisplay=default" method="post" class="tribe-common-c-search">
<div class="tribe-common-form-control-text-group">
<div class="tribe-common-form-control-text">
<label for="keyword">Keyword</label>
<?php
//* Do NOT include the opening php tag
add_filter( 'nice_article_meta', 'flatbase_article_meta_custom' );
function flatbase_article_meta_custom( $html ) {
global $nice_options;
if ( is_tax() ) {
ob_start(); ?>
<?php
/**
* Smart by NiceThemes.
*
* This file contains functions to manage WooCommerce layout.
*
* @package Smart
* @author NiceThemes <hello@nicethemes.com>
* @license GPL-2.0+
* @link http://nicethemes.com/product/smart
@juanfra
juanfra / flatbase-article-meta-taxonomy.php
Created April 19, 2019 14:29
Remove article meta in taxonomy pages
<?php
//* Do NOT include the opening php tag
add_filter( 'nice_article_meta', 'flatbase_article_meta_custom' );
function flatbase_article_meta_custom( $html ) {
if ( is_tax() ) {
return '';
}
<?php
$tribe_class = Tribe__Main::instance();
$priority_load_localize = has_action( 'init', array( $tribe_class, 'load_localize_data' ) );
remove_action( 'init', array( $tribe_class, 'load_localize_data' ), $priority_load_localize );
$priority_footer = has_action( 'wp_footer', array( $tribe_class, 'toggle_js_class' ) );
remove_action( 'wp_footer', array( $tribe_class, 'toggle_js_class' ), $priority_footer );
add_action( 'init', 'custom_remove_underscores' );