Skip to content

Instantly share code, notes, and snippets.

@joshfeck
joshfeck / ics_virtual_location.php
Last active Mar 28, 2020
Add iCalendar "Conference" property to generated ics file. Event Espresso 4
View ics_virtual_location.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_ics_virtual_location',
10,
2
);
@joshfeck
joshfeck / ticket_selector_add_to.php
Last active Apr 13, 2020
Add a tickets remaining column to the Event Espresso ticket selector. Requires displaying ticket selector details section.
View ticket_selector_add_to.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_add_inline_script_ts_show_sale_info', 20);
function my_add_inline_script_ts_show_sale_info() {
$custom_js = '
jQuery(document).ready(function($){
$(".ee-ticket-selector-ticket-details-th").after("<th class=\'cntr\' scope=\'col\'>Tickets Remaining</th>");
$("td[data-th=\'Remaining\']").each(function() {
$(this).clone().insertAfter(
@joshfeck
joshfeck / admin_reg_page.php
Created Mar 7, 2020
Example code for adding to the Event Espresso 4 Registrations admin list table
View admin_reg_page.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'AHEE__admin_wrapper__template__before_admin_page_content',
'my_custom_add_to_admin_reg_list_table'
);
function my_custom_add_to_admin_reg_list_table() {
$currentScreen = get_current_screen();
if(
@joshfeck
joshfeck / select.css
Created Mar 6, 2020
Override Astra theme's minimal styles for html select input
View select.css
.ticket-selector-tbl-qty-slct {
display: inline-block;
font-size: 16px;
font-weight: 700;
color: #444;
line-height: 1.3;
padding: .6em 1.4em .5em .8em;
max-width: 100%;
box-sizing: border-box;
margin: 0;
@joshfeck
joshfeck / date_time_formats.php
Last active Mar 5, 2020
Example code that shows how to change the date & time format for the Event Espresso 4 event editor date & time inputs
View date_time_formats.php
<?php
//* Please do NOT include the opening php tag, except if you're starting with a blank file
function ee_change_dt_formats($formats) {
return array(
'date' => 'd.m.Y',
'time' => 'H:i'
);
}
add_filter(
@joshfeck
joshfeck / venue_after_dates.php
Created Feb 14, 2020
Display venue City, State/Province, Country on the event list page, after the dates
View venue_after_dates.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_after_event_date',
'my_custom_venue_details_for_event_list'
);
function my_custom_venue_details_for_event_list($post) {
if(is_archive()) {
add_filter(
@joshfeck
joshfeck / espresso_txn.php
Created Feb 14, 2020
Example showing how to add custom CSS to the Event Espresso Transactions admin page
View espresso_txn.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'admin_enqueue_scripts',
'my_custom_txn_table_column_widths',
20
);
function my_custom_txn_table_column_widths() {
$css =
@joshfeck
joshfeck / grid.css
Created Feb 13, 2020
custom EE grid CSS example
View grid.css
.ee_grid_box_v2.item {
width: 190px !important;
}
.ee_grid_box_v2.item img {
width: 190px !important;
}
.ee_overlay {
background: rgba(0, 0, 0, 0.5) !important;
@joshfeck
joshfeck / wp_user_shortcode.php
Created Feb 13, 2020
Change [ESPRESSO_MY_EVENTS template=simple_list_table] shortcode output to display only approved registrations. EE4 + WPUser integration.
View wp_user_shortcode.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__Espresso_My_Events__getTemplateObjects__query_args',
'jf_ee_filter_my_events_approved_regs',
10,
3
);
@joshfeck
joshfeck / beaver.php
Created Feb 11, 2020
Don't display Event Espresso Maintenance Mode notification if Beaver Builder editor is active. Event Espresso 4 + Beaver Builder. Add this code snippet into its own little WordPress plugin and activate it.
View beaver.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'shutdown',
function(){
if(
class_exists('FLBuilderModel')
&& class_exists('EE_Maintenance_Mode')
&& FLBuilderModel::is_builder_active()
You can’t perform that action at this time.