@@ -11,399 +11,399 @@ |
||
11 | 11 | class EES_Espresso_Thank_You extends EES_Shortcode |
12 | 12 | { |
13 | 13 | |
14 | - /** |
|
15 | - * time in seconds to wait for the IPN to arrive before telling the registrant to bugger off ( 1200s = 20 minutes ) |
|
16 | - */ |
|
17 | - const IPN_wait_time = 1200; |
|
18 | - |
|
19 | - |
|
20 | - |
|
21 | - |
|
22 | - /** |
|
23 | - * @deprecated 4.9.27 |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public static function set_hooks() |
|
27 | - { |
|
28 | - } |
|
29 | - |
|
30 | - |
|
31 | - |
|
32 | - /** |
|
33 | - * @deprecated 4.9.27 |
|
34 | - * @return void |
|
35 | - */ |
|
36 | - public static function set_hooks_admin() |
|
37 | - { |
|
38 | - } |
|
39 | - |
|
40 | - |
|
41 | - |
|
42 | - /** |
|
43 | - * @deprecated 4.9.27 |
|
44 | - * @return void |
|
45 | - */ |
|
46 | - public static function set_definitions() |
|
47 | - { |
|
48 | - \EE_Error::doing_it_wrong( |
|
49 | - __METHOD__, |
|
50 | - __( |
|
51 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
52 | - 'event_espresso' |
|
53 | - ), |
|
54 | - '4.9.27' |
|
55 | - ); |
|
56 | - } |
|
57 | - |
|
58 | - |
|
59 | - |
|
60 | - /** |
|
61 | - * @deprecated 4.9.27 |
|
62 | - * @return EE_Transaction |
|
63 | - */ |
|
64 | - public function get_txn() |
|
65 | - { |
|
66 | - \EE_Error::doing_it_wrong( |
|
67 | - __METHOD__, |
|
68 | - __( |
|
69 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
70 | - 'event_espresso' |
|
71 | - ), |
|
72 | - '4.9.27' |
|
73 | - ); |
|
74 | - } |
|
75 | - |
|
76 | - |
|
77 | - |
|
78 | - /** |
|
79 | - * @deprecated 4.9.27 |
|
80 | - * @param int $since |
|
81 | - * @return mixed array of EE_Payment || FALSE |
|
82 | - */ |
|
83 | - public function get_txn_payments($since = 0) |
|
84 | - { |
|
85 | - \EE_Error::doing_it_wrong( |
|
86 | - __METHOD__, |
|
87 | - __( |
|
88 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
89 | - 'event_espresso' |
|
90 | - ), |
|
91 | - '4.9.27' |
|
92 | - ); |
|
93 | - } |
|
94 | - |
|
95 | - |
|
96 | - |
|
97 | - /** |
|
98 | - * @deprecated 4.9.27 |
|
99 | - * @param string $reg_url_link |
|
100 | - * @return void |
|
101 | - */ |
|
102 | - public function set_reg_url_link($reg_url_link = null) |
|
103 | - { |
|
104 | - \EE_Error::doing_it_wrong( |
|
105 | - __METHOD__, |
|
106 | - __( |
|
107 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
108 | - 'event_espresso' |
|
109 | - ), |
|
110 | - '4.9.27' |
|
111 | - ); |
|
112 | - } |
|
113 | - |
|
114 | - |
|
115 | - |
|
116 | - /** |
|
117 | - * @deprecated 4.9.27 |
|
118 | - * @param WP $WP |
|
119 | - * @return void |
|
120 | - */ |
|
121 | - public function run(WP $WP) |
|
122 | - { |
|
123 | - } |
|
124 | - |
|
125 | - |
|
126 | - |
|
127 | - /** |
|
128 | - * @deprecated 4.9.27 |
|
129 | - * @return void |
|
130 | - */ |
|
131 | - protected function _translate_strings() |
|
132 | - { |
|
133 | - \EE_Error::doing_it_wrong( |
|
134 | - __METHOD__, |
|
135 | - __( |
|
136 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
137 | - 'event_espresso' |
|
138 | - ), |
|
139 | - '4.9.27' |
|
140 | - ); |
|
141 | - } |
|
142 | - |
|
143 | - |
|
144 | - |
|
145 | - /** |
|
146 | - * @deprecated 4.9.27 |
|
147 | - * @return void |
|
148 | - */ |
|
149 | - public function load_js() |
|
150 | - { |
|
151 | - \EE_Error::doing_it_wrong( |
|
152 | - __METHOD__, |
|
153 | - __( |
|
154 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
155 | - 'event_espresso' |
|
156 | - ), |
|
157 | - '4.9.27' |
|
158 | - ); |
|
159 | - } |
|
160 | - |
|
161 | - |
|
162 | - |
|
163 | - /** |
|
164 | - * @deprecated 4.9.27 |
|
165 | - * @return void |
|
166 | - * @throws \EE_Error |
|
167 | - */ |
|
168 | - public function init() |
|
169 | - { |
|
170 | - \EE_Error::doing_it_wrong( |
|
171 | - __METHOD__, |
|
172 | - __( |
|
173 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
174 | - 'event_espresso' |
|
175 | - ), |
|
176 | - '4.9.27' |
|
177 | - ); |
|
178 | - } |
|
179 | - |
|
180 | - |
|
181 | - |
|
182 | - /** |
|
183 | - * @deprecated 4.9.27 |
|
184 | - * @param array $attributes |
|
185 | - * @return string |
|
186 | - * @throws \EE_Error |
|
187 | - */ |
|
188 | - public function process_shortcode($attributes = array()) |
|
189 | - { |
|
190 | - \EE_Error::doing_it_wrong( |
|
191 | - __METHOD__, |
|
192 | - __( |
|
193 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
194 | - 'event_espresso' |
|
195 | - ), |
|
196 | - '4.9.27' |
|
197 | - ); |
|
198 | - return ''; |
|
199 | - } |
|
200 | - |
|
201 | - |
|
202 | - |
|
203 | - /** |
|
204 | - * @deprecated 4.9.27 |
|
205 | - * @param array $response |
|
206 | - * @param array $data |
|
207 | - * @return array |
|
208 | - * @throws \EE_Error |
|
209 | - */ |
|
210 | - public static function thank_you_page_IPN_monitor($response = array(), $data = array()) |
|
211 | - { |
|
212 | - \EE_Error::doing_it_wrong( |
|
213 | - __METHOD__, |
|
214 | - __( |
|
215 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
216 | - 'event_espresso' |
|
217 | - ), |
|
218 | - '4.9.27' |
|
219 | - ); |
|
220 | - } |
|
221 | - |
|
222 | - |
|
223 | - |
|
224 | - |
|
225 | - /** |
|
226 | - * @deprecated 4.9.27 |
|
227 | - * @return string |
|
228 | - * @throws \EE_Error |
|
229 | - */ |
|
230 | - public function get_registration_details() |
|
231 | - { |
|
232 | - \EE_Error::doing_it_wrong( |
|
233 | - __METHOD__, |
|
234 | - __( |
|
235 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
236 | - 'event_espresso' |
|
237 | - ), |
|
238 | - '4.9.27' |
|
239 | - ); |
|
240 | - } |
|
241 | - |
|
242 | - |
|
243 | - |
|
244 | - /** |
|
245 | - * resend_reg_confirmation_email |
|
246 | - * |
|
247 | - * @deprecated 4.9.27 |
|
248 | - */ |
|
249 | - public static function resend_reg_confirmation_email() |
|
250 | - { |
|
251 | - \EE_Error::doing_it_wrong( |
|
252 | - __METHOD__, |
|
253 | - __( |
|
254 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
255 | - 'event_espresso' |
|
256 | - ), |
|
257 | - '4.9.27' |
|
258 | - ); |
|
259 | - } |
|
260 | - |
|
261 | - |
|
262 | - |
|
263 | - /** |
|
264 | - * get_ajax_content |
|
265 | - * |
|
266 | - * @deprecated 4.9.27 |
|
267 | - * @return void |
|
268 | - */ |
|
269 | - public function get_ajax_content() |
|
270 | - { |
|
271 | - \EE_Error::doing_it_wrong( |
|
272 | - __METHOD__, |
|
273 | - __( |
|
274 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
275 | - 'event_espresso' |
|
276 | - ), |
|
277 | - '4.9.27' |
|
278 | - ); |
|
279 | - } |
|
280 | - |
|
281 | - |
|
282 | - |
|
283 | - /** |
|
284 | - * display_details_for_events |
|
285 | - * |
|
286 | - * @deprecated 4.9.27 |
|
287 | - * @param EE_Event[] $events |
|
288 | - * @return void |
|
289 | - */ |
|
290 | - public function display_details_for_events($events = array()) |
|
291 | - { |
|
292 | - \EE_Error::doing_it_wrong( |
|
293 | - __METHOD__, |
|
294 | - __( |
|
295 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
296 | - 'event_espresso' |
|
297 | - ), |
|
298 | - '4.9.27' |
|
299 | - ); |
|
300 | - } |
|
301 | - |
|
302 | - |
|
303 | - |
|
304 | - /** |
|
305 | - * display_details_for_events_requiring_pre_approval |
|
306 | - * |
|
307 | - * @deprecated 4.9.27 |
|
308 | - * @param EE_Event[] $events |
|
309 | - * @return void |
|
310 | - */ |
|
311 | - public function display_details_for_events_requiring_pre_approval($events = array()) |
|
312 | - { |
|
313 | - \EE_Error::doing_it_wrong( |
|
314 | - __METHOD__, |
|
315 | - __( |
|
316 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
317 | - 'event_espresso' |
|
318 | - ), |
|
319 | - '4.9.27' |
|
320 | - ); |
|
321 | - } |
|
322 | - |
|
323 | - |
|
324 | - |
|
325 | - /** |
|
326 | - * get_transaction_details |
|
327 | - * |
|
328 | - * @deprecated 4.9.27 |
|
329 | - * @return string |
|
330 | - * @throws \EE_Error |
|
331 | - */ |
|
332 | - public function get_transaction_details() |
|
333 | - { |
|
334 | - \EE_Error::doing_it_wrong( |
|
335 | - __METHOD__, |
|
336 | - __( |
|
337 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
338 | - 'event_espresso' |
|
339 | - ), |
|
340 | - '4.9.27' |
|
341 | - ); |
|
342 | - } |
|
343 | - |
|
344 | - |
|
345 | - |
|
346 | - /** |
|
347 | - * get_payment_row_html |
|
348 | - * |
|
349 | - * @deprecated 4.9.27 |
|
350 | - * @param EE_Payment $payment |
|
351 | - * @return string |
|
352 | - * @throws \EE_Error |
|
353 | - */ |
|
354 | - public function get_payment_row_html($payment = null) |
|
355 | - { |
|
356 | - \EE_Error::doing_it_wrong( |
|
357 | - __METHOD__, |
|
358 | - __( |
|
359 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
360 | - 'event_espresso' |
|
361 | - ), |
|
362 | - '4.9.27' |
|
363 | - ); |
|
364 | - } |
|
365 | - |
|
366 | - |
|
367 | - |
|
368 | - /** |
|
369 | - * get_payment_details |
|
370 | - * |
|
371 | - * @deprecated 4.9.27 |
|
372 | - * @param array $payments |
|
373 | - * @return string |
|
374 | - * @throws \EE_Error |
|
375 | - */ |
|
376 | - public function get_payment_details($payments = array()) |
|
377 | - { |
|
378 | - \EE_Error::doing_it_wrong( |
|
379 | - __METHOD__, |
|
380 | - __( |
|
381 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
382 | - 'event_espresso' |
|
383 | - ), |
|
384 | - '4.9.27' |
|
385 | - ); |
|
386 | - } |
|
387 | - |
|
388 | - |
|
389 | - |
|
390 | - /** |
|
391 | - * get_payment_details |
|
392 | - * |
|
393 | - * @deprecated 4.9.27 |
|
394 | - * @param array $payments |
|
395 | - * @return string |
|
396 | - * @throws \EE_Error |
|
397 | - */ |
|
398 | - public function get_new_payments($payments = array()) |
|
399 | - { |
|
400 | - \EE_Error::doing_it_wrong( |
|
401 | - __METHOD__, |
|
402 | - __( |
|
403 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
404 | - 'event_espresso' |
|
405 | - ), |
|
406 | - '4.9.27' |
|
407 | - ); |
|
408 | - } |
|
14 | + /** |
|
15 | + * time in seconds to wait for the IPN to arrive before telling the registrant to bugger off ( 1200s = 20 minutes ) |
|
16 | + */ |
|
17 | + const IPN_wait_time = 1200; |
|
18 | + |
|
19 | + |
|
20 | + |
|
21 | + |
|
22 | + /** |
|
23 | + * @deprecated 4.9.27 |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public static function set_hooks() |
|
27 | + { |
|
28 | + } |
|
29 | + |
|
30 | + |
|
31 | + |
|
32 | + /** |
|
33 | + * @deprecated 4.9.27 |
|
34 | + * @return void |
|
35 | + */ |
|
36 | + public static function set_hooks_admin() |
|
37 | + { |
|
38 | + } |
|
39 | + |
|
40 | + |
|
41 | + |
|
42 | + /** |
|
43 | + * @deprecated 4.9.27 |
|
44 | + * @return void |
|
45 | + */ |
|
46 | + public static function set_definitions() |
|
47 | + { |
|
48 | + \EE_Error::doing_it_wrong( |
|
49 | + __METHOD__, |
|
50 | + __( |
|
51 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
52 | + 'event_espresso' |
|
53 | + ), |
|
54 | + '4.9.27' |
|
55 | + ); |
|
56 | + } |
|
57 | + |
|
58 | + |
|
59 | + |
|
60 | + /** |
|
61 | + * @deprecated 4.9.27 |
|
62 | + * @return EE_Transaction |
|
63 | + */ |
|
64 | + public function get_txn() |
|
65 | + { |
|
66 | + \EE_Error::doing_it_wrong( |
|
67 | + __METHOD__, |
|
68 | + __( |
|
69 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
70 | + 'event_espresso' |
|
71 | + ), |
|
72 | + '4.9.27' |
|
73 | + ); |
|
74 | + } |
|
75 | + |
|
76 | + |
|
77 | + |
|
78 | + /** |
|
79 | + * @deprecated 4.9.27 |
|
80 | + * @param int $since |
|
81 | + * @return mixed array of EE_Payment || FALSE |
|
82 | + */ |
|
83 | + public function get_txn_payments($since = 0) |
|
84 | + { |
|
85 | + \EE_Error::doing_it_wrong( |
|
86 | + __METHOD__, |
|
87 | + __( |
|
88 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
89 | + 'event_espresso' |
|
90 | + ), |
|
91 | + '4.9.27' |
|
92 | + ); |
|
93 | + } |
|
94 | + |
|
95 | + |
|
96 | + |
|
97 | + /** |
|
98 | + * @deprecated 4.9.27 |
|
99 | + * @param string $reg_url_link |
|
100 | + * @return void |
|
101 | + */ |
|
102 | + public function set_reg_url_link($reg_url_link = null) |
|
103 | + { |
|
104 | + \EE_Error::doing_it_wrong( |
|
105 | + __METHOD__, |
|
106 | + __( |
|
107 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
108 | + 'event_espresso' |
|
109 | + ), |
|
110 | + '4.9.27' |
|
111 | + ); |
|
112 | + } |
|
113 | + |
|
114 | + |
|
115 | + |
|
116 | + /** |
|
117 | + * @deprecated 4.9.27 |
|
118 | + * @param WP $WP |
|
119 | + * @return void |
|
120 | + */ |
|
121 | + public function run(WP $WP) |
|
122 | + { |
|
123 | + } |
|
124 | + |
|
125 | + |
|
126 | + |
|
127 | + /** |
|
128 | + * @deprecated 4.9.27 |
|
129 | + * @return void |
|
130 | + */ |
|
131 | + protected function _translate_strings() |
|
132 | + { |
|
133 | + \EE_Error::doing_it_wrong( |
|
134 | + __METHOD__, |
|
135 | + __( |
|
136 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
137 | + 'event_espresso' |
|
138 | + ), |
|
139 | + '4.9.27' |
|
140 | + ); |
|
141 | + } |
|
142 | + |
|
143 | + |
|
144 | + |
|
145 | + /** |
|
146 | + * @deprecated 4.9.27 |
|
147 | + * @return void |
|
148 | + */ |
|
149 | + public function load_js() |
|
150 | + { |
|
151 | + \EE_Error::doing_it_wrong( |
|
152 | + __METHOD__, |
|
153 | + __( |
|
154 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
155 | + 'event_espresso' |
|
156 | + ), |
|
157 | + '4.9.27' |
|
158 | + ); |
|
159 | + } |
|
160 | + |
|
161 | + |
|
162 | + |
|
163 | + /** |
|
164 | + * @deprecated 4.9.27 |
|
165 | + * @return void |
|
166 | + * @throws \EE_Error |
|
167 | + */ |
|
168 | + public function init() |
|
169 | + { |
|
170 | + \EE_Error::doing_it_wrong( |
|
171 | + __METHOD__, |
|
172 | + __( |
|
173 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
174 | + 'event_espresso' |
|
175 | + ), |
|
176 | + '4.9.27' |
|
177 | + ); |
|
178 | + } |
|
179 | + |
|
180 | + |
|
181 | + |
|
182 | + /** |
|
183 | + * @deprecated 4.9.27 |
|
184 | + * @param array $attributes |
|
185 | + * @return string |
|
186 | + * @throws \EE_Error |
|
187 | + */ |
|
188 | + public function process_shortcode($attributes = array()) |
|
189 | + { |
|
190 | + \EE_Error::doing_it_wrong( |
|
191 | + __METHOD__, |
|
192 | + __( |
|
193 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
194 | + 'event_espresso' |
|
195 | + ), |
|
196 | + '4.9.27' |
|
197 | + ); |
|
198 | + return ''; |
|
199 | + } |
|
200 | + |
|
201 | + |
|
202 | + |
|
203 | + /** |
|
204 | + * @deprecated 4.9.27 |
|
205 | + * @param array $response |
|
206 | + * @param array $data |
|
207 | + * @return array |
|
208 | + * @throws \EE_Error |
|
209 | + */ |
|
210 | + public static function thank_you_page_IPN_monitor($response = array(), $data = array()) |
|
211 | + { |
|
212 | + \EE_Error::doing_it_wrong( |
|
213 | + __METHOD__, |
|
214 | + __( |
|
215 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
216 | + 'event_espresso' |
|
217 | + ), |
|
218 | + '4.9.27' |
|
219 | + ); |
|
220 | + } |
|
221 | + |
|
222 | + |
|
223 | + |
|
224 | + |
|
225 | + /** |
|
226 | + * @deprecated 4.9.27 |
|
227 | + * @return string |
|
228 | + * @throws \EE_Error |
|
229 | + */ |
|
230 | + public function get_registration_details() |
|
231 | + { |
|
232 | + \EE_Error::doing_it_wrong( |
|
233 | + __METHOD__, |
|
234 | + __( |
|
235 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
236 | + 'event_espresso' |
|
237 | + ), |
|
238 | + '4.9.27' |
|
239 | + ); |
|
240 | + } |
|
241 | + |
|
242 | + |
|
243 | + |
|
244 | + /** |
|
245 | + * resend_reg_confirmation_email |
|
246 | + * |
|
247 | + * @deprecated 4.9.27 |
|
248 | + */ |
|
249 | + public static function resend_reg_confirmation_email() |
|
250 | + { |
|
251 | + \EE_Error::doing_it_wrong( |
|
252 | + __METHOD__, |
|
253 | + __( |
|
254 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
255 | + 'event_espresso' |
|
256 | + ), |
|
257 | + '4.9.27' |
|
258 | + ); |
|
259 | + } |
|
260 | + |
|
261 | + |
|
262 | + |
|
263 | + /** |
|
264 | + * get_ajax_content |
|
265 | + * |
|
266 | + * @deprecated 4.9.27 |
|
267 | + * @return void |
|
268 | + */ |
|
269 | + public function get_ajax_content() |
|
270 | + { |
|
271 | + \EE_Error::doing_it_wrong( |
|
272 | + __METHOD__, |
|
273 | + __( |
|
274 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
275 | + 'event_espresso' |
|
276 | + ), |
|
277 | + '4.9.27' |
|
278 | + ); |
|
279 | + } |
|
280 | + |
|
281 | + |
|
282 | + |
|
283 | + /** |
|
284 | + * display_details_for_events |
|
285 | + * |
|
286 | + * @deprecated 4.9.27 |
|
287 | + * @param EE_Event[] $events |
|
288 | + * @return void |
|
289 | + */ |
|
290 | + public function display_details_for_events($events = array()) |
|
291 | + { |
|
292 | + \EE_Error::doing_it_wrong( |
|
293 | + __METHOD__, |
|
294 | + __( |
|
295 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
296 | + 'event_espresso' |
|
297 | + ), |
|
298 | + '4.9.27' |
|
299 | + ); |
|
300 | + } |
|
301 | + |
|
302 | + |
|
303 | + |
|
304 | + /** |
|
305 | + * display_details_for_events_requiring_pre_approval |
|
306 | + * |
|
307 | + * @deprecated 4.9.27 |
|
308 | + * @param EE_Event[] $events |
|
309 | + * @return void |
|
310 | + */ |
|
311 | + public function display_details_for_events_requiring_pre_approval($events = array()) |
|
312 | + { |
|
313 | + \EE_Error::doing_it_wrong( |
|
314 | + __METHOD__, |
|
315 | + __( |
|
316 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
317 | + 'event_espresso' |
|
318 | + ), |
|
319 | + '4.9.27' |
|
320 | + ); |
|
321 | + } |
|
322 | + |
|
323 | + |
|
324 | + |
|
325 | + /** |
|
326 | + * get_transaction_details |
|
327 | + * |
|
328 | + * @deprecated 4.9.27 |
|
329 | + * @return string |
|
330 | + * @throws \EE_Error |
|
331 | + */ |
|
332 | + public function get_transaction_details() |
|
333 | + { |
|
334 | + \EE_Error::doing_it_wrong( |
|
335 | + __METHOD__, |
|
336 | + __( |
|
337 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
338 | + 'event_espresso' |
|
339 | + ), |
|
340 | + '4.9.27' |
|
341 | + ); |
|
342 | + } |
|
343 | + |
|
344 | + |
|
345 | + |
|
346 | + /** |
|
347 | + * get_payment_row_html |
|
348 | + * |
|
349 | + * @deprecated 4.9.27 |
|
350 | + * @param EE_Payment $payment |
|
351 | + * @return string |
|
352 | + * @throws \EE_Error |
|
353 | + */ |
|
354 | + public function get_payment_row_html($payment = null) |
|
355 | + { |
|
356 | + \EE_Error::doing_it_wrong( |
|
357 | + __METHOD__, |
|
358 | + __( |
|
359 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
360 | + 'event_espresso' |
|
361 | + ), |
|
362 | + '4.9.27' |
|
363 | + ); |
|
364 | + } |
|
365 | + |
|
366 | + |
|
367 | + |
|
368 | + /** |
|
369 | + * get_payment_details |
|
370 | + * |
|
371 | + * @deprecated 4.9.27 |
|
372 | + * @param array $payments |
|
373 | + * @return string |
|
374 | + * @throws \EE_Error |
|
375 | + */ |
|
376 | + public function get_payment_details($payments = array()) |
|
377 | + { |
|
378 | + \EE_Error::doing_it_wrong( |
|
379 | + __METHOD__, |
|
380 | + __( |
|
381 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
382 | + 'event_espresso' |
|
383 | + ), |
|
384 | + '4.9.27' |
|
385 | + ); |
|
386 | + } |
|
387 | + |
|
388 | + |
|
389 | + |
|
390 | + /** |
|
391 | + * get_payment_details |
|
392 | + * |
|
393 | + * @deprecated 4.9.27 |
|
394 | + * @param array $payments |
|
395 | + * @return string |
|
396 | + * @throws \EE_Error |
|
397 | + */ |
|
398 | + public function get_new_payments($payments = array()) |
|
399 | + { |
|
400 | + \EE_Error::doing_it_wrong( |
|
401 | + __METHOD__, |
|
402 | + __( |
|
403 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoThankYou instead.', |
|
404 | + 'event_espresso' |
|
405 | + ), |
|
406 | + '4.9.27' |
|
407 | + ); |
|
408 | + } |
|
409 | 409 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <label><?php _e('Amount Owing: ', 'event_espresso'); ?></label> |
18 | 18 | </td> |
19 | 19 | <td class="<?php echo ($transaction->paid() == $transaction->total()) ? 'ee-transaction-paid' |
20 | - : 'ee-transaction-unpaid' ?>"> |
|
20 | + : 'ee-transaction-unpaid' ?>"> |
|
21 | 21 | <?php echo EEH_Template::format_currency($transaction->remaining()); ?> |
22 | 22 | </td> |
23 | 23 | </tr> |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | </td> |
28 | 28 | <td> |
29 | 29 | <?php $transaction->e_pretty_status(true); |
30 | - if ($show_try_pay_again_link && ! $transaction->is_completed()) { ?> |
|
30 | + if ($show_try_pay_again_link && ! $transaction->is_completed()) { ?> |
|
31 | 31 | <span class="small-text"><a href='<?php echo $SPCO_payment_options_url ?>'><?php |
32 | - _e('View Payment Options', 'event_espresso'); |
|
33 | - ?></a></span> |
|
32 | + _e('View Payment Options', 'event_espresso'); |
|
33 | + ?></a></span> |
|
34 | 34 | <?php } ?> |
35 | 35 | </td> |
36 | 36 | </tr> |
@@ -43,16 +43,16 @@ discard block |
||
43 | 43 | </td> |
44 | 44 | </tr> |
45 | 45 | <?php do_action( |
46 | - 'AHEE__thank_you_page_transaction_details_template__after_transaction_table_row', |
|
47 | - $transaction |
|
48 | - ); ?> |
|
46 | + 'AHEE__thank_you_page_transaction_details_template__after_transaction_table_row', |
|
47 | + $transaction |
|
48 | + ); ?> |
|
49 | 49 | </tbody> |
50 | 50 | </table> |
51 | 51 | |
52 | 52 | <?php if ($show_try_pay_again_link && ! $transaction->is_completed()) { ?> |
53 | 53 | <p class="small-text jst-rght"> |
54 | 54 | <a href='<?php echo $SPCO_payment_options_url ?>'><?php |
55 | - _e("Click here to view Payment Options", 'event_espresso'); ?></a> |
|
55 | + _e("Click here to view Payment Options", 'event_espresso'); ?></a> |
|
56 | 56 | </p> |
57 | 57 | <br/> |
58 | 58 |
@@ -13,26 +13,26 @@ |
||
13 | 13 | <div class="ee-attention"> |
14 | 14 | <div class="extra-padding-sides"> |
15 | 15 | <?php echo apply_filters( |
16 | - 'FHEE__thank_you_page_overview_template__order_conf_desc', |
|
17 | - sprintf( |
|
18 | - $order_conf_desc, |
|
19 | - '<h3 class="">', |
|
20 | - '</h3>', |
|
21 | - '<br />' |
|
22 | - ) |
|
23 | - ); |
|
24 | - if (! empty($TXN_receipt_url)) : ?> |
|
16 | + 'FHEE__thank_you_page_overview_template__order_conf_desc', |
|
17 | + sprintf( |
|
18 | + $order_conf_desc, |
|
19 | + '<h3 class="">', |
|
20 | + '</h3>', |
|
21 | + '<br />' |
|
22 | + ) |
|
23 | + ); |
|
24 | + if (! empty($TXN_receipt_url)) : ?> |
|
25 | 25 | <br/> |
26 | 26 | <div class="jst-rght"> |
27 | 27 | <a class="ee-button ee-roundish indented-text big-text" |
28 | 28 | href="<?php echo $TXN_receipt_url; ?>"><span |
29 | 29 | class="ee-icon ee-icon-PDF-file-type"></span> |
30 | 30 | <?php |
31 | - echo apply_filters( |
|
32 | - 'FHEE__thank_you_page_overview_template__order_conf_button_text', |
|
33 | - __('View Full Order Confirmation Receipt', 'event_espresso') |
|
34 | - ); |
|
35 | - ?></a> |
|
31 | + echo apply_filters( |
|
32 | + 'FHEE__thank_you_page_overview_template__order_conf_button_text', |
|
33 | + __('View Full Order Confirmation Receipt', 'event_espresso') |
|
34 | + ); |
|
35 | + ?></a> |
|
36 | 36 | </div> |
37 | 37 | <?php endif; ?> |
38 | 38 | </div> |
@@ -9,7 +9,7 @@ discard block |
||
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,7 +21,7 @@ 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 | 27 | <a class="ee-button ee-roundish indented-text big-text" |
@@ -9,22 +9,22 @@ discard block |
||
9 | 9 | |
10 | 10 | <div class="ee-registration-details-dv"> |
11 | 11 | <?php |
12 | - $registrations = $transaction->registrations(); |
|
13 | - $registrations = is_array($registrations) ? $registrations : array(); |
|
14 | - $reg_count = count($registrations); |
|
15 | - $reg_cntr = 0; |
|
16 | - $event_name = ''; |
|
17 | - $wait_list = false; |
|
18 | - foreach ($registrations as $registration) { |
|
19 | - if ($registration instanceof EE_Registration) { |
|
20 | - if ($event_name != $registration->event_name() && ! empty($event_name)) { ?> |
|
12 | + $registrations = $transaction->registrations(); |
|
13 | + $registrations = is_array($registrations) ? $registrations : array(); |
|
14 | + $reg_count = count($registrations); |
|
15 | + $reg_cntr = 0; |
|
16 | + $event_name = ''; |
|
17 | + $wait_list = false; |
|
18 | + foreach ($registrations as $registration) { |
|
19 | + if ($registration instanceof EE_Registration) { |
|
20 | + if ($event_name != $registration->event_name() && ! empty($event_name)) { ?> |
|
21 | 21 | </tbody> |
22 | 22 | </table> |
23 | 23 | <?php |
24 | - } |
|
25 | - $reg_cntr++; |
|
26 | - if ($event_name != $registration->event_name()) { |
|
27 | - ?> |
|
24 | + } |
|
25 | + $reg_cntr++; |
|
26 | + if ($event_name != $registration->event_name()) { |
|
27 | + ?> |
|
28 | 28 | <h5> |
29 | 29 | <span class="smaller-text grey-text"><?php _e('for', 'event_espresso'); ?> |
30 | 30 | : </span> <?php echo htmlentities($registration->event_name(), ENT_QUOTES, 'UTF-8'); ?> |
@@ -45,48 +45,48 @@ discard block |
||
45 | 45 | </thead> |
46 | 46 | <tbody> |
47 | 47 | <?php |
48 | - } |
|
49 | - if ($is_primary || (! $is_primary && $reg_url_link == $registration->reg_url_link())) { ?> |
|
48 | + } |
|
49 | + if ($is_primary || (! $is_primary && $reg_url_link == $registration->reg_url_link())) { ?> |
|
50 | 50 | <tr> |
51 | 51 | <td width="40%"> |
52 | 52 | <?php |
53 | - if ($registration->attendee() instanceof EE_Attendee) { |
|
54 | - echo $registration->attendee()->full_name(true); |
|
55 | - } |
|
56 | - ?> |
|
53 | + if ($registration->attendee() instanceof EE_Attendee) { |
|
54 | + echo $registration->attendee()->full_name(true); |
|
55 | + } |
|
56 | + ?> |
|
57 | 57 | <p class="tiny-text" style="margin: .75em 0 0;"> |
58 | 58 | <?php |
59 | - if ($registration->count_question_groups()) { |
|
60 | - ?> |
|
59 | + if ($registration->count_question_groups()) { |
|
60 | + ?> |
|
61 | 61 | <a class="ee-icon-only-lnk" |
62 | 62 | href="<?php echo $registration->edit_attendee_information_url(); ?>" |
63 | 63 | title="<?php |
64 | - esc_attr_e( |
|
65 | - 'Click here to edit Attendee Information', |
|
66 | - 'event_espresso' |
|
67 | - ); ?>"><span class="ee-icon ee-icon-user-edit"></span> |
|
64 | + esc_attr_e( |
|
65 | + 'Click here to edit Attendee Information', |
|
66 | + 'event_espresso' |
|
67 | + ); ?>"><span class="ee-icon ee-icon-user-edit"></span> |
|
68 | 68 | <?php |
69 | - _e( |
|
70 | - 'edit info', |
|
71 | - 'event_espresso' |
|
72 | - ); ?></a> |
|
69 | + _e( |
|
70 | + 'edit info', |
|
71 | + 'event_espresso' |
|
72 | + ); ?></a> |
|
73 | 73 | <?php } ?> |
74 | 74 | <a class="ee-resend-reg-confirmation-email ee-icon-only-lnk" |
75 | 75 | href="<?php |
76 | - echo add_query_arg( |
|
77 | - array('token' => $registration->reg_url_link(), 'resend_reg_confirmation' => 'true'), |
|
78 | - EE_Registry::instance()->CFG->core->thank_you_page_url() |
|
79 | - ); ?>" title="<?php |
|
80 | - esc_attr_e( |
|
81 | - 'Click here to resend the Registration Confirmation email', |
|
82 | - 'event_espresso' |
|
83 | - ); ?>" rel="<?php echo $registration->reg_url_link(); ?>"><span |
|
76 | + echo add_query_arg( |
|
77 | + array('token' => $registration->reg_url_link(), 'resend_reg_confirmation' => 'true'), |
|
78 | + EE_Registry::instance()->CFG->core->thank_you_page_url() |
|
79 | + ); ?>" title="<?php |
|
80 | + esc_attr_e( |
|
81 | + 'Click here to resend the Registration Confirmation email', |
|
82 | + 'event_espresso' |
|
83 | + ); ?>" rel="<?php echo $registration->reg_url_link(); ?>"><span |
|
84 | 84 | class="dashicons dashicons-email-alt"></span> |
85 | 85 | <?php |
86 | - _e( |
|
87 | - 'resend email', |
|
88 | - 'event_espresso' |
|
89 | - ); ?></a> |
|
86 | + _e( |
|
87 | + 'resend email', |
|
88 | + 'event_espresso' |
|
89 | + ); ?></a> |
|
90 | 90 | </p> |
91 | 91 | </td> |
92 | 92 | <td width="25%" class="jst-left"> |
@@ -95,53 +95,53 @@ discard block |
||
95 | 95 | <td width="35%" class="jst-left"> |
96 | 96 | <?php $registration->e_pretty_status(true) ?> |
97 | 97 | <?php |
98 | - if ($registration->status_ID() === EEM_Registration::status_id_wait_list) { |
|
99 | - $wait_list = true; |
|
100 | - } |
|
101 | - ?> |
|
98 | + if ($registration->status_ID() === EEM_Registration::status_id_wait_list) { |
|
99 | + $wait_list = true; |
|
100 | + } |
|
101 | + ?> |
|
102 | 102 | </td> |
103 | 103 | </tr> |
104 | 104 | <?php do_action( |
105 | - 'AHEE__thank_you_page_registration_details_template__after_registration_table_row', |
|
106 | - $registration |
|
107 | - ); ?> |
|
105 | + 'AHEE__thank_you_page_registration_details_template__after_registration_table_row', |
|
106 | + $registration |
|
107 | + ); ?> |
|
108 | 108 | <?php |
109 | - $event_name = $registration->event_name(); |
|
110 | - } |
|
111 | - if ($reg_cntr >= $reg_count) { |
|
112 | - ?> |
|
109 | + $event_name = $registration->event_name(); |
|
110 | + } |
|
111 | + if ($reg_cntr >= $reg_count) { |
|
112 | + ?> |
|
113 | 113 | </tbody> |
114 | 114 | </table> |
115 | 115 | <?php |
116 | - } |
|
117 | - } |
|
118 | - } |
|
119 | - ?> |
|
116 | + } |
|
117 | + } |
|
118 | + } |
|
119 | + ?> |
|
120 | 120 | <?php if ($is_primary && $SPCO_attendee_information_url) { ?> |
121 | 121 | <p class="small-text jst-rght"> |
122 | 122 | <a href='<?php echo $SPCO_attendee_information_url ?>'> |
123 | 123 | <?php |
124 | - _e( |
|
125 | - "Click here to edit All Attendee Information", |
|
126 | - 'event_espresso' |
|
127 | - ); ?></a> |
|
124 | + _e( |
|
125 | + "Click here to edit All Attendee Information", |
|
126 | + 'event_espresso' |
|
127 | + ); ?></a> |
|
128 | 128 | </p> |
129 | 129 | <?php } ?> |
130 | 130 | <?php if ($wait_list) { ?> |
131 | 131 | <?php |
132 | - echo apply_filters( |
|
133 | - 'AFEE__thank_you_page_registration_details_template__wait_list_notice', |
|
134 | - sprintf( |
|
135 | - __( |
|
136 | - '%1$sre: Wait List Registrations%2$sPlease note that the total cost listed below in the Transaction Details is for ALL registrations, including those that are on the wait list, even though they can not be currently paid for. If any spaces become available however, you may be notified by the Event admin and have the opportunity to secure the remaining tickets by making a payment for them.%3$s', |
|
137 | - 'event_espresso' |
|
138 | - ), |
|
139 | - '<h6 class="" style="margin-bottom:.25em;"><span class="dashicons dashicons-clipboard ee-icon-size-16 purple-text"></span>', |
|
140 | - '</h6 ><p class="ee-wait-list-notice">', |
|
141 | - '</p ><br />' |
|
142 | - ) |
|
143 | - ); |
|
144 | - ?> |
|
132 | + echo apply_filters( |
|
133 | + 'AFEE__thank_you_page_registration_details_template__wait_list_notice', |
|
134 | + sprintf( |
|
135 | + __( |
|
136 | + '%1$sre: Wait List Registrations%2$sPlease note that the total cost listed below in the Transaction Details is for ALL registrations, including those that are on the wait list, even though they can not be currently paid for. If any spaces become available however, you may be notified by the Event admin and have the opportunity to secure the remaining tickets by making a payment for them.%3$s', |
|
137 | + 'event_espresso' |
|
138 | + ), |
|
139 | + '<h6 class="" style="margin-bottom:.25em;"><span class="dashicons dashicons-clipboard ee-icon-size-16 purple-text"></span>', |
|
140 | + '</h6 ><p class="ee-wait-list-notice">', |
|
141 | + '</p ><br />' |
|
142 | + ) |
|
143 | + ); |
|
144 | + ?> |
|
145 | 145 | <?php } ?> |
146 | 146 | |
147 | 147 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | <tbody> |
47 | 47 | <?php |
48 | 48 | } |
49 | - if ($is_primary || (! $is_primary && $reg_url_link == $registration->reg_url_link())) { ?> |
|
49 | + if ($is_primary || ( ! $is_primary && $reg_url_link == $registration->reg_url_link())) { ?> |
|
50 | 50 | <tr> |
51 | 51 | <td width="40%"> |
52 | 52 | <?php |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | |
6 | 6 | <div id="espresso-thank-you-page-payment-details-dv"> |
7 | 7 | <?php |
8 | - if (! empty($payments)) { ?> |
|
8 | + if (! empty($payments)) { ?> |
|
9 | 9 | <table class="ee-table"> |
10 | 10 | <thead> |
11 | 11 | <tr> |
@@ -25,40 +25,40 @@ discard block |
||
25 | 25 | </thead> |
26 | 26 | <tbody> |
27 | 27 | <?php |
28 | - foreach ($payments as $payment) { |
|
29 | - echo $payment; |
|
30 | - } |
|
31 | - ?> |
|
28 | + foreach ($payments as $payment) { |
|
29 | + echo $payment; |
|
30 | + } |
|
31 | + ?> |
|
32 | 32 | </tbody> |
33 | 33 | </table> |
34 | 34 | <?php |
35 | - } else { |
|
36 | - if ($transaction->total()) { |
|
37 | - echo apply_filters( |
|
38 | - 'FHEE__payment_overview_template__no_payments_made', |
|
39 | - sprintf( |
|
40 | - __('%sNo payments towards this transaction have been received.%s', 'event_espresso'), |
|
41 | - '<p class="important-notice">', |
|
42 | - '</p>' |
|
43 | - ) |
|
44 | - ); |
|
45 | - do_action('AHEE__thank_you_page_payment_details_template__no_payments_made', $transaction); |
|
46 | - } else { |
|
47 | - echo apply_filters( |
|
48 | - 'FHEE__payment_overview_template__no_payment_required', |
|
49 | - sprintf( |
|
50 | - __('%sNo payment is required for this transaction.%s', 'event_espresso'), |
|
51 | - '<p>', |
|
52 | - '</p>' |
|
53 | - ) |
|
54 | - ); |
|
55 | - do_action('AHEE__thank_you_page_payment_details_template__no_payment_required'); |
|
56 | - } |
|
57 | - } |
|
58 | - echo $gateway_content; |
|
59 | - do_action('AHEE__thank_you_page_payment_details_template__after_gateway_content', $gateway_content); |
|
35 | + } else { |
|
36 | + if ($transaction->total()) { |
|
37 | + echo apply_filters( |
|
38 | + 'FHEE__payment_overview_template__no_payments_made', |
|
39 | + sprintf( |
|
40 | + __('%sNo payments towards this transaction have been received.%s', 'event_espresso'), |
|
41 | + '<p class="important-notice">', |
|
42 | + '</p>' |
|
43 | + ) |
|
44 | + ); |
|
45 | + do_action('AHEE__thank_you_page_payment_details_template__no_payments_made', $transaction); |
|
46 | + } else { |
|
47 | + echo apply_filters( |
|
48 | + 'FHEE__payment_overview_template__no_payment_required', |
|
49 | + sprintf( |
|
50 | + __('%sNo payment is required for this transaction.%s', 'event_espresso'), |
|
51 | + '<p>', |
|
52 | + '</p>' |
|
53 | + ) |
|
54 | + ); |
|
55 | + do_action('AHEE__thank_you_page_payment_details_template__no_payment_required'); |
|
56 | + } |
|
57 | + } |
|
58 | + echo $gateway_content; |
|
59 | + do_action('AHEE__thank_you_page_payment_details_template__after_gateway_content', $gateway_content); |
|
60 | 60 | |
61 | - ?> |
|
61 | + ?> |
|
62 | 62 | |
63 | 63 | <br/> |
64 | 64 | <?php do_action('AHEE__thank_you_page_payment_details_template__after_payment_details'); ?> |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | <div id="espresso-thank-you-page-payment-details-dv"> |
7 | 7 | <?php |
8 | - if (! empty($payments)) { ?> |
|
8 | + if ( ! empty($payments)) { ?> |
|
9 | 9 | <table class="ee-table"> |
10 | 10 | <thead> |
11 | 11 | <tr> |
@@ -11,55 +11,55 @@ |
||
11 | 11 | class EES_Espresso_Cancelled extends EES_Shortcode |
12 | 12 | { |
13 | 13 | |
14 | - /** |
|
15 | - * @deprecated 4.9.27 |
|
16 | - * @return void |
|
17 | - */ |
|
18 | - public static function set_hooks() |
|
19 | - { |
|
20 | - } |
|
14 | + /** |
|
15 | + * @deprecated 4.9.27 |
|
16 | + * @return void |
|
17 | + */ |
|
18 | + public static function set_hooks() |
|
19 | + { |
|
20 | + } |
|
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | - /** |
|
25 | - * @deprecated 4.9.27 |
|
26 | - * @return void |
|
27 | - */ |
|
28 | - public static function set_hooks_admin() |
|
29 | - { |
|
30 | - } |
|
24 | + /** |
|
25 | + * @deprecated 4.9.27 |
|
26 | + * @return void |
|
27 | + */ |
|
28 | + public static function set_hooks_admin() |
|
29 | + { |
|
30 | + } |
|
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | - /** |
|
35 | - * @deprecated 4.9.27 |
|
36 | - * @param WP $WP |
|
37 | - * @return void |
|
38 | - */ |
|
39 | - public function run(WP $WP) |
|
40 | - { |
|
41 | - } |
|
34 | + /** |
|
35 | + * @deprecated 4.9.27 |
|
36 | + * @param WP $WP |
|
37 | + * @return void |
|
38 | + */ |
|
39 | + public function run(WP $WP) |
|
40 | + { |
|
41 | + } |
|
42 | 42 | |
43 | 43 | |
44 | 44 | |
45 | - /** |
|
46 | - * process_shortcode - ESPRESSO_CANCELLED |
|
47 | - * |
|
48 | - * @deprecated 4.9.27 |
|
49 | - * @param array $attributes |
|
50 | - * @return string |
|
51 | - * @throws \EE_Error |
|
52 | - */ |
|
53 | - public function process_shortcode($attributes = array()) |
|
54 | - { |
|
55 | - \EE_Error::doing_it_wrong( |
|
56 | - __METHOD__, |
|
57 | - __( |
|
58 | - 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoCancelled instead.', |
|
59 | - 'event_espresso' |
|
60 | - ), |
|
61 | - '4.9.27' |
|
62 | - ); |
|
63 | - return ''; |
|
64 | - } |
|
45 | + /** |
|
46 | + * process_shortcode - ESPRESSO_CANCELLED |
|
47 | + * |
|
48 | + * @deprecated 4.9.27 |
|
49 | + * @param array $attributes |
|
50 | + * @return string |
|
51 | + * @throws \EE_Error |
|
52 | + */ |
|
53 | + public function process_shortcode($attributes = array()) |
|
54 | + { |
|
55 | + \EE_Error::doing_it_wrong( |
|
56 | + __METHOD__, |
|
57 | + __( |
|
58 | + 'Usage is deprecated. Please use \EventEspresso\core\domain\entities\shortcodes\EspressoCancelled instead.', |
|
59 | + 'event_espresso' |
|
60 | + ), |
|
61 | + '4.9.27' |
|
62 | + ); |
|
63 | + return ''; |
|
64 | + } |
|
65 | 65 | } |
@@ -28,58 +28,58 @@ discard block |
||
28 | 28 | { |
29 | 29 | |
30 | 30 | |
31 | - /** |
|
32 | - * Register widget with WordPress. |
|
33 | - */ |
|
34 | - public function __construct() |
|
35 | - { |
|
36 | - parent::__construct( |
|
37 | - __('Event Espresso Upcoming Events', 'event_espresso'), |
|
38 | - array( 'description' => __('A widget to display your upcoming events.', 'event_espresso')) |
|
39 | - ); |
|
40 | - } |
|
31 | + /** |
|
32 | + * Register widget with WordPress. |
|
33 | + */ |
|
34 | + public function __construct() |
|
35 | + { |
|
36 | + parent::__construct( |
|
37 | + __('Event Espresso Upcoming Events', 'event_espresso'), |
|
38 | + array( 'description' => __('A widget to display your upcoming events.', 'event_espresso')) |
|
39 | + ); |
|
40 | + } |
|
41 | 41 | |
42 | 42 | |
43 | 43 | |
44 | - /** |
|
45 | - * Back-end widget form. |
|
46 | - * |
|
47 | - * @see WP_Widget::form() |
|
48 | - * @param array $instance Previously saved values from database. |
|
49 | - * @return string|void |
|
50 | - */ |
|
51 | - public function form($instance) |
|
52 | - { |
|
44 | + /** |
|
45 | + * Back-end widget form. |
|
46 | + * |
|
47 | + * @see WP_Widget::form() |
|
48 | + * @param array $instance Previously saved values from database. |
|
49 | + * @return string|void |
|
50 | + */ |
|
51 | + public function form($instance) |
|
52 | + { |
|
53 | 53 | |
54 | - EE_Registry::instance()->load_class('Question_Option', array(), false, false, true); |
|
55 | - // Set up some default widget settings. |
|
56 | - $defaults = array( |
|
57 | - 'title' => __('Upcoming Events', 'event_espresso'), |
|
58 | - 'category_name' => '', |
|
59 | - 'show_expired' => 0, |
|
60 | - 'show_desc' => true, |
|
61 | - 'show_dates' => true, |
|
62 | - 'show_everywhere' => false, |
|
63 | - 'date_limit' => 2, |
|
64 | - 'limit' => 10, |
|
65 | - 'sort' => 'ASC', |
|
66 | - 'date_range' => false, |
|
67 | - 'image_size' => 'medium' |
|
68 | - ); |
|
54 | + EE_Registry::instance()->load_class('Question_Option', array(), false, false, true); |
|
55 | + // Set up some default widget settings. |
|
56 | + $defaults = array( |
|
57 | + 'title' => __('Upcoming Events', 'event_espresso'), |
|
58 | + 'category_name' => '', |
|
59 | + 'show_expired' => 0, |
|
60 | + 'show_desc' => true, |
|
61 | + 'show_dates' => true, |
|
62 | + 'show_everywhere' => false, |
|
63 | + 'date_limit' => 2, |
|
64 | + 'limit' => 10, |
|
65 | + 'sort' => 'ASC', |
|
66 | + 'date_range' => false, |
|
67 | + 'image_size' => 'medium' |
|
68 | + ); |
|
69 | 69 | |
70 | - $instance = wp_parse_args((array) $instance, $defaults); |
|
71 | - // don't add HTML labels for EE_Form_Fields generated inputs |
|
72 | - add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); |
|
73 | - $yes_no_values = array( |
|
74 | - EE_Question_Option::new_instance(array( 'QSO_value' => false, 'QSO_desc' => __('No', 'event_espresso'))), |
|
75 | - EE_Question_Option::new_instance(array( 'QSO_value' => true, 'QSO_desc' => __('Yes', 'event_espresso'))) |
|
76 | - ); |
|
77 | - $sort_values = array( |
|
78 | - EE_Question_Option::new_instance(array( 'QSO_value' => 'ASC', 'QSO_desc' => __('ASC', 'event_espresso'))), |
|
79 | - EE_Question_Option::new_instance(array( 'QSO_value' => 'DESC', 'QSO_desc' => __('DESC', 'event_espresso'))) |
|
80 | - ); |
|
70 | + $instance = wp_parse_args((array) $instance, $defaults); |
|
71 | + // don't add HTML labels for EE_Form_Fields generated inputs |
|
72 | + add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); |
|
73 | + $yes_no_values = array( |
|
74 | + EE_Question_Option::new_instance(array( 'QSO_value' => false, 'QSO_desc' => __('No', 'event_espresso'))), |
|
75 | + EE_Question_Option::new_instance(array( 'QSO_value' => true, 'QSO_desc' => __('Yes', 'event_espresso'))) |
|
76 | + ); |
|
77 | + $sort_values = array( |
|
78 | + EE_Question_Option::new_instance(array( 'QSO_value' => 'ASC', 'QSO_desc' => __('ASC', 'event_espresso'))), |
|
79 | + EE_Question_Option::new_instance(array( 'QSO_value' => 'DESC', 'QSO_desc' => __('DESC', 'event_espresso'))) |
|
80 | + ); |
|
81 | 81 | |
82 | - ?> |
|
82 | + ?> |
|
83 | 83 | |
84 | 84 | <!-- Widget Title: Text Input --> |
85 | 85 | |
@@ -94,26 +94,26 @@ discard block |
||
94 | 94 | <?php _e('Event Category:', 'event_espresso'); ?> |
95 | 95 | </label> |
96 | 96 | <?php |
97 | - $event_categories = array(); |
|
98 | - /** @type EEM_Term $EEM_Term */ |
|
99 | - $EEM_Term = EE_Registry::instance()->load_model('Term'); |
|
100 | - $categories = $EEM_Term->get_all_ee_categories(true); |
|
101 | - if ($categories) { |
|
102 | - foreach ($categories as $category) { |
|
103 | - if ($category instanceof EE_Term) { |
|
104 | - $event_categories[] = EE_Question_Option::new_instance(array( 'QSO_value' => $category->get('slug'), 'QSO_desc' => $category->get('name'))); |
|
105 | - } |
|
106 | - } |
|
107 | - } |
|
108 | - array_unshift($event_categories, EE_Question_Option::new_instance(array( 'QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso')))); |
|
109 | - echo EEH_Form_Fields::select( |
|
110 | - __('Event Category:', 'event_espresso'), |
|
111 | - $instance['category_name'], |
|
112 | - $event_categories, |
|
113 | - $this->get_field_name('category_name'), |
|
114 | - $this->get_field_id('category_name') |
|
115 | - ); |
|
116 | - ?> |
|
97 | + $event_categories = array(); |
|
98 | + /** @type EEM_Term $EEM_Term */ |
|
99 | + $EEM_Term = EE_Registry::instance()->load_model('Term'); |
|
100 | + $categories = $EEM_Term->get_all_ee_categories(true); |
|
101 | + if ($categories) { |
|
102 | + foreach ($categories as $category) { |
|
103 | + if ($category instanceof EE_Term) { |
|
104 | + $event_categories[] = EE_Question_Option::new_instance(array( 'QSO_value' => $category->get('slug'), 'QSO_desc' => $category->get('name'))); |
|
105 | + } |
|
106 | + } |
|
107 | + } |
|
108 | + array_unshift($event_categories, EE_Question_Option::new_instance(array( 'QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso')))); |
|
109 | + echo EEH_Form_Fields::select( |
|
110 | + __('Event Category:', 'event_espresso'), |
|
111 | + $instance['category_name'], |
|
112 | + $event_categories, |
|
113 | + $this->get_field_name('category_name'), |
|
114 | + $this->get_field_id('category_name') |
|
115 | + ); |
|
116 | + ?> |
|
117 | 117 | </p> |
118 | 118 | <p> |
119 | 119 | <label for="<?php echo $this->get_field_id('limit'); ?>"> |
@@ -126,59 +126,59 @@ discard block |
||
126 | 126 | <?php _e('Show Expired Events:', 'event_espresso'); ?> |
127 | 127 | </label> |
128 | 128 | <?php |
129 | - echo EEH_Form_Fields::select( |
|
130 | - __('Show Expired Events:', 'event_espresso'), |
|
131 | - $instance['show_expired'], |
|
132 | - array( |
|
133 | - EE_Question_Option::new_instance(array( 'QSO_value' => 0, 'QSO_desc' => __('No', 'event_espresso'))), |
|
134 | - EE_Question_Option::new_instance(array( 'QSO_value' => 1, 'QSO_desc' => __('Yes', 'event_espresso'))), |
|
135 | - EE_Question_Option::new_instance(array( 'QSO_value' => 2, 'QSO_desc' => __('Show Only Expired', 'event_espresso'))), |
|
136 | - ), |
|
137 | - $this->get_field_name('show_expired'), |
|
138 | - $this->get_field_id('show_expired') |
|
139 | - ); |
|
140 | - ?> |
|
129 | + echo EEH_Form_Fields::select( |
|
130 | + __('Show Expired Events:', 'event_espresso'), |
|
131 | + $instance['show_expired'], |
|
132 | + array( |
|
133 | + EE_Question_Option::new_instance(array( 'QSO_value' => 0, 'QSO_desc' => __('No', 'event_espresso'))), |
|
134 | + EE_Question_Option::new_instance(array( 'QSO_value' => 1, 'QSO_desc' => __('Yes', 'event_espresso'))), |
|
135 | + EE_Question_Option::new_instance(array( 'QSO_value' => 2, 'QSO_desc' => __('Show Only Expired', 'event_espresso'))), |
|
136 | + ), |
|
137 | + $this->get_field_name('show_expired'), |
|
138 | + $this->get_field_id('show_expired') |
|
139 | + ); |
|
140 | + ?> |
|
141 | 141 | </p> |
142 | 142 | <p> |
143 | 143 | <label for="<?php echo $this->get_field_id('sort'); ?>"> |
144 | 144 | <?php _e('Sort Events:', 'event_espresso'); ?> |
145 | 145 | </label> |
146 | 146 | <?php |
147 | - echo EEH_Form_Fields::select( |
|
148 | - __('Sort Events:', 'event_espresso'), |
|
149 | - $instance['sort'], |
|
150 | - $sort_values, |
|
151 | - $this->get_field_name('sort'), |
|
152 | - $this->get_field_id('sort') |
|
153 | - ); |
|
154 | - ?> |
|
147 | + echo EEH_Form_Fields::select( |
|
148 | + __('Sort Events:', 'event_espresso'), |
|
149 | + $instance['sort'], |
|
150 | + $sort_values, |
|
151 | + $this->get_field_name('sort'), |
|
152 | + $this->get_field_id('sort') |
|
153 | + ); |
|
154 | + ?> |
|
155 | 155 | </p> |
156 | 156 | <p> |
157 | 157 | <label for="<?php echo $this->get_field_id('image_size'); ?>"> |
158 | 158 | <?php _e('Image Size:', 'event_espresso'); ?> |
159 | 159 | </label> |
160 | 160 | <?php |
161 | - $image_sizes = array(); |
|
162 | - $sizes = get_intermediate_image_sizes(); |
|
163 | - if ($sizes) { |
|
164 | - // loop thru images and create option objects out of them |
|
165 | - foreach ($sizes as $image_size) { |
|
166 | - $image_size = trim($image_size); |
|
167 | - // no big images plz |
|
168 | - if (! in_array($image_size, array( 'large', 'post-thumbnail' ))) { |
|
169 | - $image_sizes[] = EE_Question_Option::new_instance(array( 'QSO_value' => $image_size, 'QSO_desc' => $image_size )); |
|
170 | - } |
|
171 | - } |
|
172 | - $image_sizes[] = EE_Question_Option::new_instance(array( 'QSO_value' => 'none', 'QSO_desc' => __('don\'t show images', 'event_espresso') )); |
|
173 | - } |
|
174 | - echo EEH_Form_Fields::select( |
|
175 | - __('Image Size:', 'event_espresso'), |
|
176 | - $instance['image_size'], |
|
177 | - $image_sizes, |
|
178 | - $this->get_field_name('image_size'), |
|
179 | - $this->get_field_id('image_size') |
|
180 | - ); |
|
181 | - ?> |
|
161 | + $image_sizes = array(); |
|
162 | + $sizes = get_intermediate_image_sizes(); |
|
163 | + if ($sizes) { |
|
164 | + // loop thru images and create option objects out of them |
|
165 | + foreach ($sizes as $image_size) { |
|
166 | + $image_size = trim($image_size); |
|
167 | + // no big images plz |
|
168 | + if (! in_array($image_size, array( 'large', 'post-thumbnail' ))) { |
|
169 | + $image_sizes[] = EE_Question_Option::new_instance(array( 'QSO_value' => $image_size, 'QSO_desc' => $image_size )); |
|
170 | + } |
|
171 | + } |
|
172 | + $image_sizes[] = EE_Question_Option::new_instance(array( 'QSO_value' => 'none', 'QSO_desc' => __('don\'t show images', 'event_espresso') )); |
|
173 | + } |
|
174 | + echo EEH_Form_Fields::select( |
|
175 | + __('Image Size:', 'event_espresso'), |
|
176 | + $instance['image_size'], |
|
177 | + $image_sizes, |
|
178 | + $this->get_field_name('image_size'), |
|
179 | + $this->get_field_id('image_size') |
|
180 | + ); |
|
181 | + ?> |
|
182 | 182 | |
183 | 183 | </p> |
184 | 184 | <p> |
@@ -186,42 +186,42 @@ discard block |
||
186 | 186 | <?php _e('Show Description:', 'event_espresso'); ?> |
187 | 187 | </label> |
188 | 188 | <?php |
189 | - echo EEH_Form_Fields::select( |
|
190 | - __('Show Description:', 'event_espresso'), |
|
191 | - $instance['show_desc'], |
|
192 | - $yes_no_values, |
|
193 | - $this->get_field_name('show_desc'), |
|
194 | - $this->get_field_id('show_desc') |
|
195 | - ); |
|
196 | - ?> |
|
189 | + echo EEH_Form_Fields::select( |
|
190 | + __('Show Description:', 'event_espresso'), |
|
191 | + $instance['show_desc'], |
|
192 | + $yes_no_values, |
|
193 | + $this->get_field_name('show_desc'), |
|
194 | + $this->get_field_id('show_desc') |
|
195 | + ); |
|
196 | + ?> |
|
197 | 197 | </p> |
198 | 198 | <p> |
199 | 199 | <label for="<?php echo $this->get_field_id('show_dates'); ?>"> |
200 | 200 | <?php _e('Show Dates:', 'event_espresso'); ?> |
201 | 201 | </label> |
202 | 202 | <?php |
203 | - echo EEH_Form_Fields::select( |
|
204 | - __('Show Dates:', 'event_espresso'), |
|
205 | - $instance['show_dates'], |
|
206 | - $yes_no_values, |
|
207 | - $this->get_field_name('show_dates'), |
|
208 | - $this->get_field_id('show_dates') |
|
209 | - ); |
|
210 | - ?> |
|
203 | + echo EEH_Form_Fields::select( |
|
204 | + __('Show Dates:', 'event_espresso'), |
|
205 | + $instance['show_dates'], |
|
206 | + $yes_no_values, |
|
207 | + $this->get_field_name('show_dates'), |
|
208 | + $this->get_field_id('show_dates') |
|
209 | + ); |
|
210 | + ?> |
|
211 | 211 | </p> |
212 | 212 | <p> |
213 | 213 | <label for="<?php echo $this->get_field_id('show_everywhere'); ?>"> |
214 | 214 | <?php _e('Show on all Pages:', 'event_espresso'); ?> |
215 | 215 | </label> |
216 | 216 | <?php |
217 | - echo EEH_Form_Fields::select( |
|
218 | - __('Show on all Pages:', 'event_espresso'), |
|
219 | - $instance['show_everywhere'], |
|
220 | - $yes_no_values, |
|
221 | - $this->get_field_name('show_everywhere'), |
|
222 | - $this->get_field_id('show_everywhere') |
|
223 | - ); |
|
224 | - ?> |
|
217 | + echo EEH_Form_Fields::select( |
|
218 | + __('Show on all Pages:', 'event_espresso'), |
|
219 | + $instance['show_everywhere'], |
|
220 | + $yes_no_values, |
|
221 | + $this->get_field_name('show_everywhere'), |
|
222 | + $this->get_field_id('show_everywhere') |
|
223 | + ); |
|
224 | + ?> |
|
225 | 225 | </p> |
226 | 226 | <p> |
227 | 227 | <label for="<?php echo $this->get_field_id('date_limit'); ?>"> |
@@ -234,198 +234,198 @@ discard block |
||
234 | 234 | <?php _e('Show Date Range:', 'event_espresso'); ?> |
235 | 235 | </label> |
236 | 236 | <?php |
237 | - echo EEH_Form_Fields::select( |
|
238 | - __('Show Date Range:', 'event_espresso'), |
|
239 | - $instance['date_range'], |
|
240 | - $yes_no_values, |
|
241 | - $this->get_field_name('date_range'), |
|
242 | - $this->get_field_id('date_range') |
|
243 | - ); |
|
244 | - ?><span class="description"><br /><?php _e('This setting will replace the list of dates in the widget.', 'event_espresso'); ?></span> |
|
237 | + echo EEH_Form_Fields::select( |
|
238 | + __('Show Date Range:', 'event_espresso'), |
|
239 | + $instance['date_range'], |
|
240 | + $yes_no_values, |
|
241 | + $this->get_field_name('date_range'), |
|
242 | + $this->get_field_id('date_range') |
|
243 | + ); |
|
244 | + ?><span class="description"><br /><?php _e('This setting will replace the list of dates in the widget.', 'event_espresso'); ?></span> |
|
245 | 245 | </p> |
246 | 246 | |
247 | 247 | <?php |
248 | - } |
|
248 | + } |
|
249 | 249 | |
250 | 250 | |
251 | 251 | |
252 | - /** |
|
253 | - * Sanitize widget form values as they are saved. |
|
254 | - * |
|
255 | - * @see WP_Widget::update() |
|
256 | - * |
|
257 | - * @param array $new_instance Values just sent to be saved. |
|
258 | - * @param array $old_instance Previously saved values from database. |
|
259 | - * |
|
260 | - * @return array Updated safe values to be saved. |
|
261 | - */ |
|
262 | - public function update($new_instance, $old_instance) |
|
263 | - { |
|
264 | - $instance = $old_instance; |
|
265 | - $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
266 | - $instance['category_name'] = $new_instance['category_name']; |
|
267 | - $instance['show_expired'] = $new_instance['show_expired']; |
|
268 | - $instance['limit'] = $new_instance['limit']; |
|
269 | - $instance['sort'] = $new_instance['sort']; |
|
270 | - $instance['image_size'] = $new_instance['image_size']; |
|
271 | - $instance['show_desc'] = $new_instance['show_desc']; |
|
272 | - $instance['show_dates'] = $new_instance['show_dates']; |
|
273 | - $instance['show_everywhere'] = $new_instance['show_everywhere']; |
|
274 | - $instance['date_limit'] = $new_instance['date_limit']; |
|
275 | - $instance['date_range'] = $new_instance['date_range']; |
|
276 | - return $instance; |
|
277 | - } |
|
252 | + /** |
|
253 | + * Sanitize widget form values as they are saved. |
|
254 | + * |
|
255 | + * @see WP_Widget::update() |
|
256 | + * |
|
257 | + * @param array $new_instance Values just sent to be saved. |
|
258 | + * @param array $old_instance Previously saved values from database. |
|
259 | + * |
|
260 | + * @return array Updated safe values to be saved. |
|
261 | + */ |
|
262 | + public function update($new_instance, $old_instance) |
|
263 | + { |
|
264 | + $instance = $old_instance; |
|
265 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
266 | + $instance['category_name'] = $new_instance['category_name']; |
|
267 | + $instance['show_expired'] = $new_instance['show_expired']; |
|
268 | + $instance['limit'] = $new_instance['limit']; |
|
269 | + $instance['sort'] = $new_instance['sort']; |
|
270 | + $instance['image_size'] = $new_instance['image_size']; |
|
271 | + $instance['show_desc'] = $new_instance['show_desc']; |
|
272 | + $instance['show_dates'] = $new_instance['show_dates']; |
|
273 | + $instance['show_everywhere'] = $new_instance['show_everywhere']; |
|
274 | + $instance['date_limit'] = $new_instance['date_limit']; |
|
275 | + $instance['date_range'] = $new_instance['date_range']; |
|
276 | + return $instance; |
|
277 | + } |
|
278 | 278 | |
279 | 279 | |
280 | 280 | |
281 | - /** |
|
282 | - * Front-end display of widget. |
|
283 | - * |
|
284 | - * @see WP_Widget::widget() |
|
285 | - * |
|
286 | - * @param array $args Widget arguments. |
|
287 | - * @param array $instance Saved values from database. |
|
288 | - */ |
|
289 | - public function widget($args, $instance) |
|
290 | - { |
|
281 | + /** |
|
282 | + * Front-end display of widget. |
|
283 | + * |
|
284 | + * @see WP_Widget::widget() |
|
285 | + * |
|
286 | + * @param array $args Widget arguments. |
|
287 | + * @param array $instance Saved values from database. |
|
288 | + */ |
|
289 | + public function widget($args, $instance) |
|
290 | + { |
|
291 | 291 | |
292 | - global $post; |
|
293 | - // make sure there is some kinda post object |
|
294 | - if ($post instanceof WP_Post) { |
|
295 | - $before_widget = ''; |
|
296 | - $before_title = ''; |
|
297 | - $after_title = ''; |
|
298 | - $after_widget = ''; |
|
299 | - // but NOT an events archives page, cuz that would be like two event lists on the same page |
|
300 | - $show_everywhere = isset($instance['show_everywhere']) ? (bool) absint($instance['show_everywhere']) : true; |
|
301 | - if ($show_everywhere || ! ( $post->post_type == 'espresso_events' && is_archive() )) { |
|
302 | - // let's use some of the event helper functions' |
|
303 | - // make separate vars out of attributes |
|
292 | + global $post; |
|
293 | + // make sure there is some kinda post object |
|
294 | + if ($post instanceof WP_Post) { |
|
295 | + $before_widget = ''; |
|
296 | + $before_title = ''; |
|
297 | + $after_title = ''; |
|
298 | + $after_widget = ''; |
|
299 | + // but NOT an events archives page, cuz that would be like two event lists on the same page |
|
300 | + $show_everywhere = isset($instance['show_everywhere']) ? (bool) absint($instance['show_everywhere']) : true; |
|
301 | + if ($show_everywhere || ! ( $post->post_type == 'espresso_events' && is_archive() )) { |
|
302 | + // let's use some of the event helper functions' |
|
303 | + // make separate vars out of attributes |
|
304 | 304 | |
305 | 305 | |
306 | - extract($args); |
|
306 | + extract($args); |
|
307 | 307 | |
308 | - // add function to make the title a link |
|
309 | - add_filter('widget_title', array($this, 'make_the_title_a_link'), 15); |
|
308 | + // add function to make the title a link |
|
309 | + add_filter('widget_title', array($this, 'make_the_title_a_link'), 15); |
|
310 | 310 | |
311 | - $title = isset($instance['title']) && ! empty($instance['title']) ? $instance['title'] : ''; |
|
312 | - // filter the title |
|
313 | - $title = apply_filters('widget_title', $title); |
|
311 | + $title = isset($instance['title']) && ! empty($instance['title']) ? $instance['title'] : ''; |
|
312 | + // filter the title |
|
313 | + $title = apply_filters('widget_title', $title); |
|
314 | 314 | |
315 | - // remove the function from the filter, so it does not affect other widgets |
|
316 | - remove_filter('widget_title', array($this, 'make_the_title_a_link'), 15); |
|
315 | + // remove the function from the filter, so it does not affect other widgets |
|
316 | + remove_filter('widget_title', array($this, 'make_the_title_a_link'), 15); |
|
317 | 317 | |
318 | - // Before widget (defined by themes). |
|
319 | - echo $before_widget; |
|
320 | - // Display the widget title if one was input (before and after defined by themes). |
|
321 | - if (! empty($title)) { |
|
322 | - echo $before_title . $title . $after_title; |
|
323 | - } |
|
324 | - // grab widget settings |
|
325 | - $category = isset($instance['category_name']) && ! empty($instance['category_name']) ? $instance['category_name'] : false; |
|
326 | - $show_expired = isset($instance['show_expired']) ? absint($instance['show_expired']) : 0; |
|
327 | - $image_size = isset($instance['image_size']) && ! empty($instance['image_size']) ? $instance['image_size'] : 'medium'; |
|
328 | - $show_desc = isset($instance['show_desc']) ? (bool) absint($instance['show_desc']) : true; |
|
329 | - $show_dates = isset($instance['show_dates']) ? (bool) absint($instance['show_dates']) : true; |
|
330 | - $date_limit = isset($instance['date_limit']) && ! empty($instance['date_limit']) ? $instance['date_limit'] : null; |
|
331 | - $date_range = isset($instance['date_range']) && ! empty($instance['date_range']) ? $instance['date_range'] : false; |
|
332 | - // start to build our where clause |
|
333 | - $where = array( |
|
318 | + // Before widget (defined by themes). |
|
319 | + echo $before_widget; |
|
320 | + // Display the widget title if one was input (before and after defined by themes). |
|
321 | + if (! empty($title)) { |
|
322 | + echo $before_title . $title . $after_title; |
|
323 | + } |
|
324 | + // grab widget settings |
|
325 | + $category = isset($instance['category_name']) && ! empty($instance['category_name']) ? $instance['category_name'] : false; |
|
326 | + $show_expired = isset($instance['show_expired']) ? absint($instance['show_expired']) : 0; |
|
327 | + $image_size = isset($instance['image_size']) && ! empty($instance['image_size']) ? $instance['image_size'] : 'medium'; |
|
328 | + $show_desc = isset($instance['show_desc']) ? (bool) absint($instance['show_desc']) : true; |
|
329 | + $show_dates = isset($instance['show_dates']) ? (bool) absint($instance['show_dates']) : true; |
|
330 | + $date_limit = isset($instance['date_limit']) && ! empty($instance['date_limit']) ? $instance['date_limit'] : null; |
|
331 | + $date_range = isset($instance['date_range']) && ! empty($instance['date_range']) ? $instance['date_range'] : false; |
|
332 | + // start to build our where clause |
|
333 | + $where = array( |
|
334 | 334 | // 'Datetime.DTT_is_primary' => 1, |
335 | - 'status' => array( 'IN', array( 'publish', 'sold_out' ) ) |
|
336 | - ); |
|
337 | - // add category |
|
338 | - if ($category) { |
|
339 | - $where['Term_Taxonomy.taxonomy'] = 'espresso_event_categories'; |
|
340 | - $where['Term_Taxonomy.Term.slug'] = $category; |
|
341 | - } |
|
342 | - // if NOT expired then we want events that start today or in the future |
|
343 | - // if NOT show expired then we want events that start today or in the future |
|
344 | - if ($show_expired == 0) { |
|
345 | - $where['Datetime.DTT_EVT_end'] = array( '>=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_end') ); |
|
346 | - } |
|
347 | - // if show ONLY expired we want events that ended prior to today |
|
348 | - if ($show_expired == 2) { |
|
349 | - $where['Datetime.DTT_EVT_end'] = array( '<=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_start') ); |
|
350 | - } |
|
351 | - // allow $where to be filtered |
|
352 | - $where = apply_filters('FHEE__EEW_Upcoming_Events__widget__where', $where, $category, $show_expired); |
|
353 | - // run the query |
|
354 | - $events = EE_Registry::instance()->load_model('Event')->get_all(array( |
|
355 | - $where, |
|
356 | - 'limit' => isset($instance['limit']) && $instance['limit'] > 0 |
|
357 | - ? '0,' . $instance['limit'] |
|
358 | - : '0,10', |
|
359 | - 'order_by' => 'Datetime.DTT_EVT_start', |
|
360 | - 'order' => isset($instance['sort']) ? $instance['sort'] : 'ASC', |
|
361 | - 'group_by' => 'EVT_ID' |
|
362 | - )); |
|
335 | + 'status' => array( 'IN', array( 'publish', 'sold_out' ) ) |
|
336 | + ); |
|
337 | + // add category |
|
338 | + if ($category) { |
|
339 | + $where['Term_Taxonomy.taxonomy'] = 'espresso_event_categories'; |
|
340 | + $where['Term_Taxonomy.Term.slug'] = $category; |
|
341 | + } |
|
342 | + // if NOT expired then we want events that start today or in the future |
|
343 | + // if NOT show expired then we want events that start today or in the future |
|
344 | + if ($show_expired == 0) { |
|
345 | + $where['Datetime.DTT_EVT_end'] = array( '>=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_end') ); |
|
346 | + } |
|
347 | + // if show ONLY expired we want events that ended prior to today |
|
348 | + if ($show_expired == 2) { |
|
349 | + $where['Datetime.DTT_EVT_end'] = array( '<=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_start') ); |
|
350 | + } |
|
351 | + // allow $where to be filtered |
|
352 | + $where = apply_filters('FHEE__EEW_Upcoming_Events__widget__where', $where, $category, $show_expired); |
|
353 | + // run the query |
|
354 | + $events = EE_Registry::instance()->load_model('Event')->get_all(array( |
|
355 | + $where, |
|
356 | + 'limit' => isset($instance['limit']) && $instance['limit'] > 0 |
|
357 | + ? '0,' . $instance['limit'] |
|
358 | + : '0,10', |
|
359 | + 'order_by' => 'Datetime.DTT_EVT_start', |
|
360 | + 'order' => isset($instance['sort']) ? $instance['sort'] : 'ASC', |
|
361 | + 'group_by' => 'EVT_ID' |
|
362 | + )); |
|
363 | 363 | |
364 | - if (! empty($events)) { |
|
365 | - echo '<ul class="ee-upcoming-events-widget-ul">'; |
|
366 | - foreach ($events as $event) { |
|
367 | - if ($event instanceof EE_Event && ( !is_single() || $post->ID != $event->ID() )) { |
|
368 | - // printr( $event, '$event <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
|
369 | - echo '<li id="ee-upcoming-events-widget-li-' . $event->ID() . '" class="ee-upcoming-events-widget-li">'; |
|
370 | - // how big is the event name ? |
|
371 | - $name_length = strlen($event->name()); |
|
372 | - switch ($name_length) { |
|
373 | - case $name_length > 70: |
|
374 | - $len_class = ' three-line'; |
|
375 | - break; |
|
376 | - case $name_length > 35: |
|
377 | - $len_class = ' two-line'; |
|
378 | - break; |
|
379 | - default: |
|
380 | - $len_class = ' one-line'; |
|
381 | - } |
|
382 | - $event_url = apply_filters('FHEE_EEW_Upcoming_Events__widget__event_url', $event->get_permalink(), $event); |
|
383 | - 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>'; |
|
384 | - if (post_password_required($event->ID())) { |
|
385 | - $pswd_form = apply_filters('FHEE_EEW_Upcoming_Events__widget__password_form', get_the_password_form($event->ID()), $event); |
|
386 | - echo $pswd_form; |
|
387 | - } else { |
|
388 | - if (has_post_thumbnail($event->ID()) && $image_size != 'none') { |
|
389 | - 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>'; |
|
390 | - } |
|
391 | - $desc = $event->short_description(25); |
|
392 | - if ($show_dates) { |
|
393 | - $date_format = apply_filters('FHEE__espresso_event_date_range__date_format', get_option('date_format')); |
|
394 | - $time_format = apply_filters('FHEE__espresso_event_date_range__time_format', get_option('time_format')); |
|
395 | - $single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', get_option('date_format')); |
|
396 | - $single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', get_option('time_format')); |
|
397 | - if ($date_range == true) { |
|
398 | - echo espresso_event_date_range($date_format, $time_format, $single_date_format, $single_time_format, $event->ID()); |
|
399 | - } else { |
|
400 | - echo espresso_list_of_event_dates($event->ID(), $date_format, $time_format, false, null, true, true, $date_limit); |
|
401 | - } |
|
402 | - } |
|
403 | - if ($show_desc && $desc) { |
|
404 | - echo '<p style="margin-top: .5em">' . $desc . '</p>'; |
|
405 | - } |
|
406 | - } |
|
407 | - echo '</li>'; |
|
408 | - } |
|
409 | - } |
|
410 | - echo '</ul>'; |
|
411 | - } |
|
412 | - // After widget (defined by themes). |
|
413 | - echo $after_widget; |
|
414 | - } |
|
415 | - } |
|
416 | - } |
|
364 | + if (! empty($events)) { |
|
365 | + echo '<ul class="ee-upcoming-events-widget-ul">'; |
|
366 | + foreach ($events as $event) { |
|
367 | + if ($event instanceof EE_Event && ( !is_single() || $post->ID != $event->ID() )) { |
|
368 | + // printr( $event, '$event <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
|
369 | + echo '<li id="ee-upcoming-events-widget-li-' . $event->ID() . '" class="ee-upcoming-events-widget-li">'; |
|
370 | + // how big is the event name ? |
|
371 | + $name_length = strlen($event->name()); |
|
372 | + switch ($name_length) { |
|
373 | + case $name_length > 70: |
|
374 | + $len_class = ' three-line'; |
|
375 | + break; |
|
376 | + case $name_length > 35: |
|
377 | + $len_class = ' two-line'; |
|
378 | + break; |
|
379 | + default: |
|
380 | + $len_class = ' one-line'; |
|
381 | + } |
|
382 | + $event_url = apply_filters('FHEE_EEW_Upcoming_Events__widget__event_url', $event->get_permalink(), $event); |
|
383 | + 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>'; |
|
384 | + if (post_password_required($event->ID())) { |
|
385 | + $pswd_form = apply_filters('FHEE_EEW_Upcoming_Events__widget__password_form', get_the_password_form($event->ID()), $event); |
|
386 | + echo $pswd_form; |
|
387 | + } else { |
|
388 | + if (has_post_thumbnail($event->ID()) && $image_size != 'none') { |
|
389 | + 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>'; |
|
390 | + } |
|
391 | + $desc = $event->short_description(25); |
|
392 | + if ($show_dates) { |
|
393 | + $date_format = apply_filters('FHEE__espresso_event_date_range__date_format', get_option('date_format')); |
|
394 | + $time_format = apply_filters('FHEE__espresso_event_date_range__time_format', get_option('time_format')); |
|
395 | + $single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', get_option('date_format')); |
|
396 | + $single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', get_option('time_format')); |
|
397 | + if ($date_range == true) { |
|
398 | + echo espresso_event_date_range($date_format, $time_format, $single_date_format, $single_time_format, $event->ID()); |
|
399 | + } else { |
|
400 | + echo espresso_list_of_event_dates($event->ID(), $date_format, $time_format, false, null, true, true, $date_limit); |
|
401 | + } |
|
402 | + } |
|
403 | + if ($show_desc && $desc) { |
|
404 | + echo '<p style="margin-top: .5em">' . $desc . '</p>'; |
|
405 | + } |
|
406 | + } |
|
407 | + echo '</li>'; |
|
408 | + } |
|
409 | + } |
|
410 | + echo '</ul>'; |
|
411 | + } |
|
412 | + // After widget (defined by themes). |
|
413 | + echo $after_widget; |
|
414 | + } |
|
415 | + } |
|
416 | + } |
|
417 | 417 | |
418 | 418 | |
419 | 419 | |
420 | - /** |
|
421 | - * make_the_title_a_link |
|
422 | - * callback for widget_title filter |
|
423 | - * |
|
424 | - * @param $title |
|
425 | - * @return string |
|
426 | - */ |
|
427 | - public function make_the_title_a_link($title) |
|
428 | - { |
|
429 | - return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>'; |
|
430 | - } |
|
420 | + /** |
|
421 | + * make_the_title_a_link |
|
422 | + * callback for widget_title filter |
|
423 | + * |
|
424 | + * @param $title |
|
425 | + * @return string |
|
426 | + */ |
|
427 | + public function make_the_title_a_link($title) |
|
428 | + { |
|
429 | + return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>'; |
|
430 | + } |
|
431 | 431 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | parent::__construct( |
37 | 37 | __('Event Espresso Upcoming Events', 'event_espresso'), |
38 | - array( 'description' => __('A widget to display your upcoming events.', 'event_espresso')) |
|
38 | + array('description' => __('A widget to display your upcoming events.', 'event_espresso')) |
|
39 | 39 | ); |
40 | 40 | } |
41 | 41 | |
@@ -71,12 +71,12 @@ discard block |
||
71 | 71 | // don't add HTML labels for EE_Form_Fields generated inputs |
72 | 72 | add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); |
73 | 73 | $yes_no_values = array( |
74 | - EE_Question_Option::new_instance(array( 'QSO_value' => false, 'QSO_desc' => __('No', 'event_espresso'))), |
|
75 | - EE_Question_Option::new_instance(array( 'QSO_value' => true, 'QSO_desc' => __('Yes', 'event_espresso'))) |
|
74 | + EE_Question_Option::new_instance(array('QSO_value' => false, 'QSO_desc' => __('No', 'event_espresso'))), |
|
75 | + EE_Question_Option::new_instance(array('QSO_value' => true, 'QSO_desc' => __('Yes', 'event_espresso'))) |
|
76 | 76 | ); |
77 | 77 | $sort_values = array( |
78 | - EE_Question_Option::new_instance(array( 'QSO_value' => 'ASC', 'QSO_desc' => __('ASC', 'event_espresso'))), |
|
79 | - EE_Question_Option::new_instance(array( 'QSO_value' => 'DESC', 'QSO_desc' => __('DESC', 'event_espresso'))) |
|
78 | + EE_Question_Option::new_instance(array('QSO_value' => 'ASC', 'QSO_desc' => __('ASC', 'event_espresso'))), |
|
79 | + EE_Question_Option::new_instance(array('QSO_value' => 'DESC', 'QSO_desc' => __('DESC', 'event_espresso'))) |
|
80 | 80 | ); |
81 | 81 | |
82 | 82 | ?> |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | if ($categories) { |
102 | 102 | foreach ($categories as $category) { |
103 | 103 | if ($category instanceof EE_Term) { |
104 | - $event_categories[] = EE_Question_Option::new_instance(array( 'QSO_value' => $category->get('slug'), 'QSO_desc' => $category->get('name'))); |
|
104 | + $event_categories[] = EE_Question_Option::new_instance(array('QSO_value' => $category->get('slug'), 'QSO_desc' => $category->get('name'))); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | } |
108 | - array_unshift($event_categories, EE_Question_Option::new_instance(array( 'QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso')))); |
|
108 | + array_unshift($event_categories, EE_Question_Option::new_instance(array('QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso')))); |
|
109 | 109 | echo EEH_Form_Fields::select( |
110 | 110 | __('Event Category:', 'event_espresso'), |
111 | 111 | $instance['category_name'], |
@@ -130,9 +130,9 @@ discard block |
||
130 | 130 | __('Show Expired Events:', 'event_espresso'), |
131 | 131 | $instance['show_expired'], |
132 | 132 | array( |
133 | - EE_Question_Option::new_instance(array( 'QSO_value' => 0, 'QSO_desc' => __('No', 'event_espresso'))), |
|
134 | - EE_Question_Option::new_instance(array( 'QSO_value' => 1, 'QSO_desc' => __('Yes', 'event_espresso'))), |
|
135 | - EE_Question_Option::new_instance(array( 'QSO_value' => 2, 'QSO_desc' => __('Show Only Expired', 'event_espresso'))), |
|
133 | + EE_Question_Option::new_instance(array('QSO_value' => 0, 'QSO_desc' => __('No', 'event_espresso'))), |
|
134 | + EE_Question_Option::new_instance(array('QSO_value' => 1, 'QSO_desc' => __('Yes', 'event_espresso'))), |
|
135 | + EE_Question_Option::new_instance(array('QSO_value' => 2, 'QSO_desc' => __('Show Only Expired', 'event_espresso'))), |
|
136 | 136 | ), |
137 | 137 | $this->get_field_name('show_expired'), |
138 | 138 | $this->get_field_id('show_expired') |
@@ -165,11 +165,11 @@ discard block |
||
165 | 165 | foreach ($sizes as $image_size) { |
166 | 166 | $image_size = trim($image_size); |
167 | 167 | // no big images plz |
168 | - if (! in_array($image_size, array( 'large', 'post-thumbnail' ))) { |
|
169 | - $image_sizes[] = EE_Question_Option::new_instance(array( 'QSO_value' => $image_size, 'QSO_desc' => $image_size )); |
|
168 | + if ( ! in_array($image_size, array('large', 'post-thumbnail'))) { |
|
169 | + $image_sizes[] = EE_Question_Option::new_instance(array('QSO_value' => $image_size, 'QSO_desc' => $image_size)); |
|
170 | 170 | } |
171 | 171 | } |
172 | - $image_sizes[] = EE_Question_Option::new_instance(array( 'QSO_value' => 'none', 'QSO_desc' => __('don\'t show images', 'event_espresso') )); |
|
172 | + $image_sizes[] = EE_Question_Option::new_instance(array('QSO_value' => 'none', 'QSO_desc' => __('don\'t show images', 'event_espresso'))); |
|
173 | 173 | } |
174 | 174 | echo EEH_Form_Fields::select( |
175 | 175 | __('Image Size:', 'event_espresso'), |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | $after_widget = ''; |
299 | 299 | // but NOT an events archives page, cuz that would be like two event lists on the same page |
300 | 300 | $show_everywhere = isset($instance['show_everywhere']) ? (bool) absint($instance['show_everywhere']) : true; |
301 | - if ($show_everywhere || ! ( $post->post_type == 'espresso_events' && is_archive() )) { |
|
301 | + if ($show_everywhere || ! ($post->post_type == 'espresso_events' && is_archive())) { |
|
302 | 302 | // let's use some of the event helper functions' |
303 | 303 | // make separate vars out of attributes |
304 | 304 | |
@@ -318,8 +318,8 @@ discard block |
||
318 | 318 | // Before widget (defined by themes). |
319 | 319 | echo $before_widget; |
320 | 320 | // Display the widget title if one was input (before and after defined by themes). |
321 | - if (! empty($title)) { |
|
322 | - echo $before_title . $title . $after_title; |
|
321 | + if ( ! empty($title)) { |
|
322 | + echo $before_title.$title.$after_title; |
|
323 | 323 | } |
324 | 324 | // grab widget settings |
325 | 325 | $category = isset($instance['category_name']) && ! empty($instance['category_name']) ? $instance['category_name'] : false; |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | // start to build our where clause |
333 | 333 | $where = array( |
334 | 334 | // 'Datetime.DTT_is_primary' => 1, |
335 | - 'status' => array( 'IN', array( 'publish', 'sold_out' ) ) |
|
335 | + 'status' => array('IN', array('publish', 'sold_out')) |
|
336 | 336 | ); |
337 | 337 | // add category |
338 | 338 | if ($category) { |
@@ -342,11 +342,11 @@ discard block |
||
342 | 342 | // if NOT expired then we want events that start today or in the future |
343 | 343 | // if NOT show expired then we want events that start today or in the future |
344 | 344 | if ($show_expired == 0) { |
345 | - $where['Datetime.DTT_EVT_end'] = array( '>=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_end') ); |
|
345 | + $where['Datetime.DTT_EVT_end'] = array('>=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_end')); |
|
346 | 346 | } |
347 | 347 | // if show ONLY expired we want events that ended prior to today |
348 | 348 | if ($show_expired == 2) { |
349 | - $where['Datetime.DTT_EVT_end'] = array( '<=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_start') ); |
|
349 | + $where['Datetime.DTT_EVT_end'] = array('<=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_start')); |
|
350 | 350 | } |
351 | 351 | // allow $where to be filtered |
352 | 352 | $where = apply_filters('FHEE__EEW_Upcoming_Events__widget__where', $where, $category, $show_expired); |
@@ -354,39 +354,39 @@ discard block |
||
354 | 354 | $events = EE_Registry::instance()->load_model('Event')->get_all(array( |
355 | 355 | $where, |
356 | 356 | 'limit' => isset($instance['limit']) && $instance['limit'] > 0 |
357 | - ? '0,' . $instance['limit'] |
|
357 | + ? '0,'.$instance['limit'] |
|
358 | 358 | : '0,10', |
359 | 359 | 'order_by' => 'Datetime.DTT_EVT_start', |
360 | 360 | 'order' => isset($instance['sort']) ? $instance['sort'] : 'ASC', |
361 | 361 | 'group_by' => 'EVT_ID' |
362 | 362 | )); |
363 | 363 | |
364 | - if (! empty($events)) { |
|
364 | + if ( ! empty($events)) { |
|
365 | 365 | echo '<ul class="ee-upcoming-events-widget-ul">'; |
366 | 366 | foreach ($events as $event) { |
367 | - if ($event instanceof EE_Event && ( !is_single() || $post->ID != $event->ID() )) { |
|
367 | + if ($event instanceof EE_Event && ( ! is_single() || $post->ID != $event->ID())) { |
|
368 | 368 | // printr( $event, '$event <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
369 | - echo '<li id="ee-upcoming-events-widget-li-' . $event->ID() . '" class="ee-upcoming-events-widget-li">'; |
|
369 | + echo '<li id="ee-upcoming-events-widget-li-'.$event->ID().'" class="ee-upcoming-events-widget-li">'; |
|
370 | 370 | // how big is the event name ? |
371 | 371 | $name_length = strlen($event->name()); |
372 | 372 | switch ($name_length) { |
373 | 373 | case $name_length > 70: |
374 | - $len_class = ' three-line'; |
|
374 | + $len_class = ' three-line'; |
|
375 | 375 | break; |
376 | 376 | case $name_length > 35: |
377 | - $len_class = ' two-line'; |
|
377 | + $len_class = ' two-line'; |
|
378 | 378 | break; |
379 | 379 | default: |
380 | - $len_class = ' one-line'; |
|
380 | + $len_class = ' one-line'; |
|
381 | 381 | } |
382 | 382 | $event_url = apply_filters('FHEE_EEW_Upcoming_Events__widget__event_url', $event->get_permalink(), $event); |
383 | - 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>'; |
|
383 | + 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>'; |
|
384 | 384 | if (post_password_required($event->ID())) { |
385 | 385 | $pswd_form = apply_filters('FHEE_EEW_Upcoming_Events__widget__password_form', get_the_password_form($event->ID()), $event); |
386 | 386 | echo $pswd_form; |
387 | 387 | } else { |
388 | 388 | if (has_post_thumbnail($event->ID()) && $image_size != 'none') { |
389 | - 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>'; |
|
389 | + 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>'; |
|
390 | 390 | } |
391 | 391 | $desc = $event->short_description(25); |
392 | 392 | if ($show_dates) { |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | } |
402 | 402 | } |
403 | 403 | if ($show_desc && $desc) { |
404 | - echo '<p style="margin-top: .5em">' . $desc . '</p>'; |
|
404 | + echo '<p style="margin-top: .5em">'.$desc.'</p>'; |
|
405 | 405 | } |
406 | 406 | } |
407 | 407 | echo '</li>'; |
@@ -426,6 +426,6 @@ discard block |
||
426 | 426 | */ |
427 | 427 | public function make_the_title_a_link($title) |
428 | 428 | { |
429 | - return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>'; |
|
429 | + return '<a href="'.EEH_Event_View::event_archive_url().'">'.$title.'</a>'; |
|
430 | 430 | } |
431 | 431 | } |
@@ -6,17 +6,17 @@ |
||
6 | 6 | interface EEI_Contact |
7 | 7 | { |
8 | 8 | |
9 | - public function fname(); |
|
9 | + public function fname(); |
|
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | - public function lname(); |
|
13 | + public function lname(); |
|
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | - public function email(); |
|
17 | + public function email(); |
|
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | - public function phone(); |
|
21 | + public function phone(); |
|
22 | 22 | } |
@@ -6,33 +6,33 @@ |
||
6 | 6 | interface EEI_Has_Address |
7 | 7 | { |
8 | 8 | |
9 | - public function address(); |
|
9 | + public function address(); |
|
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | - public function address2(); |
|
13 | + public function address2(); |
|
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | - public function city(); |
|
17 | + public function city(); |
|
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | - public function state_ID(); |
|
21 | + public function state_ID(); |
|
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | - public function state_obj(); |
|
25 | + public function state_obj(); |
|
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | - public function country_ID(); |
|
29 | + public function country_ID(); |
|
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | - public function country_obj(); |
|
33 | + public function country_obj(); |
|
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | - public function zip(); |
|
37 | + public function zip(); |
|
38 | 38 | } |