@@ -1,7 +1,7 @@ |
||
1 | 1 | <div class="padding"> |
2 | - <h3><?php esc_html_e( 'Frequently Asked Questions about Event Espresso', 'event_espresso' ); ?></h3> |
|
2 | + <h3><?php esc_html_e('Frequently Asked Questions about Event Espresso', 'event_espresso'); ?></h3> |
|
3 | 3 | |
4 | - <h4><?php esc_html_e( 'New to Event Espresso?', 'event_espresso' ); ?></h4> |
|
4 | + <h4><?php esc_html_e('New to Event Espresso?', 'event_espresso'); ?></h4> |
|
5 | 5 | |
6 | - <p><?php printf( esc_html__( 'Check out the %1$squick start guide for Event Espresso 4%2$s. It has recommendations, tips, and tutorials so you can get your project started %3$squicker%4$s.', 'event_espresso' ), '<a href="https://eventespresso.com/wiki/welcome-to-event-espresso/#event-espresso-4" target="_blank">','</a>','<em>','</em>' ); ?></p> |
|
6 | + <p><?php printf(esc_html__('Check out the %1$squick start guide for Event Espresso 4%2$s. It has recommendations, tips, and tutorials so you can get your project started %3$squicker%4$s.', 'event_espresso'), '<a href="https://eventespresso.com/wiki/welcome-to-event-espresso/#event-espresso-4" target="_blank">', '</a>', '<em>', '</em>'); ?></p> |
|
7 | 7 | </div> |
8 | 8 | \ No newline at end of file |
@@ -3,33 +3,33 @@ |
||
3 | 3 | global $post; |
4 | 4 | ?> |
5 | 5 | <div class="event-content"> |
6 | -<?php if ( apply_filters( 'FHEE__content_espresso_events_details_template__display_entry_meta', TRUE )): ?> |
|
6 | +<?php if (apply_filters('FHEE__content_espresso_events_details_template__display_entry_meta', TRUE)): ?> |
|
7 | 7 | <div class="entry-meta"> |
8 | - <span class="tags-links"><?php espresso_event_categories( $post->ID, TRUE, TRUE ); ?></span> |
|
8 | + <span class="tags-links"><?php espresso_event_categories($post->ID, TRUE, TRUE); ?></span> |
|
9 | 9 | <?php |
10 | - if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : |
|
10 | + if ( ! post_password_required() && (comments_open() || get_comments_number())) : |
|
11 | 11 | ?> |
12 | - <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'event_espresso' ), __( '1 Comment', 'event_espresso' ), __( '% Comments', 'event_espresso' ) ); ?></span> |
|
12 | + <span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'event_espresso'), __('1 Comment', 'event_espresso'), __('% Comments', 'event_espresso')); ?></span> |
|
13 | 13 | <?php |
14 | 14 | endif; |
15 | - edit_post_link( __( 'Edit', 'event_espresso' ), '<span class="edit-link">', '</span>' ); |
|
15 | + edit_post_link(__('Edit', 'event_espresso'), '<span class="edit-link">', '</span>'); |
|
16 | 16 | ?> |
17 | 17 | </div> |
18 | 18 | <?php endif; |
19 | - $event_phone = espresso_event_phone( $post->ID, FALSE ); |
|
20 | - if ( $event_phone != '' ) : ?> |
|
19 | + $event_phone = espresso_event_phone($post->ID, FALSE); |
|
20 | + if ($event_phone != '') : ?> |
|
21 | 21 | <p> |
22 | - <span class="small-text"><strong><?php _e( 'Event Phone:', 'event_espresso' ); ?> </strong></span> <?php echo $event_phone; ?> |
|
22 | + <span class="small-text"><strong><?php _e('Event Phone:', 'event_espresso'); ?> </strong></span> <?php echo $event_phone; ?> |
|
23 | 23 | </p> |
24 | -<?php endif; ?> |
|
24 | +<?php endif; ?> |
|
25 | 25 | <?php |
26 | - if ( apply_filters( 'FHEE__content_espresso_events_details_template__display_the_content', true ) ) { |
|
27 | - do_action( 'AHEE_event_details_before_the_content', $post ); |
|
26 | + if (apply_filters('FHEE__content_espresso_events_details_template__display_the_content', true)) { |
|
27 | + do_action('AHEE_event_details_before_the_content', $post); |
|
28 | 28 | echo apply_filters( |
29 | 29 | 'FHEE__content_espresso_events_details_template__the_content', |
30 | - espresso_event_content_or_excerpt( 55, null, false ) |
|
30 | + espresso_event_content_or_excerpt(55, null, false) |
|
31 | 31 | ); |
32 | - do_action( 'AHEE_event_details_after_the_content', $post ); |
|
32 | + do_action('AHEE_event_details_after_the_content', $post); |
|
33 | 33 | } |
34 | 34 | ?> |
35 | 35 | </div> |
@@ -30,224 +30,224 @@ |
||
30 | 30 | class AdminOptionsSettings extends FormHandler |
31 | 31 | { |
32 | 32 | |
33 | - protected $template_args = array(); |
|
34 | - |
|
35 | - /** |
|
36 | - * Form constructor. |
|
37 | - * |
|
38 | - * @param \EE_Registry $registry |
|
39 | - */ |
|
40 | - public function __construct(\EE_Registry $registry) { |
|
41 | - parent::__construct( |
|
42 | - esc_html__('Admin Options', 'event_espresso'), |
|
43 | - esc_html__('Admin Options', 'event_espresso'), |
|
44 | - 'admin_option_settings', |
|
45 | - '', |
|
46 | - FormHandler::DO_NOT_SETUP_FORM, |
|
47 | - $registry |
|
48 | - ); |
|
49 | - } |
|
50 | - |
|
51 | - |
|
52 | - |
|
53 | - /** |
|
54 | - * @param array $template_args |
|
55 | - */ |
|
56 | - public function setTemplateArgs(array $template_args) |
|
57 | - { |
|
58 | - $this->template_args = $template_args; |
|
59 | - } |
|
60 | - |
|
61 | - |
|
62 | - |
|
63 | - /** |
|
64 | - * creates and returns the actual form |
|
65 | - * |
|
66 | - * @return EE_Form_Section_Proper |
|
67 | - * @throws \EE_Error |
|
68 | - */ |
|
69 | - public function generate() |
|
70 | - { |
|
71 | - $form = new \EE_Form_Section_Proper( |
|
72 | - array( |
|
73 | - 'name' => 'admin_option_settings', |
|
74 | - 'html_id' => 'admin_option_settings', |
|
75 | - 'layout_strategy' => new EE_Admin_Two_Column_Layout(), |
|
76 | - 'subsections' => array( |
|
77 | - 'help_tour_activation_hdr' => new EE_Form_Section_HTML( |
|
78 | - EEH_HTML::h2( |
|
79 | - esc_html__('Help Tour Global Activation', 'event_espresso') |
|
80 | - . ' ' |
|
81 | - . EEH_HTML::span( |
|
82 | - EEH_Template::get_help_tab_link('help_tour_activation_info'), |
|
83 | - 'help_tour_activation' |
|
84 | - ), |
|
85 | - '', 'ee-admin-settings-hdr' |
|
86 | - ) |
|
87 | - ), |
|
88 | - 'help_tour_activation' => new EE_Yes_No_Input( |
|
89 | - array( |
|
90 | - 'html_label_text' => esc_html__('Activate Global Help Tours?', 'event_espresso'), |
|
91 | - 'html_help_text' => esc_html__( |
|
92 | - 'This toggles whether the Event Espresso help tours are active globally or not.', |
|
93 | - 'event_espresso' |
|
94 | - ), |
|
95 | - 'default' => isset($this->registry->CFG->admin->help_tour_activation) |
|
96 | - ? filter_var($this->registry->CFG->admin->help_tour_activation, FILTER_VALIDATE_BOOLEAN) |
|
97 | - : true, |
|
98 | - 'required' => false |
|
99 | - ) |
|
100 | - ), |
|
101 | - 'compatibility_hdr' => new EE_Form_Section_HTML( |
|
102 | - EEH_HTML::h2( |
|
103 | - esc_html__('Compatibility Settings', 'event_espresso'), |
|
104 | - '', 'ee-admin-settings-hdr' |
|
105 | - ) |
|
106 | - ), |
|
107 | - 'encode_session_data' => new EE_Yes_No_Input( |
|
108 | - array( |
|
109 | - 'html_label_text' => esc_html__('Encode Session Data?', 'event_espresso'), |
|
110 | - 'html_help_text' => sprintf( |
|
111 | - esc_html__( |
|
112 | - 'Some servers and database configurations can cause problems when saving the Event Espresso session data. Setting this option to "Yes" adds an extra layer of encoding to session data to prevent serialization errors, but can be incompatible with some server configurations.%1$sIf you receive "500 internal server" type errors during registration, try turning this option on.%1$sIf you get fatal PHP errors regarding missing base64 functions, then turn this option off.', |
|
113 | - 'event_espresso' |
|
114 | - ), |
|
115 | - '<br>' |
|
116 | - ), |
|
117 | - 'default' => $this->registry->CFG->admin->encode_session_data(), |
|
118 | - 'required' => false |
|
119 | - ) |
|
120 | - ), |
|
121 | - ) |
|
122 | - ) |
|
123 | - ); |
|
124 | - if ( |
|
125 | - $this->registry->CAP->current_user_can( |
|
126 | - 'manage_options', |
|
127 | - 'display_admin_settings_options_promote_and_affiliate' |
|
128 | - ) |
|
129 | - ) { |
|
130 | - $form->add_subsections( |
|
131 | - array( |
|
132 | - 'promote_ee_hdr' => new EE_Form_Section_HTML( |
|
133 | - EEH_HTML::h2( |
|
134 | - esc_html__('Promote Event Espresso', 'event_espresso') |
|
135 | - . ' ' |
|
136 | - . EEH_HTML::span( |
|
137 | - EEH_Template::get_help_tab_link('affiliate_info'), |
|
138 | - 'affiliate_info' |
|
139 | - ), |
|
140 | - '', 'ee-admin-settings-hdr' |
|
141 | - ) |
|
142 | - ), |
|
143 | - 'show_reg_footer' => new EE_Yes_No_Input( |
|
144 | - array( |
|
145 | - 'html_label_text' => esc_html__( |
|
146 | - 'Link to Event Espresso in your Registration Page?', |
|
147 | - 'event_espresso' |
|
148 | - ) |
|
149 | - . EEH_Template::get_help_tab_link('email_validation_info'), |
|
150 | - 'html_help_text' => esc_html__( |
|
151 | - 'adds an unobtrusive link to Event Espresso\'s website in the footer of your registration form. Get an affiliate link (see below) and make money if people click the link and purchase Event Espresso.', |
|
152 | - 'event_espresso' |
|
153 | - ), |
|
154 | - 'default' => isset($this->registry->CFG->admin->show_reg_footer) |
|
155 | - ? filter_var($this->registry->CFG->admin->show_reg_footer, FILTER_VALIDATE_BOOLEAN) |
|
156 | - : true, |
|
157 | - 'required' => false |
|
158 | - ) |
|
159 | - ), |
|
160 | - 'affiliate_id' => new EE_Text_Input( |
|
161 | - array( |
|
162 | - 'html_label_text' => sprintf( |
|
163 | - esc_html__('Event Espresso %sAffiliate%s ID', 'event_espresso'), |
|
164 | - '<a href="http://eventespresso.com/affiliates/" target="_blank">', |
|
165 | - '</a>' |
|
166 | - ), |
|
167 | - 'html_help_text' => esc_html__( |
|
168 | - 'Earn cash for promoting Event Espresso.', |
|
169 | - 'event_espresso' |
|
170 | - ), |
|
171 | - 'html_class' => 'regular-text', |
|
172 | - 'default' => isset($this->registry->CFG->admin->affiliate_id) |
|
173 | - ? $this->registry->CFG->admin->get_pretty('affiliate_id') |
|
174 | - : '', |
|
175 | - 'required' => false |
|
176 | - ) |
|
177 | - ), |
|
178 | - ), |
|
179 | - 'help_tour_activation_hdr' |
|
180 | - ); |
|
181 | - } |
|
182 | - return $form; |
|
183 | - } |
|
184 | - |
|
185 | - |
|
186 | - |
|
187 | - /** |
|
188 | - * takes the generated form and displays it along with ony other non-form HTML that may be required |
|
189 | - * returns a string of HTML that can be directly echoed in a template |
|
190 | - * |
|
191 | - * @return string |
|
192 | - * @throws LogicException |
|
193 | - * @throws \EE_Error |
|
194 | - */ |
|
195 | - public function display() |
|
196 | - { |
|
197 | - add_filter( |
|
198 | - 'FHEE__EventEspresso_core_libraries_form_sections_form_handlers_FormHandler__display__before_form', |
|
199 | - array($this, 'handleOldAdminOptionsSettingsAction') |
|
200 | - ); |
|
201 | - return parent::display(); |
|
202 | - } |
|
203 | - |
|
204 | - |
|
205 | - |
|
206 | - /** |
|
207 | - * @return string |
|
208 | - */ |
|
209 | - public function handleOldAdminOptionsSettingsAction() |
|
210 | - { |
|
211 | - ob_start(); |
|
212 | - do_action('AHEE__admin_option_settings__template__before', $this->template_args); |
|
213 | - return ob_get_clean(); |
|
214 | - } |
|
215 | - |
|
216 | - |
|
217 | - |
|
218 | - /** |
|
219 | - * handles processing the form submission |
|
220 | - * returns true or false depending on whether the form was processed successfully or not |
|
221 | - * |
|
222 | - * @param array $form_data |
|
223 | - * @return bool |
|
224 | - * @throws InvalidFormSubmissionException |
|
225 | - * @throws EE_Error |
|
226 | - * @throws LogicException |
|
227 | - * @throws InvalidArgumentException |
|
228 | - * @throws InvalidDataTypeException |
|
229 | - */ |
|
230 | - public function process($form_data = array()) |
|
231 | - { |
|
232 | - // process form |
|
233 | - $valid_data = (array)parent::process($form_data); |
|
234 | - if (empty($valid_data)) { |
|
235 | - return false; |
|
236 | - } |
|
237 | - $this->registry->CFG->admin->show_reg_footer = isset( $form_data['show_reg_footer'] ) |
|
238 | - ? absint( $form_data['show_reg_footer'] ) |
|
239 | - : $this->registry->CFG->admin->show_reg_footer; |
|
240 | - $this->registry->CFG->admin->affiliate_id = isset( $form_data['affiliate_id'] ) |
|
241 | - ? sanitize_text_field( $form_data['affiliate_id'] ) |
|
242 | - : $this->registry->CFG->admin->affiliate_id; |
|
243 | - $this->registry->CFG->admin->help_tour_activation = isset( $form_data['help_tour_activation'] ) |
|
244 | - ? absint( $form_data['help_tour_activation']) |
|
245 | - : $this->registry->CFG->admin->help_tour_activation; |
|
246 | - if (isset($form_data['encode_session_data'])) { |
|
247 | - $this->registry->CFG->admin->set_encode_session_data($form_data['encode_session_data']); |
|
248 | - } |
|
249 | - return false; |
|
250 | - } |
|
33 | + protected $template_args = array(); |
|
34 | + |
|
35 | + /** |
|
36 | + * Form constructor. |
|
37 | + * |
|
38 | + * @param \EE_Registry $registry |
|
39 | + */ |
|
40 | + public function __construct(\EE_Registry $registry) { |
|
41 | + parent::__construct( |
|
42 | + esc_html__('Admin Options', 'event_espresso'), |
|
43 | + esc_html__('Admin Options', 'event_espresso'), |
|
44 | + 'admin_option_settings', |
|
45 | + '', |
|
46 | + FormHandler::DO_NOT_SETUP_FORM, |
|
47 | + $registry |
|
48 | + ); |
|
49 | + } |
|
50 | + |
|
51 | + |
|
52 | + |
|
53 | + /** |
|
54 | + * @param array $template_args |
|
55 | + */ |
|
56 | + public function setTemplateArgs(array $template_args) |
|
57 | + { |
|
58 | + $this->template_args = $template_args; |
|
59 | + } |
|
60 | + |
|
61 | + |
|
62 | + |
|
63 | + /** |
|
64 | + * creates and returns the actual form |
|
65 | + * |
|
66 | + * @return EE_Form_Section_Proper |
|
67 | + * @throws \EE_Error |
|
68 | + */ |
|
69 | + public function generate() |
|
70 | + { |
|
71 | + $form = new \EE_Form_Section_Proper( |
|
72 | + array( |
|
73 | + 'name' => 'admin_option_settings', |
|
74 | + 'html_id' => 'admin_option_settings', |
|
75 | + 'layout_strategy' => new EE_Admin_Two_Column_Layout(), |
|
76 | + 'subsections' => array( |
|
77 | + 'help_tour_activation_hdr' => new EE_Form_Section_HTML( |
|
78 | + EEH_HTML::h2( |
|
79 | + esc_html__('Help Tour Global Activation', 'event_espresso') |
|
80 | + . ' ' |
|
81 | + . EEH_HTML::span( |
|
82 | + EEH_Template::get_help_tab_link('help_tour_activation_info'), |
|
83 | + 'help_tour_activation' |
|
84 | + ), |
|
85 | + '', 'ee-admin-settings-hdr' |
|
86 | + ) |
|
87 | + ), |
|
88 | + 'help_tour_activation' => new EE_Yes_No_Input( |
|
89 | + array( |
|
90 | + 'html_label_text' => esc_html__('Activate Global Help Tours?', 'event_espresso'), |
|
91 | + 'html_help_text' => esc_html__( |
|
92 | + 'This toggles whether the Event Espresso help tours are active globally or not.', |
|
93 | + 'event_espresso' |
|
94 | + ), |
|
95 | + 'default' => isset($this->registry->CFG->admin->help_tour_activation) |
|
96 | + ? filter_var($this->registry->CFG->admin->help_tour_activation, FILTER_VALIDATE_BOOLEAN) |
|
97 | + : true, |
|
98 | + 'required' => false |
|
99 | + ) |
|
100 | + ), |
|
101 | + 'compatibility_hdr' => new EE_Form_Section_HTML( |
|
102 | + EEH_HTML::h2( |
|
103 | + esc_html__('Compatibility Settings', 'event_espresso'), |
|
104 | + '', 'ee-admin-settings-hdr' |
|
105 | + ) |
|
106 | + ), |
|
107 | + 'encode_session_data' => new EE_Yes_No_Input( |
|
108 | + array( |
|
109 | + 'html_label_text' => esc_html__('Encode Session Data?', 'event_espresso'), |
|
110 | + 'html_help_text' => sprintf( |
|
111 | + esc_html__( |
|
112 | + 'Some servers and database configurations can cause problems when saving the Event Espresso session data. Setting this option to "Yes" adds an extra layer of encoding to session data to prevent serialization errors, but can be incompatible with some server configurations.%1$sIf you receive "500 internal server" type errors during registration, try turning this option on.%1$sIf you get fatal PHP errors regarding missing base64 functions, then turn this option off.', |
|
113 | + 'event_espresso' |
|
114 | + ), |
|
115 | + '<br>' |
|
116 | + ), |
|
117 | + 'default' => $this->registry->CFG->admin->encode_session_data(), |
|
118 | + 'required' => false |
|
119 | + ) |
|
120 | + ), |
|
121 | + ) |
|
122 | + ) |
|
123 | + ); |
|
124 | + if ( |
|
125 | + $this->registry->CAP->current_user_can( |
|
126 | + 'manage_options', |
|
127 | + 'display_admin_settings_options_promote_and_affiliate' |
|
128 | + ) |
|
129 | + ) { |
|
130 | + $form->add_subsections( |
|
131 | + array( |
|
132 | + 'promote_ee_hdr' => new EE_Form_Section_HTML( |
|
133 | + EEH_HTML::h2( |
|
134 | + esc_html__('Promote Event Espresso', 'event_espresso') |
|
135 | + . ' ' |
|
136 | + . EEH_HTML::span( |
|
137 | + EEH_Template::get_help_tab_link('affiliate_info'), |
|
138 | + 'affiliate_info' |
|
139 | + ), |
|
140 | + '', 'ee-admin-settings-hdr' |
|
141 | + ) |
|
142 | + ), |
|
143 | + 'show_reg_footer' => new EE_Yes_No_Input( |
|
144 | + array( |
|
145 | + 'html_label_text' => esc_html__( |
|
146 | + 'Link to Event Espresso in your Registration Page?', |
|
147 | + 'event_espresso' |
|
148 | + ) |
|
149 | + . EEH_Template::get_help_tab_link('email_validation_info'), |
|
150 | + 'html_help_text' => esc_html__( |
|
151 | + 'adds an unobtrusive link to Event Espresso\'s website in the footer of your registration form. Get an affiliate link (see below) and make money if people click the link and purchase Event Espresso.', |
|
152 | + 'event_espresso' |
|
153 | + ), |
|
154 | + 'default' => isset($this->registry->CFG->admin->show_reg_footer) |
|
155 | + ? filter_var($this->registry->CFG->admin->show_reg_footer, FILTER_VALIDATE_BOOLEAN) |
|
156 | + : true, |
|
157 | + 'required' => false |
|
158 | + ) |
|
159 | + ), |
|
160 | + 'affiliate_id' => new EE_Text_Input( |
|
161 | + array( |
|
162 | + 'html_label_text' => sprintf( |
|
163 | + esc_html__('Event Espresso %sAffiliate%s ID', 'event_espresso'), |
|
164 | + '<a href="http://eventespresso.com/affiliates/" target="_blank">', |
|
165 | + '</a>' |
|
166 | + ), |
|
167 | + 'html_help_text' => esc_html__( |
|
168 | + 'Earn cash for promoting Event Espresso.', |
|
169 | + 'event_espresso' |
|
170 | + ), |
|
171 | + 'html_class' => 'regular-text', |
|
172 | + 'default' => isset($this->registry->CFG->admin->affiliate_id) |
|
173 | + ? $this->registry->CFG->admin->get_pretty('affiliate_id') |
|
174 | + : '', |
|
175 | + 'required' => false |
|
176 | + ) |
|
177 | + ), |
|
178 | + ), |
|
179 | + 'help_tour_activation_hdr' |
|
180 | + ); |
|
181 | + } |
|
182 | + return $form; |
|
183 | + } |
|
184 | + |
|
185 | + |
|
186 | + |
|
187 | + /** |
|
188 | + * takes the generated form and displays it along with ony other non-form HTML that may be required |
|
189 | + * returns a string of HTML that can be directly echoed in a template |
|
190 | + * |
|
191 | + * @return string |
|
192 | + * @throws LogicException |
|
193 | + * @throws \EE_Error |
|
194 | + */ |
|
195 | + public function display() |
|
196 | + { |
|
197 | + add_filter( |
|
198 | + 'FHEE__EventEspresso_core_libraries_form_sections_form_handlers_FormHandler__display__before_form', |
|
199 | + array($this, 'handleOldAdminOptionsSettingsAction') |
|
200 | + ); |
|
201 | + return parent::display(); |
|
202 | + } |
|
203 | + |
|
204 | + |
|
205 | + |
|
206 | + /** |
|
207 | + * @return string |
|
208 | + */ |
|
209 | + public function handleOldAdminOptionsSettingsAction() |
|
210 | + { |
|
211 | + ob_start(); |
|
212 | + do_action('AHEE__admin_option_settings__template__before', $this->template_args); |
|
213 | + return ob_get_clean(); |
|
214 | + } |
|
215 | + |
|
216 | + |
|
217 | + |
|
218 | + /** |
|
219 | + * handles processing the form submission |
|
220 | + * returns true or false depending on whether the form was processed successfully or not |
|
221 | + * |
|
222 | + * @param array $form_data |
|
223 | + * @return bool |
|
224 | + * @throws InvalidFormSubmissionException |
|
225 | + * @throws EE_Error |
|
226 | + * @throws LogicException |
|
227 | + * @throws InvalidArgumentException |
|
228 | + * @throws InvalidDataTypeException |
|
229 | + */ |
|
230 | + public function process($form_data = array()) |
|
231 | + { |
|
232 | + // process form |
|
233 | + $valid_data = (array)parent::process($form_data); |
|
234 | + if (empty($valid_data)) { |
|
235 | + return false; |
|
236 | + } |
|
237 | + $this->registry->CFG->admin->show_reg_footer = isset( $form_data['show_reg_footer'] ) |
|
238 | + ? absint( $form_data['show_reg_footer'] ) |
|
239 | + : $this->registry->CFG->admin->show_reg_footer; |
|
240 | + $this->registry->CFG->admin->affiliate_id = isset( $form_data['affiliate_id'] ) |
|
241 | + ? sanitize_text_field( $form_data['affiliate_id'] ) |
|
242 | + : $this->registry->CFG->admin->affiliate_id; |
|
243 | + $this->registry->CFG->admin->help_tour_activation = isset( $form_data['help_tour_activation'] ) |
|
244 | + ? absint( $form_data['help_tour_activation']) |
|
245 | + : $this->registry->CFG->admin->help_tour_activation; |
|
246 | + if (isset($form_data['encode_session_data'])) { |
|
247 | + $this->registry->CFG->admin->set_encode_session_data($form_data['encode_session_data']); |
|
248 | + } |
|
249 | + return false; |
|
250 | + } |
|
251 | 251 | |
252 | 252 | } |
253 | 253 | // End of file AdminOptionsSettings.php |
@@ -230,18 +230,18 @@ |
||
230 | 230 | public function process($form_data = array()) |
231 | 231 | { |
232 | 232 | // process form |
233 | - $valid_data = (array)parent::process($form_data); |
|
233 | + $valid_data = (array) parent::process($form_data); |
|
234 | 234 | if (empty($valid_data)) { |
235 | 235 | return false; |
236 | 236 | } |
237 | - $this->registry->CFG->admin->show_reg_footer = isset( $form_data['show_reg_footer'] ) |
|
238 | - ? absint( $form_data['show_reg_footer'] ) |
|
237 | + $this->registry->CFG->admin->show_reg_footer = isset($form_data['show_reg_footer']) |
|
238 | + ? absint($form_data['show_reg_footer']) |
|
239 | 239 | : $this->registry->CFG->admin->show_reg_footer; |
240 | - $this->registry->CFG->admin->affiliate_id = isset( $form_data['affiliate_id'] ) |
|
241 | - ? sanitize_text_field( $form_data['affiliate_id'] ) |
|
240 | + $this->registry->CFG->admin->affiliate_id = isset($form_data['affiliate_id']) |
|
241 | + ? sanitize_text_field($form_data['affiliate_id']) |
|
242 | 242 | : $this->registry->CFG->admin->affiliate_id; |
243 | - $this->registry->CFG->admin->help_tour_activation = isset( $form_data['help_tour_activation'] ) |
|
244 | - ? absint( $form_data['help_tour_activation']) |
|
243 | + $this->registry->CFG->admin->help_tour_activation = isset($form_data['help_tour_activation']) |
|
244 | + ? absint($form_data['help_tour_activation']) |
|
245 | 245 | : $this->registry->CFG->admin->help_tour_activation; |
246 | 246 | if (isset($form_data['encode_session_data'])) { |
247 | 247 | $this->registry->CFG->admin->set_encode_session_data($form_data['encode_session_data']); |
@@ -8,19 +8,19 @@ 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_Input extends EE_Form_Input_Base{ |
|
11 | +class EE_Text_Input extends EE_Form_Input_Base { |
|
12 | 12 | |
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @param array $options |
16 | 16 | */ |
17 | - public function __construct($options = array()){ |
|
17 | + public function __construct($options = array()) { |
|
18 | 18 | $this->_set_display_strategy(new EE_Text_Input_Display_Strategy()); |
19 | 19 | $this->_set_normalization_strategy(new EE_Text_Normalization()); |
20 | 20 | parent::__construct($options); |
21 | 21 | //if the input hasn't specifically mentioned a more lenient validation strategy, |
22 | 22 | //apply plaintext validation strategy |
23 | - if( ! $this->has_validation_strategy( |
|
23 | + if ( ! $this->has_validation_strategy( |
|
24 | 24 | array( |
25 | 25 | 'EE_Full_HTML_Validation_Strategy', |
26 | 26 | 'EE_Simple_HTML_Validation_Strategy' |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | ) { |
30 | 30 | //by default we use the plaintext validation. If you want something else, |
31 | 31 | //just remove it after the input is constructed :P using EE_Form_Input_Base::remove_validation_strategy() |
32 | - $this->_add_validation_strategy( new EE_Plaintext_Validation_Strategy() ); |
|
32 | + $this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy()); |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 |
@@ -8,8 +8,8 @@ |
||
8 | 8 | foreach( $form_section->subsections() as $subsection ) { |
9 | 9 | if( $subsection instanceof EE_Form_Input_Base ) { |
10 | 10 | if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_All_Sensitive_Data_Removal |
11 | - || $subsection->get_sensitive_data_removal_strategy() instanceof EE_CCV_Sensitive_Data_Removal |
|
12 | - || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy ){ |
|
11 | + || $subsection->get_sensitive_data_removal_strategy() instanceof EE_CCV_Sensitive_Data_Removal |
|
12 | + || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy ){ |
|
13 | 13 | continue; |
14 | 14 | } |
15 | 15 | if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_Credit_Card_Sensitive_Data_Removal ) { |
@@ -1,38 +1,38 @@ |
||
1 | 1 | <div id="admin-side-mbox-billing-info-dv" class="admin-side-mbox-dv"> |
2 | -<?php if ( empty($billing_form) ) : ?> |
|
2 | +<?php if (empty($billing_form)) : ?> |
|
3 | 3 | <div class="clearfix"> |
4 | - <?php _e( 'There is no billing info for this transaction.', 'event_espresso' );?><br/> |
|
4 | + <?php _e('There is no billing info for this transaction.', 'event_espresso'); ?><br/> |
|
5 | 5 | </div> |
6 | 6 | <?php else : |
7 | - function ee_show_billing_info_cleaned( EE_Form_Section_Proper $form_section, $found_cc_data = false ) { |
|
8 | - foreach( $form_section->subsections() as $subsection ) { |
|
9 | - if( $subsection instanceof EE_Form_Input_Base ) { |
|
10 | - if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_All_Sensitive_Data_Removal |
|
7 | + function ee_show_billing_info_cleaned(EE_Form_Section_Proper $form_section, $found_cc_data = false) { |
|
8 | + foreach ($form_section->subsections() as $subsection) { |
|
9 | + if ($subsection instanceof EE_Form_Input_Base) { |
|
10 | + if ($subsection->get_sensitive_data_removal_strategy() instanceof EE_All_Sensitive_Data_Removal |
|
11 | 11 | || $subsection->get_sensitive_data_removal_strategy() instanceof EE_CCV_Sensitive_Data_Removal |
12 | - || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy ){ |
|
12 | + || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy) { |
|
13 | 13 | continue; |
14 | 14 | } |
15 | - if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_Credit_Card_Sensitive_Data_Removal ) { |
|
15 | + if ($subsection->get_sensitive_data_removal_strategy() instanceof EE_Credit_Card_Sensitive_Data_Removal) { |
|
16 | 16 | $found_cc_data = true; |
17 | 17 | } |
18 | 18 | ?> |
19 | 19 | <div class="clearfix"> |
20 | - <span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php echo $subsection->get_html_for_label();?></span><?php echo $subsection->pretty_value();?> |
|
20 | + <span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php echo $subsection->get_html_for_label(); ?></span><?php echo $subsection->pretty_value(); ?> |
|
21 | 21 | </div><?php |
22 | - } elseif( $subsection instanceof EE_Form_Section_Proper ) { |
|
23 | - $found_cc_data = ee_show_billing_info_cleaned( $subsection, $found_cc_data); |
|
22 | + } elseif ($subsection instanceof EE_Form_Section_Proper) { |
|
23 | + $found_cc_data = ee_show_billing_info_cleaned($subsection, $found_cc_data); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | return $found_cc_data; |
27 | 27 | } |
28 | - $found_cc_data = ee_show_billing_info_cleaned( $billing_form ); |
|
29 | - if( apply_filters( |
|
28 | + $found_cc_data = ee_show_billing_info_cleaned($billing_form); |
|
29 | + if (apply_filters( |
|
30 | 30 | 'FHEE__txn_admin_details_side_meta_box_billing_info__show_default_note', |
31 | 31 | $found_cc_data, |
32 | - $billing_form ) ) {?> |
|
33 | - <p class="help"><?php _e( 'Note: Card expiry dates and CCV are not stored. Only the last 4 digits of card numbers are stored.', 'event_espresso' );?></p> |
|
32 | + $billing_form )) {?> |
|
33 | + <p class="help"><?php _e('Note: Card expiry dates and CCV are not stored. Only the last 4 digits of card numbers are stored.', 'event_espresso'); ?></p> |
|
34 | 34 | <?php } |
35 | - do_action( 'AHEE__txn_admin_details_side_meta_box_billing_info__billing_form_footer', $billing_form ); |
|
35 | + do_action('AHEE__txn_admin_details_side_meta_box_billing_info__billing_form_footer', $billing_form); |
|
36 | 36 | endif; ?> |
37 | 37 | |
38 | 38 | </div> |
@@ -3,7 +3,8 @@ discard block |
||
3 | 3 | <div class="clearfix"> |
4 | 4 | <?php _e( 'There is no billing info for this transaction.', 'event_espresso' );?><br/> |
5 | 5 | </div> |
6 | -<?php else : |
|
6 | +<?php else { |
|
7 | + : |
|
7 | 8 | function ee_show_billing_info_cleaned( EE_Form_Section_Proper $form_section, $found_cc_data = false ) { |
8 | 9 | foreach( $form_section->subsections() as $subsection ) { |
9 | 10 | if( $subsection instanceof EE_Form_Input_Base ) { |
@@ -11,6 +12,7 @@ discard block |
||
11 | 12 | || $subsection->get_sensitive_data_removal_strategy() instanceof EE_CCV_Sensitive_Data_Removal |
12 | 13 | || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy ){ |
13 | 14 | continue; |
15 | +} |
|
14 | 16 | } |
15 | 17 | if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_Credit_Card_Sensitive_Data_Removal ) { |
16 | 18 | $found_cc_data = true; |
@@ -239,7 +239,7 @@ |
||
239 | 239 | * setTicketMinAndMax |
240 | 240 | * |
241 | 241 | * @param int $remaining |
242 | - * @return array |
|
242 | + * @return integer[] |
|
243 | 243 | */ |
244 | 244 | protected function setTicketMinAndMax($remaining) |
245 | 245 | { |
@@ -16,461 +16,461 @@ |
||
16 | 16 | class TicketSelectorRowStandard extends TicketSelectorRow |
17 | 17 | { |
18 | 18 | |
19 | - /** |
|
20 | - * @var TicketDetails $ticket_details |
|
21 | - */ |
|
22 | - protected $ticket_details; |
|
23 | - |
|
24 | - /** |
|
25 | - * @var \EE_Ticket_Selector_Config $template_settings |
|
26 | - */ |
|
27 | - protected $template_settings; |
|
28 | - |
|
29 | - /** |
|
30 | - * @var \EE_Tax_Config $tax_settings |
|
31 | - */ |
|
32 | - protected $tax_settings; |
|
33 | - |
|
34 | - /** |
|
35 | - * @var boolean $required_ticket_sold_out |
|
36 | - */ |
|
37 | - protected $required_ticket_sold_out; |
|
38 | - |
|
39 | - /** |
|
40 | - * @var boolean $prices_displayed_including_taxes |
|
41 | - */ |
|
42 | - protected $prices_displayed_including_taxes; |
|
43 | - |
|
44 | - /** |
|
45 | - * @var string $event_status |
|
46 | - */ |
|
47 | - protected $event_status; |
|
48 | - |
|
49 | - /** |
|
50 | - * @var int $row |
|
51 | - */ |
|
52 | - protected $row; |
|
53 | - |
|
54 | - /** |
|
55 | - * @var int $cols |
|
56 | - */ |
|
57 | - protected $cols; |
|
58 | - |
|
59 | - /** |
|
60 | - * @var boolean $hidden_input_qty |
|
61 | - */ |
|
62 | - protected $hidden_input_qty; |
|
63 | - |
|
64 | - /** |
|
65 | - * @var string $ticket_datetime_classes |
|
66 | - */ |
|
67 | - protected $ticket_datetime_classes; |
|
68 | - |
|
69 | - |
|
70 | - |
|
71 | - /** |
|
72 | - * TicketDetails constructor. |
|
73 | - * |
|
74 | - * @param \EE_Ticket $ticket |
|
75 | - * @param TicketDetails $ticket_details |
|
76 | - * @param \EE_Ticket_Selector_Config $template_settings |
|
77 | - * @param \EE_Tax_Config $tax_settings |
|
78 | - * @param int $max_atndz |
|
79 | - * @param int $row |
|
80 | - * @param int $cols |
|
81 | - * @param boolean $required_ticket_sold_out |
|
82 | - * @param string $event_status |
|
83 | - * @param string $date_format |
|
84 | - * @param string $ticket_datetime_classes |
|
85 | - */ |
|
86 | - public function __construct( |
|
87 | - \EE_Ticket $ticket, |
|
88 | - TicketDetails $ticket_details, |
|
89 | - \EE_Ticket_Selector_Config $template_settings, |
|
90 | - \EE_Tax_Config $tax_settings, |
|
91 | - $max_atndz, |
|
92 | - $row, |
|
93 | - $cols, |
|
94 | - $required_ticket_sold_out, |
|
95 | - $event_status, |
|
96 | - $date_format, |
|
97 | - $ticket_datetime_classes |
|
98 | - ) { |
|
99 | - $this->ticket = $ticket; |
|
100 | - $this->ticket_details = $ticket_details; |
|
101 | - $this->template_settings = $template_settings; |
|
102 | - $this->tax_settings = $tax_settings; |
|
103 | - $this->max_atndz = $max_atndz; |
|
104 | - $this->row = $row; |
|
105 | - $this->cols = $cols; |
|
106 | - $this->required_ticket_sold_out = $required_ticket_sold_out; |
|
107 | - $this->event_status = $event_status; |
|
108 | - $this->date_format = $date_format; |
|
109 | - $this->ticket_datetime_classes = $ticket_datetime_classes; |
|
110 | - parent::__construct($ticket, $max_atndz, $date_format); |
|
111 | - } |
|
112 | - |
|
113 | - |
|
114 | - |
|
115 | - /** |
|
116 | - * other ticket rows will need to know if a required ticket is sold out, |
|
117 | - * so that they are not offered for sale |
|
118 | - * |
|
119 | - * @return boolean |
|
120 | - */ |
|
121 | - public function getRequiredTicketSoldOut() |
|
122 | - { |
|
123 | - return $this->required_ticket_sold_out; |
|
124 | - } |
|
125 | - |
|
126 | - |
|
127 | - |
|
128 | - /** |
|
129 | - * @return int |
|
130 | - */ |
|
131 | - public function getCols() |
|
132 | - { |
|
133 | - return $this->cols; |
|
134 | - } |
|
135 | - |
|
136 | - |
|
137 | - |
|
138 | - /** |
|
139 | - * getHtml |
|
140 | - * |
|
141 | - * @return string |
|
142 | - * @throws \EE_Error |
|
143 | - */ |
|
144 | - public function getHtml() |
|
145 | - { |
|
146 | - $min = 0; |
|
147 | - $max = $this->ticket->max(); |
|
148 | - $remaining = $this->ticket->remaining(); |
|
149 | - if ($this->ticket->is_on_sale() && $this->ticket->is_remaining()) { |
|
150 | - list($min, $max) = $this->setTicketMinAndMax($remaining); |
|
151 | - } else { |
|
152 | - // set flag if ticket is required (flag is set to start date so that future tickets are not blocked) |
|
153 | - $this->required_ticket_sold_out = $this->ticket->required() && ! $remaining |
|
154 | - ? $this->ticket->start_date() |
|
155 | - : $this->required_ticket_sold_out; |
|
156 | - } |
|
157 | - list($ticket_price, $ticket_bundle) = $this->getTicketPriceDetails(); |
|
158 | - list($tkt_status, $ticket_status, $status_class) = $this->getTicketStatusClasses($remaining); |
|
159 | - /** |
|
160 | - * Allow plugins to hook in and abort the generation and display of this row to do |
|
161 | - * something else if they want. |
|
162 | - * For an addon to abort things, all they have to do is register a filter with this hook, and |
|
163 | - * return a value that is NOT false. Whatever is returned gets echoed instead of the |
|
164 | - * current row. |
|
165 | - * |
|
166 | - * @var string|bool |
|
167 | - */ |
|
168 | - $ticket_selector_row_html = apply_filters( |
|
169 | - 'FHEE__ticket_selector_chart_template__do_ticket_entire_row', |
|
170 | - false, |
|
171 | - $this->ticket, |
|
172 | - $max, |
|
173 | - $min, |
|
174 | - $this->required_ticket_sold_out, |
|
175 | - $ticket_price, |
|
176 | - $ticket_bundle, |
|
177 | - $ticket_status, |
|
178 | - $status_class |
|
179 | - ); |
|
180 | - if ($ticket_selector_row_html !== false) { |
|
181 | - return $ticket_selector_row_html; |
|
182 | - } |
|
183 | - $ticket_selector_row_html = \EEH_HTML::tr( |
|
184 | - '', '', |
|
185 | - "tckt-slctr-tbl-tr {$status_class}{$this->ticket_datetime_classes} " . espresso_get_object_css_class($this->ticket) |
|
186 | - ); |
|
187 | - /** |
|
188 | - * Allow plugins to hook in and abort the generation and display of the contents of this |
|
189 | - * row to do something else if they want. |
|
190 | - * For an addon to abort things, all they have to do is register a filter with this hook, and |
|
191 | - * return a value that is NOT false. Whatever is returned gets echoed instead of the |
|
192 | - * current row. |
|
193 | - * |
|
194 | - * @var string|bool |
|
195 | - */ |
|
196 | - $new_row_cells_content = apply_filters( |
|
197 | - 'FHEE__ticket_selector_chart_template__do_ticket_inside_row', |
|
198 | - false, |
|
199 | - $this->ticket, |
|
200 | - $max, |
|
201 | - $min, |
|
202 | - $this->required_ticket_sold_out, |
|
203 | - $ticket_price, |
|
204 | - $ticket_bundle, |
|
205 | - $ticket_status, |
|
206 | - $status_class |
|
207 | - ); |
|
208 | - if ($new_row_cells_content !== false) { |
|
209 | - return $ticket_selector_row_html |
|
210 | - . $new_row_cells_content |
|
211 | - . $this->ticketQtyAndIdHiddenInputs() |
|
212 | - . \EEH_HTML::trx(); |
|
213 | - } |
|
214 | - $this->hidden_input_qty = $this->max_atndz > 1 ? true : false; |
|
215 | - |
|
216 | - $ticket_selector_row_html .= $this->ticketNameTableCell(); |
|
217 | - $ticket_selector_row_html .= $this->ticketPriceTableCell($ticket_price, $ticket_bundle); |
|
218 | - $ticket_selector_row_html .= \EEH_HTML::td('', '', 'tckt-slctr-tbl-td-qty cntr'); |
|
219 | - $this->setTicketStatusDisplay($tkt_status, $ticket_status, $remaining); |
|
220 | - if (empty($this->ticket_status_display)) { |
|
221 | - if ($this->max_atndz === 1) { |
|
222 | - // only ONE attendee is allowed to register at a time |
|
223 | - $ticket_selector_row_html .= $this->onlyOneAttendeeCanRegister(); |
|
224 | - } else if ($max > 0) { |
|
225 | - $ticket_selector_row_html .= $this->ticketQuantitySelector($min, $max); |
|
226 | - } |
|
227 | - } |
|
228 | - $ticket_selector_row_html .= $this->ticket_status_display; |
|
229 | - $ticket_selector_row_html .= $this->ticketQtyAndIdHiddenInputs(); |
|
230 | - $ticket_selector_row_html .= $this->ticket_details->display($ticket_price, $remaining, $this->cols); |
|
231 | - $ticket_selector_row_html .= \EEH_HTML::tdx(); |
|
232 | - $ticket_selector_row_html .= \EEH_HTML::trx(); |
|
233 | - |
|
234 | - |
|
235 | - $this->row++; |
|
236 | - return $ticket_selector_row_html; |
|
237 | - } |
|
238 | - |
|
239 | - |
|
240 | - |
|
241 | - /** |
|
242 | - * setTicketMinAndMax |
|
243 | - * |
|
244 | - * @param int $remaining |
|
245 | - * @return array |
|
246 | - */ |
|
247 | - protected function setTicketMinAndMax($remaining) |
|
248 | - { |
|
249 | - // offer the number of $tickets_remaining or $this->max_atndz, whichever is smaller |
|
250 | - $max = min($remaining, $this->max_atndz); |
|
251 | - // but... we also want to restrict the number of tickets by the ticket max setting, |
|
252 | - // however, the max still can't be higher than what was just set above |
|
253 | - $max = $this->ticket->max() > 0 ? min($this->ticket->max(), $max) : $max; |
|
254 | - // and we also want to restrict the minimum number of tickets by the ticket min setting |
|
255 | - $min = $this->ticket->min() > 0 ? $this->ticket->min() : 0; |
|
256 | - // and if the ticket is required, then make sure that min qty is at least 1 |
|
257 | - $min = $this->ticket->required() ? max($min, 1) : $min; |
|
258 | - return array($min, $max); |
|
259 | - } |
|
260 | - |
|
261 | - |
|
262 | - /** |
|
263 | - * getTicketPriceDetails |
|
264 | - * |
|
265 | - * @return array |
|
266 | - */ |
|
267 | - protected function getTicketPriceDetails() |
|
268 | - { |
|
269 | - $ticket_price = $this->tax_settings->prices_displayed_including_taxes |
|
270 | - ? $this->ticket->get_ticket_total_with_taxes() |
|
271 | - : $this->ticket->get_ticket_subtotal(); |
|
272 | - $ticket_bundle = false; |
|
273 | - $ticket_min = $this->ticket->min(); |
|
274 | - // for ticket bundles, set min and max qty the same |
|
275 | - if ($ticket_min !== 0 && $ticket_min === $this->ticket->max()) { |
|
276 | - $ticket_price *= $ticket_min; |
|
277 | - $ticket_bundle = true; |
|
278 | - } |
|
279 | - $ticket_price = apply_filters( |
|
280 | - 'FHEE__ticket_selector_chart_template__ticket_price', |
|
281 | - $ticket_price, |
|
282 | - $this->ticket |
|
283 | - ); |
|
284 | - return array($ticket_price, $ticket_bundle); |
|
285 | - } |
|
286 | - |
|
287 | - |
|
288 | - |
|
289 | - /** |
|
290 | - * getTicketStatusClasses |
|
291 | - * |
|
292 | - * @param int $remaining |
|
293 | - * @return array |
|
294 | - * @throws \EE_Error |
|
295 | - */ |
|
296 | - protected function getTicketStatusClasses($remaining = 0) |
|
297 | - { |
|
298 | - // if a previous required ticket with the same sale start date is sold out, |
|
299 | - // then mark this ticket as sold out as well. |
|
300 | - // tickets that go on sale at a later date than the required ticket will NOT be affected |
|
301 | - $tkt_status = $this->required_ticket_sold_out !== false |
|
302 | - && $this->required_ticket_sold_out === $this->ticket->start_date() |
|
303 | - ? \EE_Ticket::sold_out |
|
304 | - : $this->ticket->ticket_status(); |
|
305 | - $tkt_status = $this->event_status === \EE_Datetime::sold_out |
|
306 | - ? \EE_Ticket::sold_out |
|
307 | - : $tkt_status; |
|
308 | - // check ticket status |
|
309 | - switch ($tkt_status) { |
|
310 | - // sold_out |
|
311 | - case \EE_Ticket::sold_out : |
|
312 | - $ticket_status = 'ticket-sales-sold-out'; |
|
313 | - $status_class = 'ticket-sales-sold-out lt-grey-text'; |
|
314 | - break; |
|
315 | - // expired |
|
316 | - case \EE_Ticket::expired : |
|
317 | - $ticket_status = 'ticket-sales-expired'; |
|
318 | - $status_class = 'ticket-sales-expired lt-grey-text'; |
|
319 | - break; |
|
320 | - // archived |
|
321 | - case \EE_Ticket::archived : |
|
322 | - $ticket_status = 'archived-ticket'; |
|
323 | - $status_class = 'archived-ticket hidden'; |
|
324 | - break; |
|
325 | - // pending |
|
326 | - case \EE_Ticket::pending : |
|
327 | - $ticket_status = 'ticket-pending'; |
|
328 | - $status_class = 'ticket-pending'; |
|
329 | - break; |
|
330 | - // onsale |
|
331 | - case \EE_Ticket::onsale : |
|
332 | - default : |
|
333 | - $ticket_status = 'ticket-on-sale'; |
|
334 | - $status_class = 'ticket-on-sale'; |
|
335 | - break; |
|
336 | - } |
|
337 | - $ticket_status = \EEH_HTML::span($this->ticket->ticket_status(true, ($remaining > 0)), '', $ticket_status); |
|
338 | - return array($tkt_status, $ticket_status, $status_class); |
|
339 | - } |
|
340 | - |
|
341 | - |
|
342 | - |
|
343 | - /** |
|
344 | - * ticketNameTableCell |
|
345 | - * |
|
346 | - * @return string |
|
347 | - * @throws \EE_Error |
|
348 | - */ |
|
349 | - protected function ticketNameTableCell() |
|
350 | - { |
|
351 | - $html = \EEH_HTML::td('', '', 'tckt-slctr-tbl-td-name'); |
|
352 | - $html .= \EEH_HTML::strong($this->ticket->get_pretty('TKT_name')); |
|
353 | - $html .= $this->ticket_details->getShowHideLinks(); |
|
354 | - if ($this->ticket->required()) { |
|
355 | - $html .= \EEH_HTML::p( |
|
356 | - apply_filters( |
|
357 | - 'FHEE__ticket_selector_chart_template__ticket_required_message', |
|
358 | - esc_html__('This ticket is required and must be purchased.', 'event_espresso') |
|
359 | - ), |
|
360 | - '', 'ticket-required-pg' |
|
361 | - ); |
|
362 | - } |
|
363 | - $html .= \EEH_HTML::tdx(); |
|
364 | - return $html; |
|
365 | - } |
|
366 | - |
|
367 | - |
|
368 | - |
|
369 | - /** |
|
370 | - * ticketPriceTableCell |
|
371 | - * |
|
372 | - * @param float $ticket_price |
|
373 | - * @param bool $ticket_bundle |
|
374 | - * @return string |
|
375 | - * @throws \EE_Error |
|
376 | - */ |
|
377 | - protected function ticketPriceTableCell($ticket_price, $ticket_bundle) |
|
378 | - { |
|
379 | - $html = ''; |
|
380 | - if (apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', true)) { |
|
381 | - $html .= \EEH_HTML::td('', '', 'tckt-slctr-tbl-td-price jst-rght'); |
|
382 | - $html .= \EEH_Template::format_currency($ticket_price); |
|
383 | - $html .= $this->ticket->taxable() |
|
384 | - ? \EEH_HTML::span( '*', '', 'taxable-tickets-asterisk grey-text' ) |
|
385 | - : ''; |
|
386 | - $html .= ' '; |
|
387 | - $html .= \EEH_HTML::span( |
|
388 | - $ticket_bundle |
|
389 | - ? apply_filters( |
|
390 | - 'FHEE__ticket_selector_chart_template__per_ticket_bundle_text', |
|
391 | - __(' / bundle', 'event_espresso') |
|
392 | - ) |
|
393 | - : apply_filters( |
|
394 | - 'FHEE__ticket_selector_chart_template__per_ticket_text', |
|
395 | - __('', 'event_espresso') |
|
396 | - ), |
|
397 | - '', 'smaller-text no-bold' |
|
398 | - ); |
|
399 | - $html .= ' '; |
|
400 | - $html .= \EEH_HTML::tdx(); |
|
401 | - $this->cols++; |
|
402 | - } |
|
403 | - return $html; |
|
404 | - } |
|
405 | - |
|
406 | - |
|
407 | - |
|
408 | - /** |
|
409 | - * onlyOneAttendeeCanRegister |
|
410 | - * |
|
411 | - * @return string |
|
412 | - */ |
|
413 | - protected function onlyOneAttendeeCanRegister() |
|
414 | - { |
|
415 | - // display submit button since we have tickets available |
|
416 | - add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
417 | - $this->hidden_input_qty = false; |
|
418 | - $html = '<input type="radio" name="tkt-slctr-qty-' . $this->EVT_ID . '"'; |
|
419 | - $html .= ' id="ticket-selector-tbl-qty-slct-' . $this->EVT_ID . '-' . $this->row . '"'; |
|
420 | - $html .= ' class="ticket-selector-tbl-qty-slct" value="' . $this->row . '-1"'; |
|
421 | - $html .= $this->row === 1 ? ' checked="checked"' : ''; |
|
422 | - $html .= ' title=""/>'; |
|
423 | - return $html; |
|
424 | - } |
|
425 | - |
|
426 | - |
|
427 | - |
|
428 | - /** |
|
429 | - * ticketQuantitySelector |
|
430 | - * |
|
431 | - * @param int $min |
|
432 | - * @param int $max |
|
433 | - * @return string |
|
434 | - */ |
|
435 | - protected function ticketQuantitySelector($min = 0, $max = 0) |
|
436 | - { |
|
437 | - // display submit button since we have tickets available |
|
438 | - add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
439 | - $this->hidden_input_qty = false; |
|
440 | - $html = '<select name="tkt-slctr-qty-' . $this->EVT_ID . '[]"'; |
|
441 | - $html .= ' id="ticket-selector-tbl-qty-slct-' . $this->EVT_ID . '-' . $this->row . '"'; |
|
442 | - $html .= ' class="ticket-selector-tbl-qty-slct">'; |
|
443 | - // this ensures that non-required tickets with non-zero MIN QTYs don't HAVE to be purchased |
|
444 | - if ($min !== 0 && ! $this->ticket->required()) { |
|
445 | - $html .= '<option value="0"> 0 </option>'; |
|
446 | - } |
|
447 | - // offer ticket quantities from the min to the max |
|
448 | - for ($i = $min; $i <= $max; $i++) { |
|
449 | - $html .= '<option value="' . $i . '"> ' . $i . ' </option>'; |
|
450 | - } |
|
451 | - $html .= '</select>'; |
|
452 | - return $html; |
|
453 | - } |
|
454 | - |
|
455 | - |
|
456 | - |
|
457 | - /** |
|
458 | - * getHiddenInputs |
|
459 | - * |
|
460 | - * @return string |
|
461 | - * @throws \EE_Error |
|
462 | - */ |
|
463 | - protected function ticketQtyAndIdHiddenInputs() |
|
464 | - { |
|
465 | - $html = ''; |
|
466 | - // depending on group reg we need to change the format for qty |
|
467 | - if ($this->hidden_input_qty) { |
|
468 | - $html .= '<input type="hidden" name="tkt-slctr-qty-' . $this->EVT_ID . '[]" value="0"/>'; |
|
469 | - } |
|
470 | - $html .= '<input type="hidden" name="tkt-slctr-ticket-id-' . $this->EVT_ID . '[]"'; |
|
471 | - $html .= ' value="' . $this->ticket->ID() . '"/>'; |
|
472 | - return $html; |
|
473 | - } |
|
19 | + /** |
|
20 | + * @var TicketDetails $ticket_details |
|
21 | + */ |
|
22 | + protected $ticket_details; |
|
23 | + |
|
24 | + /** |
|
25 | + * @var \EE_Ticket_Selector_Config $template_settings |
|
26 | + */ |
|
27 | + protected $template_settings; |
|
28 | + |
|
29 | + /** |
|
30 | + * @var \EE_Tax_Config $tax_settings |
|
31 | + */ |
|
32 | + protected $tax_settings; |
|
33 | + |
|
34 | + /** |
|
35 | + * @var boolean $required_ticket_sold_out |
|
36 | + */ |
|
37 | + protected $required_ticket_sold_out; |
|
38 | + |
|
39 | + /** |
|
40 | + * @var boolean $prices_displayed_including_taxes |
|
41 | + */ |
|
42 | + protected $prices_displayed_including_taxes; |
|
43 | + |
|
44 | + /** |
|
45 | + * @var string $event_status |
|
46 | + */ |
|
47 | + protected $event_status; |
|
48 | + |
|
49 | + /** |
|
50 | + * @var int $row |
|
51 | + */ |
|
52 | + protected $row; |
|
53 | + |
|
54 | + /** |
|
55 | + * @var int $cols |
|
56 | + */ |
|
57 | + protected $cols; |
|
58 | + |
|
59 | + /** |
|
60 | + * @var boolean $hidden_input_qty |
|
61 | + */ |
|
62 | + protected $hidden_input_qty; |
|
63 | + |
|
64 | + /** |
|
65 | + * @var string $ticket_datetime_classes |
|
66 | + */ |
|
67 | + protected $ticket_datetime_classes; |
|
68 | + |
|
69 | + |
|
70 | + |
|
71 | + /** |
|
72 | + * TicketDetails constructor. |
|
73 | + * |
|
74 | + * @param \EE_Ticket $ticket |
|
75 | + * @param TicketDetails $ticket_details |
|
76 | + * @param \EE_Ticket_Selector_Config $template_settings |
|
77 | + * @param \EE_Tax_Config $tax_settings |
|
78 | + * @param int $max_atndz |
|
79 | + * @param int $row |
|
80 | + * @param int $cols |
|
81 | + * @param boolean $required_ticket_sold_out |
|
82 | + * @param string $event_status |
|
83 | + * @param string $date_format |
|
84 | + * @param string $ticket_datetime_classes |
|
85 | + */ |
|
86 | + public function __construct( |
|
87 | + \EE_Ticket $ticket, |
|
88 | + TicketDetails $ticket_details, |
|
89 | + \EE_Ticket_Selector_Config $template_settings, |
|
90 | + \EE_Tax_Config $tax_settings, |
|
91 | + $max_atndz, |
|
92 | + $row, |
|
93 | + $cols, |
|
94 | + $required_ticket_sold_out, |
|
95 | + $event_status, |
|
96 | + $date_format, |
|
97 | + $ticket_datetime_classes |
|
98 | + ) { |
|
99 | + $this->ticket = $ticket; |
|
100 | + $this->ticket_details = $ticket_details; |
|
101 | + $this->template_settings = $template_settings; |
|
102 | + $this->tax_settings = $tax_settings; |
|
103 | + $this->max_atndz = $max_atndz; |
|
104 | + $this->row = $row; |
|
105 | + $this->cols = $cols; |
|
106 | + $this->required_ticket_sold_out = $required_ticket_sold_out; |
|
107 | + $this->event_status = $event_status; |
|
108 | + $this->date_format = $date_format; |
|
109 | + $this->ticket_datetime_classes = $ticket_datetime_classes; |
|
110 | + parent::__construct($ticket, $max_atndz, $date_format); |
|
111 | + } |
|
112 | + |
|
113 | + |
|
114 | + |
|
115 | + /** |
|
116 | + * other ticket rows will need to know if a required ticket is sold out, |
|
117 | + * so that they are not offered for sale |
|
118 | + * |
|
119 | + * @return boolean |
|
120 | + */ |
|
121 | + public function getRequiredTicketSoldOut() |
|
122 | + { |
|
123 | + return $this->required_ticket_sold_out; |
|
124 | + } |
|
125 | + |
|
126 | + |
|
127 | + |
|
128 | + /** |
|
129 | + * @return int |
|
130 | + */ |
|
131 | + public function getCols() |
|
132 | + { |
|
133 | + return $this->cols; |
|
134 | + } |
|
135 | + |
|
136 | + |
|
137 | + |
|
138 | + /** |
|
139 | + * getHtml |
|
140 | + * |
|
141 | + * @return string |
|
142 | + * @throws \EE_Error |
|
143 | + */ |
|
144 | + public function getHtml() |
|
145 | + { |
|
146 | + $min = 0; |
|
147 | + $max = $this->ticket->max(); |
|
148 | + $remaining = $this->ticket->remaining(); |
|
149 | + if ($this->ticket->is_on_sale() && $this->ticket->is_remaining()) { |
|
150 | + list($min, $max) = $this->setTicketMinAndMax($remaining); |
|
151 | + } else { |
|
152 | + // set flag if ticket is required (flag is set to start date so that future tickets are not blocked) |
|
153 | + $this->required_ticket_sold_out = $this->ticket->required() && ! $remaining |
|
154 | + ? $this->ticket->start_date() |
|
155 | + : $this->required_ticket_sold_out; |
|
156 | + } |
|
157 | + list($ticket_price, $ticket_bundle) = $this->getTicketPriceDetails(); |
|
158 | + list($tkt_status, $ticket_status, $status_class) = $this->getTicketStatusClasses($remaining); |
|
159 | + /** |
|
160 | + * Allow plugins to hook in and abort the generation and display of this row to do |
|
161 | + * something else if they want. |
|
162 | + * For an addon to abort things, all they have to do is register a filter with this hook, and |
|
163 | + * return a value that is NOT false. Whatever is returned gets echoed instead of the |
|
164 | + * current row. |
|
165 | + * |
|
166 | + * @var string|bool |
|
167 | + */ |
|
168 | + $ticket_selector_row_html = apply_filters( |
|
169 | + 'FHEE__ticket_selector_chart_template__do_ticket_entire_row', |
|
170 | + false, |
|
171 | + $this->ticket, |
|
172 | + $max, |
|
173 | + $min, |
|
174 | + $this->required_ticket_sold_out, |
|
175 | + $ticket_price, |
|
176 | + $ticket_bundle, |
|
177 | + $ticket_status, |
|
178 | + $status_class |
|
179 | + ); |
|
180 | + if ($ticket_selector_row_html !== false) { |
|
181 | + return $ticket_selector_row_html; |
|
182 | + } |
|
183 | + $ticket_selector_row_html = \EEH_HTML::tr( |
|
184 | + '', '', |
|
185 | + "tckt-slctr-tbl-tr {$status_class}{$this->ticket_datetime_classes} " . espresso_get_object_css_class($this->ticket) |
|
186 | + ); |
|
187 | + /** |
|
188 | + * Allow plugins to hook in and abort the generation and display of the contents of this |
|
189 | + * row to do something else if they want. |
|
190 | + * For an addon to abort things, all they have to do is register a filter with this hook, and |
|
191 | + * return a value that is NOT false. Whatever is returned gets echoed instead of the |
|
192 | + * current row. |
|
193 | + * |
|
194 | + * @var string|bool |
|
195 | + */ |
|
196 | + $new_row_cells_content = apply_filters( |
|
197 | + 'FHEE__ticket_selector_chart_template__do_ticket_inside_row', |
|
198 | + false, |
|
199 | + $this->ticket, |
|
200 | + $max, |
|
201 | + $min, |
|
202 | + $this->required_ticket_sold_out, |
|
203 | + $ticket_price, |
|
204 | + $ticket_bundle, |
|
205 | + $ticket_status, |
|
206 | + $status_class |
|
207 | + ); |
|
208 | + if ($new_row_cells_content !== false) { |
|
209 | + return $ticket_selector_row_html |
|
210 | + . $new_row_cells_content |
|
211 | + . $this->ticketQtyAndIdHiddenInputs() |
|
212 | + . \EEH_HTML::trx(); |
|
213 | + } |
|
214 | + $this->hidden_input_qty = $this->max_atndz > 1 ? true : false; |
|
215 | + |
|
216 | + $ticket_selector_row_html .= $this->ticketNameTableCell(); |
|
217 | + $ticket_selector_row_html .= $this->ticketPriceTableCell($ticket_price, $ticket_bundle); |
|
218 | + $ticket_selector_row_html .= \EEH_HTML::td('', '', 'tckt-slctr-tbl-td-qty cntr'); |
|
219 | + $this->setTicketStatusDisplay($tkt_status, $ticket_status, $remaining); |
|
220 | + if (empty($this->ticket_status_display)) { |
|
221 | + if ($this->max_atndz === 1) { |
|
222 | + // only ONE attendee is allowed to register at a time |
|
223 | + $ticket_selector_row_html .= $this->onlyOneAttendeeCanRegister(); |
|
224 | + } else if ($max > 0) { |
|
225 | + $ticket_selector_row_html .= $this->ticketQuantitySelector($min, $max); |
|
226 | + } |
|
227 | + } |
|
228 | + $ticket_selector_row_html .= $this->ticket_status_display; |
|
229 | + $ticket_selector_row_html .= $this->ticketQtyAndIdHiddenInputs(); |
|
230 | + $ticket_selector_row_html .= $this->ticket_details->display($ticket_price, $remaining, $this->cols); |
|
231 | + $ticket_selector_row_html .= \EEH_HTML::tdx(); |
|
232 | + $ticket_selector_row_html .= \EEH_HTML::trx(); |
|
233 | + |
|
234 | + |
|
235 | + $this->row++; |
|
236 | + return $ticket_selector_row_html; |
|
237 | + } |
|
238 | + |
|
239 | + |
|
240 | + |
|
241 | + /** |
|
242 | + * setTicketMinAndMax |
|
243 | + * |
|
244 | + * @param int $remaining |
|
245 | + * @return array |
|
246 | + */ |
|
247 | + protected function setTicketMinAndMax($remaining) |
|
248 | + { |
|
249 | + // offer the number of $tickets_remaining or $this->max_atndz, whichever is smaller |
|
250 | + $max = min($remaining, $this->max_atndz); |
|
251 | + // but... we also want to restrict the number of tickets by the ticket max setting, |
|
252 | + // however, the max still can't be higher than what was just set above |
|
253 | + $max = $this->ticket->max() > 0 ? min($this->ticket->max(), $max) : $max; |
|
254 | + // and we also want to restrict the minimum number of tickets by the ticket min setting |
|
255 | + $min = $this->ticket->min() > 0 ? $this->ticket->min() : 0; |
|
256 | + // and if the ticket is required, then make sure that min qty is at least 1 |
|
257 | + $min = $this->ticket->required() ? max($min, 1) : $min; |
|
258 | + return array($min, $max); |
|
259 | + } |
|
260 | + |
|
261 | + |
|
262 | + /** |
|
263 | + * getTicketPriceDetails |
|
264 | + * |
|
265 | + * @return array |
|
266 | + */ |
|
267 | + protected function getTicketPriceDetails() |
|
268 | + { |
|
269 | + $ticket_price = $this->tax_settings->prices_displayed_including_taxes |
|
270 | + ? $this->ticket->get_ticket_total_with_taxes() |
|
271 | + : $this->ticket->get_ticket_subtotal(); |
|
272 | + $ticket_bundle = false; |
|
273 | + $ticket_min = $this->ticket->min(); |
|
274 | + // for ticket bundles, set min and max qty the same |
|
275 | + if ($ticket_min !== 0 && $ticket_min === $this->ticket->max()) { |
|
276 | + $ticket_price *= $ticket_min; |
|
277 | + $ticket_bundle = true; |
|
278 | + } |
|
279 | + $ticket_price = apply_filters( |
|
280 | + 'FHEE__ticket_selector_chart_template__ticket_price', |
|
281 | + $ticket_price, |
|
282 | + $this->ticket |
|
283 | + ); |
|
284 | + return array($ticket_price, $ticket_bundle); |
|
285 | + } |
|
286 | + |
|
287 | + |
|
288 | + |
|
289 | + /** |
|
290 | + * getTicketStatusClasses |
|
291 | + * |
|
292 | + * @param int $remaining |
|
293 | + * @return array |
|
294 | + * @throws \EE_Error |
|
295 | + */ |
|
296 | + protected function getTicketStatusClasses($remaining = 0) |
|
297 | + { |
|
298 | + // if a previous required ticket with the same sale start date is sold out, |
|
299 | + // then mark this ticket as sold out as well. |
|
300 | + // tickets that go on sale at a later date than the required ticket will NOT be affected |
|
301 | + $tkt_status = $this->required_ticket_sold_out !== false |
|
302 | + && $this->required_ticket_sold_out === $this->ticket->start_date() |
|
303 | + ? \EE_Ticket::sold_out |
|
304 | + : $this->ticket->ticket_status(); |
|
305 | + $tkt_status = $this->event_status === \EE_Datetime::sold_out |
|
306 | + ? \EE_Ticket::sold_out |
|
307 | + : $tkt_status; |
|
308 | + // check ticket status |
|
309 | + switch ($tkt_status) { |
|
310 | + // sold_out |
|
311 | + case \EE_Ticket::sold_out : |
|
312 | + $ticket_status = 'ticket-sales-sold-out'; |
|
313 | + $status_class = 'ticket-sales-sold-out lt-grey-text'; |
|
314 | + break; |
|
315 | + // expired |
|
316 | + case \EE_Ticket::expired : |
|
317 | + $ticket_status = 'ticket-sales-expired'; |
|
318 | + $status_class = 'ticket-sales-expired lt-grey-text'; |
|
319 | + break; |
|
320 | + // archived |
|
321 | + case \EE_Ticket::archived : |
|
322 | + $ticket_status = 'archived-ticket'; |
|
323 | + $status_class = 'archived-ticket hidden'; |
|
324 | + break; |
|
325 | + // pending |
|
326 | + case \EE_Ticket::pending : |
|
327 | + $ticket_status = 'ticket-pending'; |
|
328 | + $status_class = 'ticket-pending'; |
|
329 | + break; |
|
330 | + // onsale |
|
331 | + case \EE_Ticket::onsale : |
|
332 | + default : |
|
333 | + $ticket_status = 'ticket-on-sale'; |
|
334 | + $status_class = 'ticket-on-sale'; |
|
335 | + break; |
|
336 | + } |
|
337 | + $ticket_status = \EEH_HTML::span($this->ticket->ticket_status(true, ($remaining > 0)), '', $ticket_status); |
|
338 | + return array($tkt_status, $ticket_status, $status_class); |
|
339 | + } |
|
340 | + |
|
341 | + |
|
342 | + |
|
343 | + /** |
|
344 | + * ticketNameTableCell |
|
345 | + * |
|
346 | + * @return string |
|
347 | + * @throws \EE_Error |
|
348 | + */ |
|
349 | + protected function ticketNameTableCell() |
|
350 | + { |
|
351 | + $html = \EEH_HTML::td('', '', 'tckt-slctr-tbl-td-name'); |
|
352 | + $html .= \EEH_HTML::strong($this->ticket->get_pretty('TKT_name')); |
|
353 | + $html .= $this->ticket_details->getShowHideLinks(); |
|
354 | + if ($this->ticket->required()) { |
|
355 | + $html .= \EEH_HTML::p( |
|
356 | + apply_filters( |
|
357 | + 'FHEE__ticket_selector_chart_template__ticket_required_message', |
|
358 | + esc_html__('This ticket is required and must be purchased.', 'event_espresso') |
|
359 | + ), |
|
360 | + '', 'ticket-required-pg' |
|
361 | + ); |
|
362 | + } |
|
363 | + $html .= \EEH_HTML::tdx(); |
|
364 | + return $html; |
|
365 | + } |
|
366 | + |
|
367 | + |
|
368 | + |
|
369 | + /** |
|
370 | + * ticketPriceTableCell |
|
371 | + * |
|
372 | + * @param float $ticket_price |
|
373 | + * @param bool $ticket_bundle |
|
374 | + * @return string |
|
375 | + * @throws \EE_Error |
|
376 | + */ |
|
377 | + protected function ticketPriceTableCell($ticket_price, $ticket_bundle) |
|
378 | + { |
|
379 | + $html = ''; |
|
380 | + if (apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', true)) { |
|
381 | + $html .= \EEH_HTML::td('', '', 'tckt-slctr-tbl-td-price jst-rght'); |
|
382 | + $html .= \EEH_Template::format_currency($ticket_price); |
|
383 | + $html .= $this->ticket->taxable() |
|
384 | + ? \EEH_HTML::span( '*', '', 'taxable-tickets-asterisk grey-text' ) |
|
385 | + : ''; |
|
386 | + $html .= ' '; |
|
387 | + $html .= \EEH_HTML::span( |
|
388 | + $ticket_bundle |
|
389 | + ? apply_filters( |
|
390 | + 'FHEE__ticket_selector_chart_template__per_ticket_bundle_text', |
|
391 | + __(' / bundle', 'event_espresso') |
|
392 | + ) |
|
393 | + : apply_filters( |
|
394 | + 'FHEE__ticket_selector_chart_template__per_ticket_text', |
|
395 | + __('', 'event_espresso') |
|
396 | + ), |
|
397 | + '', 'smaller-text no-bold' |
|
398 | + ); |
|
399 | + $html .= ' '; |
|
400 | + $html .= \EEH_HTML::tdx(); |
|
401 | + $this->cols++; |
|
402 | + } |
|
403 | + return $html; |
|
404 | + } |
|
405 | + |
|
406 | + |
|
407 | + |
|
408 | + /** |
|
409 | + * onlyOneAttendeeCanRegister |
|
410 | + * |
|
411 | + * @return string |
|
412 | + */ |
|
413 | + protected function onlyOneAttendeeCanRegister() |
|
414 | + { |
|
415 | + // display submit button since we have tickets available |
|
416 | + add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
417 | + $this->hidden_input_qty = false; |
|
418 | + $html = '<input type="radio" name="tkt-slctr-qty-' . $this->EVT_ID . '"'; |
|
419 | + $html .= ' id="ticket-selector-tbl-qty-slct-' . $this->EVT_ID . '-' . $this->row . '"'; |
|
420 | + $html .= ' class="ticket-selector-tbl-qty-slct" value="' . $this->row . '-1"'; |
|
421 | + $html .= $this->row === 1 ? ' checked="checked"' : ''; |
|
422 | + $html .= ' title=""/>'; |
|
423 | + return $html; |
|
424 | + } |
|
425 | + |
|
426 | + |
|
427 | + |
|
428 | + /** |
|
429 | + * ticketQuantitySelector |
|
430 | + * |
|
431 | + * @param int $min |
|
432 | + * @param int $max |
|
433 | + * @return string |
|
434 | + */ |
|
435 | + protected function ticketQuantitySelector($min = 0, $max = 0) |
|
436 | + { |
|
437 | + // display submit button since we have tickets available |
|
438 | + add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
439 | + $this->hidden_input_qty = false; |
|
440 | + $html = '<select name="tkt-slctr-qty-' . $this->EVT_ID . '[]"'; |
|
441 | + $html .= ' id="ticket-selector-tbl-qty-slct-' . $this->EVT_ID . '-' . $this->row . '"'; |
|
442 | + $html .= ' class="ticket-selector-tbl-qty-slct">'; |
|
443 | + // this ensures that non-required tickets with non-zero MIN QTYs don't HAVE to be purchased |
|
444 | + if ($min !== 0 && ! $this->ticket->required()) { |
|
445 | + $html .= '<option value="0"> 0 </option>'; |
|
446 | + } |
|
447 | + // offer ticket quantities from the min to the max |
|
448 | + for ($i = $min; $i <= $max; $i++) { |
|
449 | + $html .= '<option value="' . $i . '"> ' . $i . ' </option>'; |
|
450 | + } |
|
451 | + $html .= '</select>'; |
|
452 | + return $html; |
|
453 | + } |
|
454 | + |
|
455 | + |
|
456 | + |
|
457 | + /** |
|
458 | + * getHiddenInputs |
|
459 | + * |
|
460 | + * @return string |
|
461 | + * @throws \EE_Error |
|
462 | + */ |
|
463 | + protected function ticketQtyAndIdHiddenInputs() |
|
464 | + { |
|
465 | + $html = ''; |
|
466 | + // depending on group reg we need to change the format for qty |
|
467 | + if ($this->hidden_input_qty) { |
|
468 | + $html .= '<input type="hidden" name="tkt-slctr-qty-' . $this->EVT_ID . '[]" value="0"/>'; |
|
469 | + } |
|
470 | + $html .= '<input type="hidden" name="tkt-slctr-ticket-id-' . $this->EVT_ID . '[]"'; |
|
471 | + $html .= ' value="' . $this->ticket->ID() . '"/>'; |
|
472 | + return $html; |
|
473 | + } |
|
474 | 474 | |
475 | 475 | } |
476 | 476 | // End of file TicketSelectorRowStandard.php |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | $ticket_selector_row_html = \EEH_HTML::tr( |
184 | 184 | '', '', |
185 | - "tckt-slctr-tbl-tr {$status_class}{$this->ticket_datetime_classes} " . espresso_get_object_css_class($this->ticket) |
|
185 | + "tckt-slctr-tbl-tr {$status_class}{$this->ticket_datetime_classes} ".espresso_get_object_css_class($this->ticket) |
|
186 | 186 | ); |
187 | 187 | /** |
188 | 188 | * Allow plugins to hook in and abort the generation and display of the contents of this |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $html .= \EEH_HTML::td('', '', 'tckt-slctr-tbl-td-price jst-rght'); |
382 | 382 | $html .= \EEH_Template::format_currency($ticket_price); |
383 | 383 | $html .= $this->ticket->taxable() |
384 | - ? \EEH_HTML::span( '*', '', 'taxable-tickets-asterisk grey-text' ) |
|
384 | + ? \EEH_HTML::span('*', '', 'taxable-tickets-asterisk grey-text') |
|
385 | 385 | : ''; |
386 | 386 | $html .= ' '; |
387 | 387 | $html .= \EEH_HTML::span( |
@@ -415,9 +415,9 @@ discard block |
||
415 | 415 | // display submit button since we have tickets available |
416 | 416 | add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
417 | 417 | $this->hidden_input_qty = false; |
418 | - $html = '<input type="radio" name="tkt-slctr-qty-' . $this->EVT_ID . '"'; |
|
419 | - $html .= ' id="ticket-selector-tbl-qty-slct-' . $this->EVT_ID . '-' . $this->row . '"'; |
|
420 | - $html .= ' class="ticket-selector-tbl-qty-slct" value="' . $this->row . '-1"'; |
|
418 | + $html = '<input type="radio" name="tkt-slctr-qty-'.$this->EVT_ID.'"'; |
|
419 | + $html .= ' id="ticket-selector-tbl-qty-slct-'.$this->EVT_ID.'-'.$this->row.'"'; |
|
420 | + $html .= ' class="ticket-selector-tbl-qty-slct" value="'.$this->row.'-1"'; |
|
421 | 421 | $html .= $this->row === 1 ? ' checked="checked"' : ''; |
422 | 422 | $html .= ' title=""/>'; |
423 | 423 | return $html; |
@@ -437,8 +437,8 @@ discard block |
||
437 | 437 | // display submit button since we have tickets available |
438 | 438 | add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
439 | 439 | $this->hidden_input_qty = false; |
440 | - $html = '<select name="tkt-slctr-qty-' . $this->EVT_ID . '[]"'; |
|
441 | - $html .= ' id="ticket-selector-tbl-qty-slct-' . $this->EVT_ID . '-' . $this->row . '"'; |
|
440 | + $html = '<select name="tkt-slctr-qty-'.$this->EVT_ID.'[]"'; |
|
441 | + $html .= ' id="ticket-selector-tbl-qty-slct-'.$this->EVT_ID.'-'.$this->row.'"'; |
|
442 | 442 | $html .= ' class="ticket-selector-tbl-qty-slct">'; |
443 | 443 | // this ensures that non-required tickets with non-zero MIN QTYs don't HAVE to be purchased |
444 | 444 | if ($min !== 0 && ! $this->ticket->required()) { |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | } |
447 | 447 | // offer ticket quantities from the min to the max |
448 | 448 | for ($i = $min; $i <= $max; $i++) { |
449 | - $html .= '<option value="' . $i . '"> ' . $i . ' </option>'; |
|
449 | + $html .= '<option value="'.$i.'"> '.$i.' </option>'; |
|
450 | 450 | } |
451 | 451 | $html .= '</select>'; |
452 | 452 | return $html; |
@@ -465,10 +465,10 @@ discard block |
||
465 | 465 | $html = ''; |
466 | 466 | // depending on group reg we need to change the format for qty |
467 | 467 | if ($this->hidden_input_qty) { |
468 | - $html .= '<input type="hidden" name="tkt-slctr-qty-' . $this->EVT_ID . '[]" value="0"/>'; |
|
468 | + $html .= '<input type="hidden" name="tkt-slctr-qty-'.$this->EVT_ID.'[]" value="0"/>'; |
|
469 | 469 | } |
470 | - $html .= '<input type="hidden" name="tkt-slctr-ticket-id-' . $this->EVT_ID . '[]"'; |
|
471 | - $html .= ' value="' . $this->ticket->ID() . '"/>'; |
|
470 | + $html .= '<input type="hidden" name="tkt-slctr-ticket-id-'.$this->EVT_ID.'[]"'; |
|
471 | + $html .= ' value="'.$this->ticket->ID().'"/>'; |
|
472 | 472 | return $html; |
473 | 473 | } |
474 | 474 |
@@ -17,158 +17,158 @@ |
||
17 | 17 | { |
18 | 18 | |
19 | 19 | |
20 | - /** |
|
21 | - * @var \EE_Ticket $ticket |
|
22 | - */ |
|
23 | - protected $ticket; |
|
24 | - |
|
25 | - /** |
|
26 | - * @var \EE_Ticket_Selector_Config $template_settings |
|
27 | - */ |
|
28 | - protected $template_settings; |
|
29 | - |
|
30 | - /** |
|
31 | - * @var string $date_format |
|
32 | - */ |
|
33 | - protected $date_format; |
|
34 | - |
|
35 | - /** |
|
36 | - * @var string $time_format |
|
37 | - */ |
|
38 | - protected $time_format; |
|
39 | - |
|
40 | - /** |
|
41 | - * @var boolean $event_is_expired |
|
42 | - */ |
|
43 | - protected $event_is_expired; |
|
44 | - |
|
45 | - |
|
46 | - |
|
47 | - /** |
|
48 | - * TicketDetails constructor. |
|
49 | - * |
|
50 | - * @param \EE_Ticket $ticket |
|
51 | - * @param \EE_Ticket_Selector_Config $template_settings |
|
52 | - * @param array $template_args |
|
53 | - */ |
|
54 | - public function __construct( |
|
55 | - \EE_Ticket $ticket, |
|
56 | - \EE_Ticket_Selector_Config $template_settings, |
|
57 | - array $template_args |
|
58 | - ) |
|
59 | - { |
|
60 | - $this->ticket = $ticket; |
|
61 | - $this->template_settings = $template_settings; |
|
62 | - $this->date_format = $template_args['date_format']; |
|
63 | - $this->time_format = $template_args['time_format']; |
|
64 | - $this->event_is_expired = $template_args['event_is_expired']; |
|
65 | - } |
|
66 | - |
|
67 | - |
|
68 | - |
|
69 | - /** |
|
70 | - * @return bool |
|
71 | - */ |
|
72 | - public function showTicketDetails() |
|
73 | - { |
|
74 | - return $this->template_settings->show_ticket_details; |
|
75 | - } |
|
76 | - |
|
77 | - |
|
78 | - |
|
79 | - /** |
|
80 | - * @return string |
|
81 | - */ |
|
82 | - public function getShowHideLinks() |
|
83 | - { |
|
84 | - if ( ! $this->showTicketDetails()) { |
|
85 | - return ''; |
|
86 | - } |
|
87 | - return \EEH_HTML::link( |
|
88 | - '', |
|
89 | - sprintf(__('show%1$sdetails%1$s+', 'event_espresso'), ' '), |
|
90 | - esc_attr( |
|
91 | - apply_filters( |
|
92 | - 'FHEE__ticket_selector_chart_template__show_ticket_details_link_title', |
|
93 | - __('click to show additional ticket details', 'event_espresso') |
|
94 | - ) |
|
95 | - ), |
|
96 | - "display-{$this->cssId()}", |
|
97 | - 'display-tckt-slctr-tkt-details display-the-hidden lt-grey-text smaller-text hide-if-no-js', |
|
98 | - '', |
|
99 | - 'rel="' . $this->cssId() . '"' |
|
100 | - ) . \EEH_HTML::link( |
|
101 | - '', |
|
102 | - sprintf(__('hide%1$sdetails%1$s-', 'event_espresso'), ' '), |
|
103 | - esc_attr( |
|
104 | - apply_filters( |
|
105 | - 'FHEE__ticket_selector_chart_template__hide_ticket_details_link_title', |
|
106 | - __('click to hide additional ticket details', 'event_espresso') |
|
107 | - ) |
|
108 | - ), |
|
109 | - "hide-{$this->cssId()}", |
|
110 | - 'hide-tckt-slctr-tkt-details hide-the-displayed lt-grey-text smaller-text hide-if-no-js', |
|
111 | - 'display:none;', |
|
112 | - 'rel="' . $this->cssId() . '"' |
|
113 | - ); |
|
114 | - } |
|
115 | - |
|
116 | - |
|
117 | - |
|
118 | - /** |
|
119 | - * @return string |
|
120 | - */ |
|
121 | - public function cssId() |
|
122 | - { |
|
123 | - return apply_filters( |
|
124 | - 'FHEE__ticket_selector_chart_template__ticket_details_css_id', |
|
125 | - "tckt-slctr-tkt-details-{$this->ticket->get_event_ID()}-{$this->ticket->ID()}" |
|
126 | - ); |
|
127 | - } |
|
128 | - |
|
129 | - |
|
130 | - |
|
131 | - /** |
|
132 | - * @param float $ticket_price |
|
133 | - * @param int $remaining |
|
134 | - * @param int $cols |
|
135 | - * @return string |
|
136 | - */ |
|
137 | - public function display( |
|
138 | - $ticket_price = 0.00, |
|
139 | - $remaining, |
|
140 | - $cols = 2 |
|
141 | - ) { |
|
142 | - $template_args = array(); |
|
143 | - $template_args['ticket'] = $this->ticket; |
|
144 | - $template_args['ticket_price'] = $ticket_price; |
|
145 | - $template_args['remaining'] = $remaining; |
|
146 | - $template_args['cols'] = $cols; |
|
147 | - $template_args['show_ticket_details'] = $this->template_settings->show_ticket_details; |
|
148 | - $template_args['show_ticket_sale_columns'] = $this->template_settings->show_ticket_sale_columns; |
|
149 | - $template_args['ticket_details_row_class'] = espresso_get_object_css_class($this->ticket, '', 'details'); |
|
150 | - $template_args['ticket_details_css_id'] = $this->cssId(); |
|
151 | - $template_args['display_ticket_price'] = $ticket_price !== 0 && apply_filters( |
|
152 | - 'FHEE__ticket_selector_chart_template__display_ticket_price_details', |
|
153 | - true |
|
154 | - ); |
|
155 | - $template_args['price_breakdown_heading'] = apply_filters( |
|
156 | - 'FHEE__ticket_selector_chart_template__ticket_details_price_breakdown_heading', |
|
157 | - esc_html__('Price', 'event_espresso') |
|
158 | - ); |
|
159 | - $template_args['date_format'] = $this->date_format; |
|
160 | - $template_args['time_format'] = $this->time_format; |
|
161 | - $template_args['event_is_expired'] = $this->event_is_expired; |
|
162 | - |
|
163 | - return \EEH_Template::locate_template( |
|
164 | - apply_filters( |
|
165 | - 'FHEE__EventEspresso_modules_ticket_selector_TicketDetails__display__template_path', |
|
166 | - TICKET_SELECTOR_TEMPLATES_PATH . 'ticket_details.template.php', |
|
167 | - $this->ticket |
|
168 | - ), |
|
169 | - $template_args |
|
170 | - ); |
|
171 | - } |
|
20 | + /** |
|
21 | + * @var \EE_Ticket $ticket |
|
22 | + */ |
|
23 | + protected $ticket; |
|
24 | + |
|
25 | + /** |
|
26 | + * @var \EE_Ticket_Selector_Config $template_settings |
|
27 | + */ |
|
28 | + protected $template_settings; |
|
29 | + |
|
30 | + /** |
|
31 | + * @var string $date_format |
|
32 | + */ |
|
33 | + protected $date_format; |
|
34 | + |
|
35 | + /** |
|
36 | + * @var string $time_format |
|
37 | + */ |
|
38 | + protected $time_format; |
|
39 | + |
|
40 | + /** |
|
41 | + * @var boolean $event_is_expired |
|
42 | + */ |
|
43 | + protected $event_is_expired; |
|
44 | + |
|
45 | + |
|
46 | + |
|
47 | + /** |
|
48 | + * TicketDetails constructor. |
|
49 | + * |
|
50 | + * @param \EE_Ticket $ticket |
|
51 | + * @param \EE_Ticket_Selector_Config $template_settings |
|
52 | + * @param array $template_args |
|
53 | + */ |
|
54 | + public function __construct( |
|
55 | + \EE_Ticket $ticket, |
|
56 | + \EE_Ticket_Selector_Config $template_settings, |
|
57 | + array $template_args |
|
58 | + ) |
|
59 | + { |
|
60 | + $this->ticket = $ticket; |
|
61 | + $this->template_settings = $template_settings; |
|
62 | + $this->date_format = $template_args['date_format']; |
|
63 | + $this->time_format = $template_args['time_format']; |
|
64 | + $this->event_is_expired = $template_args['event_is_expired']; |
|
65 | + } |
|
66 | + |
|
67 | + |
|
68 | + |
|
69 | + /** |
|
70 | + * @return bool |
|
71 | + */ |
|
72 | + public function showTicketDetails() |
|
73 | + { |
|
74 | + return $this->template_settings->show_ticket_details; |
|
75 | + } |
|
76 | + |
|
77 | + |
|
78 | + |
|
79 | + /** |
|
80 | + * @return string |
|
81 | + */ |
|
82 | + public function getShowHideLinks() |
|
83 | + { |
|
84 | + if ( ! $this->showTicketDetails()) { |
|
85 | + return ''; |
|
86 | + } |
|
87 | + return \EEH_HTML::link( |
|
88 | + '', |
|
89 | + sprintf(__('show%1$sdetails%1$s+', 'event_espresso'), ' '), |
|
90 | + esc_attr( |
|
91 | + apply_filters( |
|
92 | + 'FHEE__ticket_selector_chart_template__show_ticket_details_link_title', |
|
93 | + __('click to show additional ticket details', 'event_espresso') |
|
94 | + ) |
|
95 | + ), |
|
96 | + "display-{$this->cssId()}", |
|
97 | + 'display-tckt-slctr-tkt-details display-the-hidden lt-grey-text smaller-text hide-if-no-js', |
|
98 | + '', |
|
99 | + 'rel="' . $this->cssId() . '"' |
|
100 | + ) . \EEH_HTML::link( |
|
101 | + '', |
|
102 | + sprintf(__('hide%1$sdetails%1$s-', 'event_espresso'), ' '), |
|
103 | + esc_attr( |
|
104 | + apply_filters( |
|
105 | + 'FHEE__ticket_selector_chart_template__hide_ticket_details_link_title', |
|
106 | + __('click to hide additional ticket details', 'event_espresso') |
|
107 | + ) |
|
108 | + ), |
|
109 | + "hide-{$this->cssId()}", |
|
110 | + 'hide-tckt-slctr-tkt-details hide-the-displayed lt-grey-text smaller-text hide-if-no-js', |
|
111 | + 'display:none;', |
|
112 | + 'rel="' . $this->cssId() . '"' |
|
113 | + ); |
|
114 | + } |
|
115 | + |
|
116 | + |
|
117 | + |
|
118 | + /** |
|
119 | + * @return string |
|
120 | + */ |
|
121 | + public function cssId() |
|
122 | + { |
|
123 | + return apply_filters( |
|
124 | + 'FHEE__ticket_selector_chart_template__ticket_details_css_id', |
|
125 | + "tckt-slctr-tkt-details-{$this->ticket->get_event_ID()}-{$this->ticket->ID()}" |
|
126 | + ); |
|
127 | + } |
|
128 | + |
|
129 | + |
|
130 | + |
|
131 | + /** |
|
132 | + * @param float $ticket_price |
|
133 | + * @param int $remaining |
|
134 | + * @param int $cols |
|
135 | + * @return string |
|
136 | + */ |
|
137 | + public function display( |
|
138 | + $ticket_price = 0.00, |
|
139 | + $remaining, |
|
140 | + $cols = 2 |
|
141 | + ) { |
|
142 | + $template_args = array(); |
|
143 | + $template_args['ticket'] = $this->ticket; |
|
144 | + $template_args['ticket_price'] = $ticket_price; |
|
145 | + $template_args['remaining'] = $remaining; |
|
146 | + $template_args['cols'] = $cols; |
|
147 | + $template_args['show_ticket_details'] = $this->template_settings->show_ticket_details; |
|
148 | + $template_args['show_ticket_sale_columns'] = $this->template_settings->show_ticket_sale_columns; |
|
149 | + $template_args['ticket_details_row_class'] = espresso_get_object_css_class($this->ticket, '', 'details'); |
|
150 | + $template_args['ticket_details_css_id'] = $this->cssId(); |
|
151 | + $template_args['display_ticket_price'] = $ticket_price !== 0 && apply_filters( |
|
152 | + 'FHEE__ticket_selector_chart_template__display_ticket_price_details', |
|
153 | + true |
|
154 | + ); |
|
155 | + $template_args['price_breakdown_heading'] = apply_filters( |
|
156 | + 'FHEE__ticket_selector_chart_template__ticket_details_price_breakdown_heading', |
|
157 | + esc_html__('Price', 'event_espresso') |
|
158 | + ); |
|
159 | + $template_args['date_format'] = $this->date_format; |
|
160 | + $template_args['time_format'] = $this->time_format; |
|
161 | + $template_args['event_is_expired'] = $this->event_is_expired; |
|
162 | + |
|
163 | + return \EEH_Template::locate_template( |
|
164 | + apply_filters( |
|
165 | + 'FHEE__EventEspresso_modules_ticket_selector_TicketDetails__display__template_path', |
|
166 | + TICKET_SELECTOR_TEMPLATES_PATH . 'ticket_details.template.php', |
|
167 | + $this->ticket |
|
168 | + ), |
|
169 | + $template_args |
|
170 | + ); |
|
171 | + } |
|
172 | 172 | |
173 | 173 | } |
174 | 174 | // End of file TicketDetails.php |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | "display-{$this->cssId()}", |
97 | 97 | 'display-tckt-slctr-tkt-details display-the-hidden lt-grey-text smaller-text hide-if-no-js', |
98 | 98 | '', |
99 | - 'rel="' . $this->cssId() . '"' |
|
100 | - ) . \EEH_HTML::link( |
|
99 | + 'rel="'.$this->cssId().'"' |
|
100 | + ).\EEH_HTML::link( |
|
101 | 101 | '', |
102 | 102 | sprintf(__('hide%1$sdetails%1$s-', 'event_espresso'), ' '), |
103 | 103 | esc_attr( |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | "hide-{$this->cssId()}", |
110 | 110 | 'hide-tckt-slctr-tkt-details hide-the-displayed lt-grey-text smaller-text hide-if-no-js', |
111 | 111 | 'display:none;', |
112 | - 'rel="' . $this->cssId() . '"' |
|
112 | + 'rel="'.$this->cssId().'"' |
|
113 | 113 | ); |
114 | 114 | } |
115 | 115 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | return \EEH_Template::locate_template( |
164 | 164 | apply_filters( |
165 | 165 | 'FHEE__EventEspresso_modules_ticket_selector_TicketDetails__display__template_path', |
166 | - TICKET_SELECTOR_TEMPLATES_PATH . 'ticket_details.template.php', |
|
166 | + TICKET_SELECTOR_TEMPLATES_PATH.'ticket_details.template.php', |
|
167 | 167 | $this->ticket |
168 | 168 | ), |
169 | 169 | $template_args |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | 2 | /** |
3 | - * |
|
4 | - * Class EE_SPCO_Reg_Step |
|
5 | - * |
|
6 | - * Description |
|
7 | - * |
|
8 | - * @package Event Espresso |
|
9 | - * @subpackage core |
|
10 | - * @author Brent Christensen |
|
11 | - * @since 4.5.0 |
|
12 | - * |
|
13 | - */ |
|
3 | + * |
|
4 | + * Class EE_SPCO_Reg_Step |
|
5 | + * |
|
6 | + * Description |
|
7 | + * |
|
8 | + * @package Event Espresso |
|
9 | + * @subpackage core |
|
10 | + * @author Brent Christensen |
|
11 | + * @since 4.5.0 |
|
12 | + * |
|
13 | + */ |
|
14 | 14 | abstract class EE_SPCO_Reg_Step { |
15 | 15 | |
16 | 16 | /** |
@@ -385,12 +385,12 @@ discard block |
||
385 | 385 | |
386 | 386 | |
387 | 387 | |
388 | - /** |
|
389 | - * creates the default hidden inputs section |
|
390 | - * |
|
391 | - * @return EE_Form_Section_Proper |
|
392 | - * @throws \EE_Error |
|
393 | - */ |
|
388 | + /** |
|
389 | + * creates the default hidden inputs section |
|
390 | + * |
|
391 | + * @return EE_Form_Section_Proper |
|
392 | + * @throws \EE_Error |
|
393 | + */ |
|
394 | 394 | public function reg_step_hidden_inputs() { |
395 | 395 | // hidden inputs for admin registrations |
396 | 396 | if ( $this->checkout->admin_request ) { |
@@ -465,10 +465,10 @@ discard block |
||
465 | 465 | |
466 | 466 | |
467 | 467 | |
468 | - /** |
|
469 | - * @return string |
|
470 | - * @throws \EE_Error |
|
471 | - */ |
|
468 | + /** |
|
469 | + * @return string |
|
470 | + * @throws \EE_Error |
|
471 | + */ |
|
472 | 472 | public function display_reg_form() { |
473 | 473 | $html = ''; |
474 | 474 | if ( $this->reg_form instanceof EE_Form_Section_Proper ) { |
@@ -477,8 +477,8 @@ discard block |
||
477 | 477 | $this->reg_form->localize_validation_rules(); |
478 | 478 | $this->checkout->json_response->add_validation_rules( EE_Form_Section_Proper::js_localization() ); |
479 | 479 | } |
480 | - $html .= $this->reg_form->get_html(); |
|
481 | - $html .= ! $this->checkout->admin_request ? $this->reg_step_submit_button() : ''; |
|
480 | + $html .= $this->reg_form->get_html(); |
|
481 | + $html .= ! $this->checkout->admin_request ? $this->reg_step_submit_button() : ''; |
|
482 | 482 | $html .= ! $this->checkout->admin_request ? $this->reg_form->form_close() : ''; |
483 | 483 | } |
484 | 484 | return $html; |
@@ -486,12 +486,12 @@ discard block |
||
486 | 486 | |
487 | 487 | |
488 | 488 | |
489 | - /** |
|
490 | - * div_class - returns nothing for current step, but a css class of "hidden" for others |
|
491 | - * |
|
492 | - * @return string |
|
493 | - * @throws \EE_Error |
|
494 | - */ |
|
489 | + /** |
|
490 | + * div_class - returns nothing for current step, but a css class of "hidden" for others |
|
491 | + * |
|
492 | + * @return string |
|
493 | + * @throws \EE_Error |
|
494 | + */ |
|
495 | 495 | public function reg_step_submit_button() { |
496 | 496 | if ( ! $this->checkout->next_step instanceof EE_SPCO_Reg_Step ) { |
497 | 497 | return ''; |
@@ -550,12 +550,12 @@ discard block |
||
550 | 550 | |
551 | 551 | |
552 | 552 | |
553 | - /** |
|
554 | - * update_checkout with changes that have been made to the cart |
|
555 | - * |
|
556 | - * @return void |
|
557 | - * @throws \EE_Error |
|
558 | - */ |
|
553 | + /** |
|
554 | + * update_checkout with changes that have been made to the cart |
|
555 | + * |
|
556 | + * @return void |
|
557 | + * @throws \EE_Error |
|
558 | + */ |
|
559 | 559 | public function update_checkout() { |
560 | 560 | // grab the cart grand total and reset TXN total |
561 | 561 | $this->checkout->transaction->set_total( $this->checkout->cart->get_cart_grand_total() ); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | public function set_completed() { |
154 | 154 | // DEBUG LOG |
155 | 155 | //$this->checkout->log( __CLASS__, __FUNCTION__, __LINE__ ); |
156 | - $this->_completed = apply_filters( 'FHEE__EE_SPCO_Reg_Step__set_completed___completed', true, $this ); |
|
156 | + $this->_completed = apply_filters('FHEE__EE_SPCO_Reg_Step__set_completed___completed', true, $this); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | |
@@ -201,18 +201,18 @@ discard block |
||
201 | 201 | * sets the text that appears on the reg step form submit button |
202 | 202 | * @param string $submit_button_text |
203 | 203 | */ |
204 | - public function set_submit_button_text( $submit_button_text = '' ) { |
|
205 | - if ( ! empty( $submit_button_text )) { |
|
204 | + public function set_submit_button_text($submit_button_text = '') { |
|
205 | + if ( ! empty($submit_button_text)) { |
|
206 | 206 | $this->_submit_button_text = $submit_button_text; |
207 | - } else if ( $this->checkout->next_step instanceof EE_SPCO_Reg_Step ) { |
|
208 | - if ( $this->checkout->revisit ) { |
|
209 | - $this->_submit_button_text = sprintf( __( 'Update %s', 'event_espresso' ), $this->checkout->current_step->name() ); |
|
207 | + } else if ($this->checkout->next_step instanceof EE_SPCO_Reg_Step) { |
|
208 | + if ($this->checkout->revisit) { |
|
209 | + $this->_submit_button_text = sprintf(__('Update %s', 'event_espresso'), $this->checkout->current_step->name()); |
|
210 | 210 | } else { |
211 | - $this->_submit_button_text = sprintf( __( 'Proceed to %s', 'event_espresso' ), $this->checkout->next_step->name() ); |
|
211 | + $this->_submit_button_text = sprintf(__('Proceed to %s', 'event_espresso'), $this->checkout->next_step->name()); |
|
212 | 212 | } |
213 | 213 | } |
214 | 214 | // filters the submit button text |
215 | - $this->_submit_button_text = apply_filters( 'FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', $this->_submit_button_text, $this->checkout ); |
|
215 | + $this->_submit_button_text = apply_filters('FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', $this->_submit_button_text, $this->checkout); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | /** |
221 | 221 | * @param boolean $is_current_step |
222 | 222 | */ |
223 | - public function set_is_current_step( $is_current_step ) { |
|
223 | + public function set_is_current_step($is_current_step) { |
|
224 | 224 | $this->_is_current_step = $is_current_step; |
225 | 225 | } |
226 | 226 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | /** |
248 | 248 | * @param int $order |
249 | 249 | */ |
250 | - public function set_order( $order ) { |
|
250 | + public function set_order($order) { |
|
251 | 251 | $this->_order = $order; |
252 | 252 | } |
253 | 253 | |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | * _set_success_message |
286 | 286 | * @param string $success_message |
287 | 287 | */ |
288 | - protected function _set_success_message( $success_message ) { |
|
288 | + protected function _set_success_message($success_message) { |
|
289 | 289 | $this->_success_message = $success_message; |
290 | 290 | } |
291 | 291 | |
@@ -313,8 +313,8 @@ discard block |
||
313 | 313 | /** |
314 | 314 | * @param string $instructions |
315 | 315 | */ |
316 | - public function set_instructions( $instructions ) { |
|
317 | - $this->_instructions = apply_filters( 'FHEE__EE_SPCO_Reg_Step__set_instructions__instructions', $instructions, $this ); |
|
316 | + public function set_instructions($instructions) { |
|
317 | + $this->_instructions = apply_filters('FHEE__EE_SPCO_Reg_Step__set_instructions__instructions', $instructions, $this); |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | /** |
323 | 323 | * @param array $valid_data |
324 | 324 | */ |
325 | - public function set_valid_data( $valid_data ) { |
|
325 | + public function set_valid_data($valid_data) { |
|
326 | 326 | $this->_valid_data = $valid_data; |
327 | 327 | } |
328 | 328 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | * @return array |
333 | 333 | */ |
334 | 334 | public function valid_data() { |
335 | - if ( empty( $this->_valid_data )) { |
|
335 | + if (empty($this->_valid_data)) { |
|
336 | 336 | $this->_valid_data = $this->reg_form->valid_data(); |
337 | 337 | } |
338 | 338 | return $this->_valid_data; |
@@ -343,8 +343,8 @@ discard block |
||
343 | 343 | * @return string |
344 | 344 | */ |
345 | 345 | public function reg_form_name() { |
346 | - if ( empty( $this->_reg_form_name )) { |
|
347 | - $this->set_reg_form_name( 'ee-spco-' . $this->slug() . '-reg-step-form' ); |
|
346 | + if (empty($this->_reg_form_name)) { |
|
347 | + $this->set_reg_form_name('ee-spco-'.$this->slug().'-reg-step-form'); |
|
348 | 348 | } |
349 | 349 | return $this->_reg_form_name; |
350 | 350 | } |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | /** |
355 | 355 | * @param string $reg_form_name |
356 | 356 | */ |
357 | - protected function set_reg_form_name( $reg_form_name ) { |
|
357 | + protected function set_reg_form_name($reg_form_name) { |
|
358 | 358 | $this->_reg_form_name = $reg_form_name; |
359 | 359 | } |
360 | 360 | |
@@ -365,22 +365,22 @@ discard block |
||
365 | 365 | * @param string $action |
366 | 366 | * @return string |
367 | 367 | */ |
368 | - public function reg_step_url( $action = '' ) { |
|
369 | - $query_args = array( 'step' => $this->slug() ); |
|
370 | - if( ! empty( $action )) { |
|
368 | + public function reg_step_url($action = '') { |
|
369 | + $query_args = array('step' => $this->slug()); |
|
370 | + if ( ! empty($action)) { |
|
371 | 371 | $query_args['action'] = $action; |
372 | 372 | } |
373 | 373 | // final step has no display |
374 | - if ( $this instanceof EE_SPCO_Reg_Step_Finalize_Registration && $action === 'display_spco_reg_step' ) { |
|
375 | - $query_args[ 'action' ] = 'process_reg_step'; |
|
374 | + if ($this instanceof EE_SPCO_Reg_Step_Finalize_Registration && $action === 'display_spco_reg_step') { |
|
375 | + $query_args['action'] = 'process_reg_step'; |
|
376 | 376 | } |
377 | - if( $this->checkout->revisit ) { |
|
377 | + if ($this->checkout->revisit) { |
|
378 | 378 | $query_args['revisit'] = TRUE; |
379 | 379 | } |
380 | - if( $this->checkout->reg_url_link ) { |
|
380 | + if ($this->checkout->reg_url_link) { |
|
381 | 381 | $query_args['e_reg_url_link'] = $this->checkout->reg_url_link; |
382 | 382 | } |
383 | - return add_query_arg( $query_args, $this->checkout->reg_page_base_url ); |
|
383 | + return add_query_arg($query_args, $this->checkout->reg_page_base_url); |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | |
@@ -393,16 +393,16 @@ discard block |
||
393 | 393 | */ |
394 | 394 | public function reg_step_hidden_inputs() { |
395 | 395 | // hidden inputs for admin registrations |
396 | - if ( $this->checkout->admin_request ) { |
|
396 | + if ($this->checkout->admin_request) { |
|
397 | 397 | return new EE_Form_Section_Proper( |
398 | 398 | array( |
399 | 399 | 'layout_strategy' => new EE_Div_Per_Section_Layout(), |
400 | - 'html_id' => 'ee-' . $this->slug() . '-hidden-inputs', |
|
400 | + 'html_id' => 'ee-'.$this->slug().'-hidden-inputs', |
|
401 | 401 | 'subsections' => array( |
402 | 402 | 'next_step' => new EE_Fixed_Hidden_Input( |
403 | 403 | array( |
404 | 404 | 'html_name' => 'next_step', |
405 | - 'html_id' => 'spco-' . $this->slug() . '-next-step', |
|
405 | + 'html_id' => 'spco-'.$this->slug().'-next-step', |
|
406 | 406 | 'default' => $this->checkout->next_step instanceof EE_SPCO_Reg_Step ? $this->checkout->next_step->slug() : '' |
407 | 407 | ) |
408 | 408 | ) |
@@ -414,19 +414,19 @@ discard block |
||
414 | 414 | return new EE_Form_Section_Proper( |
415 | 415 | array( |
416 | 416 | 'layout_strategy' => new EE_Div_Per_Section_Layout(), |
417 | - 'html_id' => 'ee-' . $this->slug() . '-hidden-inputs', |
|
417 | + 'html_id' => 'ee-'.$this->slug().'-hidden-inputs', |
|
418 | 418 | 'subsections' => array( |
419 | 419 | 'action' => new EE_Fixed_Hidden_Input( |
420 | 420 | array( |
421 | 421 | 'html_name' => 'action', |
422 | - 'html_id' => 'spco-' . $this->slug() . '-action', |
|
423 | - 'default' => empty( $this->checkout->reg_url_link ) ? 'process_reg_step' : 'update_reg_step' |
|
422 | + 'html_id' => 'spco-'.$this->slug().'-action', |
|
423 | + 'default' => empty($this->checkout->reg_url_link) ? 'process_reg_step' : 'update_reg_step' |
|
424 | 424 | ) |
425 | 425 | ), |
426 | 426 | 'next_step' => new EE_Fixed_Hidden_Input( |
427 | 427 | array( |
428 | 428 | 'html_name' => 'next_step', |
429 | - 'html_id' => 'spco-' . $this->slug() . '-next-step', |
|
429 | + 'html_id' => 'spco-'.$this->slug().'-next-step', |
|
430 | 430 | 'default' => $this->checkout->next_step instanceof EE_SPCO_Reg_Step ? $this->checkout->next_step->slug() : '' |
431 | 431 | ) |
432 | 432 | ), |
@@ -458,9 +458,9 @@ discard block |
||
458 | 458 | * @param array $actions |
459 | 459 | * @return void |
460 | 460 | */ |
461 | - public function generate_reg_form_for_actions( $actions = array() ) { |
|
462 | - $actions = array_merge( array( 'generate_reg_form', 'display_spco_reg_step', 'process_reg_step', 'update_reg_step' ), $actions ); |
|
463 | - $this->checkout->generate_reg_form = in_array( $this->checkout->action, $actions ) ? TRUE : FALSE; |
|
461 | + public function generate_reg_form_for_actions($actions = array()) { |
|
462 | + $actions = array_merge(array('generate_reg_form', 'display_spco_reg_step', 'process_reg_step', 'update_reg_step'), $actions); |
|
463 | + $this->checkout->generate_reg_form = in_array($this->checkout->action, $actions) ? TRUE : FALSE; |
|
464 | 464 | } |
465 | 465 | |
466 | 466 | |
@@ -471,11 +471,11 @@ discard block |
||
471 | 471 | */ |
472 | 472 | public function display_reg_form() { |
473 | 473 | $html = ''; |
474 | - if ( $this->reg_form instanceof EE_Form_Section_Proper ) { |
|
475 | - $html .= ! $this->checkout->admin_request ? $this->reg_form->form_open( $this->reg_step_url() ) : ''; |
|
476 | - if ( EE_Registry::instance()->REQ->ajax ) { |
|
474 | + if ($this->reg_form instanceof EE_Form_Section_Proper) { |
|
475 | + $html .= ! $this->checkout->admin_request ? $this->reg_form->form_open($this->reg_step_url()) : ''; |
|
476 | + if (EE_Registry::instance()->REQ->ajax) { |
|
477 | 477 | $this->reg_form->localize_validation_rules(); |
478 | - $this->checkout->json_response->add_validation_rules( EE_Form_Section_Proper::js_localization() ); |
|
478 | + $this->checkout->json_response->add_validation_rules(EE_Form_Section_Proper::js_localization()); |
|
479 | 479 | } |
480 | 480 | $html .= $this->reg_form->get_html(); |
481 | 481 | $html .= ! $this->checkout->admin_request ? $this->reg_step_submit_button() : ''; |
@@ -493,25 +493,25 @@ discard block |
||
493 | 493 | * @throws \EE_Error |
494 | 494 | */ |
495 | 495 | public function reg_step_submit_button() { |
496 | - if ( ! $this->checkout->next_step instanceof EE_SPCO_Reg_Step ) { |
|
496 | + if ( ! $this->checkout->next_step instanceof EE_SPCO_Reg_Step) { |
|
497 | 497 | return ''; |
498 | 498 | } |
499 | 499 | ob_start(); |
500 | - do_action( 'AHEE__before_spco_whats_next_buttons', $this->slug(), $this->checkout->next_step->slug(), $this->checkout ); |
|
500 | + do_action('AHEE__before_spco_whats_next_buttons', $this->slug(), $this->checkout->next_step->slug(), $this->checkout); |
|
501 | 501 | $html = ob_get_clean(); |
502 | 502 | // generate submit button |
503 | - $sbmt_btn = new EE_Submit_Input( array( |
|
504 | - 'html_name' => 'spco-go-to-step-' . $this->checkout->next_step->slug(), |
|
505 | - 'html_id' => 'spco-go-to-step-' . $this->checkout->next_step->slug(), |
|
503 | + $sbmt_btn = new EE_Submit_Input(array( |
|
504 | + 'html_name' => 'spco-go-to-step-'.$this->checkout->next_step->slug(), |
|
505 | + 'html_id' => 'spco-go-to-step-'.$this->checkout->next_step->slug(), |
|
506 | 506 | 'html_class' => 'spco-next-step-btn', |
507 | - 'other_html_attributes' => ' rel="' . $this->slug() . '"', |
|
507 | + 'other_html_attributes' => ' rel="'.$this->slug().'"', |
|
508 | 508 | 'default' => $this->submit_button_text() |
509 | 509 | )); |
510 | - $sbmt_btn->set_button_css_attributes( TRUE, 'large' ); |
|
510 | + $sbmt_btn->set_button_css_attributes(TRUE, 'large'); |
|
511 | 511 | $sbmt_btn_html = $sbmt_btn->get_html_for_input(); |
512 | 512 | $html .= EEH_HTML::div( |
513 | - apply_filters( 'FHEE__EE_SPCO_Reg_Step__reg_step_submit_button__sbmt_btn_html', $sbmt_btn_html, $this ), |
|
514 | - 'spco-' . $this->slug() . '-whats-next-buttons-dv', |
|
513 | + apply_filters('FHEE__EE_SPCO_Reg_Step__reg_step_submit_button__sbmt_btn_html', $sbmt_btn_html, $this), |
|
514 | + 'spco-'.$this->slug().'-whats-next-buttons-dv', |
|
515 | 515 | 'spco-whats-next-buttons' |
516 | 516 | ); |
517 | 517 | return $html; |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | * @return string |
535 | 535 | */ |
536 | 536 | public function edit_lnk_url() { |
537 | - return add_query_arg( array( 'step' => $this->slug() ), $this->checkout->reg_page_base_url ); |
|
537 | + return add_query_arg(array('step' => $this->slug()), $this->checkout->reg_page_base_url); |
|
538 | 538 | |
539 | 539 | } |
540 | 540 | |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | */ |
559 | 559 | public function update_checkout() { |
560 | 560 | // grab the cart grand total and reset TXN total |
561 | - $this->checkout->transaction->set_total( $this->checkout->cart->get_cart_grand_total() ); |
|
561 | + $this->checkout->transaction->set_total($this->checkout->cart->get_cart_grand_total()); |
|
562 | 562 | $this->checkout->stash_transaction_and_checkout(); |
563 | 563 | } |
564 | 564 | |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | */ |
574 | 574 | public function __sleep() { |
575 | 575 | // remove the reg form and the checkout |
576 | - return array_diff( array_keys( get_object_vars( $this )), array( 'reg_form', 'checkout' )); |
|
576 | + return array_diff(array_keys(get_object_vars($this)), array('reg_form', 'checkout')); |
|
577 | 577 | } |
578 | 578 | } |
579 | 579 |
@@ -1,29 +1,29 @@ |
||
1 | 1 | <div class="padding"> |
2 | 2 | <h3><?php esc_html_e('Need help with Event Espresso?', 'event_espresso'); ?></h3> |
3 | 3 | |
4 | - <h4><?php esc_html_e( 'You may be able to find an answer for your question or concern here:', 'event_espresso' ); ?></h4> |
|
4 | + <h4><?php esc_html_e('You may be able to find an answer for your question or concern here:', 'event_espresso'); ?></h4> |
|
5 | 5 | <ol> |
6 | - <li><strong><em><?php esc_html_e( 'A known issue.', 'event_espresso' ); ?></em></strong> <?php printf( esc_html__( 'Some themes and plugins have %1$sknown conflicts%2$s with Event Espresso. (You can also browse the %3$sEvent Espresso support pages%2$s or %4$sEvent Espresso support forums%2$s to see if other members have experienced and solved the problem.)', 'event_espresso' ), '<a href="https://eventespresso.com/wiki/known-third-party-plugin-theme-conflicts/" target="_blank">','</a>', '<a href="https://eventespresso.com/support/documentation/versioned-docs/?doc_ver=ee4" target="_blank">', '<a href="https://eventespresso.com/support/forums/" target="_blank">' ); ?></li> |
|
7 | - <li><strong><em><?php esc_html_e( 'A plugin conflict.', 'event_espresso' ); ?></em></strong> <?php esc_html_e( 'You can check to see if there is a plugin conflict by temporarily deactivating all plugins except for Event Espresso. If the problem goes away, then reactivate your plugins one by one until the issue returns. This will help you pinpoint the source of the conflict.', 'event_espresso' ); ?></li> |
|
6 | + <li><strong><em><?php esc_html_e('A known issue.', 'event_espresso'); ?></em></strong> <?php printf(esc_html__('Some themes and plugins have %1$sknown conflicts%2$s with Event Espresso. (You can also browse the %3$sEvent Espresso support pages%2$s or %4$sEvent Espresso support forums%2$s to see if other members have experienced and solved the problem.)', 'event_espresso'), '<a href="https://eventespresso.com/wiki/known-third-party-plugin-theme-conflicts/" target="_blank">', '</a>', '<a href="https://eventespresso.com/support/documentation/versioned-docs/?doc_ver=ee4" target="_blank">', '<a href="https://eventespresso.com/support/forums/" target="_blank">'); ?></li> |
|
7 | + <li><strong><em><?php esc_html_e('A plugin conflict.', 'event_espresso'); ?></em></strong> <?php esc_html_e('You can check to see if there is a plugin conflict by temporarily deactivating all plugins except for Event Espresso. If the problem goes away, then reactivate your plugins one by one until the issue returns. This will help you pinpoint the source of the conflict.', 'event_espresso'); ?></li> |
|
8 | 8 | <li> |
9 | - <strong><em><?php esc_html_e( 'A theme conflict.', 'event_espresso' ); ?></em></strong> |
|
9 | + <strong><em><?php esc_html_e('A theme conflict.', 'event_espresso'); ?></em></strong> |
|
10 | 10 | <?php |
11 | - $default_theme = wp_get_theme( WP_DEFAULT_THEME ); |
|
11 | + $default_theme = wp_get_theme(WP_DEFAULT_THEME); |
|
12 | 12 | |
13 | - if ( $default_theme->exists() ) { |
|
14 | - printf( esc_html__( 'If your problem is not a known issue or caused by a plugin, then try activating %s (the default WordPress theme).', 'event_espresso' ), $default_theme->get( 'Name' ) ); |
|
13 | + if ($default_theme->exists()) { |
|
14 | + printf(esc_html__('If your problem is not a known issue or caused by a plugin, then try activating %s (the default WordPress theme).', 'event_espresso'), $default_theme->get('Name')); |
|
15 | 15 | } else { |
16 | - esc_html_e( 'If your problem is not a known issue or caused by a plugin, then try activating the default WordPress theme.', 'event_espresso' ); |
|
16 | + esc_html_e('If your problem is not a known issue or caused by a plugin, then try activating the default WordPress theme.', 'event_espresso'); |
|
17 | 17 | } |
18 | 18 | ?> |
19 | - <?php esc_html_e( 'If this solves the problem for you, then something in your theme is causing this issue. Check to see if an update is available for your WordPress theme or reach out to the theme author.', 'event_espresso' ); ?> |
|
19 | + <?php esc_html_e('If this solves the problem for you, then something in your theme is causing this issue. Check to see if an update is available for your WordPress theme or reach out to the theme author.', 'event_espresso'); ?> |
|
20 | 20 | </li> |
21 | 21 | </ol> |
22 | 22 | |
23 | - <p><?php esc_html_e( 'If none of the suggestions above help you find a solution, then feel free to reach out to the support team at Event Espresso.', 'event_espresso' ); ?></p> |
|
24 | - <p><?php printf( esc_html__( 'Login to your account on EventEspresso.com and %1$screate a support post in our member support forums%2$s. Use a %3$sclear and descriptive title%4$s in your support post, %3$sdescribe the issue to the best of your knowledge%4$s, and %3$snever post any sensitive information such as login details%4$s. Be sure to also include %5$simportant information in the section below%2$s about your WordPress site.', 'event_espresso' ), '<a href="https://eventespresso.com/support/forums/" target="_blank">','</a>','<strong>','</strong>','<a href="#espresso_important_information_settings">' ); ?></p> |
|
23 | + <p><?php esc_html_e('If none of the suggestions above help you find a solution, then feel free to reach out to the support team at Event Espresso.', 'event_espresso'); ?></p> |
|
24 | + <p><?php printf(esc_html__('Login to your account on EventEspresso.com and %1$screate a support post in our member support forums%2$s. Use a %3$sclear and descriptive title%4$s in your support post, %3$sdescribe the issue to the best of your knowledge%4$s, and %3$snever post any sensitive information such as login details%4$s. Be sure to also include %5$simportant information in the section below%2$s about your WordPress site.', 'event_espresso'), '<a href="https://eventespresso.com/support/forums/" target="_blank">', '</a>', '<strong>', '</strong>', '<a href="#espresso_important_information_settings">'); ?></p> |
|
25 | 25 | |
26 | - <h4><?php esc_html_e( 'Have an emergency?', 'event_espresso' ); ?></h4> |
|
26 | + <h4><?php esc_html_e('Have an emergency?', 'event_espresso'); ?></h4> |
|
27 | 27 | |
28 | - <p><?php printf( esc_html__( 'We offer support tokens to members that need help with a time-sensitive issue. A support token will provide you with up to 30 minutes of one-on-one time with a team member at Event Espresso. If you have an emergency and need help quickly, then please %1$spurchase a support token%2$s.', 'event_espresso' ), '<a href="https://eventespresso.com/product/premium-support-token/?utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=help_support_tab&utm_content=support_token" target="_blank">','</a>' ); ?></p> |
|
28 | + <p><?php printf(esc_html__('We offer support tokens to members that need help with a time-sensitive issue. A support token will provide you with up to 30 minutes of one-on-one time with a team member at Event Espresso. If you have an emergency and need help quickly, then please %1$spurchase a support token%2$s.', 'event_espresso'), '<a href="https://eventespresso.com/product/premium-support-token/?utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=help_support_tab&utm_content=support_token" target="_blank">', '</a>'); ?></p> |
|
29 | 29 | </div> |
30 | 30 | \ No newline at end of file |