This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Event Espresso site specific functions | |
Description: Add custom functions for Event Espresso to this plugin. | |
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */ | |
//Remove the Extensions & Services menu for all but admins with manage_options cap | |
function tw_ee_remove_services_menu() { | |
if( !current_user_can( 'manage_options' ) ) { | |
remove_submenu_page( 'espresso_events', 'espresso_packages' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', 'ee_print_event_duration', 10 ); | |
function ee_print_event_duration( $event ) { | |
$datetimes = $event->datetimes(); | |
foreach($datetimes as $datetime){ | |
if ( $datetime instanceof EE_Datetime ) { | |
$start = $datetime->get_raw('DTT_EVT_start'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
// move promotions table row to just before total table row | |
// | |
function move_promotion_table_row() { | |
?> | |
<script> | |
jQuery( document ).on('ajaxComplete ready', function() { | |
jQuery('table#spco-payment-info-table .spco-grand-total') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
//* Disable email match check for logged out users | |
add_filter( 'EED_WP_Users_SPCO__verify_user_access__perform_email_user_match_check', 'ee_wp_users_remove_email_user_match_check_logged_out' ); | |
function ee_wp_users_remove_email_user_match_check_logged_out() { | |
if ( ! is_user_logged_in() ) { | |
return false; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function jf_change_ee_reg_form_datepicker_format() { | |
?> | |
<script> | |
jQuery(document).ready(function($) { | |
$('.datepicker').datepicker({ | |
changeYear: true, | |
yearRange: "1960:2010", // for more info see http://api.jqueryui.com/datepicker/#option-yearRange |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
//Output details just after the ticket selector, the function has the Event ID ($EVT_ID) | |
//and EE_Event object $event available for use. | |
function tw_output_details_after_the_ts( $EVT_ID, $event ) { | |
echo "<h1>TESTING TESTING</h1>"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Custom EE Upcoming Events Widget | |
Description: Add a custom Upcoming Events widger with a 'sort' field and 'Show Only Expired' option. | |
Author: Tony Warwick | |
Version: 1.1 | |
*/ | |
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */ | |
class Custom_Upcoming_Events extends WP_Widget { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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_meta_value_csv', | |
10, | |
2 | |
); | |
function espresso_add_meta_value_csv( $reg_csv_array, $reg_row ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function ee_display_download_tickets( $transaction ) { | |
if ( $transaction instanceof EE_Transaction ) { | |
$primary_reg = $transaction->primary_registration(); | |
if ( $primary_reg->is_approved() ) { |