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 espresso_ical_prepare_by_meta($meta, $title = '', $image = '', $link_only = FALSE) { | |
global $org_options, $wpdb; | |
do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, ''); | |
if ( !empty($org_options['display_ical_download']) && $org_options['display_ical_download'] == 'N' || !isset($org_options['display_ical_download']) ){ | |
return; | |
} | |
$start_date_object = DateTime::createFromFormat(get_option('date_format').' G:i', $meta['start_date'] . ' ' . $meta['start_time']); | |
$start_date = !empty($start_date_object) ? $start_date_object->getTimestamp() : ''; | |
$end_date_object = DateTime::createFromFormat(get_option('date_format').' G:i', $meta['end_date'] . ' ' . $meta['end_time']); | |
$end_date = !empty($end_date_object) ? $end_date_object->getTimestamp() : ''; |
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
// unfortunately, the function does not currently have a pluggable function wrapper, | |
// so the best course of action right now is to add the pluggable function wrapper in core, | |
// then add the overriding function into a custom function holding location. | |
// so in includes/admin-reports/add_new_attendees.php add this as line 2: | |
if (!function_exists('add_new_attendee')) { | |
// then add the closing brace at the end of the file: | |
} | |
// that way, whenever the client updates and loses the custom functionality, all you need to do is | |
// add the pluggable function wrapper back in. And in a future update, we will probably add the | |
// pluggable function wrapper in. |
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 | |
/*Custom Log Function Include*/ | |
// require('log.php'); | |
/*End Custom Log Function Include*/ | |
if (isset($_SESSION['espresso_session']['id'])) { | |
unset($_SESSION['espresso_session']['id']); | |
} | |
define('FPDF_FONTPATH', EVENT_ESPRESSO_PLUGINFULLPATH . 'class/fpdf/font/'); | |
require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'class/fpdf/fpdf.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 espresso_display_all_event_times($event_id) { | |
global $wpdb; | |
$sql = "SELECT ese.start_time, ese.end_time "; | |
$sql .= "FROM " . EVENTS_START_END_TABLE . " ese WHERE ese.event_id = %d"; | |
$times = $wpdb->get_results($wpdb->prepare($sql, $event_id)); | |
if(empty($times)) return NULL; | |
$time_format = get_option('time_format'); | |
$output = "<p>"; | |
foreach ($times as $time) { | |
$output .= "<span>" . event_date_display($time->start_time, $time_format) . " - " . event_date_display($time->end_time, $time_format) . "</span>"; |
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 goes in includes/admin-files/event_newsletter.php at line 49 (approx) | |
<li> | |
<select name="filter"> | |
<option value="all"><?php _e("All attendees of this event", "event_espresso"); ?></opton> | |
<option value="completed"><?php _e("Completed payment status attendees", "event_espresso"); ?></opton> | |
<option value="incomplete"><?php _e("Incomplete payment status attendees", "event_espresso"); ?></opton> | |
<option value="pending"><?php _e("Pending payment status attendees", "event_espresso"); ?></opton> | |
</select> | |
</li> |
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 espresso_chart_display($event_id, $type){ | |
global $wpdb, $org_options; | |
$retVAl = array(); | |
switch ($type){ | |
case 'total_reg': | |
//Total Registrations/Transactions | |
$title = __('Total Registrations/Transactions', 'event_espresso'); | |
$sql = "SELECT SUM(a.total_cost) amount, SUM(a.quantity) quantity, DATE_FORMAT(a.date,'%b %d') date FROM ".EVENTS_ATTENDEE_TABLE." a WHERE event_id =".$event_id." GROUP BY DATE_FORMAT(a.date,'%m-%d-%Y')"; | |
$sql2 = "SELECT SUM(a.total_cost) amount, SUM(a.quantity) quantity, 'total' as date FROM ".EVENTS_ATTENDEE_TABLE." a WHERE event_id =".$event_id; | |
break; |
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
// insert at line 70 of gateways/aim/aim_vars.php | |
// copy aim folder from plugins/event-espresso/gateways to uploads/espresso/gateways first | |
<p> | |
<label for="card-type">Card Card Type</label> | |
<select id="ppp_card-type" name="creditcardtype" class="wide required"> | |
<option value="Visa">Visa</option><option value="MasterCard">MasterCard</option><option value="Discover">Discover</option> | |
</select> | |
</p> |
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 espresso_reg_form_sc($atts) { | |
wp_enqueue_script('validation'); //This tells the plugin to load the required scripts | |
extract(shortcode_atts(array('event_id' => '0'), $atts)); | |
$event_id = "{$event_id}"; | |
ob_start(); | |
register_attendees(NULL, $event_id, false); | |
$buffer = ob_get_contents(); | |
ob_end_clean(); | |
return $buffer; | |
} |
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
// in includes/event-management/insert_event.php, put this in after | |
// $post_id = wp_insert_post($my_post); | |
// which is line 508 in 3.1.36.4.P | |
$event_thumbnail_id = $wpdb->get_var($wpdb->prepare("SELECT id FROM $wpdb->posts WHERE guid = '%s'", $event_thumbnail_url)); | |
if (!empty($event_thumbnail_id)) { | |
$wpdb->update( $wpdb->posts, array('post_parent' => $post_id), array('id' => $event_thumbnail_id)); | |
add_post_meta($post_id, '_thumbnail_id', $event_thumbnail_id); | |
} | |
// and in includes/event-management/update_event.php, put this in after |
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 | |
//echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>'; | |
if ( is_single() || is_archive() && espresso_display_datetimes_in_event_list() ) : | |
global $post; | |
do_action( 'AHEE_event_details_before_event_date', $post ); | |
?> | |
<div class="event-datetimes"> | |
<h3 class="event-datetimes-h3 ee-event-h3"> | |
<span class="dashicons dashicons-calendar"></span><?php _e( 'Upcoming Date(s) and Time(s)', 'event_espresso' ); ?> |
OlderNewer