@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | use EventEspresso\modules\invalid_checkout_access\InvalidCheckoutAccess; |
3 | 3 | |
4 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
5 | - exit( 'No direct script access allowed' ); |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -36,12 +36,12 @@ discard block |
||
36 | 36 | public static function set_hooks_admin() { |
37 | 37 | add_action( |
38 | 38 | 'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template', |
39 | - array( 'EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form' ), |
|
39 | + array('EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form'), |
|
40 | 40 | 15 |
41 | 41 | ); |
42 | 42 | add_filter( |
43 | 43 | 'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration', |
44 | - array( 'EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form' ) |
|
44 | + array('EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form') |
|
45 | 45 | ); |
46 | 46 | } |
47 | 47 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @var WP $WP |
55 | 55 | */ |
56 | - public function run( $WP ) { |
|
56 | + public function run($WP) { |
|
57 | 57 | // TODO: Implement run() method. |
58 | 58 | } |
59 | 59 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @return InvalidCheckoutAccess |
64 | 64 | */ |
65 | 65 | public static function getInvalidCheckoutAccess() { |
66 | - if ( ! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess ) { |
|
66 | + if ( ! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) { |
|
67 | 67 | self::$invalid_checkout_access_form = new InvalidCheckoutAccess(); |
68 | 68 | } |
69 | 69 | return self::$invalid_checkout_access_form; |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | * @param \EE_Registration_Config $EE_Registration_Config |
91 | 91 | * @return \EE_Registration_Config |
92 | 92 | */ |
93 | - public static function process_invalid_checkout_access_form( \EE_Registration_Config $EE_Registration_Config ) { |
|
93 | + public static function process_invalid_checkout_access_form(\EE_Registration_Config $EE_Registration_Config) { |
|
94 | 94 | $invalid_checkout_access_form = \EED_Invalid_Checkout_Access::getInvalidCheckoutAccess(); |
95 | - return $invalid_checkout_access_form->processForm( $EE_Registration_Config ); |
|
95 | + return $invalid_checkout_access_form->processForm($EE_Registration_Config); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\exceptions; |
3 | 3 | |
4 | -defined( 'ABSPATH' ) || exit; |
|
4 | +defined('ABSPATH') || exit; |
|
5 | 5 | |
6 | 6 | |
7 | 7 | |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | * @param int $code |
23 | 23 | * @param \Exception $previous |
24 | 24 | */ |
25 | - public function __construct( $message = '', $code = 0, \Exception $previous = null ) { |
|
26 | - if ( empty( $message ) ) { |
|
27 | - $message = esc_html__( 'The session data is either missing or invalid.', 'event_espresso' ); |
|
25 | + public function __construct($message = '', $code = 0, \Exception $previous = null) { |
|
26 | + if (empty($message)) { |
|
27 | + $message = esc_html__('The session data is either missing or invalid.', 'event_espresso'); |
|
28 | 28 | } |
29 | - parent::__construct( $message, $code, $previous ); |
|
29 | + parent::__construct($message, $code, $previous); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <div class="padding"> |
2 | - <p><?php printf( esc_html__( 'Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso' ), '<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank">','</a>' ); ?></p> |
|
2 | + <p><?php printf(esc_html__('Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso'), '<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank">', '</a>'); ?></p> |
|
3 | 3 | </div> |
4 | 4 | \ No newline at end of file |
@@ -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; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public static function instance() { |
43 | 43 | // check if class object is instantiated, and instantiated properly |
44 | - if ( ! self::$_instance instanceof EEH_HTML ) { |
|
44 | + if ( ! self::$_instance instanceof EEH_HTML) { |
|
45 | 45 | self::$_instance = new EEH_HTML(); |
46 | 46 | } |
47 | 47 | return self::$_instance; |
@@ -102,14 +102,14 @@ discard block |
||
102 | 102 | $other_attributes = '', |
103 | 103 | $force_close = false |
104 | 104 | ) { |
105 | - $attributes = ! empty( $id ) ? ' id="' . EEH_HTML::sanitize_id( $id ) . '"' : ''; |
|
106 | - $attributes .= ! empty( $class ) ? ' class="' . $class . '"' : ''; |
|
107 | - $attributes .= ! empty( $style ) ? ' style="' . $style . '"' : ''; |
|
108 | - $attributes .= ! empty( $other_attributes ) ? ' ' . $other_attributes : ''; |
|
109 | - $html = EEH_HTML::nl( 0, $tag ) . '<' . $tag . $attributes . '>'; |
|
110 | - $html .= ! empty( $content ) ? EEH_HTML::nl( 1, $tag ) . $content : ''; |
|
111 | - $indent = ! empty( $content ) || $force_close ? TRUE : FALSE; |
|
112 | - $html .= ! empty( $content ) || $force_close ? EEH_HTML::_close_tag( $tag, $id, $class, $indent ) : ''; |
|
105 | + $attributes = ! empty($id) ? ' id="'.EEH_HTML::sanitize_id($id).'"' : ''; |
|
106 | + $attributes .= ! empty($class) ? ' class="'.$class.'"' : ''; |
|
107 | + $attributes .= ! empty($style) ? ' style="'.$style.'"' : ''; |
|
108 | + $attributes .= ! empty($other_attributes) ? ' '.$other_attributes : ''; |
|
109 | + $html = EEH_HTML::nl(0, $tag).'<'.$tag.$attributes.'>'; |
|
110 | + $html .= ! empty($content) ? EEH_HTML::nl(1, $tag).$content : ''; |
|
111 | + $indent = ! empty($content) || $force_close ? TRUE : FALSE; |
|
112 | + $html .= ! empty($content) || $force_close ? EEH_HTML::_close_tag($tag, $id, $class, $indent) : ''; |
|
113 | 113 | return $html; |
114 | 114 | } |
115 | 115 | |
@@ -126,15 +126,15 @@ discard block |
||
126 | 126 | * @param bool $indent |
127 | 127 | * @return string |
128 | 128 | */ |
129 | - protected static function _close_tag( $tag = 'div', $id = '', $class = '', $indent = TRUE ) { |
|
129 | + protected static function _close_tag($tag = 'div', $id = '', $class = '', $indent = TRUE) { |
|
130 | 130 | $comment = ''; |
131 | - if ( $id ) { |
|
132 | - $comment = EEH_HTML::comment( 'close ' . $id ) . EEH_HTML::nl( 0, $tag ); |
|
133 | - } else if ( $class ) { |
|
134 | - $comment = EEH_HTML::comment( 'close ' . $class ) . EEH_HTML::nl( 0, $tag ); |
|
131 | + if ($id) { |
|
132 | + $comment = EEH_HTML::comment('close '.$id).EEH_HTML::nl(0, $tag); |
|
133 | + } else if ($class) { |
|
134 | + $comment = EEH_HTML::comment('close '.$class).EEH_HTML::nl(0, $tag); |
|
135 | 135 | } |
136 | 136 | $html = $indent ? EEH_HTML::nl( -1, $tag ) : ''; |
137 | - $html .= '</' . $tag . '>' . $comment; |
|
137 | + $html .= '</'.$tag.'>'.$comment; |
|
138 | 138 | return $html; |
139 | 139 | } |
140 | 140 | |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
154 | 154 | * @return string |
155 | 155 | */ |
156 | - public static function div( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
157 | - return EEH_HTML::_open_tag( 'div', $content, $id, $class, $style, $other_attributes ); |
|
156 | + public static function div($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
157 | + return EEH_HTML::_open_tag('div', $content, $id, $class, $style, $other_attributes); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | * @param string $class - html class attribute |
168 | 168 | * @return string |
169 | 169 | */ |
170 | - public static function divx( $id = '', $class = '' ) { |
|
171 | - return EEH_HTML::_close_tag( 'div', $id, $class ); |
|
170 | + public static function divx($id = '', $class = '') { |
|
171 | + return EEH_HTML::_close_tag('div', $id, $class); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | |
@@ -184,8 +184,8 @@ discard block |
||
184 | 184 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
185 | 185 | * @return string |
186 | 186 | */ |
187 | - public static function h1( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
188 | - return EEH_HTML::_open_tag( 'h1', $content, $id, $class, $style, $other_attributes, TRUE ); |
|
187 | + public static function h1($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
188 | + return EEH_HTML::_open_tag('h1', $content, $id, $class, $style, $other_attributes, TRUE); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
202 | 202 | * @return string |
203 | 203 | */ |
204 | - public static function h2( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
205 | - return EEH_HTML::_open_tag( 'h2', $content, $id, $class, $style, $other_attributes, TRUE ); |
|
204 | + public static function h2($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
205 | + return EEH_HTML::_open_tag('h2', $content, $id, $class, $style, $other_attributes, TRUE); |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | |
@@ -218,8 +218,8 @@ discard block |
||
218 | 218 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
219 | 219 | * @return string |
220 | 220 | */ |
221 | - public static function h3( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
222 | - return EEH_HTML::_open_tag( 'h3', $content, $id, $class, $style, $other_attributes, TRUE ); |
|
221 | + public static function h3($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
222 | + return EEH_HTML::_open_tag('h3', $content, $id, $class, $style, $other_attributes, TRUE); |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | |
@@ -235,8 +235,8 @@ discard block |
||
235 | 235 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
236 | 236 | * @return string |
237 | 237 | */ |
238 | - public static function h4( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
239 | - return EEH_HTML::_open_tag( 'h4', $content, $id, $class, $style, $other_attributes, TRUE ); |
|
238 | + public static function h4($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
239 | + return EEH_HTML::_open_tag('h4', $content, $id, $class, $style, $other_attributes, TRUE); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | |
@@ -252,8 +252,8 @@ discard block |
||
252 | 252 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
253 | 253 | * @return string |
254 | 254 | */ |
255 | - public static function h5( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
256 | - return EEH_HTML::_open_tag( 'h5', $content, $id, $class, $style, $other_attributes, TRUE ); |
|
255 | + public static function h5($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
256 | + return EEH_HTML::_open_tag('h5', $content, $id, $class, $style, $other_attributes, TRUE); |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | |
@@ -269,8 +269,8 @@ discard block |
||
269 | 269 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
270 | 270 | * @return string |
271 | 271 | */ |
272 | - public static function h6( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
273 | - return EEH_HTML::_open_tag( 'h6', $content, $id, $class, $style, $other_attributes, TRUE ); |
|
272 | + public static function h6($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
273 | + return EEH_HTML::_open_tag('h6', $content, $id, $class, $style, $other_attributes, TRUE); |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | |
@@ -286,8 +286,8 @@ discard block |
||
286 | 286 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
287 | 287 | * @return string |
288 | 288 | */ |
289 | - public static function p( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
290 | - return EEH_HTML::_open_tag( 'p', $content, $id, $class, $style, $other_attributes, TRUE ); |
|
289 | + public static function p($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
290 | + return EEH_HTML::_open_tag('p', $content, $id, $class, $style, $other_attributes, TRUE); |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | |
@@ -302,8 +302,8 @@ discard block |
||
302 | 302 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
303 | 303 | * @return string |
304 | 304 | */ |
305 | - public static function ul( $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
306 | - return EEH_HTML::_open_tag( 'ul', '', $id, $class, $style, $other_attributes ); |
|
305 | + public static function ul($id = '', $class = '', $style = '', $other_attributes = '') { |
|
306 | + return EEH_HTML::_open_tag('ul', '', $id, $class, $style, $other_attributes); |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | |
@@ -316,8 +316,8 @@ discard block |
||
316 | 316 | * @param string $class - html class attribute |
317 | 317 | * @return string |
318 | 318 | */ |
319 | - public static function ulx( $id = '', $class = '' ) { |
|
320 | - return EEH_HTML::_close_tag( 'ul', $id, $class ); |
|
319 | + public static function ulx($id = '', $class = '') { |
|
320 | + return EEH_HTML::_close_tag('ul', $id, $class); |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | |
@@ -334,8 +334,8 @@ discard block |
||
334 | 334 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
335 | 335 | * @return string |
336 | 336 | */ |
337 | - public static function li( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
338 | - return EEH_HTML::_open_tag( 'li', $content, $id, $class, $style, $other_attributes ); |
|
337 | + public static function li($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
338 | + return EEH_HTML::_open_tag('li', $content, $id, $class, $style, $other_attributes); |
|
339 | 339 | } |
340 | 340 | |
341 | 341 | |
@@ -348,8 +348,8 @@ discard block |
||
348 | 348 | * @param string $class - html class attribute |
349 | 349 | * @return string |
350 | 350 | */ |
351 | - public static function lix( $id = '', $class = '' ) { |
|
352 | - return EEH_HTML::_close_tag( 'li', $id, $class ); |
|
351 | + public static function lix($id = '', $class = '') { |
|
352 | + return EEH_HTML::_close_tag('li', $id, $class); |
|
353 | 353 | } |
354 | 354 | |
355 | 355 | |
@@ -365,8 +365,8 @@ discard block |
||
365 | 365 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
366 | 366 | * @return string |
367 | 367 | */ |
368 | - public static function table( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
369 | - return EEH_HTML::_open_tag( 'table', $content, $id, $class, $style, $other_attributes ); |
|
368 | + public static function table($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
369 | + return EEH_HTML::_open_tag('table', $content, $id, $class, $style, $other_attributes); |
|
370 | 370 | } |
371 | 371 | |
372 | 372 | |
@@ -378,8 +378,8 @@ discard block |
||
378 | 378 | * @param string $class - html class attribute |
379 | 379 | * @return string |
380 | 380 | */ |
381 | - public static function tablex( $id = '', $class = '' ) { |
|
382 | - return EEH_HTML::_close_tag( 'table', $id, $class ); |
|
381 | + public static function tablex($id = '', $class = '') { |
|
382 | + return EEH_HTML::_close_tag('table', $id, $class); |
|
383 | 383 | } |
384 | 384 | |
385 | 385 | |
@@ -395,8 +395,8 @@ discard block |
||
395 | 395 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
396 | 396 | * @return string |
397 | 397 | */ |
398 | - public static function thead( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
399 | - return EEH_HTML::_open_tag( 'thead', $content, $id, $class, $style, $other_attributes ); |
|
398 | + public static function thead($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
399 | + return EEH_HTML::_open_tag('thead', $content, $id, $class, $style, $other_attributes); |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | |
@@ -408,8 +408,8 @@ discard block |
||
408 | 408 | * @param string $class - html class attribute |
409 | 409 | * @return string |
410 | 410 | */ |
411 | - public static function theadx( $id = '', $class = '' ) { |
|
412 | - return EEH_HTML::_close_tag( 'thead', $id, $class ); |
|
411 | + public static function theadx($id = '', $class = '') { |
|
412 | + return EEH_HTML::_close_tag('thead', $id, $class); |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | |
@@ -425,8 +425,8 @@ discard block |
||
425 | 425 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
426 | 426 | * @return string |
427 | 427 | */ |
428 | - public static function tbody( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
429 | - return EEH_HTML::_open_tag( 'tbody', $content, $id, $class, $style, $other_attributes ); |
|
428 | + public static function tbody($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
429 | + return EEH_HTML::_open_tag('tbody', $content, $id, $class, $style, $other_attributes); |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | |
@@ -438,8 +438,8 @@ discard block |
||
438 | 438 | * @param string $class - html class attribute |
439 | 439 | * @return string |
440 | 440 | */ |
441 | - public static function tbodyx( $id = '', $class = '' ) { |
|
442 | - return EEH_HTML::_close_tag( 'tbody', $id, $class ); |
|
441 | + public static function tbodyx($id = '', $class = '') { |
|
442 | + return EEH_HTML::_close_tag('tbody', $id, $class); |
|
443 | 443 | } |
444 | 444 | |
445 | 445 | |
@@ -455,8 +455,8 @@ discard block |
||
455 | 455 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
456 | 456 | * @return string |
457 | 457 | */ |
458 | - public static function tr( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
459 | - return EEH_HTML::_open_tag( 'tr', $content, $id, $class, $style, $other_attributes ); |
|
458 | + public static function tr($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
459 | + return EEH_HTML::_open_tag('tr', $content, $id, $class, $style, $other_attributes); |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | |
@@ -468,8 +468,8 @@ discard block |
||
468 | 468 | * @param string $class - html class attribute |
469 | 469 | * @return string |
470 | 470 | */ |
471 | - public static function trx( $id = '', $class = '' ) { |
|
472 | - return EEH_HTML::_close_tag( 'tr', $id, $class ); |
|
471 | + public static function trx($id = '', $class = '') { |
|
472 | + return EEH_HTML::_close_tag('tr', $id, $class); |
|
473 | 473 | } |
474 | 474 | |
475 | 475 | |
@@ -485,8 +485,8 @@ discard block |
||
485 | 485 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
486 | 486 | * @return string |
487 | 487 | */ |
488 | - public static function th( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
489 | - return EEH_HTML::_open_tag( 'th', $content, $id, $class, $style, $other_attributes ); |
|
488 | + public static function th($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
489 | + return EEH_HTML::_open_tag('th', $content, $id, $class, $style, $other_attributes); |
|
490 | 490 | } |
491 | 491 | |
492 | 492 | |
@@ -498,8 +498,8 @@ discard block |
||
498 | 498 | * @param string $class - html class attribute |
499 | 499 | * @return string |
500 | 500 | */ |
501 | - public static function thx( $id = '', $class = '' ) { |
|
502 | - return EEH_HTML::_close_tag( 'th', $id, $class ); |
|
501 | + public static function thx($id = '', $class = '') { |
|
502 | + return EEH_HTML::_close_tag('th', $id, $class); |
|
503 | 503 | } |
504 | 504 | |
505 | 505 | |
@@ -515,8 +515,8 @@ discard block |
||
515 | 515 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
516 | 516 | * @return string |
517 | 517 | */ |
518 | - public static function td( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
519 | - return EEH_HTML::_open_tag( 'td', $content, $id, $class, $style, $other_attributes ); |
|
518 | + public static function td($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
519 | + return EEH_HTML::_open_tag('td', $content, $id, $class, $style, $other_attributes); |
|
520 | 520 | } |
521 | 521 | |
522 | 522 | |
@@ -528,8 +528,8 @@ discard block |
||
528 | 528 | * @param string $class - html class attribute |
529 | 529 | * @return string |
530 | 530 | */ |
531 | - public static function tdx( $id = '', $class = '' ) { |
|
532 | - return EEH_HTML::_close_tag( 'td', $id, $class ); |
|
531 | + public static function tdx($id = '', $class = '') { |
|
532 | + return EEH_HTML::_close_tag('td', $id, $class); |
|
533 | 533 | } |
534 | 534 | |
535 | 535 | |
@@ -543,10 +543,10 @@ discard block |
||
543 | 543 | * @param int $colspan |
544 | 544 | * @return string |
545 | 545 | */ |
546 | - public static function no_row( $content = '', $colspan = 2 ) { |
|
546 | + public static function no_row($content = '', $colspan = 2) { |
|
547 | 547 | return EEH_HTML::tr( |
548 | - EEH_HTML::td( $content, '', '', 'padding:0; border:none;', 'colspan="' . $colspan . '"' ), |
|
549 | - '', '', 'padding:0; border:none;' |
|
548 | + EEH_HTML::td($content, '', '', 'padding:0; border:none;', 'colspan="'.$colspan.'"'), |
|
549 | + '', '', 'padding:0; border:none;' |
|
550 | 550 | ); |
551 | 551 | } |
552 | 552 | |
@@ -566,14 +566,14 @@ discard block |
||
566 | 566 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
567 | 567 | * @return string |
568 | 568 | */ |
569 | - public static function link( $href = '', $link_text = '', $title = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
570 | - $link_text = ! empty( $link_text ) ? $link_text : $href; |
|
571 | - $attributes = ! empty($href ) ? ' href="' . $href . '"' : ''; |
|
572 | - $attributes .= ! empty( $id ) ? ' id="' . EEH_HTML::sanitize_id( $id ) . '"' : ''; |
|
573 | - $attributes .= ! empty( $class ) ? ' class="' . $class . '"' : ''; |
|
574 | - $attributes .= ! empty( $style ) ? ' style="' . $style . '"' : ''; |
|
575 | - $attributes .= ! empty( $title ) ? ' title="' . esc_attr( $title ) . '"' : ''; |
|
576 | - $attributes .= ! empty( $other_attributes ) ? ' ' . $other_attributes : ''; |
|
569 | + public static function link($href = '', $link_text = '', $title = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
570 | + $link_text = ! empty($link_text) ? $link_text : $href; |
|
571 | + $attributes = ! empty($href) ? ' href="'.$href.'"' : ''; |
|
572 | + $attributes .= ! empty($id) ? ' id="'.EEH_HTML::sanitize_id($id).'"' : ''; |
|
573 | + $attributes .= ! empty($class) ? ' class="'.$class.'"' : ''; |
|
574 | + $attributes .= ! empty($style) ? ' style="'.$style.'"' : ''; |
|
575 | + $attributes .= ! empty($title) ? ' title="'.esc_attr($title).'"' : ''; |
|
576 | + $attributes .= ! empty($other_attributes) ? ' '.$other_attributes : ''; |
|
577 | 577 | return "<a{$attributes}>{$link_text}</a>"; |
578 | 578 | } |
579 | 579 | |
@@ -591,14 +591,14 @@ discard block |
||
591 | 591 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
592 | 592 | * @return string |
593 | 593 | */ |
594 | - public static function img( $src = '', $alt = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
595 | - $attributes = ! empty( $src ) ? ' src="' . esc_url_raw( $src ) . '"' : ''; |
|
596 | - $attributes .= ! empty( $alt ) ? ' alt="' . esc_attr( $alt ) . '"' : ''; |
|
597 | - $attributes .= ! empty( $id ) ? ' id="' . EEH_HTML::sanitize_id( $id ) . '"' : ''; |
|
598 | - $attributes .= ! empty( $class ) ? ' class="' . $class . '"' : ''; |
|
599 | - $attributes .= ! empty( $style ) ? ' style="' . $style . '"' : ''; |
|
600 | - $attributes .= ! empty( $other_attributes ) ? ' ' . $other_attributes : ''; |
|
601 | - return '<img' . $attributes . '/>'; |
|
594 | + public static function img($src = '', $alt = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
595 | + $attributes = ! empty($src) ? ' src="'.esc_url_raw($src).'"' : ''; |
|
596 | + $attributes .= ! empty($alt) ? ' alt="'.esc_attr($alt).'"' : ''; |
|
597 | + $attributes .= ! empty($id) ? ' id="'.EEH_HTML::sanitize_id($id).'"' : ''; |
|
598 | + $attributes .= ! empty($class) ? ' class="'.$class.'"' : ''; |
|
599 | + $attributes .= ! empty($style) ? ' style="'.$style.'"' : ''; |
|
600 | + $attributes .= ! empty($other_attributes) ? ' '.$other_attributes : ''; |
|
601 | + return '<img'.$attributes.'/>'; |
|
602 | 602 | } |
603 | 603 | |
604 | 604 | |
@@ -616,12 +616,12 @@ discard block |
||
616 | 616 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
617 | 617 | * @return string |
618 | 618 | */ |
619 | - protected static function _inline_tag( $tag = 'span', $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
620 | - $attributes = ! empty( $id ) ? ' id="' . EEH_HTML::sanitize_id( $id ) . '"' : ''; |
|
621 | - $attributes .= ! empty( $class ) ? ' class="' . $class . '"' : ''; |
|
622 | - $attributes .= ! empty( $style ) ? ' style="' . $style . '"' : ''; |
|
623 | - $attributes .= ! empty( $other_attributes ) ? ' ' . $other_attributes : ''; |
|
624 | - return '<' . $tag . ' ' . $attributes . '>' . $content . '</' . $tag . '>'; |
|
619 | + protected static function _inline_tag($tag = 'span', $content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
620 | + $attributes = ! empty($id) ? ' id="'.EEH_HTML::sanitize_id($id).'"' : ''; |
|
621 | + $attributes .= ! empty($class) ? ' class="'.$class.'"' : ''; |
|
622 | + $attributes .= ! empty($style) ? ' style="'.$style.'"' : ''; |
|
623 | + $attributes .= ! empty($other_attributes) ? ' '.$other_attributes : ''; |
|
624 | + return '<'.$tag.' '.$attributes.'>'.$content.'</'.$tag.'>'; |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | |
@@ -637,8 +637,8 @@ discard block |
||
637 | 637 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
638 | 638 | * @return string |
639 | 639 | */ |
640 | - public static function label( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
641 | - return EEH_HTML::_inline_tag( 'label', $content, $id, $class, $style, $other_attributes ); |
|
640 | + public static function label($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
641 | + return EEH_HTML::_inline_tag('label', $content, $id, $class, $style, $other_attributes); |
|
642 | 642 | } |
643 | 643 | |
644 | 644 | |
@@ -654,8 +654,8 @@ discard block |
||
654 | 654 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
655 | 655 | * @return string |
656 | 656 | */ |
657 | - public static function span( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
658 | - return EEH_HTML::_inline_tag( 'span', $content, $id, $class, $style, $other_attributes ); |
|
657 | + public static function span($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
658 | + return EEH_HTML::_inline_tag('span', $content, $id, $class, $style, $other_attributes); |
|
659 | 659 | } |
660 | 660 | |
661 | 661 | |
@@ -671,8 +671,8 @@ discard block |
||
671 | 671 | * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc |
672 | 672 | * @return string |
673 | 673 | */ |
674 | - public static function strong( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) { |
|
675 | - return EEH_HTML::_inline_tag( 'strong', $content, $id, $class, $style, $other_attributes ); |
|
674 | + public static function strong($content = '', $id = '', $class = '', $style = '', $other_attributes = '') { |
|
675 | + return EEH_HTML::_inline_tag('strong', $content, $id, $class, $style, $other_attributes); |
|
676 | 676 | } |
677 | 677 | |
678 | 678 | |
@@ -684,8 +684,8 @@ discard block |
||
684 | 684 | * @param string $comment |
685 | 685 | * @return string |
686 | 686 | */ |
687 | - public static function comment( $comment = '' ) { |
|
688 | - return ! empty( $comment ) ? EEH_HTML::nl() . '<!-- ' . $comment . ' -->' : ''; |
|
687 | + public static function comment($comment = '') { |
|
688 | + return ! empty($comment) ? EEH_HTML::nl().'<!-- '.$comment.' -->' : ''; |
|
689 | 689 | } |
690 | 690 | |
691 | 691 | |
@@ -696,8 +696,8 @@ discard block |
||
696 | 696 | * @param int $nmbr - the number of line breaks to return |
697 | 697 | * @return string |
698 | 698 | */ |
699 | - public static function br( $nmbr = 1 ) { |
|
700 | - return str_repeat( '<br />', $nmbr ); |
|
699 | + public static function br($nmbr = 1) { |
|
700 | + return str_repeat('<br />', $nmbr); |
|
701 | 701 | } |
702 | 702 | |
703 | 703 | |
@@ -708,8 +708,8 @@ discard block |
||
708 | 708 | * @param int $nmbr - the number of non-breaking spaces to return |
709 | 709 | * @return string |
710 | 710 | */ |
711 | - public static function nbsp( $nmbr = 1 ) { |
|
712 | - return str_repeat( ' ', $nmbr ); |
|
711 | + public static function nbsp($nmbr = 1) { |
|
712 | + return str_repeat(' ', $nmbr); |
|
713 | 713 | } |
714 | 714 | |
715 | 715 | |
@@ -723,9 +723,9 @@ discard block |
||
723 | 723 | * @param string $id |
724 | 724 | * @return string |
725 | 725 | */ |
726 | - public static function sanitize_id( $id = '' ) { |
|
727 | - $key = str_replace( ' ', '-', trim( $id ) ); |
|
728 | - return preg_replace( '/[^a-zA-Z0-9_\-]/', '', $key ); |
|
726 | + public static function sanitize_id($id = '') { |
|
727 | + $key = str_replace(' ', '-', trim($id)); |
|
728 | + return preg_replace('/[^a-zA-Z0-9_\-]/', '', $key); |
|
729 | 729 | } |
730 | 730 | |
731 | 731 | |
@@ -737,10 +737,10 @@ discard block |
||
737 | 737 | * @param string $tag |
738 | 738 | * @return string - newline character plus # of indents passed (can be + or -) |
739 | 739 | */ |
740 | - public static function nl( $indent = 0, $tag = 'none' ) { |
|
740 | + public static function nl($indent = 0, $tag = 'none') { |
|
741 | 741 | $html = "\n"; |
742 | - EEH_HTML::indent( $indent, $tag ); |
|
743 | - for ( $x = 0; $x < EEH_HTML::$_indent[ $tag ]; $x++ ) { |
|
742 | + EEH_HTML::indent($indent, $tag); |
|
743 | + for ($x = 0; $x < EEH_HTML::$_indent[$tag]; $x++) { |
|
744 | 744 | $html .= "\t"; |
745 | 745 | } |
746 | 746 | return $html; |
@@ -755,17 +755,17 @@ discard block |
||
755 | 755 | * @param int $indent can be negative to decrease the indentation level |
756 | 756 | * @param string $tag |
757 | 757 | */ |
758 | - public static function indent( $indent, $tag = 'none' ){ |
|
758 | + public static function indent($indent, $tag = 'none') { |
|
759 | 759 | static $default_indentation = FALSE; |
760 | - if ( ! $default_indentation ) { |
|
760 | + if ( ! $default_indentation) { |
|
761 | 761 | EEH_HTML::_set_default_indentation(); |
762 | 762 | $default_indentation = TRUE; |
763 | 763 | } |
764 | - if ( ! isset( EEH_HTML::$_indent[ $tag ] )) { |
|
765 | - EEH_HTML::$_indent[ $tag ] = 0; |
|
764 | + if ( ! isset(EEH_HTML::$_indent[$tag])) { |
|
765 | + EEH_HTML::$_indent[$tag] = 0; |
|
766 | 766 | } |
767 | - EEH_HTML::$_indent[ $tag ] += (int)$indent; |
|
768 | - EEH_HTML::$_indent[ $tag ] = EEH_HTML::$_indent[ $tag ] >= 0 ? EEH_HTML::$_indent[ $tag ] : 0; |
|
767 | + EEH_HTML::$_indent[$tag] += (int) $indent; |
|
768 | + EEH_HTML::$_indent[$tag] = EEH_HTML::$_indent[$tag] >= 0 ? EEH_HTML::$_indent[$tag] : 0; |
|
769 | 769 | } |
770 | 770 | |
771 | 771 | |
@@ -811,15 +811,15 @@ discard block |
||
811 | 811 | * @global array $allowedtags |
812 | 812 | * @return array |
813 | 813 | */ |
814 | - public static function get_simple_tags(){ |
|
814 | + public static function get_simple_tags() { |
|
815 | 815 | global $allowedtags; |
816 | 816 | $tags_we_allow = $allowedtags; |
817 | - $tags_we_allow['ol']=array(); |
|
818 | - $tags_we_allow['ul']=array(); |
|
819 | - $tags_we_allow['li']=array(); |
|
820 | - $tags_we_allow['br']=array(); |
|
821 | - $tags_we_allow['p']=array(); |
|
822 | - return apply_filters( 'FHEE__EEH_HTML__get_simple_tags', $tags_we_allow ); |
|
817 | + $tags_we_allow['ol'] = array(); |
|
818 | + $tags_we_allow['ul'] = array(); |
|
819 | + $tags_we_allow['li'] = array(); |
|
820 | + $tags_we_allow['br'] = array(); |
|
821 | + $tags_we_allow['p'] = array(); |
|
822 | + return apply_filters('FHEE__EEH_HTML__get_simple_tags', $tags_we_allow); |
|
823 | 823 | } |
824 | 824 | |
825 | 825 |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | 2 | /** |
3 | - * |
|
4 | - * Class EEH_HTML |
|
5 | - * |
|
3 | + * |
|
4 | + * Class EEH_HTML |
|
5 | + * |
|
6 | 6 | * Sometimes when writing PHP you need to generate some standard HTML, |
7 | 7 | * but either not enough to warrant creating a template file, |
8 | 8 | * or the amount of PHP conditionals and/or loops peppered throughout the HTML |
9 | 9 | * just make it really ugly and difficult to read. |
10 | 10 | * This class simply adds a bunch of methods for generating basic HTML tags. |
11 | 11 | * Most of the methods have the same name as the HTML tag they generate, and most have the same set of parameters. |
12 | - * |
|
13 | - * @package Event Espresso |
|
14 | - * @subpackage core |
|
15 | - * @author Brent Christensen |
|
16 | - * |
|
17 | - * |
|
18 | - */ |
|
12 | + * |
|
13 | + * @package Event Espresso |
|
14 | + * @subpackage core |
|
15 | + * @author Brent Christensen |
|
16 | + * |
|
17 | + * |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | class EEH_HTML { |
21 | 21 |