@@ -192,14 +192,14 @@ discard block |
||
192 | 192 | <?php _e('Show on all Pages:', 'event_espresso'); ?> |
193 | 193 | </label> |
194 | 194 | <?php |
195 | - echo EEH_Form_Fields::select( |
|
196 | - __('Show on all Pages:', 'event_espresso'), |
|
197 | - $instance['show_everywhere'], |
|
198 | - $yes_no_values, |
|
199 | - $this->get_field_name('show_everywhere'), |
|
200 | - $this->get_field_id('show_everywhere') |
|
201 | - ); |
|
202 | - ?> |
|
195 | + echo EEH_Form_Fields::select( |
|
196 | + __('Show on all Pages:', 'event_espresso'), |
|
197 | + $instance['show_everywhere'], |
|
198 | + $yes_no_values, |
|
199 | + $this->get_field_name('show_everywhere'), |
|
200 | + $this->get_field_id('show_everywhere') |
|
201 | + ); |
|
202 | + ?> |
|
203 | 203 | </p> |
204 | 204 | <p> |
205 | 205 | <label for="<?php echo $this->get_field_id('date_limit'); ?>"> |
@@ -282,13 +282,13 @@ discard block |
||
282 | 282 | extract($args); |
283 | 283 | |
284 | 284 | // add function to make the title a link |
285 | - add_filter('widget_title', array($this, 'make_the_title_a_link'), 15); |
|
285 | + add_filter('widget_title', array($this, 'make_the_title_a_link'), 15); |
|
286 | 286 | |
287 | 287 | // filter the title |
288 | 288 | $title = apply_filters('widget_title', $instance['title']); |
289 | 289 | |
290 | 290 | // remove the function from the filter, so it does not affect other widgets |
291 | - remove_filter('widget_title', array($this, 'make_the_title_a_link'), 15); |
|
291 | + remove_filter('widget_title', array($this, 'make_the_title_a_link'), 15); |
|
292 | 292 | |
293 | 293 | // Before widget (defined by themes). |
294 | 294 | echo $before_widget; |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | * @return string |
386 | 386 | */ |
387 | 387 | public function make_the_title_a_link($title) { |
388 | - return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>'; |
|
388 | + return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>'; |
|
389 | 389 | } |
390 | 390 | |
391 | 391 | } |
@@ -1,6 +1,8 @@ discard block |
||
1 | 1 | <?php use EventEspresso\widgets\EspressoWidget; |
2 | 2 | |
3 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
4 | + exit('No direct script access allowed'); |
|
5 | +} |
|
4 | 6 | /** |
5 | 7 | * Event Espresso |
6 | 8 | * |
@@ -356,7 +358,7 @@ discard block |
||
356 | 358 | $single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', get_option( 'time_format' )); |
357 | 359 | if ( $date_range == TRUE ) { |
358 | 360 | echo espresso_event_date_range( $date_format, $time_format, $single_date_format, $single_time_format, $event->ID() ); |
359 | - }else{ |
|
361 | + } else{ |
|
360 | 362 | echo espresso_list_of_event_dates( $event->ID(), $date_format, $time_format, FALSE, NULL, TRUE, TRUE, $date_limit ); |
361 | 363 | } |
362 | 364 | } |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function __construct() { |
33 | 33 | parent::__construct( |
34 | - __( 'Event Espresso Upcoming Events', 'event_espresso' ), |
|
35 | - array( 'description' => __( 'A widget to display your upcoming events.', 'event_espresso' )) |
|
34 | + __('Event Espresso Upcoming Events', 'event_espresso'), |
|
35 | + array('description' => __('A widget to display your upcoming events.', 'event_espresso')) |
|
36 | 36 | ); |
37 | 37 | } |
38 | 38 | |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | * @param array $instance Previously saved values from database. |
46 | 46 | * @return string|void |
47 | 47 | */ |
48 | - public function form( $instance ) { |
|
48 | + public function form($instance) { |
|
49 | 49 | |
50 | - EE_Registry::instance()->load_class( 'Question_Option', array(), FALSE, FALSE, TRUE ); |
|
50 | + EE_Registry::instance()->load_class('Question_Option', array(), FALSE, FALSE, TRUE); |
|
51 | 51 | // Set up some default widget settings. |
52 | 52 | $defaults = array( |
53 | 53 | 'title' => __('Upcoming Events', 'event_espresso'), |
@@ -63,16 +63,16 @@ discard block |
||
63 | 63 | 'image_size' => 'medium' |
64 | 64 | ); |
65 | 65 | |
66 | - $instance = wp_parse_args( (array) $instance, $defaults ); |
|
66 | + $instance = wp_parse_args((array) $instance, $defaults); |
|
67 | 67 | // don't add HTML labels for EE_Form_Fields generated inputs |
68 | - add_filter( 'FHEE__EEH_Form_Fields__label_html', '__return_empty_string' ); |
|
68 | + add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); |
|
69 | 69 | $yes_no_values = array( |
70 | - EE_Question_Option::new_instance( array( 'QSO_value' => FALSE, 'QSO_desc' => __('No', 'event_espresso'))), |
|
71 | - EE_Question_Option::new_instance( array( 'QSO_value' => TRUE, 'QSO_desc' => __('Yes', 'event_espresso'))) |
|
70 | + EE_Question_Option::new_instance(array('QSO_value' => FALSE, 'QSO_desc' => __('No', 'event_espresso'))), |
|
71 | + EE_Question_Option::new_instance(array('QSO_value' => TRUE, 'QSO_desc' => __('Yes', 'event_espresso'))) |
|
72 | 72 | ); |
73 | 73 | $sort_values = array( |
74 | - EE_Question_Option::new_instance( array( 'QSO_value' => 'ASC', 'QSO_desc' => __('ASC', 'event_espresso'))), |
|
75 | - EE_Question_Option::new_instance( array( 'QSO_value' => 'DESC', 'QSO_desc' => __('DESC', 'event_espresso'))) |
|
74 | + EE_Question_Option::new_instance(array('QSO_value' => 'ASC', 'QSO_desc' => __('ASC', 'event_espresso'))), |
|
75 | + EE_Question_Option::new_instance(array('QSO_value' => 'DESC', 'QSO_desc' => __('DESC', 'event_espresso'))) |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | ?> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | <label for="<?php echo $this->get_field_id('title'); ?>"> |
84 | 84 | <?php _e('Title:', 'event_espresso'); ?> |
85 | 85 | </label> |
86 | - <input id="<?php echo $this->get_field_id('title'); ?>" class="widefat" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" type="text" /> |
|
86 | + <input id="<?php echo $this->get_field_id('title'); ?>" class="widefat" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr($instance['title']); ?>" type="text" /> |
|
87 | 87 | </p> |
88 | 88 | <p> |
89 | 89 | <label for="<?php echo $this->get_field_id('category_name'); ?>"> |
@@ -92,16 +92,16 @@ discard block |
||
92 | 92 | <?php |
93 | 93 | $event_categories = array(); |
94 | 94 | /** @type EEM_Term $EEM_Term */ |
95 | - $EEM_Term = EE_Registry::instance()->load_model( 'Term' ); |
|
96 | - $categories = $EEM_Term->get_all_ee_categories( TRUE ); |
|
97 | - if ( $categories ) { |
|
98 | - foreach ( $categories as $category ) { |
|
99 | - if ( $category instanceof EE_Term ) { |
|
100 | - $event_categories[] = EE_Question_Option::new_instance( array( 'QSO_value' => $category->get( 'slug' ), 'QSO_desc' => $category->get( 'name' ))); |
|
95 | + $EEM_Term = EE_Registry::instance()->load_model('Term'); |
|
96 | + $categories = $EEM_Term->get_all_ee_categories(TRUE); |
|
97 | + if ($categories) { |
|
98 | + foreach ($categories as $category) { |
|
99 | + if ($category instanceof EE_Term) { |
|
100 | + $event_categories[] = EE_Question_Option::new_instance(array('QSO_value' => $category->get('slug'), 'QSO_desc' => $category->get('name'))); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | } |
104 | - array_unshift( $event_categories, EE_Question_Option::new_instance( array( 'QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso')))); |
|
104 | + array_unshift($event_categories, EE_Question_Option::new_instance(array('QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso')))); |
|
105 | 105 | echo EEH_Form_Fields::select( |
106 | 106 | __('Event Category:', 'event_espresso'), |
107 | 107 | $instance['category_name'], |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | __('Show Expired Events:', 'event_espresso'), |
127 | 127 | $instance['show_expired'], |
128 | 128 | array( |
129 | - EE_Question_Option::new_instance( array( 'QSO_value' => 0, 'QSO_desc' => __('No', 'event_espresso'))), |
|
130 | - EE_Question_Option::new_instance( array( 'QSO_value' => 1, 'QSO_desc' => __('Yes', 'event_espresso'))), |
|
131 | - EE_Question_Option::new_instance( array( 'QSO_value' => 2, 'QSO_desc' => __('Show Only Expired', 'event_espresso'))), |
|
129 | + EE_Question_Option::new_instance(array('QSO_value' => 0, 'QSO_desc' => __('No', 'event_espresso'))), |
|
130 | + EE_Question_Option::new_instance(array('QSO_value' => 1, 'QSO_desc' => __('Yes', 'event_espresso'))), |
|
131 | + EE_Question_Option::new_instance(array('QSO_value' => 2, 'QSO_desc' => __('Show Only Expired', 'event_espresso'))), |
|
132 | 132 | ), |
133 | 133 | $this->get_field_name('show_expired'), |
134 | 134 | $this->get_field_id('show_expired') |
@@ -156,16 +156,16 @@ discard block |
||
156 | 156 | <?php |
157 | 157 | $image_sizes = array(); |
158 | 158 | $sizes = get_intermediate_image_sizes(); |
159 | - if ( $sizes ) { |
|
159 | + if ($sizes) { |
|
160 | 160 | // loop thru images and create option objects out of them |
161 | - foreach ( $sizes as $image_size ) { |
|
162 | - $image_size = trim( $image_size ); |
|
161 | + foreach ($sizes as $image_size) { |
|
162 | + $image_size = trim($image_size); |
|
163 | 163 | // no big images plz |
164 | - if ( ! in_array( $image_size, array( 'large', 'post-thumbnail' ))) { |
|
165 | - $image_sizes[] = EE_Question_Option::new_instance( array( 'QSO_value' => $image_size, 'QSO_desc' => $image_size )); |
|
164 | + if ( ! in_array($image_size, array('large', 'post-thumbnail'))) { |
|
165 | + $image_sizes[] = EE_Question_Option::new_instance(array('QSO_value' => $image_size, 'QSO_desc' => $image_size)); |
|
166 | 166 | } |
167 | 167 | } |
168 | - $image_sizes[] = EE_Question_Option::new_instance( array( 'QSO_value' => 'none', 'QSO_desc' => __('don\'t show images', 'event_espresso') )); |
|
168 | + $image_sizes[] = EE_Question_Option::new_instance(array('QSO_value' => 'none', 'QSO_desc' => __('don\'t show images', 'event_espresso'))); |
|
169 | 169 | } |
170 | 170 | echo EEH_Form_Fields::select( |
171 | 171 | __('Image Size:', 'event_espresso'), |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | <label for="<?php echo $this->get_field_id('date_limit'); ?>"> |
224 | 224 | <?php _e('Number of Dates to Display:', 'event_espresso'); ?> |
225 | 225 | </label> |
226 | - <input id="<?php echo $this->get_field_id('date_limit'); ?>" name="<?php echo $this->get_field_name('date_limit'); ?>" value="<?php echo esc_attr( $instance['date_limit'] ); ?>" size="3" type="text" /> |
|
226 | + <input id="<?php echo $this->get_field_id('date_limit'); ?>" name="<?php echo $this->get_field_name('date_limit'); ?>" value="<?php echo esc_attr($instance['date_limit']); ?>" size="3" type="text" /> |
|
227 | 227 | </p> |
228 | 228 | <p> |
229 | 229 | <label for="<?php echo $this->get_field_id('date_range'); ?>"> |
@@ -255,9 +255,9 @@ discard block |
||
255 | 255 | * |
256 | 256 | * @return array Updated safe values to be saved. |
257 | 257 | */ |
258 | - public function update( $new_instance, $old_instance ) { |
|
258 | + public function update($new_instance, $old_instance) { |
|
259 | 259 | $instance = $old_instance; |
260 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
260 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
261 | 261 | $instance['category_name'] = $new_instance['category_name']; |
262 | 262 | $instance['show_expired'] = $new_instance['show_expired']; |
263 | 263 | $instance['limit'] = $new_instance['limit']; |
@@ -281,18 +281,18 @@ discard block |
||
281 | 281 | * @param array $args Widget arguments. |
282 | 282 | * @param array $instance Saved values from database. |
283 | 283 | */ |
284 | - public function widget( $args, $instance ) { |
|
284 | + public function widget($args, $instance) { |
|
285 | 285 | |
286 | 286 | global $post; |
287 | 287 | // make sure there is some kinda post object |
288 | - if ( $post instanceof WP_Post ) { |
|
288 | + if ($post instanceof WP_Post) { |
|
289 | 289 | $before_widget = ''; |
290 | 290 | $before_title = ''; |
291 | 291 | $after_title = ''; |
292 | 292 | $after_widget = ''; |
293 | 293 | // but NOT an events archives page, cuz that would be like two event lists on the same page |
294 | - $show_everywhere = isset( $instance['show_everywhere'] ) ? (bool) absint( $instance['show_everywhere'] ) : TRUE; |
|
295 | - if ( $show_everywhere || ! ( $post->post_type == 'espresso_events' && is_archive() )) { |
|
294 | + $show_everywhere = isset($instance['show_everywhere']) ? (bool) absint($instance['show_everywhere']) : TRUE; |
|
295 | + if ($show_everywhere || ! ($post->post_type == 'espresso_events' && is_archive())) { |
|
296 | 296 | // let's use some of the event helper functions' |
297 | 297 | // make separate vars out of attributes |
298 | 298 | |
@@ -311,88 +311,88 @@ discard block |
||
311 | 311 | // Before widget (defined by themes). |
312 | 312 | echo $before_widget; |
313 | 313 | // Display the widget title if one was input (before and after defined by themes). |
314 | - if ( ! empty( $title )) { |
|
315 | - echo $before_title . $title . $after_title; |
|
314 | + if ( ! empty($title)) { |
|
315 | + echo $before_title.$title.$after_title; |
|
316 | 316 | } |
317 | 317 | // grab widget settings |
318 | - $category = isset( $instance['category_name'] ) && ! empty( $instance['category_name'] ) ? $instance['category_name'] : FALSE; |
|
319 | - $show_expired = isset( $instance['show_expired'] ) ? absint( $instance['show_expired'] ) : 0; |
|
320 | - $image_size = isset( $instance['image_size'] ) && ! empty( $instance['image_size'] ) ? $instance['image_size'] : 'medium'; |
|
321 | - $show_desc = isset( $instance['show_desc'] ) ? (bool) absint( $instance['show_desc'] ) : TRUE; |
|
322 | - $show_dates = isset( $instance['show_dates'] ) ? (bool) absint( $instance['show_dates'] ) : TRUE; |
|
323 | - $date_limit = isset( $instance['date_limit'] ) && ! empty( $instance['date_limit'] ) ? $instance['date_limit'] : NULL; |
|
324 | - $date_range = isset( $instance['date_range'] ) && ! empty( $instance['date_range'] ) ? $instance['date_range'] : FALSE; |
|
318 | + $category = isset($instance['category_name']) && ! empty($instance['category_name']) ? $instance['category_name'] : FALSE; |
|
319 | + $show_expired = isset($instance['show_expired']) ? absint($instance['show_expired']) : 0; |
|
320 | + $image_size = isset($instance['image_size']) && ! empty($instance['image_size']) ? $instance['image_size'] : 'medium'; |
|
321 | + $show_desc = isset($instance['show_desc']) ? (bool) absint($instance['show_desc']) : TRUE; |
|
322 | + $show_dates = isset($instance['show_dates']) ? (bool) absint($instance['show_dates']) : TRUE; |
|
323 | + $date_limit = isset($instance['date_limit']) && ! empty($instance['date_limit']) ? $instance['date_limit'] : NULL; |
|
324 | + $date_range = isset($instance['date_range']) && ! empty($instance['date_range']) ? $instance['date_range'] : FALSE; |
|
325 | 325 | // start to build our where clause |
326 | 326 | $where = array( |
327 | 327 | // 'Datetime.DTT_is_primary' => 1, |
328 | - 'status' => array( 'IN', array( 'publish', 'sold_out' ) ) |
|
328 | + 'status' => array('IN', array('publish', 'sold_out')) |
|
329 | 329 | ); |
330 | 330 | // add category |
331 | - if ( $category ) { |
|
331 | + if ($category) { |
|
332 | 332 | $where['Term_Taxonomy.taxonomy'] = 'espresso_event_categories'; |
333 | 333 | $where['Term_Taxonomy.Term.slug'] = $category; |
334 | 334 | } |
335 | 335 | // if NOT expired then we want events that start today or in the future |
336 | 336 | // if NOT show expired then we want events that start today or in the future |
337 | - if ( $show_expired == 0 ) { |
|
338 | - $where['Datetime.DTT_EVT_end'] = array( '>=', EEM_Datetime::instance()->current_time_for_query( 'DTT_EVT_end' ) ); |
|
337 | + if ($show_expired == 0) { |
|
338 | + $where['Datetime.DTT_EVT_end'] = array('>=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_end')); |
|
339 | 339 | } |
340 | 340 | // if show ONLY expired we want events that ended prior to today |
341 | - if ( $show_expired == 2 ) { |
|
342 | - $where['Datetime.DTT_EVT_end'] = array( '<=', EEM_Datetime::instance()->current_time_for_query( 'DTT_EVT_start' ) ); |
|
341 | + if ($show_expired == 2) { |
|
342 | + $where['Datetime.DTT_EVT_end'] = array('<=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_start')); |
|
343 | 343 | } |
344 | 344 | // allow $where to be filtered |
345 | - $where = apply_filters( 'FHEE__EEW_Upcoming_Events__widget__where', $where, $category, $show_expired ); |
|
345 | + $where = apply_filters('FHEE__EEW_Upcoming_Events__widget__where', $where, $category, $show_expired); |
|
346 | 346 | // run the query |
347 | - $events = EE_Registry::instance()->load_model( 'Event' )->get_all( array( |
|
347 | + $events = EE_Registry::instance()->load_model('Event')->get_all(array( |
|
348 | 348 | $where, |
349 | - 'limit' => $instance['limit'] > 0 ? '0,' . $instance['limit'] : '0,10', |
|
349 | + 'limit' => $instance['limit'] > 0 ? '0,'.$instance['limit'] : '0,10', |
|
350 | 350 | 'order_by' => 'Datetime.DTT_EVT_start', |
351 | 351 | 'order' => isset($instance['sort']) ? $instance['sort'] : 'ASC', |
352 | 352 | 'group_by' => 'EVT_ID' |
353 | 353 | )); |
354 | 354 | |
355 | - if ( ! empty( $events )) { |
|
355 | + if ( ! empty($events)) { |
|
356 | 356 | echo '<ul class="ee-upcoming-events-widget-ul">'; |
357 | - foreach ( $events as $event ) { |
|
358 | - if ( $event instanceof EE_Event && ( !is_single() || $post->ID != $event->ID() ) ) { |
|
357 | + foreach ($events as $event) { |
|
358 | + if ($event instanceof EE_Event && ( ! is_single() || $post->ID != $event->ID())) { |
|
359 | 359 | //printr( $event, '$event <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
360 | - echo '<li id="ee-upcoming-events-widget-li-' . $event->ID() . '" class="ee-upcoming-events-widget-li">'; |
|
360 | + echo '<li id="ee-upcoming-events-widget-li-'.$event->ID().'" class="ee-upcoming-events-widget-li">'; |
|
361 | 361 | // how big is the event name ? |
362 | - $name_length = strlen( $event->name() ); |
|
363 | - switch( $name_length ) { |
|
362 | + $name_length = strlen($event->name()); |
|
363 | + switch ($name_length) { |
|
364 | 364 | case $name_length > 70 : |
365 | - $len_class = ' three-line'; |
|
365 | + $len_class = ' three-line'; |
|
366 | 366 | break; |
367 | 367 | case $name_length > 35 : |
368 | - $len_class = ' two-line'; |
|
368 | + $len_class = ' two-line'; |
|
369 | 369 | break; |
370 | 370 | default : |
371 | - $len_class = ' one-line'; |
|
371 | + $len_class = ' one-line'; |
|
372 | 372 | } |
373 | - $event_url = apply_filters( 'FHEE_EEW_Upcoming_Events__widget__event_url', $event->get_permalink(), $event ); |
|
374 | - echo '<h5 class="ee-upcoming-events-widget-title-h5"><a class="ee-widget-event-name-a' . $len_class . '" href="' . $event_url . '">' . $event->name() . '</a></h5>'; |
|
375 | - if ( post_password_required( $event->ID() ) ) { |
|
376 | - $pswd_form = apply_filters( 'FHEE_EEW_Upcoming_Events__widget__password_form', get_the_password_form( $event->ID() ), $event ); |
|
373 | + $event_url = apply_filters('FHEE_EEW_Upcoming_Events__widget__event_url', $event->get_permalink(), $event); |
|
374 | + echo '<h5 class="ee-upcoming-events-widget-title-h5"><a class="ee-widget-event-name-a'.$len_class.'" href="'.$event_url.'">'.$event->name().'</a></h5>'; |
|
375 | + if (post_password_required($event->ID())) { |
|
376 | + $pswd_form = apply_filters('FHEE_EEW_Upcoming_Events__widget__password_form', get_the_password_form($event->ID()), $event); |
|
377 | 377 | echo $pswd_form; |
378 | 378 | } else { |
379 | - if ( has_post_thumbnail( $event->ID() ) && $image_size != 'none' ) { |
|
380 | - echo '<div class="ee-upcoming-events-widget-img-dv"><a class="ee-upcoming-events-widget-img" href="' . $event_url . '">' . get_the_post_thumbnail( $event->ID(), $image_size ) . '</a></div>'; |
|
379 | + if (has_post_thumbnail($event->ID()) && $image_size != 'none') { |
|
380 | + echo '<div class="ee-upcoming-events-widget-img-dv"><a class="ee-upcoming-events-widget-img" href="'.$event_url.'">'.get_the_post_thumbnail($event->ID(), $image_size).'</a></div>'; |
|
381 | 381 | } |
382 | - $desc = $event->short_description( 25 ); |
|
383 | - if ( $show_dates ) { |
|
384 | - $date_format = apply_filters( 'FHEE__espresso_event_date_range__date_format', get_option( 'date_format' )); |
|
385 | - $time_format = apply_filters( 'FHEE__espresso_event_date_range__time_format', get_option( 'time_format' )); |
|
386 | - $single_date_format = apply_filters( 'FHEE__espresso_event_date_range__single_date_format', get_option( 'date_format' )); |
|
387 | - $single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', get_option( 'time_format' )); |
|
388 | - if ( $date_range == TRUE ) { |
|
389 | - echo espresso_event_date_range( $date_format, $time_format, $single_date_format, $single_time_format, $event->ID() ); |
|
390 | - }else{ |
|
391 | - echo espresso_list_of_event_dates( $event->ID(), $date_format, $time_format, FALSE, NULL, TRUE, TRUE, $date_limit ); |
|
382 | + $desc = $event->short_description(25); |
|
383 | + if ($show_dates) { |
|
384 | + $date_format = apply_filters('FHEE__espresso_event_date_range__date_format', get_option('date_format')); |
|
385 | + $time_format = apply_filters('FHEE__espresso_event_date_range__time_format', get_option('time_format')); |
|
386 | + $single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', get_option('date_format')); |
|
387 | + $single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', get_option('time_format')); |
|
388 | + if ($date_range == TRUE) { |
|
389 | + echo espresso_event_date_range($date_format, $time_format, $single_date_format, $single_time_format, $event->ID()); |
|
390 | + } else { |
|
391 | + echo espresso_list_of_event_dates($event->ID(), $date_format, $time_format, FALSE, NULL, TRUE, TRUE, $date_limit); |
|
392 | 392 | } |
393 | 393 | } |
394 | - if ( $show_desc && $desc ) { |
|
395 | - echo '<p style="margin-top: .5em">' . $desc . '</p>'; |
|
394 | + if ($show_desc && $desc) { |
|
395 | + echo '<p style="margin-top: .5em">'.$desc.'</p>'; |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 | echo '</li>'; |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | * @return string |
417 | 417 | */ |
418 | 418 | public function make_the_title_a_link($title) { |
419 | - return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>'; |
|
419 | + return '<a href="'.EEH_Event_View::event_archive_url().'">'.$title.'</a>'; |
|
420 | 420 | } |
421 | 421 | |
422 | 422 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | 0 => array( |
34 | 34 | 'content_id' => 'attendee-column-tip', |
35 | 35 | 'target' => '.column-attendees .dashicons-groups', |
36 | - 'content' => sprintf( __('%s Registrations', 'event_espresso'), EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence') ), |
|
36 | + 'content' => sprintf(__('%s Registrations', 'event_espresso'), EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence')), |
|
37 | 37 | 'options' => array( |
38 | 38 | 'position' => array( |
39 | 39 | 'my' => 'bottom left', |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | * @param EE_Datetime constant $status What status is set (by class) |
125 | 125 | * @return string The status legend with the related status highlighted |
126 | 126 | */ |
127 | - private function _event_status_legend( $status ) { |
|
127 | + private function _event_status_legend($status) { |
|
128 | 128 | |
129 | 129 | $status_array = array( |
130 | 130 | 'active_status' => EE_Datetime::active, |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | 'inactive_status' => EE_Datetime::inactive |
137 | 137 | ); |
138 | 138 | |
139 | - return EEH_Template::status_legend( $status_array, $status ); |
|
139 | + return EEH_Template::status_legend($status_array, $status); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | } |
143 | 143 | \ No newline at end of file |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | |
94 | 94 | private function _registration_trash_message() { |
95 | - return '<p>' . __('This lock-icon means that this registration cannot be trashed. Registrations that belong to a transaction that has payments cannot be trashed. If you wish to trash this registration then you must delete all payments attached to the related transaction first.', 'event_espresso') . '</p>'; |
|
95 | + return '<p>'.__('This lock-icon means that this registration cannot be trashed. Registrations that belong to a transaction that has payments cannot be trashed. If you wish to trash this registration then you must delete all payments attached to the related transaction first.', 'event_espresso').'</p>'; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * @param EEM_Registration constant $status What status is set (by class) |
105 | 105 | * @return string The status legend with the related status highlighted |
106 | 106 | */ |
107 | - private function _registration_status_legend( $status ) { |
|
107 | + private function _registration_status_legend($status) { |
|
108 | 108 | |
109 | 109 | $status_array = array( |
110 | 110 | 'approved_status' => EEM_Registration::status_id_approved, |
@@ -114,6 +114,6 @@ discard block |
||
114 | 114 | 'cancelled_status' => EEM_Registration::status_id_cancelled |
115 | 115 | ); |
116 | 116 | |
117 | - return EEH_Template::status_legend( $status_array, $status ); |
|
117 | + return EEH_Template::status_legend($status_array, $status); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | \ No newline at end of file |
@@ -32,16 +32,16 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function __construct() { |
34 | 34 | |
35 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
36 | - if ( ! defined( 'TXN_PG_SLUG' ) ) { |
|
37 | - define( 'TXN_PG_SLUG', 'espresso_transactions' ); |
|
38 | - define( 'TXN_PG_NAME', ucwords( str_replace( '_', '', TXN_PG_SLUG ) ) ); |
|
39 | - define( 'TXN_ADMIN', EE_ADMIN_PAGES . 'transactions' . DS ); |
|
40 | - define( 'TXN_ADMIN_URL', admin_url( 'admin.php?page=' . TXN_PG_SLUG ) ); |
|
41 | - define( 'TXN_ASSETS_PATH', TXN_ADMIN . 'assets' . DS ); |
|
42 | - define( 'TXN_ASSETS_URL', str_replace( '\\', '/', EE_ADMIN_PAGES_URL . 'transactions/assets' . DS ) ); |
|
43 | - define( 'TXN_TEMPLATE_PATH', TXN_ADMIN . 'templates' . DS ); |
|
44 | - define( 'TXN_TEMPLATE_URL', str_replace( '\\', '/', EE_ADMIN_PAGES_URL . 'transactions/templates' . DS ) ); |
|
35 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
36 | + if ( ! defined('TXN_PG_SLUG')) { |
|
37 | + define('TXN_PG_SLUG', 'espresso_transactions'); |
|
38 | + define('TXN_PG_NAME', ucwords(str_replace('_', '', TXN_PG_SLUG))); |
|
39 | + define('TXN_ADMIN', EE_ADMIN_PAGES.'transactions'.DS); |
|
40 | + define('TXN_ADMIN_URL', admin_url('admin.php?page='.TXN_PG_SLUG)); |
|
41 | + define('TXN_ASSETS_PATH', TXN_ADMIN.'assets'.DS); |
|
42 | + define('TXN_ASSETS_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL.'transactions/assets'.DS)); |
|
43 | + define('TXN_TEMPLATE_PATH', TXN_ADMIN.'templates'.DS); |
|
44 | + define('TXN_TEMPLATE_URL', str_replace('\\', '/', EE_ADMIN_PAGES_URL.'transactions/templates'.DS)); |
|
45 | 45 | } |
46 | 46 | parent::__construct(); |
47 | 47 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @return void |
64 | 64 | */ |
65 | 65 | protected function _set_menu_map() { |
66 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
66 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
67 | 67 | 'menu_group' => 'main', |
68 | 68 | 'menu_order' => 50, |
69 | 69 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Event Espresso |
4 | 6 | * |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @param EEM_Transaction constant $status What status is set (by class) |
84 | 84 | * @return string The status legend with the related status highlighted |
85 | 85 | */ |
86 | - private function _transaction_status_legend( $status ) { |
|
86 | + private function _transaction_status_legend($status) { |
|
87 | 87 | |
88 | 88 | $status_array = array( |
89 | 89 | 'overpaid' => EEM_Transaction::overpaid_status_code, |
@@ -92,6 +92,6 @@ discard block |
||
92 | 92 | 'failed' => EEM_Transaction::failed_status_code, |
93 | 93 | ); |
94 | 94 | |
95 | - return EEH_Template::status_legend( $status_array, $status ); |
|
95 | + return EEH_Template::status_legend($status_array, $status); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | \ No newline at end of file |
@@ -55,21 +55,21 @@ discard block |
||
55 | 55 | 'QSO_deleted'=>new EE_Trashed_Flag_Field('QSO_deleted', __('Flag indicating Option was trashed','event_espresso'), false, false) |
56 | 56 | ) |
57 | 57 | */ |
58 | -class EE_DMS_4_1_0_questions extends EE_Data_Migration_Script_Stage{ |
|
58 | +class EE_DMS_4_1_0_questions extends EE_Data_Migration_Script_Stage { |
|
59 | 59 | private $_old_table; |
60 | 60 | private $_new_table; |
61 | 61 | private $_option_table; |
62 | - function _migration_step($num_items=50){ |
|
62 | + function _migration_step($num_items = 50) { |
|
63 | 63 | global $wpdb; |
64 | 64 | $start_at_record = $this->count_records_migrated(); |
65 | - $rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM $this->_old_table LIMIT %d,%d",$start_at_record,$num_items),ARRAY_A); |
|
65 | + $rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM $this->_old_table LIMIT %d,%d", $start_at_record, $num_items), ARRAY_A); |
|
66 | 66 | $items_actually_migrated = 0; |
67 | - foreach($rows as $question_row){ |
|
67 | + foreach ($rows as $question_row) { |
|
68 | 68 | $new_id = $this->_insert_new_question($question_row); |
69 | 69 | $this->get_migration_script()->set_mapping($this->_old_table, $question_row['id'], $this->_new_table, $new_id); |
70 | 70 | $items_actually_migrated++; |
71 | 71 | } |
72 | - if($this->count_records_migrated() + $items_actually_migrated >= $this->count_records_to_migrate()){ |
|
72 | + if ($this->count_records_migrated() + $items_actually_migrated >= $this->count_records_to_migrate()) { |
|
73 | 73 | $this->set_completed(); |
74 | 74 | } |
75 | 75 | return $items_actually_migrated; |
@@ -87,14 +87,14 @@ discard block |
||
87 | 87 | $this->_option_table = $wpdb->prefix."esp_question_option"; |
88 | 88 | parent::__construct(); |
89 | 89 | } |
90 | - private function _insert_new_question($old_question){ |
|
90 | + private function _insert_new_question($old_question) { |
|
91 | 91 | global $wpdb; |
92 | 92 | //if this pretends to be a 'system' question, check if we already have a |
93 | 93 | //system question for that string. If so, pretend THAT new question |
94 | 94 | //is what we just isnerted |
95 | - if($old_question['system_name']){ |
|
96 | - $id_of_new_system_question = intval($wpdb->get_var($wpdb->prepare("SELECT QST_ID FROM {$this->_new_table} WHERE QST_system = %s",$old_question['system_name']))); |
|
97 | - if($id_of_new_system_question){ |
|
95 | + if ($old_question['system_name']) { |
|
96 | + $id_of_new_system_question = intval($wpdb->get_var($wpdb->prepare("SELECT QST_ID FROM {$this->_new_table} WHERE QST_system = %s", $old_question['system_name']))); |
|
97 | + if ($id_of_new_system_question) { |
|
98 | 98 | return $id_of_new_system_question; |
99 | 99 | } |
100 | 100 | //ok so this must be the first one. Carry on. |
@@ -113,27 +113,27 @@ discard block |
||
113 | 113 | 'QST_deleted'=>false |
114 | 114 | ); |
115 | 115 | $datatypes = array( |
116 | - '%s',//QST_display_text |
|
117 | - '%s',//QST-admin_label |
|
118 | - '%s',//QST_system |
|
119 | - '%s',//QST_type |
|
120 | - '%d',//QST_required |
|
121 | - '%s',//QST_required_text |
|
122 | - '%d',//QST_order |
|
123 | - '%d',//QST_admin_only |
|
124 | - '%d',//QST_wp_user |
|
125 | - '%d',//QST_deleted |
|
116 | + '%s', //QST_display_text |
|
117 | + '%s', //QST-admin_label |
|
118 | + '%s', //QST_system |
|
119 | + '%s', //QST_type |
|
120 | + '%d', //QST_required |
|
121 | + '%s', //QST_required_text |
|
122 | + '%d', //QST_order |
|
123 | + '%d', //QST_admin_only |
|
124 | + '%d', //QST_wp_user |
|
125 | + '%d', //QST_deleted |
|
126 | 126 | ); |
127 | - $success = $wpdb->insert($this->_new_table,$cols_n_values,$datatypes); |
|
128 | - if ( ! $success){ |
|
127 | + $success = $wpdb->insert($this->_new_table, $cols_n_values, $datatypes); |
|
128 | + if ( ! $success) { |
|
129 | 129 | $this->add_error($this->get_migration_script()->_create_error_message_for_db_insertion($this->_old_table, $old_question, $this->_new_table, $cols_n_values, $datatypes)); |
130 | 130 | return 0; |
131 | 131 | } |
132 | 132 | $new_id = $wpdb->insert_id; |
133 | 133 | //now take care of posisbly adding question options |
134 | - if(in_array($old_question['question_type'],array('DROPDOWN','SINGLE','MULTIPLE'))){ |
|
135 | - $options = explode(",",$old_question['response']); |
|
136 | - foreach($options as $option){ |
|
134 | + if (in_array($old_question['question_type'], array('DROPDOWN', 'SINGLE', 'MULTIPLE'))) { |
|
135 | + $options = explode(",", $old_question['response']); |
|
136 | + foreach ($options as $option) { |
|
137 | 137 | $this->_insert_question_option($option, $new_id); |
138 | 138 | } |
139 | 139 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @param int $question_id |
147 | 147 | * @return int |
148 | 148 | */ |
149 | - private function _insert_question_option($option,$question_id){ |
|
149 | + private function _insert_question_option($option, $question_id) { |
|
150 | 150 | $option = trim($option); |
151 | 151 | global $wpdb; |
152 | 152 | $cols_n_values = array( |
@@ -154,14 +154,14 @@ discard block |
||
154 | 154 | 'QSO_value'=>$option, |
155 | 155 | 'QSO_deleted'=>false |
156 | 156 | ); |
157 | - $datatypes= array( |
|
158 | - '%d',//QST_ID |
|
159 | - '%s',//QSO_value |
|
160 | - '%d',//QSO_deleted |
|
157 | + $datatypes = array( |
|
158 | + '%d', //QST_ID |
|
159 | + '%s', //QSO_value |
|
160 | + '%d', //QSO_deleted |
|
161 | 161 | ); |
162 | - $success = $wpdb->insert($this->_option_table,$cols_n_values,$datatypes); |
|
163 | - if ( ! $success ){ |
|
164 | - $this->add_error($this->get_migration_script()->_create_error_message_for_db_insertion($this->_old_table, array('option'=>$option,'new_question_id'=>$question_id), $this->_option_table, $cols_n_values, $datatypes)); |
|
162 | + $success = $wpdb->insert($this->_option_table, $cols_n_values, $datatypes); |
|
163 | + if ( ! $success) { |
|
164 | + $this->add_error($this->get_migration_script()->_create_error_message_for_db_insertion($this->_old_table, array('option'=>$option, 'new_question_id'=>$question_id), $this->_option_table, $cols_n_values, $datatypes)); |
|
165 | 165 | return 0; |
166 | 166 | } |
167 | 167 | return $wpdb->insert_id; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | /** |
@@ -12,68 +12,68 @@ discard block |
||
12 | 12 | * @author Mike Nelson |
13 | 13 | * |
14 | 14 | */ |
15 | -class EE_DMS_4_8_0_event_subtotals extends EE_Data_Migration_Script_Stage_Table{ |
|
16 | - function __construct(){ |
|
15 | +class EE_DMS_4_8_0_event_subtotals extends EE_Data_Migration_Script_Stage_Table { |
|
16 | + function __construct() { |
|
17 | 17 | global $wpdb; |
18 | - $this->_old_table = $wpdb->prefix . 'esp_line_item'; |
|
18 | + $this->_old_table = $wpdb->prefix.'esp_line_item'; |
|
19 | 19 | $this->_extra_where_sql = ' WHERE LIN_type="sub-total" AND LIN_code="pre-tax-subtotal"'; |
20 | 20 | $this->_pretty_name = __('Event Sub-total line items', 'event_espresso'); |
21 | 21 | parent::__construct(); |
22 | 22 | } |
23 | - protected function _migrate_old_row( $line_item_row ) { |
|
23 | + protected function _migrate_old_row($line_item_row) { |
|
24 | 24 | global $wpdb; |
25 | 25 | //what event is this line item for? this can be found by looking at its transaction's registration's EVT_ID |
26 | - $event_id = $wpdb->get_var( $wpdb->prepare( 'SELECT EVT_ID FROM ' . $wpdb->prefix . 'esp_registration WHERE TXN_ID=%d LIMIT 1', $line_item_row[ 'TXN_ID' ] ) ); |
|
26 | + $event_id = $wpdb->get_var($wpdb->prepare('SELECT EVT_ID FROM '.$wpdb->prefix.'esp_registration WHERE TXN_ID=%d LIMIT 1', $line_item_row['TXN_ID'])); |
|
27 | 27 | $new_line_item_data = array( |
28 | - 'LIN_code' => 'event-' . $event_id, |
|
29 | - 'TXN_ID' => $line_item_row[ 'TXN_ID' ], |
|
30 | - 'LIN_name' => __( 'Event', 'event_espresso' ), |
|
31 | - 'LIN_desc' => $line_item_row[ 'LIN_desc' ], |
|
32 | - 'LIN_unit_price' => $line_item_row[ 'LIN_unit_price' ], |
|
33 | - 'LIN_percent' => $line_item_row[ 'LIN_percent' ], |
|
34 | - 'LIN_is_taxable' => $line_item_row[ 'LIN_is_taxable' ], |
|
35 | - 'LIN_order' => $line_item_row[ 'LIN_order' ], |
|
36 | - 'LIN_total' => $line_item_row[ 'LIN_total' ], |
|
37 | - 'LIN_quantity' => $line_item_row[ 'LIN_quantity' ], |
|
38 | - 'LIN_parent' => $line_item_row[ 'LIN_ID'], |
|
28 | + 'LIN_code' => 'event-'.$event_id, |
|
29 | + 'TXN_ID' => $line_item_row['TXN_ID'], |
|
30 | + 'LIN_name' => __('Event', 'event_espresso'), |
|
31 | + 'LIN_desc' => $line_item_row['LIN_desc'], |
|
32 | + 'LIN_unit_price' => $line_item_row['LIN_unit_price'], |
|
33 | + 'LIN_percent' => $line_item_row['LIN_percent'], |
|
34 | + 'LIN_is_taxable' => $line_item_row['LIN_is_taxable'], |
|
35 | + 'LIN_order' => $line_item_row['LIN_order'], |
|
36 | + 'LIN_total' => $line_item_row['LIN_total'], |
|
37 | + 'LIN_quantity' => $line_item_row['LIN_quantity'], |
|
38 | + 'LIN_parent' => $line_item_row['LIN_ID'], |
|
39 | 39 | 'LIN_type' => 'sub-total', |
40 | 40 | 'OBJ_type' => 'Event', |
41 | 41 | 'OBJ_ID' => $event_id, |
42 | 42 | ); |
43 | 43 | $new_line_item_datatypes = array( |
44 | - '%s',//LIN_code |
|
45 | - '%d',//TXN_ID |
|
46 | - '%s',//LIN_name |
|
47 | - '%s',//LIN_desc |
|
48 | - '%f',//LIN_unit_price |
|
49 | - '%f',//LIN_percent |
|
50 | - '%d',//LIN_is_taxable |
|
51 | - '%d',//LIN_order |
|
52 | - '%f',//LIN_total |
|
53 | - '%d',//LIN_quantity |
|
54 | - '%d',//LIN_parent |
|
55 | - '%s',//LIN_type |
|
56 | - '%s',//OBJ_type |
|
57 | - '%d',//OBJ_ID |
|
44 | + '%s', //LIN_code |
|
45 | + '%d', //TXN_ID |
|
46 | + '%s', //LIN_name |
|
47 | + '%s', //LIN_desc |
|
48 | + '%f', //LIN_unit_price |
|
49 | + '%f', //LIN_percent |
|
50 | + '%d', //LIN_is_taxable |
|
51 | + '%d', //LIN_order |
|
52 | + '%f', //LIN_total |
|
53 | + '%d', //LIN_quantity |
|
54 | + '%d', //LIN_parent |
|
55 | + '%s', //LIN_type |
|
56 | + '%s', //OBJ_type |
|
57 | + '%d', //OBJ_ID |
|
58 | 58 | ); |
59 | 59 | //insert the new event subtotal line item, pointing to this line item |
60 | - $success = $wpdb->insert( $this->_old_table, $new_line_item_data, $new_line_item_datatypes ); |
|
61 | - if( ! $success ) { |
|
62 | - $this->add_error( $this->_create_error_message_for_db_insertion( $this->_old_table, $line_item_row, $this->_old_table, $new_line_item_data, $new_line_item_datatypes ) ); |
|
60 | + $success = $wpdb->insert($this->_old_table, $new_line_item_data, $new_line_item_datatypes); |
|
61 | + if ( ! $success) { |
|
62 | + $this->add_error($this->_create_error_message_for_db_insertion($this->_old_table, $line_item_row, $this->_old_table, $new_line_item_data, $new_line_item_datatypes)); |
|
63 | 63 | } |
64 | 64 | $new_line_item_id = $wpdb->insert_id; |
65 | - $this->get_migration_script()->set_mapping($this->_old_table, $line_item_row[ 'LIN_ID' ], $this->_old_table, $new_line_item_id ); |
|
65 | + $this->get_migration_script()->set_mapping($this->_old_table, $line_item_row['LIN_ID'], $this->_old_table, $new_line_item_id); |
|
66 | 66 | $query = $wpdb->prepare( |
67 | 67 | "UPDATE {$this->_old_table} SET LIN_parent=%d WHERE LIN_parent = %d AND LIN_ID != %d LIMIT 100", |
68 | 68 | $new_line_item_id, |
69 | - $line_item_row[ 'LIN_ID' ], |
|
69 | + $line_item_row['LIN_ID'], |
|
70 | 70 | $new_line_item_id ); |
71 | - $success = $wpdb->query( $query ); |
|
72 | - if( $success === false ) { |
|
71 | + $success = $wpdb->query($query); |
|
72 | + if ($success === false) { |
|
73 | 73 | $this->add_error( |
74 | - sprintf( __( 'Error updating rows to new event subtotal %1$s from %2$s. Error was: %3$s, while using query %4$s which had a result of %5$s', 'event_espresso' ), |
|
74 | + sprintf(__('Error updating rows to new event subtotal %1$s from %2$s. Error was: %3$s, while using query %4$s which had a result of %5$s', 'event_espresso'), |
|
75 | 75 | $new_line_item_id, |
76 | - $line_item_row[ 'LIN_ID' ], |
|
76 | + $line_item_row['LIN_ID'], |
|
77 | 77 | $wpdb->last_error, |
78 | 78 | $query, |
79 | 79 | $success) ); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | /** |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @since 4.9.0 |
13 | 13 | * @author Darren Ethier |
14 | 14 | */ |
15 | -interface EEI_Query_Filter { |
|
15 | +interface EEI_Query_Filter { |
|
16 | 16 | |
17 | 17 | |
18 | 18 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * Class EE_Line_Item_Filter_Base |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @param \EEI_Line_Item $line_item |
25 | 25 | * @return \EEI_Line_Item |
26 | 26 | */ |
27 | - public function process( EEI_Line_Item $line_item ) { |
|
27 | + public function process(EEI_Line_Item $line_item) { |
|
28 | 28 | return $line_item; |
29 | 29 | } |
30 | 30 |