@@ -40,8 +40,11 @@ discard block |
||
40 | 40 | <?php echo do_shortcode( $venue_description ); ?> |
41 | 41 | </p> |
42 | 42 | <?php endif; ?> |
43 | - <?php else : ?> |
|
44 | - <?php $venue_excerpt = espresso_venue_excerpt( $VNU_ID, FALSE ); ?> |
|
43 | + <?php else { |
|
44 | + : ?> |
|
45 | + <?php $venue_excerpt = espresso_venue_excerpt( $VNU_ID, FALSE ); |
|
46 | +} |
|
47 | +?> |
|
45 | 48 | <?php if ( $venue_excerpt ) : ?> |
46 | 49 | <p> |
47 | 50 | <strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/> |
@@ -53,12 +56,15 @@ discard block |
||
53 | 56 | <!-- .espresso-venue-dv --> |
54 | 57 | <?php |
55 | 58 | do_action( 'AHEE_event_details_after_venue_details', $post ); |
56 | -else : |
|
59 | +else { |
|
60 | + : |
|
57 | 61 | if ( espresso_venue_is_password_protected() ) : |
58 | 62 | ?> |
59 | 63 | <div class="espresso-venue-dv espresso-password-protected-venue-dv" > |
60 | 64 | <h3 class="event-venues-h3 ee-event-h3"> |
61 | - <?php _e( 'Location', 'event_espresso' );?> |
|
65 | + <?php _e( 'Location', 'event_espresso' ); |
|
66 | +} |
|
67 | +?> |
|
62 | 68 | </h3> |
63 | 69 | <?php echo espresso_password_protected_venue_form(); ?> |
64 | 70 | </div> |
@@ -1,66 +1,66 @@ |
||
1 | 1 | <?php |
2 | 2 | //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>'; |
3 | 3 | if ( |
4 | - ( is_single() && espresso_display_venue_in_event_details() ) |
|
5 | - || ( is_archive() && espresso_display_venue_in_event_list() ) |
|
4 | + (is_single() && espresso_display_venue_in_event_details()) |
|
5 | + || (is_archive() && espresso_display_venue_in_event_list()) |
|
6 | 6 | ) : |
7 | 7 | global $post; |
8 | - do_action( 'AHEE_event_details_before_venue_details', $post ); |
|
9 | - $venue_name = espresso_venue_name( 0, 'details', FALSE ); |
|
10 | - if ( empty( $venue_name ) && espresso_is_venue_private() ) { |
|
11 | - do_action( 'AHEE_event_details_after_venue_details', $post ); |
|
8 | + do_action('AHEE_event_details_before_venue_details', $post); |
|
9 | + $venue_name = espresso_venue_name(0, 'details', FALSE); |
|
10 | + if (empty($venue_name) && espresso_is_venue_private()) { |
|
11 | + do_action('AHEE_event_details_after_venue_details', $post); |
|
12 | 12 | return ''; |
13 | 13 | } |
14 | 14 | ?> |
15 | 15 | |
16 | 16 | <div class="espresso-venue-dv<?php echo espresso_is_venue_private() ? ' espresso-private-venue-dv' : ''; ?>"> |
17 | - <h4><strong><?php _e( 'Venue:', 'event_espresso' ); ?></strong> <strong> <?php echo $venue_name; ?></strong></h4> |
|
17 | + <h4><strong><?php _e('Venue:', 'event_espresso'); ?></strong> <strong> <?php echo $venue_name; ?></strong></h4> |
|
18 | 18 | <p><span class="smaller-text tags-links"><?php echo espresso_venue_categories(); ?></span></p> |
19 | -<?php if ( $venue_phone = espresso_venue_phone( $post->ID, FALSE )) : ?> |
|
19 | +<?php if ($venue_phone = espresso_venue_phone($post->ID, FALSE)) : ?> |
|
20 | 20 | <p> |
21 | - <span class="small-text"><strong><?php _e( 'Venue Phone:', 'event_espresso' ); ?></strong></span> <?php echo $venue_phone; ?> |
|
21 | + <span class="small-text"><strong><?php _e('Venue Phone:', 'event_espresso'); ?></strong></span> <?php echo $venue_phone; ?> |
|
22 | 22 | </p> |
23 | -<?php endif; ?> |
|
24 | -<?php if ( $venue_website = espresso_venue_website( $post->ID, FALSE )) : ?> |
|
23 | +<?php endif; ?> |
|
24 | +<?php if ($venue_website = espresso_venue_website($post->ID, FALSE)) : ?> |
|
25 | 25 | <p> |
26 | - <span class="small-text"><strong><?php _e( 'Venue Website:', 'event_espresso' ); ?></strong></span> <?php echo $venue_website; ?> |
|
26 | + <span class="small-text"><strong><?php _e('Venue Website:', 'event_espresso'); ?></strong></span> <?php echo $venue_website; ?> |
|
27 | 27 | </p> |
28 | 28 | <?php endif; ?> |
29 | -<?php if ( espresso_venue_has_address( $post->ID )) : ?> |
|
30 | - <strong><span class="dashicons dashicons-location-alt"></span><?php _e( 'Address:', 'event_espresso' ); ?></strong> |
|
31 | - <?php espresso_venue_address( 'inline' ); ?> |
|
32 | - <?php espresso_venue_gmap( $post->ID ); ?> |
|
29 | +<?php if (espresso_venue_has_address($post->ID)) : ?> |
|
30 | + <strong><span class="dashicons dashicons-location-alt"></span><?php _e('Address:', 'event_espresso'); ?></strong> |
|
31 | + <?php espresso_venue_address('inline'); ?> |
|
32 | + <?php espresso_venue_gmap($post->ID); ?> |
|
33 | 33 | <div class="clear"><br/></div> |
34 | -<?php endif; ?> |
|
34 | +<?php endif; ?> |
|
35 | 35 | |
36 | - <?php $VNU_ID = espresso_venue_id( $post->ID ); ?> |
|
37 | - <?php if ( is_single() ) : ?> |
|
38 | - <?php $venue_description = espresso_venue_description( $VNU_ID, FALSE ); ?> |
|
39 | - <?php if ( $venue_description ) : ?> |
|
36 | + <?php $VNU_ID = espresso_venue_id($post->ID); ?> |
|
37 | + <?php if (is_single()) : ?> |
|
38 | + <?php $venue_description = espresso_venue_description($VNU_ID, FALSE); ?> |
|
39 | + <?php if ($venue_description) : ?> |
|
40 | 40 | <p> |
41 | - <strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/> |
|
42 | - <?php echo do_shortcode( $venue_description ); ?> |
|
41 | + <strong><?php _e('Description:', 'event_espresso'); ?></strong><br/> |
|
42 | + <?php echo do_shortcode($venue_description); ?> |
|
43 | 43 | </p> |
44 | - <?php endif; ?> |
|
44 | + <?php endif; ?> |
|
45 | 45 | <?php else : ?> |
46 | - <?php $venue_excerpt = espresso_venue_excerpt( $VNU_ID, FALSE ); ?> |
|
47 | - <?php if ( $venue_excerpt ) : ?> |
|
46 | + <?php $venue_excerpt = espresso_venue_excerpt($VNU_ID, FALSE); ?> |
|
47 | + <?php if ($venue_excerpt) : ?> |
|
48 | 48 | <p> |
49 | - <strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/> |
|
49 | + <strong><?php _e('Description:', 'event_espresso'); ?></strong><br/> |
|
50 | 50 | <?php echo $venue_excerpt; ?> |
51 | 51 | </p> |
52 | - <?php endif; ?> |
|
53 | - <?php endif; ?> |
|
52 | + <?php endif; ?> |
|
53 | + <?php endif; ?> |
|
54 | 54 | </div> |
55 | 55 | <!-- .espresso-venue-dv --> |
56 | 56 | <?php |
57 | -do_action( 'AHEE_event_details_after_venue_details', $post ); |
|
57 | +do_action('AHEE_event_details_after_venue_details', $post); |
|
58 | 58 | else : |
59 | - if ( espresso_venue_is_password_protected() ) : |
|
59 | + if (espresso_venue_is_password_protected()) : |
|
60 | 60 | ?> |
61 | 61 | <div class="espresso-venue-dv espresso-password-protected-venue-dv" > |
62 | 62 | <h3 class="event-venues-h3 ee-event-h3"> |
63 | - <?php _e( 'Location', 'event_espresso' );?> |
|
63 | + <?php _e('Location', 'event_espresso'); ?> |
|
64 | 64 | </h3> |
65 | 65 | <?php echo espresso_password_protected_venue_form(); ?> |
66 | 66 | </div> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('No direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -24,18 +24,18 @@ discard block |
||
24 | 24 | * |
25 | 25 | * ------------------------------------------------------------------------ |
26 | 26 | */ |
27 | -class EE_Year_Input extends EE_Select_Input{ |
|
27 | +class EE_Year_Input extends EE_Select_Input { |
|
28 | 28 | |
29 | - function __construct( $input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0 ){ |
|
30 | - if($four_digit_year){ |
|
29 | + function __construct($input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0) { |
|
30 | + if ($four_digit_year) { |
|
31 | 31 | $current_year_int = intval(date('Y')); |
32 | - }else{ |
|
32 | + } else { |
|
33 | 33 | $current_year_int = intval(date('y')); |
34 | 34 | } |
35 | 35 | $answer_options = array(); |
36 | - for( $start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++){ |
|
36 | + for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) { |
|
37 | 37 | $answer_options[$start] = $start; |
38 | 38 | } |
39 | - parent::__construct( $answer_options, $input_settings ); |
|
39 | + parent::__construct($answer_options, $input_settings); |
|
40 | 40 | } |
41 | 41 | } |
@@ -1,6 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | 3 | exit('No direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -29,7 +30,7 @@ discard block |
||
29 | 30 | function __construct( $input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0 ){ |
30 | 31 | if($four_digit_year){ |
31 | 32 | $current_year_int = intval(date('Y')); |
32 | - }else{ |
|
33 | + } else{ |
|
33 | 34 | $current_year_int = intval(date('y')); |
34 | 35 | } |
35 | 36 | $answer_options = array(); |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | protected function _set_tips_array() { |
19 | 19 | $this->_qtipsa = array( |
20 | 20 | 0 => array( |
21 | - 'content_id' => 'message_status-' . EEM_Message::status_sent, |
|
22 | - 'target' => '.msg-status-' . EEM_Message::status_sent, |
|
23 | - 'content' => $this->_message_status_legend( EEM_Message::status_sent ), |
|
21 | + 'content_id' => 'message_status-'.EEM_Message::status_sent, |
|
22 | + 'target' => '.msg-status-'.EEM_Message::status_sent, |
|
23 | + 'content' => $this->_message_status_legend(EEM_Message::status_sent), |
|
24 | 24 | 'options' => array( |
25 | 25 | 'position' => array( |
26 | 26 | 'target' => 'mouse', |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | ) |
29 | 29 | ), |
30 | 30 | 1 => array( |
31 | - 'content_id' => 'message_status-' . EEM_Message::status_idle, |
|
32 | - 'target' => '.msg-status-' . EEM_Message::status_idle, |
|
33 | - 'content' => $this->_message_status_legend( EEM_Message::status_idle ), |
|
31 | + 'content_id' => 'message_status-'.EEM_Message::status_idle, |
|
32 | + 'target' => '.msg-status-'.EEM_Message::status_idle, |
|
33 | + 'content' => $this->_message_status_legend(EEM_Message::status_idle), |
|
34 | 34 | 'options' => array( |
35 | 35 | 'position' => array( |
36 | 36 | 'target' => 'mouse', |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | ) |
39 | 39 | ), |
40 | 40 | 2 => array( |
41 | - 'content_id' => 'message_status-' . EEM_Message::status_failed, |
|
42 | - 'target' => '.msg-status-' . EEM_Message::status_failed, |
|
43 | - 'content' => $this->_message_status_legend( EEM_Message::status_failed ), |
|
41 | + 'content_id' => 'message_status-'.EEM_Message::status_failed, |
|
42 | + 'target' => '.msg-status-'.EEM_Message::status_failed, |
|
43 | + 'content' => $this->_message_status_legend(EEM_Message::status_failed), |
|
44 | 44 | 'options' => array( |
45 | 45 | 'position' => array( |
46 | 46 | 'target' => 'mouse', |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | ) |
49 | 49 | ), |
50 | 50 | 3 => array( |
51 | - 'content_id' => 'message_status-' . EEM_Message::status_resend, |
|
52 | - 'target' => '.msg-status-' . EEM_Message::status_resend, |
|
53 | - 'content' => $this->_message_status_legend( EEM_Message::status_resend ), |
|
51 | + 'content_id' => 'message_status-'.EEM_Message::status_resend, |
|
52 | + 'target' => '.msg-status-'.EEM_Message::status_resend, |
|
53 | + 'content' => $this->_message_status_legend(EEM_Message::status_resend), |
|
54 | 54 | 'options' => array( |
55 | 55 | 'position' => array( |
56 | 56 | 'target' => 'mouse', |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | ) |
59 | 59 | ), |
60 | 60 | 4 => array( |
61 | - 'content_id' => 'message_status-' . EEM_Message::status_incomplete, |
|
62 | - 'target' => '.msg-status-' . EEM_Message::status_incomplete, |
|
63 | - 'content' => $this->_message_status_legend( EEM_Message::status_incomplete ), |
|
61 | + 'content_id' => 'message_status-'.EEM_Message::status_incomplete, |
|
62 | + 'target' => '.msg-status-'.EEM_Message::status_incomplete, |
|
63 | + 'content' => $this->_message_status_legend(EEM_Message::status_incomplete), |
|
64 | 64 | 'options' => array( |
65 | 65 | 'position' => array( |
66 | 66 | 'target' => 'mouse', |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | ) |
69 | 69 | ), |
70 | 70 | 5 => array( |
71 | - 'content_id' => 'message_status-' . EEM_Message::status_retry, |
|
72 | - 'target' => '.msg-status-' . EEM_Message::status_retry, |
|
73 | - 'content' => $this->_message_status_legend( EEM_Message::status_retry ), |
|
71 | + 'content_id' => 'message_status-'.EEM_Message::status_retry, |
|
72 | + 'target' => '.msg-status-'.EEM_Message::status_retry, |
|
73 | + 'content' => $this->_message_status_legend(EEM_Message::status_retry), |
|
74 | 74 | 'options' => array( |
75 | 75 | 'position' => array( |
76 | 76 | 'target' => 'mouse', |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | ) |
79 | 79 | ), |
80 | 80 | 6 => array( |
81 | - 'content_id' => 'message_status-' . EEM_Message::status_debug_only, |
|
82 | - 'target' => '.msg-status-' . EEM_Message::status_debug_only, |
|
83 | - 'content' => $this->_message_status_legend( EEM_Message::status_debug_only ), |
|
81 | + 'content_id' => 'message_status-'.EEM_Message::status_debug_only, |
|
82 | + 'target' => '.msg-status-'.EEM_Message::status_debug_only, |
|
83 | + 'content' => $this->_message_status_legend(EEM_Message::status_debug_only), |
|
84 | 84 | 'options' => array( |
85 | 85 | 'position' => array( |
86 | 86 | 'target' => 'mouse', |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param EEM_Message constant $status What status is set (by class) |
100 | 100 | * @return string The status legend with the related status highlighted |
101 | 101 | */ |
102 | - private function _message_status_legend( $status ) { |
|
102 | + private function _message_status_legend($status) { |
|
103 | 103 | |
104 | 104 | $status_array = array( |
105 | 105 | 'sent_status' => EEM_Message::status_sent, |
@@ -110,10 +110,10 @@ discard block |
||
110 | 110 | 'retry_status' => EEM_Message::status_retry, |
111 | 111 | ); |
112 | 112 | |
113 | - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { |
|
113 | + if (defined('WP_DEBUG') && WP_DEBUG) { |
|
114 | 114 | $status_array['debug_only_status'] = EEM_Message::status_debug_only; |
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 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * |
9 | 9 | * This input has a default validation strategy of plaintext (which can be removed after construction) |
10 | 10 | */ |
11 | -class EE_Text_Area_Input extends EE_Form_Input_Base{ |
|
11 | +class EE_Text_Area_Input extends EE_Form_Input_Base { |
|
12 | 12 | |
13 | 13 | |
14 | 14 | protected $_rows = 2; |
@@ -18,28 +18,28 @@ discard block |
||
18 | 18 | * sets the rows property on this input |
19 | 19 | * @param int $rows |
20 | 20 | */ |
21 | - public function set_rows( $rows ) { |
|
21 | + public function set_rows($rows) { |
|
22 | 22 | $this->_rows = $rows; |
23 | 23 | } |
24 | 24 | /** |
25 | 25 | * sets the cols html property on this input |
26 | 26 | * @param int $cols |
27 | 27 | */ |
28 | - public function set_cols( $cols ) { |
|
28 | + public function set_cols($cols) { |
|
29 | 29 | $this->_cols = $cols; |
30 | 30 | } |
31 | 31 | /** |
32 | 32 | * |
33 | 33 | * @return int |
34 | 34 | */ |
35 | - public function get_rows(){ |
|
35 | + public function get_rows() { |
|
36 | 36 | return $this->_rows; |
37 | 37 | } |
38 | 38 | /** |
39 | 39 | * |
40 | 40 | * @return int |
41 | 41 | */ |
42 | - public function get_cols(){ |
|
42 | + public function get_cols() { |
|
43 | 43 | return $this->_cols; |
44 | 44 | } |
45 | 45 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | //if the input hasn't specifically mentioned a more lenient validation strategy, |
59 | 59 | //apply plaintext validation strategy |
60 | - if( ! $this->has_validation_strategy( |
|
60 | + if ( ! $this->has_validation_strategy( |
|
61 | 61 | array( |
62 | 62 | 'EE_Full_HTML_Validation_Strategy', |
63 | 63 | 'EE_Simple_HTML_Validation_Strategy' |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | ) { |
67 | 67 | //by default we use the plaintext validation. If you want something else, |
68 | 68 | //just remove it after the input is constructed :P using EE_Form_Input_Base::remove_validation_strategy() |
69 | - $this->_add_validation_strategy( new EE_Plaintext_Validation_Strategy() ); |
|
69 | + $this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy()); |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | } |
@@ -3,15 +3,15 @@ |
||
3 | 3 | <?php _e('This page shows options for Email Validation, the EE "Bot Trap" and reCAPTCHA which can help prevent SPAM registrations on your site.', 'event_espresso'); ?> |
4 | 4 | </p> |
5 | 5 | <div id="email_validation_info"> |
6 | -<p><strong><?php _e('Email Validation', 'event_espresso');?></strong></p> |
|
6 | +<p><strong><?php _e('Email Validation', 'event_espresso'); ?></strong></p> |
|
7 | 7 | <p><?php _e("Validating an email address is extremely difficult to do correctly. Your server's configuration, as well as your own tolerances and needs, can affect the type of validation needed. We offer different types of validation so that you can control how strict your registration form responds to entered email addresses. If you are receiving too many bogus email addresses, then you can try the WordPress Default validation setting. If you find that the form validation is blocking a valid email address you can try the Basic setting, or if available, the International validation settings.", 'event_espresso'); ?> |
8 | 8 | </p> |
9 | -<p><strong><?php _e('Validation Options:', 'event_espresso' );?></strong></p> |
|
9 | +<p><strong><?php _e('Validation Options:', 'event_espresso'); ?></strong></p> |
|
10 | 10 | <ul> |
11 | 11 | <li> |
12 | 12 | <?php _e('"Basic" - only checks that an email address follows the most basic structure guidelines ( ie: [email protected] ). Will work with the widest range of email addresses but will also allow the most garbage through.', 'event_espresso'); ?></li> |
13 | 13 | <li> |
14 | - <?php _e('"WordPress Default" - uses built in WordPress email validation, but does not support unicode characters (ie: international characters from non-latin based languages).','event_espresso'); ?></li> |
|
14 | + <?php _e('"WordPress Default" - uses built in WordPress email validation, but does not support unicode characters (ie: international characters from non-latin based languages).', 'event_espresso'); ?></li> |
|
15 | 15 | <li> |
16 | 16 | <?php _e('"International" - supports unicode characters but may not be supported by all server configurations. Try this first if you need to international language support, but drop back down to "Basic" if your server configuration conflicts.', 'event_espresso'); ?> |
17 | 17 | </li> |
@@ -1,25 +1,25 @@ |
||
1 | 1 | <div class="changelog point-releases"> |
2 | - <!-- <h3><?php echo _n( 'Minor Release Information', 'Minor Releases', 1 ); ?></h3> --> |
|
3 | - <h3><?php echo _n( 'Major Release Information', 'Major Releases', 1 ); ?></h3> |
|
2 | + <!-- <h3><?php echo _n('Minor Release Information', 'Minor Releases', 1); ?></h3> --> |
|
3 | + <h3><?php echo _n('Major Release Information', 'Major Releases', 1); ?></h3> |
|
4 | 4 | <?php //$type = 'minor'; ?> |
5 | 5 | <?php $type = 'major'; ?> |
6 | - <p><?php printf( __( '<strong>Version %1$s</strong> is a %2$s release.', 'event_espresso'), EVENT_ESPRESSO_VERSION, $type ); ?> |
|
6 | + <p><?php printf(__('<strong>Version %1$s</strong> is a %2$s release.', 'event_espresso'), EVENT_ESPRESSO_VERSION, $type); ?> |
|
7 | 7 | <?php |
8 | - $ver = explode( '.', EVENT_ESPRESSO_VERSION ); |
|
9 | - array_pop( $ver ); |
|
10 | - $ver = implode( '.', $ver ); |
|
8 | + $ver = explode('.', EVENT_ESPRESSO_VERSION); |
|
9 | + array_pop($ver); |
|
10 | + $ver = implode('.', $ver); |
|
11 | 11 | ?> |
12 | - <?php printf( __( 'For more information, see <a href="%s" target="_blank">the release notes</a>.' ), 'http://eventespresso.com/wiki/ee4-changelog/#' . $ver ); ?> |
|
12 | + <?php printf(__('For more information, see <a href="%s" target="_blank">the release notes</a>.'), 'http://eventespresso.com/wiki/ee4-changelog/#'.$ver); ?> |
|
13 | 13 | </p> |
14 | 14 | </div> |
15 | 15 | |
16 | 16 | <div class="changelog"> |
17 | 17 | <?php |
18 | 18 | //maintenance mode on? |
19 | - if ( EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ) { |
|
19 | + if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) { |
|
20 | 20 | ?> |
21 | 21 | <div class="ee-attention"> |
22 | - <h2 class="ee-maintenance-mode-callout"><?php _e('Event Espresso is in full maintenance mode.' , 'event_espresso'); ?></h2> |
|
22 | + <h2 class="ee-maintenance-mode-callout"><?php _e('Event Espresso is in full maintenance mode.', 'event_espresso'); ?></h2> |
|
23 | 23 | <p> |
24 | 24 | <?php |
25 | 25 | printf( |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | |
17 | 17 | use EventEspressoBatchRequest\Helpers\BatchRequestException; |
18 | 18 | |
19 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
20 | - exit( 'No direct script access allowed' ); |
|
19 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
20 | + exit('No direct script access allowed'); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @param \EEHI_File|null $file_helper |
41 | 41 | */ |
42 | - public function __construct( \EEHI_File $file_helper = null ) { |
|
43 | - if( ! $file_helper ) { |
|
42 | + public function __construct(\EEHI_File $file_helper = null) { |
|
43 | + if ( ! $file_helper) { |
|
44 | 44 | $this->_file_helper = new \EEH_File(); |
45 | 45 | } |
46 | 46 | } |
@@ -56,39 +56,39 @@ discard block |
||
56 | 56 | * @return string |
57 | 57 | * @throws \EventEspressoBatchRequest\Helpers\BatchRequestException |
58 | 58 | */ |
59 | - public function create_file_from_job_with_name( $job_id, $filename, $filetype = 'application/ms-excel' ) { |
|
59 | + public function create_file_from_job_with_name($job_id, $filename, $filetype = 'application/ms-excel') { |
|
60 | 60 | $filepath = ''; |
61 | - try{ |
|
61 | + try { |
|
62 | 62 | $base_folder = $this->get_base_folder(); |
63 | 63 | $success = $this->_file_helper->ensure_folder_exists_and_is_writable( |
64 | - $base_folder . JobHandlerFile::temp_folder_name |
|
64 | + $base_folder.JobHandlerFile::temp_folder_name |
|
65 | 65 | ); |
66 | - if ( $success ) { |
|
66 | + if ($success) { |
|
67 | 67 | $success = $this->_file_helper->ensure_folder_exists_and_is_writable( |
68 | - $base_folder . JobHandlerFile::temp_folder_name . DS . $job_id |
|
68 | + $base_folder.JobHandlerFile::temp_folder_name.DS.$job_id |
|
69 | 69 | ); |
70 | 70 | } |
71 | - if( $success ) { |
|
72 | - $filepath = $base_folder . JobHandlerFile::temp_folder_name . DS . $job_id . DS. $filename; |
|
73 | - $success = $this->_file_helper->ensure_file_exists_and_is_writable( $filepath ); |
|
71 | + if ($success) { |
|
72 | + $filepath = $base_folder.JobHandlerFile::temp_folder_name.DS.$job_id.DS.$filename; |
|
73 | + $success = $this->_file_helper->ensure_file_exists_and_is_writable($filepath); |
|
74 | 74 | } |
75 | 75 | //let's add the .htaccess file so safari will open the file properly |
76 | - if( $success ) { |
|
77 | - $extension = \EEH_File::get_file_extension( $filepath ); |
|
76 | + if ($success) { |
|
77 | + $extension = \EEH_File::get_file_extension($filepath); |
|
78 | 78 | \EEH_File::write_to_file( |
79 | - $base_folder . JobHandlerFile::temp_folder_name . DS . $job_id . DS . '.htaccess', |
|
80 | - 'AddType ' . $filetype . ' ' . $extension, |
|
79 | + $base_folder.JobHandlerFile::temp_folder_name.DS.$job_id.DS.'.htaccess', |
|
80 | + 'AddType '.$filetype.' '.$extension, |
|
81 | 81 | '.htaccess' |
82 | 82 | ); |
83 | 83 | } |
84 | 84 | //those methods normally fail with an exception, but if not, let's do it |
85 | - if( ! $success ) { |
|
86 | - throw new \EE_Error( __( 'Could not create temporary file, an unknown error occurred', 'event_espresso' ) ); |
|
85 | + if ( ! $success) { |
|
86 | + throw new \EE_Error(__('Could not create temporary file, an unknown error occurred', 'event_espresso')); |
|
87 | 87 | } |
88 | - } catch( \EE_Error $e ) { |
|
88 | + } catch (\EE_Error $e) { |
|
89 | 89 | throw new BatchRequestException( |
90 | 90 | sprintf( |
91 | - __( 'Could not create temporary file for job %1$s, because: %2$s ', 'event_espresso' ), |
|
91 | + __('Could not create temporary file for job %1$s, because: %2$s ', 'event_espresso'), |
|
92 | 92 | $job_id, |
93 | 93 | $e->getMessage() |
94 | 94 | ), |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | * @param string $filepath |
105 | 105 | * @return string url to file |
106 | 106 | */ |
107 | - public function get_url_to_file( $filepath ) { |
|
108 | - return str_replace( $this->get_base_folder(), $this->get_base_url(), $filepath ); |
|
107 | + public function get_url_to_file($filepath) { |
|
108 | + return str_replace($this->get_base_folder(), $this->get_base_url(), $filepath); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
@@ -3,13 +3,13 @@ discard block |
||
3 | 3 | /** @var boolean $revisit */ |
4 | 4 | /** @var string $order_conf_desc */ |
5 | 5 | |
6 | -do_action( 'AHEE__thank_you_page_overview_template__top', $transaction ); |
|
6 | +do_action('AHEE__thank_you_page_overview_template__top', $transaction); |
|
7 | 7 | |
8 | 8 | ?> |
9 | 9 | |
10 | 10 | <div id="espresso-thank-you-page-overview-dv" class="width-100" > |
11 | 11 | |
12 | - <?php if ( ! $revisit ) : ?> |
|
12 | + <?php if ( ! $revisit) : ?> |
|
13 | 13 | <div class="ee-attention"> |
14 | 14 | <div class="extra-padding-sides"> |
15 | 15 | <?php echo apply_filters( |
@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | '<br />' |
22 | 22 | ) |
23 | 23 | ); |
24 | - if ( ! empty( $TXN_receipt_url )) : ?> |
|
24 | + if ( ! empty($TXN_receipt_url)) : ?> |
|
25 | 25 | <br/> |
26 | 26 | <div class="jst-rght"> |
27 | - <a class="ee-button ee-roundish indented-text big-text" href="<?php echo $TXN_receipt_url;?>"><span class="ee-icon ee-icon-PDF-file-type"></span><?php echo apply_filters( 'FHEE__thank_you_page_overview_template__order_conf_button_text', __( 'View Full Order Confirmation Receipt', 'event_espresso' )); ?></a> |
|
27 | + <a class="ee-button ee-roundish indented-text big-text" href="<?php echo $TXN_receipt_url; ?>"><span class="ee-icon ee-icon-PDF-file-type"></span><?php echo apply_filters('FHEE__thank_you_page_overview_template__order_conf_button_text', __('View Full Order Confirmation Receipt', 'event_espresso')); ?></a> |
|
28 | 28 | </div> |
29 | 29 | <?php endif; ?> |
30 | 30 | </div> |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | <?php endif; ?> |
34 | 34 | <br/> |
35 | 35 | |
36 | - <?php do_action( 'AHEE__thank_you_page_overview_template__content', $transaction ); ?> |
|
36 | + <?php do_action('AHEE__thank_you_page_overview_template__content', $transaction); ?> |
|
37 | 37 | |
38 | 38 | </div> |
39 | 39 | <!-- end of espresso-thank-you-page-overview-dv --> |
40 | 40 | |
41 | -<?php do_action( 'AHEE__thank_you_page_overview_template__bottom', $transaction ); ?> |
|
41 | +<?php do_action('AHEE__thank_you_page_overview_template__bottom', $transaction); ?> |
@@ -161,7 +161,7 @@ |
||
161 | 161 | * @param EE_Transaction $transaction |
162 | 162 | * @param string $payment_status One of EEM_Payment's statuses, like 'PAP' (Approved). |
163 | 163 | * By default, searches for approved payments |
164 | - * @return float|false float on success, false on fail |
|
164 | + * @return double float on success, false on fail |
|
165 | 165 | * @throws \EE_Error |
166 | 166 | */ |
167 | 167 | public function recalculate_total_payments_for_transaction( EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved ) { |
@@ -233,8 +233,8 @@ |
||
233 | 233 | if ( $registration instanceof EE_Registration ) { |
234 | 234 | $registration->set_paid( $registration->paid() - $amount_paid ); |
235 | 235 | if ($registration->save() !== false) { |
236 | - $registration_payment->delete_permanently(); |
|
237 | - $save_payment = true; |
|
236 | + $registration_payment->delete_permanently(); |
|
237 | + $save_payment = true; |
|
238 | 238 | } |
239 | 239 | } else { |
240 | 240 | EE_Error::add_error( |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | -EE_Registry::instance()->load_class( 'Processor_Base' ); |
|
2 | +EE_Registry::instance()->load_class('Processor_Base'); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Class EE_Transaction_Payments |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public static function instance() { |
44 | 44 | // check if class object is instantiated |
45 | - if ( ! self::$_instance instanceof EE_Transaction_Payments ) { |
|
45 | + if ( ! self::$_instance instanceof EE_Transaction_Payments) { |
|
46 | 46 | self::$_instance = new self(); |
47 | 47 | } |
48 | 48 | return self::$_instance; |
@@ -59,18 +59,18 @@ discard block |
||
59 | 59 | * @return bool true if TXN total was updated, false if not |
60 | 60 | * @throws \EE_Error |
61 | 61 | */ |
62 | - public function recalculate_transaction_total( EE_Transaction $transaction, $update_txn = true ) { |
|
62 | + public function recalculate_transaction_total(EE_Transaction $transaction, $update_txn = true) { |
|
63 | 63 | $total_line_item = $transaction->total_line_item(); |
64 | - if ( ! $total_line_item instanceof EE_Line_Item ) { |
|
64 | + if ( ! $total_line_item instanceof EE_Line_Item) { |
|
65 | 65 | EE_Error::add_error( |
66 | - sprintf( __( 'The Total Line Item for Transaction %1$d\'s was not found or is invalid.', 'event_espresso' ), $transaction->ID() ), |
|
66 | + sprintf(__('The Total Line Item for Transaction %1$d\'s was not found or is invalid.', 'event_espresso'), $transaction->ID()), |
|
67 | 67 | __FILE__, __FUNCTION__, __LINE__ |
68 | 68 | ); |
69 | 69 | return false; |
70 | 70 | } |
71 | 71 | $new_total = $total_line_item->recalculate_total_including_taxes(); |
72 | - $transaction->set_total( $new_total ); |
|
73 | - if ( $update_txn ) { |
|
72 | + $transaction->set_total($new_total); |
|
73 | + if ($update_txn) { |
|
74 | 74 | return $transaction->save() ? true : false; |
75 | 75 | } |
76 | 76 | return false; |
@@ -93,20 +93,20 @@ discard block |
||
93 | 93 | * @return boolean whether the TXN was saved |
94 | 94 | * @throws \EE_Error |
95 | 95 | */ |
96 | - public function calculate_total_payments_and_update_status( EE_Transaction $transaction, $update_txn = true ){ |
|
96 | + public function calculate_total_payments_and_update_status(EE_Transaction $transaction, $update_txn = true) { |
|
97 | 97 | // verify transaction |
98 | - if ( ! $transaction instanceof EE_Transaction ) { |
|
99 | - EE_Error::add_error( __( 'Please provide a valid EE_Transaction object.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
98 | + if ( ! $transaction instanceof EE_Transaction) { |
|
99 | + EE_Error::add_error(__('Please provide a valid EE_Transaction object.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
100 | 100 | return false; |
101 | 101 | } |
102 | 102 | // calculate total paid |
103 | - $total_paid = $this->recalculate_total_payments_for_transaction( $transaction ); |
|
103 | + $total_paid = $this->recalculate_total_payments_for_transaction($transaction); |
|
104 | 104 | // if total paid has changed |
105 | - if ( $total_paid !== false && (float)$total_paid !== $transaction->paid() ) { |
|
106 | - $transaction->set_paid( $total_paid ); |
|
105 | + if ($total_paid !== false && (float) $total_paid !== $transaction->paid()) { |
|
106 | + $transaction->set_paid($total_paid); |
|
107 | 107 | // maybe update status, and make sure to save transaction if not done already |
108 | - if ( ! $transaction->update_status_based_on_total_paid( $update_txn ) ) { |
|
109 | - if ( $update_txn ) { |
|
108 | + if ( ! $transaction->update_status_based_on_total_paid($update_txn)) { |
|
109 | + if ($update_txn) { |
|
110 | 110 | return $transaction->save() ? true : false; |
111 | 111 | } |
112 | 112 | } else { |
@@ -130,18 +130,18 @@ discard block |
||
130 | 130 | * @return float|false float on success, false on fail |
131 | 131 | * @throws \EE_Error |
132 | 132 | */ |
133 | - public function recalculate_total_payments_for_transaction( EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved ) { |
|
133 | + public function recalculate_total_payments_for_transaction(EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved) { |
|
134 | 134 | // verify transaction |
135 | - if ( ! $transaction instanceof EE_Transaction ) { |
|
136 | - EE_Error::add_error( __( 'Please provide a valid EE_Transaction object.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
135 | + if ( ! $transaction instanceof EE_Transaction) { |
|
136 | + EE_Error::add_error(__('Please provide a valid EE_Transaction object.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
137 | 137 | return false; |
138 | 138 | } |
139 | 139 | // ensure Payment model is loaded |
140 | - EE_Registry::instance()->load_model( 'Payment' ); |
|
140 | + EE_Registry::instance()->load_model('Payment'); |
|
141 | 141 | // calls EEM_Base::sum() |
142 | 142 | return EEM_Payment::instance()->sum( |
143 | 143 | // query params |
144 | - array( array( 'TXN_ID' => $transaction->ID(), 'STS_ID' => $payment_status )), |
|
144 | + array(array('TXN_ID' => $transaction->ID(), 'STS_ID' => $payment_status)), |
|
145 | 145 | // field to sum |
146 | 146 | 'PAY_amount' |
147 | 147 | ); |
@@ -159,17 +159,17 @@ discard block |
||
159 | 159 | * @return boolean |
160 | 160 | * @throws \EE_Error |
161 | 161 | */ |
162 | - public function delete_payment_and_update_transaction( EE_Payment $payment ) { |
|
162 | + public function delete_payment_and_update_transaction(EE_Payment $payment) { |
|
163 | 163 | // verify payment |
164 | - if ( ! $payment instanceof EE_Payment ) { |
|
165 | - EE_Error::add_error( __( 'A valid Payment object was not received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
164 | + if ( ! $payment instanceof EE_Payment) { |
|
165 | + EE_Error::add_error(__('A valid Payment object was not received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
166 | 166 | return false; |
167 | 167 | } |
168 | - if ( ! $this->delete_registration_payments_and_update_registrations( $payment ) ) { |
|
168 | + if ( ! $this->delete_registration_payments_and_update_registrations($payment)) { |
|
169 | 169 | return false; |
170 | 170 | } |
171 | - if ( ! $payment->delete() ) { |
|
172 | - EE_Error::add_error( __( 'The payment could not be deleted.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
171 | + if ( ! $payment->delete()) { |
|
172 | + EE_Error::add_error(__('The payment could not be deleted.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
173 | 173 | return false; |
174 | 174 | } |
175 | 175 | |
@@ -180,14 +180,14 @@ discard block |
||
180 | 180 | || $TXN_status === EEM_Transaction::failed_status_code |
181 | 181 | || $payment->amount() === 0 |
182 | 182 | ) { |
183 | - EE_Error::add_success( __( 'The Payment was successfully deleted.', 'event_espresso' ) ); |
|
183 | + EE_Error::add_success(__('The Payment was successfully deleted.', 'event_espresso')); |
|
184 | 184 | return true; |
185 | 185 | } |
186 | 186 | |
187 | 187 | |
188 | 188 | //if this fails, that just means that the transaction didn't get its status changed and/or updated. |
189 | 189 | //however the payment was still deleted. |
190 | - if ( ! $this->calculate_total_payments_and_update_status( $transaction ) ) { |
|
190 | + if ( ! $this->calculate_total_payments_and_update_status($transaction)) { |
|
191 | 191 | |
192 | 192 | EE_Error::add_attention( |
193 | 193 | __( |
@@ -221,17 +221,17 @@ discard block |
||
221 | 221 | * @return bool |
222 | 222 | * @throws \EE_Error |
223 | 223 | */ |
224 | - public function delete_registration_payments_and_update_registrations( EE_Payment $payment, $reg_payment_query_params = array() ) { |
|
224 | + public function delete_registration_payments_and_update_registrations(EE_Payment $payment, $reg_payment_query_params = array()) { |
|
225 | 225 | $save_payment = false; |
226 | - $reg_payment_query_params = ! empty( $reg_payment_query_params ) ? $reg_payment_query_params : array( array( 'PAY_ID' => $payment->ID() ) ); |
|
227 | - $registration_payments = EEM_Registration_Payment::instance()->get_all( $reg_payment_query_params ); |
|
228 | - if ( ! empty( $registration_payments )) { |
|
229 | - foreach ( $registration_payments as $registration_payment ) { |
|
230 | - if ( $registration_payment instanceof EE_Registration_Payment ) { |
|
226 | + $reg_payment_query_params = ! empty($reg_payment_query_params) ? $reg_payment_query_params : array(array('PAY_ID' => $payment->ID())); |
|
227 | + $registration_payments = EEM_Registration_Payment::instance()->get_all($reg_payment_query_params); |
|
228 | + if ( ! empty($registration_payments)) { |
|
229 | + foreach ($registration_payments as $registration_payment) { |
|
230 | + if ($registration_payment instanceof EE_Registration_Payment) { |
|
231 | 231 | $amount_paid = $registration_payment->amount(); |
232 | 232 | $registration = $registration_payment->registration(); |
233 | - if ( $registration instanceof EE_Registration ) { |
|
234 | - $registration->set_paid( $registration->paid() - $amount_paid ); |
|
233 | + if ($registration instanceof EE_Registration) { |
|
234 | + $registration->set_paid($registration->paid() - $amount_paid); |
|
235 | 235 | if ($registration->save() !== false) { |
236 | 236 | $registration_payment->delete_permanently(); |
237 | 237 | $save_payment = true; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } else { |
240 | 240 | EE_Error::add_error( |
241 | 241 | sprintf( |
242 | - __( 'An invalid Registration object was associated with Registration Payment ID# %1$d.', 'event_espresso' ), |
|
242 | + __('An invalid Registration object was associated with Registration Payment ID# %1$d.', 'event_espresso'), |
|
243 | 243 | $registration_payment->ID() |
244 | 244 | ), |
245 | 245 | __FILE__, __FUNCTION__, __LINE__ |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } else { |
250 | 250 | EE_Error::add_error( |
251 | 251 | sprintf( |
252 | - __( 'An invalid Registration Payment object was associated with payment ID# %1$d.', 'event_espresso' ), |
|
252 | + __('An invalid Registration Payment object was associated with payment ID# %1$d.', 'event_espresso'), |
|
253 | 253 | $payment->ID() |
254 | 254 | ), |
255 | 255 | __FILE__, __FUNCTION__, __LINE__ |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | } |
259 | 259 | } |
260 | 260 | } |
261 | - if ( $save_payment ) { |
|
261 | + if ($save_payment) { |
|
262 | 262 | $payment->save(); |
263 | 263 | } |
264 | 264 | return true; |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | public function update_transaction_status_based_on_total_paid(EE_Transaction $transaction, $update_txn = true) |
283 | 283 | { |
284 | 284 | EE_Error::doing_it_wrong( |
285 | - __CLASS__ . '::' . __FUNCTION__, |
|
285 | + __CLASS__.'::'.__FUNCTION__, |
|
286 | 286 | sprintf(__('This method is deprecated. Please use "%s" instead', 'event_espresso'), |
287 | 287 | 'EE_Transaction::update_status_based_on_total_paid()'), |
288 | 288 | '4.9.1', |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | * @deprecated 4.9.12 |
325 | 325 | * @param string $old_txn_status |
326 | 326 | */ |
327 | - public function set_old_txn_status( $old_txn_status ) { |
|
327 | + public function set_old_txn_status($old_txn_status) { |
|
328 | 328 | EE_Error::doing_it_wrong( |
329 | 329 | __METHOD__, |
330 | 330 | esc_html__( |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | '4.9.12' |
335 | 335 | ); |
336 | 336 | // only set the first time |
337 | - if ( $this->_old_txn_status === null ) { |
|
337 | + if ($this->_old_txn_status === null) { |
|
338 | 338 | $this->_old_txn_status = $old_txn_status; |
339 | 339 | } |
340 | 340 | } |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | * @deprecated 4.9.12 |
364 | 364 | * @param string $new_txn_status |
365 | 365 | */ |
366 | - public function set_new_txn_status( $new_txn_status ) { |
|
366 | + public function set_new_txn_status($new_txn_status) { |
|
367 | 367 | EE_Error::doing_it_wrong( |
368 | 368 | __METHOD__, |
369 | 369 | esc_html__( |