Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Tony Warwick Pebblo

🏠
Working from home
  • Event Espresso
  • Liverpool, UK
View GitHub Profile
@Pebblo
Pebblo / ical_offset_example.php
Last active Jul 26, 2022 — forked from joshfeck/ical_offset_example.php
This allows you to change the timezone used for the iCal data, if a custom field value is present it will be used to set the timezone on the datetime. Useful for sites that have events in different timezones
View ical_offset_example.php
<?php //* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EED_Ical__download_ics_file_ics_data',
'my_custom_ical_timezone_output_filter',
10,
2
);
function my_custom_ical_timezone_output_filter(
$ics_data,
View test.php
something something
@Pebblo
Pebblo / ee_add_unique_attendee_validation.php
Last active May 10, 2022 — forked from joshfeck/ee_add_unique_email_validation.php
Add custom email field input validation to check for unique email addresses for each field. You can add this to a site specific plugin.
View ee_add_unique_attendee_validation.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_add_unique_attendee_validation(){
wp_add_inline_script(
'single_page_checkout',
'jQuery( document ).ready(function($) {
$(".ee-reg-qstn-email").addClass("unique");
$(".ee-reg-qstn-fname").addClass("unique");
$(".ee-reg-qstn-lname").addClass("unique");
@Pebblo
Pebblo / add_user_cap.php
Created Mar 30, 2022 — forked from joshfeck/add_user_cap.php
Add a new capability to WP User account after they complete a registration for a specific event. Event Espresso 4
View add_user_cap.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'AHEE__EE_Transaction_Processor__update_transaction_and_registrations_after_checkout_or_payment',
'my_add_user_cap_for_ticket',
10,
2
);
@Pebblo
Pebblo / mer_scripts_everywhere.php
Last active Feb 18, 2022 — forked from joshfeck/mer_tribe_events.php
Make sure that the scripts and styles for the Multi Event Registration add-on cart are loaded on tribe_events event pages.
View mer_scripts_everywhere.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function my_add_mer_scripts_everywhere() {
wp_enqueue_style(
'espresso_multi_event_registration',
apply_filters(
'FHEE__EED_Multi_Event_Registration__enqueue_scripts__event_cart_css',
EE_MER_URL . 'css' . DS . 'multi_event_registration.css'
)
@Pebblo
Pebblo / ee_avada_remove_readd_filters.php
Last active May 25, 2022
Example of how to remove/re-add EE's filter on the_content when using Avada.
View ee_avada_remove_readd_filters.php
<?php // Do not include the opening PHP tag if you already have one.
add_action('awb_remove_third_party_the_content_changes', 'tw_ee_avada_remove_filters', 10);
function tw_ee_avada_remove_filters() {
remove_filter(
'the_content',
array('EED_Event_Single', 'event_details'),
EED_Event_Single::EVENT_DETAILS_PRIORITY
);
remove_filter(
@Pebblo
Pebblo / ticket_headings.php
Created Oct 11, 2021 — forked from joshfeck/ticket_headings.php
Example that shows how to add some headings between ticket selector rows. Requires WordPress + Event Espresso 4.
View ticket_headings.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'wp_enqueue_scripts', 'my_ee_add_ticket_row_headings', 11 );
function my_ee_add_ticket_row_headings() {
wp_add_inline_script(
'ticket_selector',
'jQuery( document ).ready(function($) {
$(".ee-ticket-tees-for-keys-golf-tournament-executive-sponsor")
.before( "<tr><td colspan=\'3\'><h3>Tees For Keys</h3></td></tr>" );
@Pebblo
Pebblo / calendar-iframe-custom-styles.css
Last active Sep 29, 2021 — forked from joshfeck/calendar-print-styles.css
Custom styles for the Event Espresso 4 events calendar's iframe. Add the calendar-iframe-custom-styles.css file to your child theme (top level).
View calendar-iframe-custom-styles.css
#ee-category-legend-ul #ee-category-li-70,
#ee-category-submit option[value=unlisted] {
display:none
}
@Pebblo
Pebblo / display_event_tags_and_categories.php
Last active Jul 21, 2021 — forked from joshfeck/display_event_categories.php
Display the description for the category/categories that are assigned to a single event. Requires Event Espresso 4. You can add this code to a <a href="http://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/">functions plugin</a> or into your WordPress theme's functions.php file.
View display_event_tags_and_categories.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'AHEE_event_details_before_the_content', 'ee_display_tags_and_categories_single_event' );
function ee_display_tags_and_categories_single_event( $post ) {
$taxonomy = 'espresso_event_categories';
$terms = get_the_terms( (int) $post->ID, $taxonomy );
$tags = get_the_tags( (int) $post->ID );
View ee-custom-functions-plugin.php
<?php
/*
Plugin Name: EE Custom Functions - Specific Functions Plugin
Description: Use this plugin to add custom functions to your site.
*/
// Change Mini Cart Widget ticket row.
function ee_mer_change_item_name($ticketrowname){
return $ticketrowname . ' (date test)';
}