Skip to content

Instantly share code, notes, and snippets.

View Pebblo's full-sized avatar
🏠
Working from home

Tony Warwick Pebblo

🏠
Working from home
  • Event Espresso
  • Liverpool, UK
View GitHub Profile
@Pebblo
Pebblo / avada.css
Last active February 4, 2022 12:58 — forked from joshfeck/avada.css
Avada theme responsive tickets fix
@media (max-width: 640px) {
.tkt-slctr-tbl,
.spco-ticket-details {
table-layout: fixed;
font-size: .8em;
}
.tkt-slctr-tbl tr td {
padding-left: 2px;
padding-right: 0;
}
@Pebblo
Pebblo / calendar-iframe-custom-styles.css
Last active September 29, 2021 10:38 — 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).
#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 July 21, 2021 17:20 — 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.
<?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 );
@Pebblo
Pebblo / csv_transaction.php
Last active December 2, 2020 12:03 — forked from joshfeck/csv_transaction.php
add a column to the Event Espresso 4 Registrations CSV report that displays the total tax amount for the transaction
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter( 'FHEE__EventEspressoBatchRequest__JobHandlers__RegistrationsReport__reg_csv_array', 'espresso_add_total_taxes_column', 10, 2);
function espresso_add_total_taxes_column( $reg_csv_array, $reg_row ) {
$sub_line_item_details = array();
$registration = EEM_Registration::instance()->get_one_by_ID( $reg_row['Registration.REG_ID'] );
if( $registration instanceof EE_Registration && $registration->is_primary_registrant() ) {
@Pebblo
Pebblo / espresso-events-table-template.template.php
Last active October 24, 2018 15:09 — forked from joshfeck/espresso-events-table-template.template.php
[Test] An example template for the Event Espresso 4 events table template that adds the ticket selector to the table
<?php
// Options
$date_format = get_option( 'date_format' );
$time_format = get_option( 'time_format' );
// Load Venue View Helper
EE_Registry::instance()->load_helper('Venue_View');
// EE_Registry::instance()->load_helper( 'Template' );
//Defaults
$reg_button_text = !isset($reg_button_text) ? __('More Info', 'event_espresso') : $reg_button_text;
$alt_button_text = !isset($alt_button_text) ? __('More Info', 'event_espresso') : $alt_button_text;//For alternate registration pages
@Pebblo
Pebblo / functions.php
Last active July 2, 2018 09:58 — forked from joshfeck/functions.php
espresso_list_of_event_dates, without the times being displayed if you set a 'hide-event-times' custom field.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function espresso_list_of_event_dates( $EVT_ID = FALSE, $dt_frmt = '', $tm_frmt = '', $echo = TRUE, $show_expired = NULL, $format = TRUE, $add_breaks = TRUE ) {
$dt_frmt = ! empty( $dt_frmt ) ? $dt_frmt : get_option('date_format');
$tm_frmt = ! empty( $tm_frmt ) ? $tm_frmt : get_option('time_format');
$datetimes = EEH_Event_View::get_all_date_obj( $EVT_ID ,$show_expired );
//d( $datetimes );
if ( is_array( $datetimes ) && ! empty( $datetimes )) {
global $post;
@Pebblo
Pebblo / ee_taxonomy_body_class.php
Last active April 18, 2018 21:44 — forked from joshfeck/ee_taxonomy_body_class.php
Add event's category slug to registration checkout and thank you page's body class
<?php //Please do not add the opening PHP tag if you already have one
// add category slug to registration checkout and thank you page's body class
add_filter( 'body_class', 'jf_ee_return_event_tax_term_on_spco' );
function jf_ee_return_event_tax_term_on_spco( $classes ){
// get out if this isn't the reg checkout page
if (! is_page( 'thank-you' ) && ! is_page( 'registration-checkout' ) ){
return $classes;
}
@Pebblo
Pebblo / robots.php
Last active February 23, 2018 11:47 — forked from joshfeck/robots.php
Tell SEO bots to not index Event Espresso taxonomy pages.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_no_index_tagseo_meta() {
if (is_tax('espresso_event_categories') ) {
?>
<meta name="robots" content="noindex tony">
<?php
}
}
add_action( 'wp_head', 'ee_no_index_tagseo_meta', 9 );
@Pebblo
Pebblo / functions.php
Last active May 8, 2017 09:32 — forked from joshfeck/details_waiting_list.md
Add a ninja form to a Sold out Event Espresso 4 event. This is useful if you want to capture names and contact info from people that want to be signed up for a waiting list.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
// Display a contact form when the event is sold out
// to be used as a waiting list
function ee_espresso_clean_event_status( $event ) {
//$event = EEH_Event_View::get_event( $EVT_ID );
$status = $event instanceof EE_Event ? $event->get_active_status() : 'inactive';
return $status;
}
@Pebblo
Pebblo / espresso_create_wp_user.php
Last active December 30, 2015 11:49 — forked from sethshoultes/espresso_create_wp_user.php
A function to create a new WP member using the registration details provided for the event, this function also adds the event they have just registered onto into the my events database so the initial events is displayed within 'My Events'
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action('action_hook_espresso_save_attendee_data','espresso_create_wp_user', 10, 1);
function espresso_create_wp_user($attendee_data) {
if( email_exists( $attendee_data['email'] ) == NULL ) {
global $org_options;
// Generate the password and create the user
$password = wp_generate_password( 12, false );