@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | * @since $VID:$ |
16 | 16 | * |
17 | 17 | */ |
18 | -if( !defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
19 | - exit( 'No direct script access allowed' ); |
|
18 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
19 | + exit('No direct script access allowed'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | class Datetime extends Calculations_Base { |
@@ -32,20 +32,20 @@ discard block |
||
32 | 32 | * @return int |
33 | 33 | * @throws \EE_Error |
34 | 34 | */ |
35 | - public static function spaces_remaining_considering_tickets( $wpdb_row, $request, $controller ){ |
|
36 | - if( is_array( $wpdb_row ) && isset( $wpdb_row[ 'Datetime.DTT_ID' ] ) ) { |
|
37 | - $dtt_obj = \EEM_Datetime::instance()->get_one_by_ID( $wpdb_row[ 'Datetime.DTT_ID' ] ); |
|
35 | + public static function spaces_remaining_considering_tickets($wpdb_row, $request, $controller) { |
|
36 | + if (is_array($wpdb_row) && isset($wpdb_row['Datetime.DTT_ID'])) { |
|
37 | + $dtt_obj = \EEM_Datetime::instance()->get_one_by_ID($wpdb_row['Datetime.DTT_ID']); |
|
38 | 38 | } else { |
39 | 39 | $dtt_obj = null; |
40 | 40 | } |
41 | - if( $dtt_obj instanceof \EE_Datetime ) { |
|
42 | - return $dtt_obj->spaces_remaining( true ); |
|
41 | + if ($dtt_obj instanceof \EE_Datetime) { |
|
42 | + return $dtt_obj->spaces_remaining(true); |
|
43 | 43 | } else { |
44 | 44 | throw new \EE_Error( |
45 | 45 | sprintf( |
46 | - __( 'Cannot calculate spaces_remaining_considering_tickets because the datetime with ID %1$s (from database row %2$s) was not found', 'event_espresso' ), |
|
47 | - $wpdb_row[ 'Datetime.DTT_ID' ], |
|
48 | - print_r( $wpdb_row, true ) |
|
46 | + __('Cannot calculate spaces_remaining_considering_tickets because the datetime with ID %1$s (from database row %2$s) was not found', 'event_espresso'), |
|
47 | + $wpdb_row['Datetime.DTT_ID'], |
|
48 | + print_r($wpdb_row, true) |
|
49 | 49 | ) |
50 | 50 | ); |
51 | 51 | } |
@@ -63,17 +63,17 @@ discard block |
||
63 | 63 | * @throws \EE_Error |
64 | 64 | * @throws \EventEspresso\core\libraries\rest_api\Rest_Exception |
65 | 65 | */ |
66 | - public static function registrations_checked_in_count( $wpdb_row, $request, $controller ){ |
|
67 | - if( ! is_array( $wpdb_row ) || ! isset( $wpdb_row[ 'Datetime.DTT_ID' ] ) ) { |
|
66 | + public static function registrations_checked_in_count($wpdb_row, $request, $controller) { |
|
67 | + if ( ! is_array($wpdb_row) || ! isset($wpdb_row['Datetime.DTT_ID'])) { |
|
68 | 68 | throw new \EE_Error( |
69 | 69 | sprintf( |
70 | - __( 'Cannot calculate registrations_checked_in_count because the database row %1$s does not have an entry for "Datetime.DTT_ID"', 'event_espresso' ), |
|
71 | - print_r( $wpdb_row, true ) |
|
70 | + __('Cannot calculate registrations_checked_in_count because the database row %1$s does not have an entry for "Datetime.DTT_ID"', 'event_espresso'), |
|
71 | + print_r($wpdb_row, true) |
|
72 | 72 | ) |
73 | 73 | ); |
74 | 74 | } |
75 | - self::_verify_current_user_can( 'ee_read_checkins', 'registrations_checked_in_count' ); |
|
76 | - return \EEM_Registration::instance()->count_registrations_checked_into_datetime( $wpdb_row[ 'Datetime.DTT_ID' ], true ); |
|
75 | + self::_verify_current_user_can('ee_read_checkins', 'registrations_checked_in_count'); |
|
76 | + return \EEM_Registration::instance()->count_registrations_checked_into_datetime($wpdb_row['Datetime.DTT_ID'], true); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | |
@@ -88,17 +88,17 @@ discard block |
||
88 | 88 | * @throws \EE_Error |
89 | 89 | * @throws \EventEspresso\core\libraries\rest_api\Rest_Exception |
90 | 90 | */ |
91 | - public static function registrations_checked_out_count( $wpdb_row, $request, $controller ){ |
|
92 | - if( ! is_array( $wpdb_row ) || ! isset( $wpdb_row[ 'Datetime.DTT_ID' ] ) ) { |
|
91 | + public static function registrations_checked_out_count($wpdb_row, $request, $controller) { |
|
92 | + if ( ! is_array($wpdb_row) || ! isset($wpdb_row['Datetime.DTT_ID'])) { |
|
93 | 93 | throw new \EE_Error( |
94 | 94 | sprintf( |
95 | - __( 'Cannot calculate registrations_checked_out_count because the database row %1$s does not have an entry for "Datetime.DTT_ID"', 'event_espresso' ), |
|
96 | - print_r( $wpdb_row, true ) |
|
95 | + __('Cannot calculate registrations_checked_out_count because the database row %1$s does not have an entry for "Datetime.DTT_ID"', 'event_espresso'), |
|
96 | + print_r($wpdb_row, true) |
|
97 | 97 | ) |
98 | 98 | ); |
99 | 99 | } |
100 | - self::_verify_current_user_can( 'ee_read_checkins', 'registrations_checked_out_count' ); |
|
101 | - return \EEM_Registration::instance()->count_registrations_checked_into_datetime( $wpdb_row[ 'Datetime.DTT_ID' ], false ); |
|
100 | + self::_verify_current_user_can('ee_read_checkins', 'registrations_checked_out_count'); |
|
101 | + return \EEM_Registration::instance()->count_registrations_checked_into_datetime($wpdb_row['Datetime.DTT_ID'], false); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | |
@@ -114,20 +114,20 @@ discard block |
||
114 | 114 | * @throws \EE_Error |
115 | 115 | * @throws \EventEspresso\core\libraries\rest_api\Rest_Exception |
116 | 116 | */ |
117 | - public static function spots_taken_pending_payment( $wpdb_row, $request, $controller ){ |
|
118 | - if( ! is_array( $wpdb_row ) || ! isset( $wpdb_row[ 'Datetime.DTT_ID' ] ) ) { |
|
117 | + public static function spots_taken_pending_payment($wpdb_row, $request, $controller) { |
|
118 | + if ( ! is_array($wpdb_row) || ! isset($wpdb_row['Datetime.DTT_ID'])) { |
|
119 | 119 | throw new \EE_Error( |
120 | 120 | sprintf( |
121 | - __( 'Cannot calculate spots_taken_pending_payment because the database row %1$s does not have an entry for "Datetime.DTT_ID"', 'event_espresso' ), |
|
122 | - print_r( $wpdb_row, true ) |
|
121 | + __('Cannot calculate spots_taken_pending_payment because the database row %1$s does not have an entry for "Datetime.DTT_ID"', 'event_espresso'), |
|
122 | + print_r($wpdb_row, true) |
|
123 | 123 | ) |
124 | 124 | ); |
125 | 125 | } |
126 | - self::_verify_current_user_can( 'ee_read_registrations', 'spots_taken_pending_payment' ); |
|
126 | + self::_verify_current_user_can('ee_read_registrations', 'spots_taken_pending_payment'); |
|
127 | 127 | return \EEM_Registration::instance()->count( |
128 | 128 | array( |
129 | 129 | array( |
130 | - 'Ticket.Datetime.DTT_ID' => $wpdb_row[ 'Datetime.DTT_ID' ], |
|
130 | + 'Ticket.Datetime.DTT_ID' => $wpdb_row['Datetime.DTT_ID'], |
|
131 | 131 | 'STS_ID' => \EEM_Registration::status_id_pending_payment |
132 | 132 | ) |
133 | 133 | ), |
@@ -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 | |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | * @param mixed $info |
40 | 40 | * @return bool |
41 | 41 | */ |
42 | - public function add( $object, $info = null ) { |
|
43 | - $info = empty( $info ) && $object instanceof $this->interface ? $object->name : $info; |
|
44 | - return parent::add( $object, $info ); |
|
42 | + public function add($object, $info = null) { |
|
43 | + $info = empty($info) && $object instanceof $this->interface ? $object->name : $info; |
|
44 | + return parent::add($object, $info); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | * @param mixed $info |
58 | 58 | * @return bool |
59 | 59 | */ |
60 | - public function set_info( $object, $info = null ) { |
|
61 | - $info = empty( $info ) && $object instanceof $this->interface ? $object->name : $info; |
|
62 | - return parent::set_info( $object, $info ); |
|
60 | + public function set_info($object, $info = null) { |
|
61 | + $info = empty($info) && $object instanceof $this->interface ? $object->name : $info; |
|
62 | + return parent::set_info($object, $info); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | * @param mixed |
75 | 75 | * @return null | object |
76 | 76 | */ |
77 | - public function get_by_info( $info ) { |
|
78 | - return parent::get_by_info( str_replace( ' ', '_', strtolower( $info ) ) ); |
|
77 | + public function get_by_info($info) { |
|
78 | + return parent::get_by_info(str_replace(' ', '_', strtolower($info))); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | |
@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | * @param object $object |
90 | 90 | * @return bool |
91 | 91 | */ |
92 | - public function has( $object ) { |
|
93 | - return parent::has( $object ); |
|
92 | + public function has($object) { |
|
93 | + return parent::has($object); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | * @param string $message_type_name |
105 | 105 | * @return bool |
106 | 106 | */ |
107 | - public function has_by_name( $message_type_name ) { |
|
108 | - return $this->get_by_info( $message_type_name ) instanceof $this->interface ? true : false; |
|
107 | + public function has_by_name($message_type_name) { |
|
108 | + return $this->get_by_info($message_type_name) instanceof $this->interface ? true : false; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | * @param $object |
120 | 120 | * @return bool |
121 | 121 | */ |
122 | - public function remove( $object ) { |
|
123 | - return parent::remove( $object ); |
|
122 | + public function remove($object) { |
|
123 | + return parent::remove($object); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | * @param $object |
135 | 135 | * @return void |
136 | 136 | */ |
137 | - public function set_current( $object ) { |
|
138 | - parent::set_current( $object ); |
|
137 | + public function set_current($object) { |
|
138 | + parent::set_current($object); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | * @param $info |
150 | 150 | * @return void |
151 | 151 | */ |
152 | - public function set_current_by_info( $info ) { |
|
153 | - parent::set_current_by_info( $info ); |
|
152 | + public function set_current_by_info($info) { |
|
153 | + parent::set_current_by_info($info); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | |
@@ -164,10 +164,10 @@ discard block |
||
164 | 164 | * @return void |
165 | 165 | */ |
166 | 166 | public function show_collection_classes() { |
167 | - if ( WP_DEBUG ) { |
|
167 | + if (WP_DEBUG) { |
|
168 | 168 | $this->rewind(); |
169 | - while ( $this->valid() ) { |
|
170 | - echo '<h5 style="color:#2EA2CC;">' . __CLASS__ . ' class : <span style="color:#E76700">' . $this->getInfo() . '</span></h5>'; |
|
169 | + while ($this->valid()) { |
|
170 | + echo '<h5 style="color:#2EA2CC;">'.__CLASS__.' class : <span style="color:#E76700">'.$this->getInfo().'</span></h5>'; |
|
171 | 171 | $this->next(); |
172 | 172 | } |
173 | 173 | } |
@@ -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 | |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | * @param mixed $info |
40 | 40 | * @return bool |
41 | 41 | */ |
42 | - public function add( $object, $info = null ) { |
|
43 | - $info = empty( $info ) && $object instanceof $this->interface ? $object->name : $info; |
|
44 | - return parent::add( $object, $info ); |
|
42 | + public function add($object, $info = null) { |
|
43 | + $info = empty($info) && $object instanceof $this->interface ? $object->name : $info; |
|
44 | + return parent::add($object, $info); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | * @param mixed $info |
58 | 58 | * @return bool |
59 | 59 | */ |
60 | - public function set_info( $object, $info = null ) { |
|
61 | - $info = empty( $info ) && $object instanceof $this->interface ? $object->name : $info; |
|
62 | - return parent::set_info( $object, $info ); |
|
60 | + public function set_info($object, $info = null) { |
|
61 | + $info = empty($info) && $object instanceof $this->interface ? $object->name : $info; |
|
62 | + return parent::set_info($object, $info); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | * @param mixed |
75 | 75 | * @return null | object |
76 | 76 | */ |
77 | - public function get_by_info( $info ) { |
|
78 | - return parent::get_by_info( str_replace( ' ', '_', strtolower( $info ) ) ); |
|
77 | + public function get_by_info($info) { |
|
78 | + return parent::get_by_info(str_replace(' ', '_', strtolower($info))); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | |
@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | * @param object $object |
90 | 90 | * @return bool |
91 | 91 | */ |
92 | - public function has( $object ) { |
|
93 | - return parent::has( $object ); |
|
92 | + public function has($object) { |
|
93 | + return parent::has($object); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | * @param string $messenger_name |
105 | 105 | * @return bool |
106 | 106 | */ |
107 | - public function has_by_name( $messenger_name ) { |
|
108 | - return $this->get_by_info( $messenger_name ) instanceof $this->interface ? true : false; |
|
107 | + public function has_by_name($messenger_name) { |
|
108 | + return $this->get_by_info($messenger_name) instanceof $this->interface ? true : false; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | * @param $object |
120 | 120 | * @return bool |
121 | 121 | */ |
122 | - public function remove( $object ) { |
|
123 | - return parent::remove( $object ); |
|
122 | + public function remove($object) { |
|
123 | + return parent::remove($object); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | * @param $object |
149 | 149 | * @return void |
150 | 150 | */ |
151 | - public function set_current( $object ) { |
|
152 | - parent::set_current( $object ); |
|
151 | + public function set_current($object) { |
|
152 | + parent::set_current($object); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | |
@@ -163,8 +163,8 @@ discard block |
||
163 | 163 | * @param $info |
164 | 164 | * @return void |
165 | 165 | */ |
166 | - public function set_current_by_info( $info ) { |
|
167 | - parent::set_current_by_info( $info ); |
|
166 | + public function set_current_by_info($info) { |
|
167 | + parent::set_current_by_info($info); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | |
@@ -178,10 +178,10 @@ discard block |
||
178 | 178 | * @return void |
179 | 179 | */ |
180 | 180 | public function show_collection_classes() { |
181 | - if ( WP_DEBUG ) { |
|
181 | + if (WP_DEBUG) { |
|
182 | 182 | $this->rewind(); |
183 | - while ( $this->valid() ) { |
|
184 | - echo '<h5 style="color:#2EA2CC;">' . __CLASS__ . ' class : . <span style="color:#E76700">' . $this->getInfo() . '</span></h5>'; |
|
183 | + while ($this->valid()) { |
|
184 | + echo '<h5 style="color:#2EA2CC;">'.__CLASS__.' class : . <span style="color:#E76700">'.$this->getInfo().'</span></h5>'; |
|
185 | 185 | $this->next(); |
186 | 186 | } |
187 | 187 | } |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | * @ link http://www.eventespresso.com |
10 | 10 | * @ version 4+ |
11 | 11 | */ |
12 | -define( 'EE_THEME_FUNCTIONS_LOADED', TRUE ); |
|
12 | +define('EE_THEME_FUNCTIONS_LOADED', TRUE); |
|
13 | 13 | |
14 | -if ( ! function_exists( 'espresso_pagination' ) ) { |
|
14 | +if ( ! function_exists('espresso_pagination')) { |
|
15 | 15 | /** |
16 | 16 | * espresso_pagination |
17 | 17 | * |
@@ -23,21 +23,21 @@ discard block |
||
23 | 23 | $big = 999999999; // need an unlikely integer |
24 | 24 | $pagination = paginate_links( |
25 | 25 | array( |
26 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
26 | + 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), |
|
27 | 27 | 'format' => '?paged=%#%', |
28 | - 'current' => max( 1, get_query_var( 'paged' ) ), |
|
28 | + 'current' => max(1, get_query_var('paged')), |
|
29 | 29 | 'total' => $wp_query->max_num_pages, |
30 | 30 | 'show_all' => true, |
31 | 31 | 'end_size' => 10, |
32 | 32 | 'mid_size' => 6, |
33 | 33 | 'prev_next' => true, |
34 | - 'prev_text' => __( '‹ PREV', 'event_espresso' ), |
|
35 | - 'next_text' => __( 'NEXT ›', 'event_espresso' ), |
|
34 | + 'prev_text' => __('‹ PREV', 'event_espresso'), |
|
35 | + 'next_text' => __('NEXT ›', 'event_espresso'), |
|
36 | 36 | 'type' => 'plain', |
37 | 37 | 'add_args' => false, |
38 | 38 | 'add_fragment' => '' |
39 | 39 | ) |
40 | 40 | ); |
41 | - echo ! empty( $pagination ) ? '<div class="ee-pagination-dv clear">' . $pagination . '</div>' : ''; |
|
41 | + echo ! empty($pagination) ? '<div class="ee-pagination-dv clear">'.$pagination.'</div>' : ''; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | \ No newline at end of file |
@@ -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,69 +1,69 @@ |
||
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 | 17 | <h3 class="event-venues-h3 ee-event-h3"> |
18 | - <?php _e( 'Location', 'event_espresso' ); ?> |
|
18 | + <?php _e('Location', 'event_espresso'); ?> |
|
19 | 19 | </h3> |
20 | - <h4><strong><?php _e( 'Venue:', 'event_espresso' ); ?></strong> <strong> <?php echo $venue_name; ?></strong></h4> |
|
20 | + <h4><strong><?php _e('Venue:', 'event_espresso'); ?></strong> <strong> <?php echo $venue_name; ?></strong></h4> |
|
21 | 21 | <p><span class="smaller-text tags-links"><?php echo espresso_venue_categories(); ?></span></p> |
22 | -<?php if ( $venue_phone = espresso_venue_phone( $post->ID, FALSE )) : ?> |
|
22 | +<?php if ($venue_phone = espresso_venue_phone($post->ID, FALSE)) : ?> |
|
23 | 23 | <p> |
24 | - <span class="small-text"><strong><?php _e( 'Venue Phone:', 'event_espresso' ); ?></strong></span> <?php echo $venue_phone; ?> |
|
24 | + <span class="small-text"><strong><?php _e('Venue Phone:', 'event_espresso'); ?></strong></span> <?php echo $venue_phone; ?> |
|
25 | 25 | </p> |
26 | -<?php endif; ?> |
|
27 | -<?php if ( $venue_website = espresso_venue_website( $post->ID, FALSE )) : ?> |
|
26 | +<?php endif; ?> |
|
27 | +<?php if ($venue_website = espresso_venue_website($post->ID, FALSE)) : ?> |
|
28 | 28 | <p> |
29 | - <span class="small-text"><strong><?php _e( 'Venue Website:', 'event_espresso' ); ?></strong></span> <?php echo $venue_website; ?> |
|
29 | + <span class="small-text"><strong><?php _e('Venue Website:', 'event_espresso'); ?></strong></span> <?php echo $venue_website; ?> |
|
30 | 30 | </p> |
31 | 31 | <?php endif; ?> |
32 | -<?php if ( espresso_venue_has_address( $post->ID )) : ?> |
|
33 | - <strong><span class="dashicons dashicons-location-alt"></span><?php _e( 'Address:', 'event_espresso' ); ?></strong> |
|
34 | - <?php espresso_venue_address( 'inline' ); ?> |
|
35 | - <?php espresso_venue_gmap( $post->ID ); ?> |
|
32 | +<?php if (espresso_venue_has_address($post->ID)) : ?> |
|
33 | + <strong><span class="dashicons dashicons-location-alt"></span><?php _e('Address:', 'event_espresso'); ?></strong> |
|
34 | + <?php espresso_venue_address('inline'); ?> |
|
35 | + <?php espresso_venue_gmap($post->ID); ?> |
|
36 | 36 | <div class="clear"><br/></div> |
37 | -<?php endif; ?> |
|
37 | +<?php endif; ?> |
|
38 | 38 | |
39 | - <?php $VNU_ID = espresso_venue_id( $post->ID ); ?> |
|
40 | - <?php if ( is_single() ) : ?> |
|
41 | - <?php $venue_description = espresso_venue_description( $VNU_ID, FALSE ); ?> |
|
42 | - <?php if ( $venue_description ) : ?> |
|
39 | + <?php $VNU_ID = espresso_venue_id($post->ID); ?> |
|
40 | + <?php if (is_single()) : ?> |
|
41 | + <?php $venue_description = espresso_venue_description($VNU_ID, FALSE); ?> |
|
42 | + <?php if ($venue_description) : ?> |
|
43 | 43 | <p> |
44 | - <strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/> |
|
45 | - <?php echo do_shortcode( $venue_description ); ?> |
|
44 | + <strong><?php _e('Description:', 'event_espresso'); ?></strong><br/> |
|
45 | + <?php echo do_shortcode($venue_description); ?> |
|
46 | 46 | </p> |
47 | - <?php endif; ?> |
|
47 | + <?php endif; ?> |
|
48 | 48 | <?php else : ?> |
49 | - <?php $venue_excerpt = espresso_venue_excerpt( $VNU_ID, FALSE ); ?> |
|
50 | - <?php if ( $venue_excerpt ) : ?> |
|
49 | + <?php $venue_excerpt = espresso_venue_excerpt($VNU_ID, FALSE); ?> |
|
50 | + <?php if ($venue_excerpt) : ?> |
|
51 | 51 | <p> |
52 | - <strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/> |
|
52 | + <strong><?php _e('Description:', 'event_espresso'); ?></strong><br/> |
|
53 | 53 | <?php echo $venue_excerpt; ?> |
54 | 54 | </p> |
55 | - <?php endif; ?> |
|
56 | - <?php endif; ?> |
|
55 | + <?php endif; ?> |
|
56 | + <?php endif; ?> |
|
57 | 57 | </div> |
58 | 58 | <!-- .espresso-venue-dv --> |
59 | 59 | <?php |
60 | -do_action( 'AHEE_event_details_after_venue_details', $post ); |
|
60 | +do_action('AHEE_event_details_after_venue_details', $post); |
|
61 | 61 | else : |
62 | - if ( espresso_venue_is_password_protected() ) : |
|
62 | + if (espresso_venue_is_password_protected()) : |
|
63 | 63 | ?> |
64 | 64 | <div class="espresso-venue-dv espresso-password-protected-venue-dv" > |
65 | 65 | <h3 class="event-venues-h3 ee-event-h3"> |
66 | - <?php _e( 'Location', 'event_espresso' );?> |
|
66 | + <?php _e('Location', 'event_espresso'); ?> |
|
67 | 67 | </h3> |
68 | 68 | <?php echo espresso_password_protected_venue_form(); ?> |
69 | 69 | </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 | } |
@@ -8,16 +8,16 @@ discard block |
||
8 | 8 | * @since 4.6 |
9 | 9 | * |
10 | 10 | */ |
11 | -class EE_Email_Validation_Strategy extends EE_Text_Validation_Strategy{ |
|
11 | +class EE_Email_Validation_Strategy extends EE_Text_Validation_Strategy { |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * @param null $validation_error_message |
15 | 15 | */ |
16 | - public function __construct( $validation_error_message = NULL ) { |
|
17 | - if( ! $validation_error_message ){ |
|
16 | + public function __construct($validation_error_message = NULL) { |
|
17 | + if ( ! $validation_error_message) { |
|
18 | 18 | $validation_error_message = __("Please enter a valid email address.", "event_espresso"); |
19 | 19 | } |
20 | - parent::__construct( $validation_error_message ); |
|
20 | + parent::__construct($validation_error_message); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | * @return bool |
30 | 30 | * @throws \EE_Validation_Error |
31 | 31 | */ |
32 | - public function validate( $normalized_value ) { |
|
33 | - if( $normalized_value && ! $this->_validate_email( $normalized_value ) ){ |
|
34 | - throw new EE_Validation_Error( $this->get_validation_error_message(), 'required'); |
|
32 | + public function validate($normalized_value) { |
|
33 | + if ($normalized_value && ! $this->_validate_email($normalized_value)) { |
|
34 | + throw new EE_Validation_Error($this->get_validation_error_message(), 'required'); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * @return array |
42 | 42 | */ |
43 | - public function get_jquery_validation_rule_array(){ |
|
44 | - return array( 'email'=>true, 'messages' => array( 'email' => $this->get_validation_error_message() ) ); |
|
43 | + public function get_jquery_validation_rule_array() { |
|
44 | + return array('email'=>true, 'messages' => array('email' => $this->get_validation_error_message())); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
@@ -54,38 +54,38 @@ discard block |
||
54 | 54 | * @return bool of whether the email is valid or not |
55 | 55 | * @throws \EE_Validation_Error |
56 | 56 | */ |
57 | - private function _validate_email( $email ) { |
|
58 | - $validation_level = isset( EE_Registry::instance()->CFG->registration->email_validation_level ) |
|
57 | + private function _validate_email($email) { |
|
58 | + $validation_level = isset(EE_Registry::instance()->CFG->registration->email_validation_level) |
|
59 | 59 | ? EE_Registry::instance()->CFG->registration->email_validation_level |
60 | 60 | : 'wp_default'; |
61 | - if ( ! preg_match( '/^.+\@\S+$/', $email ) ) { // \.\S+ |
|
61 | + if ( ! preg_match('/^.+\@\S+$/', $email)) { // \.\S+ |
|
62 | 62 | // email not in correct {string}@{string} format |
63 | 63 | return false; |
64 | 64 | } else { |
65 | - $atIndex = strrpos( $email, "@" ); |
|
66 | - $domain = substr( $email, $atIndex + 1 ); |
|
67 | - $local = substr( $email, 0, $atIndex ); |
|
68 | - $localLen = strlen( $local ); |
|
69 | - $domainLen = strlen( $domain ); |
|
70 | - if ( $localLen < 1 || $localLen > 64 ) { |
|
65 | + $atIndex = strrpos($email, "@"); |
|
66 | + $domain = substr($email, $atIndex + 1); |
|
67 | + $local = substr($email, 0, $atIndex); |
|
68 | + $localLen = strlen($local); |
|
69 | + $domainLen = strlen($domain); |
|
70 | + if ($localLen < 1 || $localLen > 64) { |
|
71 | 71 | // local part length exceeded |
72 | 72 | return false; |
73 | - } else if ( $domainLen < 1 || $domainLen > 255 ) { |
|
73 | + } else if ($domainLen < 1 || $domainLen > 255) { |
|
74 | 74 | // domain part length exceeded |
75 | 75 | return false; |
76 | - } else if ( $local[ 0 ] === '.' || $local[ $localLen - 1 ] === '.' ) { |
|
76 | + } else if ($local[0] === '.' || $local[$localLen - 1] === '.') { |
|
77 | 77 | // local part starts or ends with '.' |
78 | 78 | return false; |
79 | - } else if ( preg_match( '/\\.\\./', $local ) ) { |
|
79 | + } else if (preg_match('/\\.\\./', $local)) { |
|
80 | 80 | // local part has two consecutive dots |
81 | 81 | return false; |
82 | - } else if ( preg_match( '/\\.\\./', $domain ) ) { |
|
82 | + } else if (preg_match('/\\.\\./', $domain)) { |
|
83 | 83 | // domain part has two consecutive dots |
84 | 84 | return false; |
85 | - } else if ( $validation_level === 'wp_default' ) { |
|
86 | - return is_email( $email ); |
|
85 | + } else if ($validation_level === 'wp_default') { |
|
86 | + return is_email($email); |
|
87 | 87 | } else if ( |
88 | - ( $validation_level === 'i18n' || $validation_level === 'i18n_dns' ) |
|
88 | + ($validation_level === 'i18n' || $validation_level === 'i18n_dns') |
|
89 | 89 | // plz see http://stackoverflow.com/a/24817336 re: the following regex |
90 | 90 | && ! preg_match( |
91 | 91 | '/^(?!\.)((?!.*\.{2})[a-zA-Z0-9\x{0080}-\x{00FF}\x{0100}-\x{017F}\x{0180}-\x{024F}\x{0250}-\x{02AF}\x{0300}-\x{036F}\x{0370}-\x{03FF}\x{0400}-\x{04FF}\x{0500}-\x{052F}\x{0530}-\x{058F}\x{0590}-\x{05FF}\x{0600}-\x{06FF}\x{0700}-\x{074F}\x{0750}-\x{077F}\x{0780}-\x{07BF}\x{07C0}-\x{07FF}\x{0900}-\x{097F}\x{0980}-\x{09FF}\x{0A00}-\x{0A7F}\x{0A80}-\x{0AFF}\x{0B00}-\x{0B7F}\x{0B80}-\x{0BFF}\x{0C00}-\x{0C7F}\x{0C80}-\x{0CFF}\x{0D00}-\x{0D7F}\x{0D80}-\x{0DFF}\x{0E00}-\x{0E7F}\x{0E80}-\x{0EFF}\x{0F00}-\x{0FFF}\x{1000}-\x{109F}\x{10A0}-\x{10FF}\x{1100}-\x{11FF}\x{1200}-\x{137F}\x{1380}-\x{139F}\x{13A0}-\x{13FF}\x{1400}-\x{167F}\x{1680}-\x{169F}\x{16A0}-\x{16FF}\x{1700}-\x{171F}\x{1720}-\x{173F}\x{1740}-\x{175F}\x{1760}-\x{177F}\x{1780}-\x{17FF}\x{1800}-\x{18AF}\x{1900}-\x{194F}\x{1950}-\x{197F}\x{1980}-\x{19DF}\x{19E0}-\x{19FF}\x{1A00}-\x{1A1F}\x{1B00}-\x{1B7F}\x{1D00}-\x{1D7F}\x{1D80}-\x{1DBF}\x{1DC0}-\x{1DFF}\x{1E00}-\x{1EFF}\x{1F00}-\x{1FFF}\x{20D0}-\x{20FF}\x{2100}-\x{214F}\x{2C00}-\x{2C5F}\x{2C60}-\x{2C7F}\x{2C80}-\x{2CFF}\x{2D00}-\x{2D2F}\x{2D30}-\x{2D7F}\x{2D80}-\x{2DDF}\x{2F00}-\x{2FDF}\x{2FF0}-\x{2FFF}\x{3040}-\x{309F}\x{30A0}-\x{30FF}\x{3100}-\x{312F}\x{3130}-\x{318F}\x{3190}-\x{319F}\x{31C0}-\x{31EF}\x{31F0}-\x{31FF}\x{3200}-\x{32FF}\x{3300}-\x{33FF}\x{3400}-\x{4DBF}\x{4DC0}-\x{4DFF}\x{4E00}-\x{9FFF}\x{A000}-\x{A48F}\x{A490}-\x{A4CF}\x{A700}-\x{A71F}\x{A800}-\x{A82F}\x{A840}-\x{A87F}\x{AC00}-\x{D7AF}\x{F900}-\x{FAFF}\.!#$%&\'*+-\/=?^_`{|}~\-\d]+)@(?!\.)([a-zA-Z0-9\x{0080}-\x{00FF}\x{0100}-\x{017F}\x{0180}-\x{024F}\x{0250}-\x{02AF}\x{0300}-\x{036F}\x{0370}-\x{03FF}\x{0400}-\x{04FF}\x{0500}-\x{052F}\x{0530}-\x{058F}\x{0590}-\x{05FF}\x{0600}-\x{06FF}\x{0700}-\x{074F}\x{0750}-\x{077F}\x{0780}-\x{07BF}\x{07C0}-\x{07FF}\x{0900}-\x{097F}\x{0980}-\x{09FF}\x{0A00}-\x{0A7F}\x{0A80}-\x{0AFF}\x{0B00}-\x{0B7F}\x{0B80}-\x{0BFF}\x{0C00}-\x{0C7F}\x{0C80}-\x{0CFF}\x{0D00}-\x{0D7F}\x{0D80}-\x{0DFF}\x{0E00}-\x{0E7F}\x{0E80}-\x{0EFF}\x{0F00}-\x{0FFF}\x{1000}-\x{109F}\x{10A0}-\x{10FF}\x{1100}-\x{11FF}\x{1200}-\x{137F}\x{1380}-\x{139F}\x{13A0}-\x{13FF}\x{1400}-\x{167F}\x{1680}-\x{169F}\x{16A0}-\x{16FF}\x{1700}-\x{171F}\x{1720}-\x{173F}\x{1740}-\x{175F}\x{1760}-\x{177F}\x{1780}-\x{17FF}\x{1800}-\x{18AF}\x{1900}-\x{194F}\x{1950}-\x{197F}\x{1980}-\x{19DF}\x{19E0}-\x{19FF}\x{1A00}-\x{1A1F}\x{1B00}-\x{1B7F}\x{1D00}-\x{1D7F}\x{1D80}-\x{1DBF}\x{1DC0}-\x{1DFF}\x{1E00}-\x{1EFF}\x{1F00}-\x{1FFF}\x{20D0}-\x{20FF}\x{2100}-\x{214F}\x{2C00}-\x{2C5F}\x{2C60}-\x{2C7F}\x{2C80}-\x{2CFF}\x{2D00}-\x{2D2F}\x{2D30}-\x{2D7F}\x{2D80}-\x{2DDF}\x{2F00}-\x{2FDF}\x{2FF0}-\x{2FFF}\x{3040}-\x{309F}\x{30A0}-\x{30FF}\x{3100}-\x{312F}\x{3130}-\x{318F}\x{3190}-\x{319F}\x{31C0}-\x{31EF}\x{31F0}-\x{31FF}\x{3200}-\x{32FF}\x{3300}-\x{33FF}\x{3400}-\x{4DBF}\x{4DC0}-\x{4DFF}\x{4E00}-\x{9FFF}\x{A000}-\x{A48F}\x{A490}-\x{A4CF}\x{A700}-\x{A71F}\x{A800}-\x{A82F}\x{A840}-\x{A87F}\x{AC00}-\x{D7AF}\x{F900}-\x{FAFF}\-\.\d]+)((\.([a-zA-Z\x{0080}-\x{00FF}\x{0100}-\x{017F}\x{0180}-\x{024F}\x{0250}-\x{02AF}\x{0300}-\x{036F}\x{0370}-\x{03FF}\x{0400}-\x{04FF}\x{0500}-\x{052F}\x{0530}-\x{058F}\x{0590}-\x{05FF}\x{0600}-\x{06FF}\x{0700}-\x{074F}\x{0750}-\x{077F}\x{0780}-\x{07BF}\x{07C0}-\x{07FF}\x{0900}-\x{097F}\x{0980}-\x{09FF}\x{0A00}-\x{0A7F}\x{0A80}-\x{0AFF}\x{0B00}-\x{0B7F}\x{0B80}-\x{0BFF}\x{0C00}-\x{0C7F}\x{0C80}-\x{0CFF}\x{0D00}-\x{0D7F}\x{0D80}-\x{0DFF}\x{0E00}-\x{0E7F}\x{0E80}-\x{0EFF}\x{0F00}-\x{0FFF}\x{1000}-\x{109F}\x{10A0}-\x{10FF}\x{1100}-\x{11FF}\x{1200}-\x{137F}\x{1380}-\x{139F}\x{13A0}-\x{13FF}\x{1400}-\x{167F}\x{1680}-\x{169F}\x{16A0}-\x{16FF}\x{1700}-\x{171F}\x{1720}-\x{173F}\x{1740}-\x{175F}\x{1760}-\x{177F}\x{1780}-\x{17FF}\x{1800}-\x{18AF}\x{1900}-\x{194F}\x{1950}-\x{197F}\x{1980}-\x{19DF}\x{19E0}-\x{19FF}\x{1A00}-\x{1A1F}\x{1B00}-\x{1B7F}\x{1D00}-\x{1D7F}\x{1D80}-\x{1DBF}\x{1DC0}-\x{1DFF}\x{1E00}-\x{1EFF}\x{1F00}-\x{1FFF}\x{20D0}-\x{20FF}\x{2100}-\x{214F}\x{2C00}-\x{2C5F}\x{2C60}-\x{2C7F}\x{2C80}-\x{2CFF}\x{2D00}-\x{2D2F}\x{2D30}-\x{2D7F}\x{2D80}-\x{2DDF}\x{2F00}-\x{2FDF}\x{2FF0}-\x{2FFF}\x{3040}-\x{309F}\x{30A0}-\x{30FF}\x{3100}-\x{312F}\x{3130}-\x{318F}\x{3190}-\x{319F}\x{31C0}-\x{31EF}\x{31F0}-\x{31FF}\x{3200}-\x{32FF}\x{3300}-\x{33FF}\x{3400}-\x{4DBF}\x{4DC0}-\x{4DFF}\x{4E00}-\x{9FFF}\x{A000}-\x{A48F}\x{A490}-\x{A4CF}\x{A700}-\x{A71F}\x{A800}-\x{A82F}\x{A840}-\x{A87F}\x{AC00}-\x{D7AF}\x{F900}-\x{FAFF}]){2,63})+)$/u', |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | ) { |
95 | 95 | return false; |
96 | 96 | } |
97 | - if ( $validation_level === 'i18n_dns' ) { |
|
98 | - if ( ! checkdnsrr( $domain, "MX" ) ) { |
|
97 | + if ($validation_level === 'i18n_dns') { |
|
98 | + if ( ! checkdnsrr($domain, "MX")) { |
|
99 | 99 | // domain not found in MX records |
100 | 100 | throw new EE_Validation_Error( |
101 | 101 | __( |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | 'event_espresso' |
104 | 104 | ) |
105 | 105 | ); |
106 | - } else if ( ! checkdnsrr( $domain, "A" ) ) { |
|
106 | + } else if ( ! checkdnsrr($domain, "A")) { |
|
107 | 107 | // domain not found in A records |
108 | 108 | throw new EE_Validation_Error( |
109 | 109 | __( |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | class EE_Email_Validation_Strategy extends EE_Text_Validation_Strategy{ |
12 | 12 | |
13 | 13 | /** |
14 | - * @param null $validation_error_message |
|
15 | - */ |
|
14 | + * @param null $validation_error_message |
|
15 | + */ |
|
16 | 16 | public function __construct( $validation_error_message = NULL ) { |
17 | 17 | if( ! $validation_error_message ){ |
18 | 18 | $validation_error_message = __("Please enter a valid email address.", "event_espresso"); |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | |
39 | 39 | |
40 | 40 | /** |
41 | - * @return array |
|
42 | - */ |
|
41 | + * @return array |
|
42 | + */ |
|
43 | 43 | public function get_jquery_validation_rule_array(){ |
44 | 44 | return array( 'email'=>true, 'messages' => array( 'email' => $this->get_validation_error_message() ) ); |
45 | 45 | } |