This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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' ); ?> |
This file contains hidden or 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_return_prices_for_event ( $event_id ) { | |
| global $wpdb; | |
| return $wpdb->get_results($wpdb->prepare( "SELECT * FROM " . EVENTS_PRICES_TABLE . " WHERE event_id = %d" , $event_id )); | |
| } |
This file contains hidden or 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
| // replaces lines 87-93 | |
| if ($event_status == 'NOT_ACTIVE') { | |
| $live_button = __('Closed', 'event_espresso'); | |
| $cart_link = ''; | |
| } | |
| if ( !empty( $event->category_id ) ) { | |
| $array_cat=explode(",",$event->category_id); | |
| $cat=array_map(function($val) { return "cat-" . trim($val); }, $array_cat); | |
| $cat_class = implode(" ", $cat); |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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_list_of_event_dates( $EVT_ID = FALSE, $dt_frmt = '', $tm_frmt = '', $echo = TRUE, $show_expired = NULL, $format = TRUE, $add_breaks = TRUE ) { | |
| $dt_frmt = ! empty( $dt_frmt ) ? $dt_frmt : get_option('date_format'); | |
| $tm_frmt = ! empty( $tm_frmt ) ? $tm_frmt : get_option('time_format'); | |
| $datetimes = EEH_Event_View::get_all_date_obj( $EVT_ID ,$show_expired ); | |
| //d( $datetimes ); | |
| if ( is_array( $datetimes ) && ! empty( $datetimes )) { | |
| global $post; | |
| $html = $format ? '<ul id="ee-event-datetimes-ul-' . $post->ID . '" class="ee-event-datetimes-ul">' : ''; | |
| foreach ( $datetimes as $datetime ) { | |
| if ( $datetime instanceof EE_Datetime ) { |
This file contains hidden or 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 csv_import() { ?> | |
| <h3>Event Import</h3> | |
| <ul> | |
| <li> | |
| <p><?php _e('This page is for importing your events from a comma separated file (CSV) directly into the the events database. The limitation of this upload is that it does not support the extra questions, only the core event configuration.', 'event_espresso'); ?> </p> | |
| <ul> | |
| <li><?php _e('Please use Y where you want to say Yes and N where you want No.', 'event_espresso'); ?></li> | |
| <li><?php _e('Dates should be formatted YYYY-MM-DD (2009-07-04).', 'event_espresso'); ?></li> |