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 | |
// Options | |
$date_format = get_option( 'date_format' ); | |
$time_format = get_option( 'time_format' ); | |
// Load Venue View Helper | |
EE_Registry::instance()->load_helper('Venue_View'); | |
//Defaults | |
$reg_button_text = !isset($reg_button_text) ? __('Register', 'event_espresso') : $reg_button_text; | |
$alt_button_text = !isset($alt_button_text) ? __('View Details', 'event_espresso') : $alt_button_text;//For alternate registration pages | |
$sold_out_button_text = !isset($sold_out_button_text) ? __('Sold Out', 'event_espresso') : $sold_out_button_text;//For sold out events |
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__EE_Registration_Processor__trigger_registration_update_notifications', | |
'my_remove_one_time_invitation_from_user', | |
10, | |
2 | |
); | |
function my_remove_one_time_invitation_from_user( | |
$registration, |
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() ) { |
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__EE_Export__report_registrations__reg_csv_array', 'espresso_add_total_taxes_column', 10, 2); | |
function espresso_add_total_taxes_column( $reg_csv_array, $reg_row ) { | |
$registration = EEM_Registration::instance()->get_one_by_ID( $reg_row['Registration.REG_ID'] ); | |
$sub_line_item_details = array(); | |
if( $registration instanceof EE_Registration && $registration->is_primary_registrant() ) { | |
$sub_line_items = EEM_Line_Item::instance()->get_all( | |
array( |
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 | |
// Display a contact form when the event is sold out | |
// to be used as a waiting list | |
function ee_espresso_clean_event_status( $event ) { | |
$status = $event instanceof EE_Event ? $event->get_active_status() : 'inactive'; | |
return $status; | |
} |
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 if you already have one. | |
function tw_ee_return_cart() { | |
return 'Cart'; | |
} | |
add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__event_cart_name', 'tw_ee_return_cart' ); | |
// also filter the empty cart message: | |
function my_ee_cart_is_empty() { |
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
function jv_ee_add_location_to_calendar_event( $text, $datetime, $event ) { | |
if ( $event instanceof EE_Event ) { | |
$venue = $event->get_first_related( 'Venue' ); | |
if ( $venue instanceof EE_Venue ) { | |
$venue_name = $venue->name(); | |
$text .= '<span>Location: ' . $venue_name . '</span>'; | |
} | |
} | |
return $text; | |
} |
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 a previous event and next event link to single event pages in Event Espresso 4 | |
function ee_previous_event_next_event_navigation(){ | |
?> | |
<div class="ee-after-event-navigation ee-clearfix"> | |
<div class="ee-after-event-navigation-previous" style="float:left"><?php previous_post_link('« %link', 'Previous Event: %title'); ?></div> | |
<div class="ee-after-event-navigation-next" style="float:right"><?php next_post_link('%link » ', 'Next Event: %title'); ?></div> | |
</div> |
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 Post Type Plugin | |
Description: Properties Custom Post Type. | |
*/ | |
/* | |
* Creating a function to create our CPT | |
*/ |
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 | |
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 ); | |
$user_id = wp_create_user( $attendee_data['email'], $password, $attendee_data['email'] ); | |
NewerOlder