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 | |
$date_time_format = get_option('date_format') . " H:i"; | |
$start_date_time = DateTime::createFromFormat($date_time_format, | |
$all_meta['start_date'] . " " . $all_meta['start_time']); | |
$end_date_time = DateTime::createFromFormat($date_time_format, | |
$all_meta['end_date'] . " " . $all_meta['end_time']); | |
$gc_start_date = $start_date_time->getTimestamp(); | |
$gc_end_date = $end_date_time->getTimestamp(); | |
$startyear = date('Y', $gc_start_date); | |
$startmonth = date('m', $gc_start_date); |
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 $id_num = rand(); ?> | |
<div id="lhsHeader<?php echo $id_num; ?>" class="leftBoxHeading_Off" onClick="lhsAction('<?php echo $id_num; ?>',true,'T6_Effective_Behaviour_Change');"><?php echo $button_text ?></div> | |
<div id="lhsExpander<?php echo $id_num; ?>" class="leftBoxExpander"> | |
<div id="lhsInner<?php echo $id_num; ?>" class="leftBoxInnerPic"> <img src="<?php echo EVENT_ESPRESSO_UPLOAD_URL ?>templates/css-dropdown/images/left-box-inner-img.png" alt="Left image" height="18" width="287" /> | |
<ul> | |
<?php echo espresso_list_builder($sql, 'css-dropdown/css_dropdown_display.php', '<li>', '</li>'); //Call out the template file ?> | |
</ul> | |
</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 | |
// This is the full contents of the updated init.php file for firstdata_e4 for the fix added to 3.1.34-BETA | |
// This is for the gateway display | |
add_action('action_hook_espresso_display_offsite_payment_header', 'espresso_display_offsite_payment_header'); | |
add_action('action_hook_espresso_display_offsite_payment_footer', 'espresso_display_offsite_payment_footer'); | |
event_espresso_require_gateway("firstdata_e4/e4_vars.php"); | |
if (!empty($_REQUEST['type']) && $_REQUEST['type'] == 'firstdata_e4') { | |
event_espresso_require_gateway("firstdata_e4/e4_ipn.php"); |
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 customized_espresso_email_after_payment($payment_data) { | |
global $org_options; | |
if ($payment_data['payment_status'] == 'Completed') { | |
event_espresso_send_payment_notification(array('attendee_id' => $payment_data['attendee_id'], 'registration_id' => $payment_data['registration_id'])); | |
if ($org_options['email_before_payment'] == 'N') { | |
event_espresso_email_confirmations(array('attendee_id' => $payment_data['attendee_id'], 'registration_id' => $payment_data['registration_id'], 'send_admin_email' => 'true', 'send_attendee_email' => 'true')); | |
} | |
} | |
remove_action('action_hook_espresso_email_after_payment','espresso_email_after_payment'); | |
} |
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 get_price_breakdown($attendee_id) { | |
global $wpdb; | |
$sql = "SELECT * FROM " . EVENTS_PRICES_TABLE . " p JOIN "; | |
$sql .= EVENTS_ATTENDEE_TABLE . " a ON (a.event_id = p.event_id AND a.price_option = (p.price_type OR p.member_price_type)) "; | |
$sql .= "WHERE a.id = %d;"; | |
$temp = $wpdb->get_row($wpdb->prepare($sql, $attendee_id), ARRAY_A); | |
if ($temp['price_option'] == $temp['price_type']) { | |
$temp['pre_surcharge_price'] = $temp['event_cost']; | |
} else { | |
$temp['pre_surcharge_price'] = $temp['member_price']; |
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 show_event_titles($atts) { | |
ob_start(); | |
global $wpdb; | |
$sql = "SELECT e.* FROM ". EVENTS_DETAIL_TABLE . " e "; | |
$sql .= " WHERE is_active = 'Y' ";//Makes sure event is active | |
$sql .= " AND event_status != 'D' ";//Makes sure event is not deleted | |
//$sql .= " AND event_status = 'O' ";//Un-comment to only show ongoing events | |
//Removing this line keeps events from showing that may be expired | |
$sql .= " AND start_date >= '".date ( 'Y-m-d' )."' "; |
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
add_action('action_hook_espresso_save_attendee_data','espresso_create_wp_user', 10, 1); | |
function espresso_create_wp_user($attendee_data) { | |
if( username_exists( $attendee_data['email'] ) == NULL ) { | |
global $org_options, $wpdb; | |
// 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'] ); | |
// Set the users details |
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 | |
function espresso_get_total_cost_custom($payment_data) { | |
remove_filter('filter_hook_espresso_get_total_cost', 'espresso_get_total_cost'); | |
global $wpdb; | |
//if for some reason attendee_session isn't setin the payment data, set it now | |
if(!array_key_exists('attendee_session',$payment_data) || empty($payment_data['attendee_session'])){ | |
$SQL = "SELECT attendee_session FROM " . EVENTS_ATTENDEE_TABLE . " WHERE id=%d"; | |
$session_id = $wpdb->get_var( $wpdb->prepare( $SQL, $payment_data['attendee_id'] )); | |
$payment_data['attendee_session']=$session_id; | |
} |
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
// THIS IS FOR 2.1 BETA | |
// in the espresso calendar object add.. | |
/** | |
* @var INT $_event_user_id | |
* @access private | |
*/ | |
private $_event_user_id = 0; | |
// in public function espresso_calendar( $atts ) { | |
$atts = shortcode_atts( $defaults, $atts ); |
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 | |
function get_event_date_times($event_id = FALSE, $format = ARRAY_A) { | |
global $wpdb; | |
$sql = "SELECT e.start_date, e.end_date, ese.start_time, ese.end_time "; | |
$sql .= "FROM " . EVENTS_DETAIL_TABLE . " e "; | |
$sql .= "LEFT JOIN " . EVENTS_START_END_TABLE . " ese ON ese.event_id = e.id "; | |
$sql .= "WHERE e.id = %d"; | |
$results = $wpdb->get_results($wpdb->prepare($sql, $event_id), $format); | |
return $results; | |
} |
OlderNewer