@@ -1,22 +1,22 @@ discard block |
||
1 | 1 | |
2 | 2 | <div class="misc-pub-section"> |
3 | 3 | <span class="dashicons dashicons-groups ee-icon-color-ee-green ee-icon-size-20"></span> |
4 | - <a href="<?php echo $view_approved_reg_url;?>"> |
|
5 | - <?php printf( __('%s Registrations', 'event_espresso'), EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence') ); ?> |
|
4 | + <a href="<?php echo $view_approved_reg_url; ?>"> |
|
5 | + <?php printf(__('%s Registrations', 'event_espresso'), EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence')); ?> |
|
6 | 6 | </a>: |
7 | 7 | <?php echo $approved_regs; ?> |
8 | 8 | </div> |
9 | 9 | <div class="misc-pub-section"> |
10 | 10 | <span class="dashicons dashicons-groups ee-icon-color-ee-blue ee-icon-size-20"></span> |
11 | - <a href="<?php echo $view_pending_payment_reg_url;?>"> |
|
12 | - <?php printf( __('%s Registrations', 'event_espresso'), EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence') ); ?> |
|
11 | + <a href="<?php echo $view_pending_payment_reg_url; ?>"> |
|
12 | + <?php printf(__('%s Registrations', 'event_espresso'), EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence')); ?> |
|
13 | 13 | </a>: |
14 | 14 | <?php echo $pending_payment_regs; ?> |
15 | 15 | </div> |
16 | 16 | <div class="misc-pub-section"> |
17 | 17 | <span class="dashicons dashicons-groups ee-icon-color-ee-orange ee-icon-size-20"></span> |
18 | - <a href="<?php echo $view_not_approved_reg_url;?>"> |
|
19 | - <?php printf( __('%s Registrations', 'event_espresso'), EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence') ); ?> |
|
18 | + <a href="<?php echo $view_not_approved_reg_url; ?>"> |
|
19 | + <?php printf(__('%s Registrations', 'event_espresso'), EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence')); ?> |
|
20 | 20 | </a>: |
21 | 21 | <?php echo $not_approved_regs; ?> |
22 | 22 | </div> |
@@ -29,4 +29,4 @@ discard block |
||
29 | 29 | </a> |
30 | 30 | </div> /**/ ?> |
31 | 31 | |
32 | -<?php echo $event_editor_overview_add;?> |
|
33 | 32 | \ No newline at end of file |
33 | +<?php echo $event_editor_overview_add; ?> |
|
34 | 34 | \ No newline at end of file |
@@ -10,14 +10,14 @@ |
||
10 | 10 | </label> |
11 | 11 | </th> |
12 | 12 | <td> |
13 | - <p><?php echo EEH_Form_Fields::select_input('default_reg_status', $reg_status_array, $default_reg_status ) ?></p> |
|
13 | + <p><?php echo EEH_Form_Fields::select_input('default_reg_status', $reg_status_array, $default_reg_status) ?></p> |
|
14 | 14 | <p class="description"> |
15 | 15 | <?php _e('This setting allows you to preselect what the default registration status setting is when creating an event. Note that changing this setting does NOT retroactively apply it to existing events.', 'event_espresso'); ?> |
16 | 16 | </p> |
17 | 17 | </td> |
18 | 18 | </tr> |
19 | 19 | |
20 | - <?php do_action( 'AHEE__event_settings__template', $template_args ); ?> |
|
20 | + <?php do_action('AHEE__event_settings__template', $template_args); ?> |
|
21 | 21 | |
22 | 22 | </tbody> |
23 | 23 | </table> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | <span class="ticket-price-info-display ticket-price-dollar-sign-display"><?php echo $price_currency_symbol; ?></span> |
16 | 16 | </td> |
17 | 17 | <td> |
18 | - <?php if ( empty( $disabled ) ) : ?> |
|
18 | + <?php if (empty($disabled)) : ?> |
|
19 | 19 | <input type="text" size="1" class="edit-price-PRC_amount ee-small-text-inp ee-inp-right" name="edit_prices[<?php echo $ticketrow; ?>][1][PRC_amount]" value="<?php echo $PRC_amount; ?>"> |
20 | 20 | <?php else : ?> |
21 | 21 | <input type="text" size="1" class="edit-price-PRC_amount ee-small-text-inp ee-inp-right" name="disabled_price_amount" value="<?php echo $PRC_amount; ?>"<?php echo $disabled; ?>> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <input type="hidden" name="edit_prices[<?php echo $ticketrow; ?>][1][PRC_is_default]" class="edit-price-PRC_is_default" value="<?php echo $PRC_is_default; ?>"> |
28 | 28 | </td> |
29 | 29 | <td> |
30 | - <?php if ( empty( $disabled ) ) : ?> |
|
30 | + <?php if (empty($disabled)) : ?> |
|
31 | 31 | <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-inp-right" name="<?php echo $edit_ticketrow_name; ?>[<?php echo $ticketrow; ?>][TKT_qty]" value="<?php echo $TKT_qty; ?>"> |
32 | 32 | <?php else : ?> |
33 | 33 | <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-inp-right" name="disabled_tkt_qty" value="<?php echo $TKT_qty; ?>"<?php echo $disabled; ?>> |
@@ -17,8 +17,11 @@ discard block |
||
17 | 17 | <td> |
18 | 18 | <?php if ( empty( $disabled ) ) : ?> |
19 | 19 | <input type="text" size="1" class="edit-price-PRC_amount ee-small-text-inp ee-inp-right" name="edit_prices[<?php echo $ticketrow; ?>][1][PRC_amount]" value="<?php echo $PRC_amount; ?>"> |
20 | - <?php else : ?> |
|
21 | - <input type="text" size="1" class="edit-price-PRC_amount ee-small-text-inp ee-inp-right" name="disabled_price_amount" value="<?php echo $PRC_amount; ?>"<?php echo $disabled; ?>> |
|
20 | + <?php else { |
|
21 | + : ?> |
|
22 | + <input type="text" size="1" class="edit-price-PRC_amount ee-small-text-inp ee-inp-right" name="disabled_price_amount" value="<?php echo $PRC_amount; |
|
23 | +} |
|
24 | +?>"<?php echo $disabled; ?>> |
|
22 | 25 | <input type="hidden" size="1" class="edit-price-PRC_amount ee-small-text-inp ee-inp-right" name="edit_prices[<?php echo $ticketrow; ?>][1][PRC_amount]" value="<?php echo $PRC_amount; ?>"> |
23 | 26 | <?php endif; ?> |
24 | 27 | |
@@ -29,8 +32,11 @@ discard block |
||
29 | 32 | <td> |
30 | 33 | <?php if ( empty( $disabled ) ) : ?> |
31 | 34 | <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-inp-right" name="<?php echo $edit_ticketrow_name; ?>[<?php echo $ticketrow; ?>][TKT_qty]" value="<?php echo $TKT_qty; ?>"> |
32 | - <?php else : ?> |
|
33 | - <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-inp-right" name="disabled_tkt_qty" value="<?php echo $TKT_qty; ?>"<?php echo $disabled; ?>> |
|
35 | + <?php else { |
|
36 | + : ?> |
|
37 | + <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-inp-right" name="disabled_tkt_qty" value="<?php echo $TKT_qty; |
|
38 | +} |
|
39 | +?>"<?php echo $disabled; ?>> |
|
34 | 40 | <input type="hidden" class="edit-ticket-TKT_qty ee-small-text-inp ee-inp-right" name="<?php echo $edit_ticketrow_name; ?>[<?php echo $ticketrow; ?>][TKT_qty]" value="<?php echo $TKT_qty; ?>"> |
35 | 41 | <?php endif; ?> |
36 | 42 | </td> |
@@ -1,6 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -419,8 +420,9 @@ discard block |
||
419 | 420 | } |
420 | 421 | |
421 | 422 | protected function _update_your_organization_settings() { |
422 | - if ( is_main_site() ) |
|
423 | - EE_Registry::instance()->NET_CFG->core->site_license_key = isset( $this->_req_data['site_license_key'] ) ? sanitize_text_field( $this->_req_data['site_license_key'] ) : EE_Registry::instance()->NET_CFG->core->site_license_key; |
|
423 | + if ( is_main_site() ) { |
|
424 | + EE_Registry::instance()->NET_CFG->core->site_license_key = isset( $this->_req_data['site_license_key'] ) ? sanitize_text_field( $this->_req_data['site_license_key'] ) : EE_Registry::instance()->NET_CFG->core->site_license_key; |
|
425 | + } |
|
424 | 426 | EE_Registry::instance()->CFG->organization->name = isset( $this->_req_data['organization_name'] ) ? sanitize_text_field( $this->_req_data['organization_name'] ) : EE_Registry::instance()->CFG->organization->name; |
425 | 427 | EE_Registry::instance()->CFG->organization->address_1 = isset( $this->_req_data['organization_address_1'] ) ? sanitize_text_field( $this->_req_data['organization_address_1'] ) : EE_Registry::instance()->CFG->organization->address_1; |
426 | 428 | EE_Registry::instance()->CFG->organization->address_2 = isset( $this->_req_data['organization_address_2'] ) ? sanitize_text_field( $this->_req_data['organization_address_2'] ) : EE_Registry::instance()->CFG->organization->address_2; |
@@ -950,10 +952,11 @@ discard block |
||
950 | 952 | if ( $items ) { |
951 | 953 | foreach ( $items as $item ) { |
952 | 954 | $pad = str_repeat( ' ', $level * 3 ); |
953 | - if ( $item->ID == $default) |
|
954 | - $current = ' selected="selected"'; |
|
955 | - else |
|
956 | - $current = ''; |
|
955 | + if ( $item->ID == $default) { |
|
956 | + $current = ' selected="selected"'; |
|
957 | + } else { |
|
958 | + $current = ''; |
|
959 | + } |
|
957 | 960 | |
958 | 961 | echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . "</option>"; |
959 | 962 | parent_dropdown( $default, $item->ID, $level +1 ); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | 'order' => 50 |
157 | 157 | ), |
158 | 158 | 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_publish_post_box' ) ), |
159 | - 'help_tabs' => array( |
|
159 | + 'help_tabs' => array( |
|
160 | 160 | 'general_settings_critical_pages_help_tab' => array( |
161 | 161 | 'title' => __('Critical Pages', 'event_espresso'), |
162 | 162 | 'filename' => 'general_settings_critical_pages' |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | 'label' => __('Your Organization', 'event_espresso'), |
171 | 171 | 'order' => 20 |
172 | 172 | ), |
173 | - 'help_tabs' => array( |
|
173 | + 'help_tabs' => array( |
|
174 | 174 | 'general_settings_your_organization_help_tab' => array( |
175 | 175 | 'title' => __('Your Organization', 'event_espresso'), |
176 | 176 | 'filename' => 'general_settings_your_organization' |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | 'order' => 60 |
187 | 187 | ), |
188 | 188 | 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_publish_post_box' ) ), |
189 | - 'help_tabs' => array( |
|
189 | + 'help_tabs' => array( |
|
190 | 190 | 'general_settings_admin_options_help_tab' => array( |
191 | 191 | 'title' => __('Admin Options', 'event_espresso'), |
192 | 192 | 'filename' => 'general_settings_admin_options' |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | 'label' => __('Countries', 'event_espresso'), |
201 | 201 | 'order' => 70 |
202 | 202 | ), |
203 | - 'help_tabs' => array( |
|
203 | + 'help_tabs' => array( |
|
204 | 204 | 'general_settings_countries_help_tab' => array( |
205 | 205 | 'title' => __('Countries', 'event_espresso'), |
206 | 206 | 'filename' => 'general_settings_countries' |
@@ -453,68 +453,68 @@ discard block |
||
453 | 453 | |
454 | 454 | |
455 | 455 | |
456 | - /************* Admin Options *************/ |
|
457 | - |
|
458 | - |
|
459 | - |
|
460 | - /** |
|
461 | - * _admin_option_settings |
|
462 | - * |
|
463 | - * @throws \EE_Error |
|
464 | - * @throws \LogicException |
|
465 | - */ |
|
466 | - protected function _admin_option_settings() { |
|
467 | - $this->_template_args['admin_page_content'] = ''; |
|
468 | - try { |
|
469 | - $admin_options_settings_form = new AdminOptionsSettings(EE_Registry::instance()); |
|
470 | - // still need this for the old school form in Extend_General_Settings_Admin_Page |
|
471 | - $this->_template_args['values'] = $this->_yes_no_values; |
|
472 | - // also need to account for the do_action that was in the old template |
|
473 | - $admin_options_settings_form->setTemplateArgs($this->_template_args); |
|
474 | - $this->_template_args['admin_page_content'] = $admin_options_settings_form->display(); |
|
475 | - } catch (Exception $e) { |
|
476 | - EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__); |
|
477 | - } |
|
478 | - $this->_set_add_edit_form_tags('update_admin_option_settings'); |
|
479 | - $this->_set_publish_post_box_vars(null, false, false, null, false); |
|
480 | - $this->display_admin_page_with_sidebar(); |
|
481 | - } |
|
482 | - |
|
483 | - |
|
484 | - |
|
485 | - /** |
|
486 | - * _update_admin_option_settings |
|
487 | - * |
|
488 | - * @throws \EE_Error |
|
489 | - * @throws \EventEspresso\core\exceptions\InvalidDataTypeException |
|
490 | - * @throws \EventEspresso\core\exceptions\InvalidFormSubmissionException |
|
491 | - * @throws \InvalidArgumentException |
|
492 | - * @throws \LogicException |
|
493 | - */ |
|
494 | - protected function _update_admin_option_settings() { |
|
495 | - try { |
|
496 | - $admin_options_settings_form = new AdminOptionsSettings(EE_Registry::instance()); |
|
497 | - $admin_options_settings_form->process($this->_req_data[$admin_options_settings_form->slug()]); |
|
498 | - EE_Registry::instance()->CFG->admin = apply_filters( |
|
499 | - 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin', |
|
500 | - EE_Registry::instance()->CFG->admin |
|
501 | - ); |
|
502 | - } catch (Exception $e) { |
|
503 | - EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__); |
|
504 | - } |
|
456 | + /************* Admin Options *************/ |
|
457 | + |
|
458 | + |
|
459 | + |
|
460 | + /** |
|
461 | + * _admin_option_settings |
|
462 | + * |
|
463 | + * @throws \EE_Error |
|
464 | + * @throws \LogicException |
|
465 | + */ |
|
466 | + protected function _admin_option_settings() { |
|
467 | + $this->_template_args['admin_page_content'] = ''; |
|
468 | + try { |
|
469 | + $admin_options_settings_form = new AdminOptionsSettings(EE_Registry::instance()); |
|
470 | + // still need this for the old school form in Extend_General_Settings_Admin_Page |
|
471 | + $this->_template_args['values'] = $this->_yes_no_values; |
|
472 | + // also need to account for the do_action that was in the old template |
|
473 | + $admin_options_settings_form->setTemplateArgs($this->_template_args); |
|
474 | + $this->_template_args['admin_page_content'] = $admin_options_settings_form->display(); |
|
475 | + } catch (Exception $e) { |
|
476 | + EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__); |
|
477 | + } |
|
478 | + $this->_set_add_edit_form_tags('update_admin_option_settings'); |
|
479 | + $this->_set_publish_post_box_vars(null, false, false, null, false); |
|
480 | + $this->display_admin_page_with_sidebar(); |
|
481 | + } |
|
482 | + |
|
483 | + |
|
484 | + |
|
485 | + /** |
|
486 | + * _update_admin_option_settings |
|
487 | + * |
|
488 | + * @throws \EE_Error |
|
489 | + * @throws \EventEspresso\core\exceptions\InvalidDataTypeException |
|
490 | + * @throws \EventEspresso\core\exceptions\InvalidFormSubmissionException |
|
491 | + * @throws \InvalidArgumentException |
|
492 | + * @throws \LogicException |
|
493 | + */ |
|
494 | + protected function _update_admin_option_settings() { |
|
495 | + try { |
|
496 | + $admin_options_settings_form = new AdminOptionsSettings(EE_Registry::instance()); |
|
497 | + $admin_options_settings_form->process($this->_req_data[$admin_options_settings_form->slug()]); |
|
498 | + EE_Registry::instance()->CFG->admin = apply_filters( |
|
499 | + 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin', |
|
500 | + EE_Registry::instance()->CFG->admin |
|
501 | + ); |
|
502 | + } catch (Exception $e) { |
|
503 | + EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__); |
|
504 | + } |
|
505 | 505 | $this->_redirect_after_action( |
506 | - apply_filters( |
|
507 | - 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', |
|
508 | - $this->_update_espresso_configuration( |
|
509 | - 'Admin Options', |
|
510 | - EE_Registry::instance()->CFG->admin, |
|
511 | - __FILE__, __FUNCTION__, __LINE__ |
|
512 | - ) |
|
513 | - ), |
|
514 | - 'Admin Options', |
|
515 | - 'updated', |
|
516 | - array( 'action' => 'admin_option_settings' ) |
|
517 | - ); |
|
506 | + apply_filters( |
|
507 | + 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', |
|
508 | + $this->_update_espresso_configuration( |
|
509 | + 'Admin Options', |
|
510 | + EE_Registry::instance()->CFG->admin, |
|
511 | + __FILE__, __FUNCTION__, __LINE__ |
|
512 | + ) |
|
513 | + ), |
|
514 | + 'Admin Options', |
|
515 | + 'updated', |
|
516 | + array( 'action' => 'admin_option_settings' ) |
|
517 | + ); |
|
518 | 518 | |
519 | 519 | } |
520 | 520 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | use EventEspresso\admin_pages\general_settings\AdminOptionsSettings; |
3 | 3 | |
4 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
5 | 5 | exit('NO direct script access allowed'); |
6 | 6 | |
7 | 7 | /** |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | |
43 | 43 | |
44 | 44 | |
45 | - public function __construct( $routing = TRUE ) { |
|
46 | - parent::__construct( $routing ); |
|
45 | + public function __construct($routing = TRUE) { |
|
46 | + parent::__construct($routing); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | |
60 | 60 | |
61 | 61 | protected function _ajax_hooks() { |
62 | - add_action('wp_ajax_espresso_display_country_settings', array( $this, 'display_country_settings')); |
|
63 | - add_action('wp_ajax_espresso_display_country_states', array( $this, 'display_country_states')); |
|
64 | - add_action('wp_ajax_espresso_delete_state', array( $this, 'delete_state'), 10, 3 ); |
|
65 | - add_action('wp_ajax_espresso_add_new_state', array( $this, 'add_new_state')); |
|
62 | + add_action('wp_ajax_espresso_display_country_settings', array($this, 'display_country_settings')); |
|
63 | + add_action('wp_ajax_espresso_display_country_states', array($this, 'display_country_states')); |
|
64 | + add_action('wp_ajax_espresso_delete_state', array($this, 'delete_state'), 10, 3); |
|
65 | + add_action('wp_ajax_espresso_add_new_state', array($this, 'add_new_state')); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | |
@@ -155,14 +155,14 @@ discard block |
||
155 | 155 | 'label' => __('Critical Pages', 'event_espresso'), |
156 | 156 | 'order' => 50 |
157 | 157 | ), |
158 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_publish_post_box' ) ), |
|
158 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')), |
|
159 | 159 | 'help_tabs' => array( |
160 | 160 | 'general_settings_critical_pages_help_tab' => array( |
161 | 161 | 'title' => __('Critical Pages', 'event_espresso'), |
162 | 162 | 'filename' => 'general_settings_critical_pages' |
163 | 163 | ) |
164 | 164 | ), |
165 | - 'help_tour' => array( 'Critical_Pages_Help_Tour' ), |
|
165 | + 'help_tour' => array('Critical_Pages_Help_Tour'), |
|
166 | 166 | 'require_nonce' => FALSE |
167 | 167 | ), |
168 | 168 | 'default' => array( |
@@ -176,8 +176,8 @@ discard block |
||
176 | 176 | 'filename' => 'general_settings_your_organization' |
177 | 177 | ) |
178 | 178 | ), |
179 | - 'help_tour' => array( 'Your_Organization_Help_Tour' ), |
|
180 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_publish_post_box' ) ), |
|
179 | + 'help_tour' => array('Your_Organization_Help_Tour'), |
|
180 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')), |
|
181 | 181 | 'require_nonce' => FALSE |
182 | 182 | ), |
183 | 183 | 'admin_option_settings' => array( |
@@ -185,14 +185,14 @@ discard block |
||
185 | 185 | 'label' => __('Admin Options', 'event_espresso'), |
186 | 186 | 'order' => 60 |
187 | 187 | ), |
188 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_publish_post_box' ) ), |
|
188 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')), |
|
189 | 189 | 'help_tabs' => array( |
190 | 190 | 'general_settings_admin_options_help_tab' => array( |
191 | 191 | 'title' => __('Admin Options', 'event_espresso'), |
192 | 192 | 'filename' => 'general_settings_admin_options' |
193 | 193 | ) |
194 | 194 | ), |
195 | - 'help_tour' => array( 'Admin_Options_Help_Tour' ), |
|
195 | + 'help_tour' => array('Admin_Options_Help_Tour'), |
|
196 | 196 | 'require_nonce' => FALSE |
197 | 197 | ), |
198 | 198 | 'country_settings' => array( |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | 'filename' => 'general_settings_countries' |
207 | 207 | ) |
208 | 208 | ), |
209 | - 'help_tour' => array( 'Countries_Help_Tour' ), |
|
209 | + 'help_tour' => array('Countries_Help_Tour'), |
|
210 | 210 | 'require_nonce' => FALSE |
211 | 211 | ) |
212 | 212 | ); |
@@ -224,11 +224,11 @@ discard block |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | public function admin_init() { |
227 | - EE_Registry::$i18n_js_strings[ 'invalid_server_response' ] = __( 'An error occurred! Your request may have been processed, but a valid response from the server was not received. Please refresh the page and try again.', 'event_espresso' ); |
|
228 | - EE_Registry::$i18n_js_strings[ 'error_occurred' ] = __( 'An error occurred! Please refresh the page and try again.', 'event_espresso' ); |
|
229 | - EE_Registry::$i18n_js_strings[ 'confirm_delete_state' ] = __( 'Are you sure you want to delete this State / Province?', 'event_espresso' ); |
|
230 | - $protocol = isset( $_SERVER[ 'HTTPS' ] ) ? 'https://' : 'http://'; |
|
231 | - EE_Registry::$i18n_js_strings[ 'ajax_url' ] = admin_url( 'admin-ajax.php?page=espresso_general_settings', $protocol ); |
|
227 | + EE_Registry::$i18n_js_strings['invalid_server_response'] = __('An error occurred! Your request may have been processed, but a valid response from the server was not received. Please refresh the page and try again.', 'event_espresso'); |
|
228 | + EE_Registry::$i18n_js_strings['error_occurred'] = __('An error occurred! Please refresh the page and try again.', 'event_espresso'); |
|
229 | + EE_Registry::$i18n_js_strings['confirm_delete_state'] = __('Are you sure you want to delete this State / Province?', 'event_espresso'); |
|
230 | + $protocol = isset($_SERVER['HTTPS']) ? 'https://' : 'http://'; |
|
231 | + EE_Registry::$i18n_js_strings['ajax_url'] = admin_url('admin-ajax.php?page=espresso_general_settings', $protocol); |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | public function admin_notices() {} |
@@ -241,21 +241,21 @@ discard block |
||
241 | 241 | //scripts |
242 | 242 | wp_enqueue_script('media-upload'); |
243 | 243 | wp_enqueue_script('thickbox'); |
244 | - wp_register_script( 'organization_settings', GEN_SET_ASSETS_URL . 'your_organization_settings.js', array( 'jquery','media-upload','thickbox' ), EVENT_ESPRESSO_VERSION, TRUE ); |
|
245 | - wp_register_style( 'organization-css', GEN_SET_ASSETS_URL . 'organization.css', array(), EVENT_ESPRESSO_VERSION ); |
|
246 | - wp_enqueue_script( 'organization_settings' ); |
|
247 | - wp_enqueue_style( 'organization-css' ); |
|
248 | - $confirm_image_delete = array( 'text' => __('Do you really want to delete this image? Please remember to save your settings to complete the removal.', 'event_espresso')); |
|
249 | - wp_localize_script( 'organization_settings', 'confirm_image_delete', $confirm_image_delete ); |
|
244 | + wp_register_script('organization_settings', GEN_SET_ASSETS_URL.'your_organization_settings.js', array('jquery', 'media-upload', 'thickbox'), EVENT_ESPRESSO_VERSION, TRUE); |
|
245 | + wp_register_style('organization-css', GEN_SET_ASSETS_URL.'organization.css', array(), EVENT_ESPRESSO_VERSION); |
|
246 | + wp_enqueue_script('organization_settings'); |
|
247 | + wp_enqueue_style('organization-css'); |
|
248 | + $confirm_image_delete = array('text' => __('Do you really want to delete this image? Please remember to save your settings to complete the removal.', 'event_espresso')); |
|
249 | + wp_localize_script('organization_settings', 'confirm_image_delete', $confirm_image_delete); |
|
250 | 250 | |
251 | 251 | } |
252 | 252 | |
253 | 253 | public function load_scripts_styles_country_settings() { |
254 | 254 | //scripts |
255 | - wp_register_script( 'gen_settings_countries', GEN_SET_ASSETS_URL . 'gen_settings_countries.js', array( 'ee_admin_js' ), EVENT_ESPRESSO_VERSION, TRUE ); |
|
256 | - wp_register_style( 'organization-css', GEN_SET_ASSETS_URL . 'organization.css', array(), EVENT_ESPRESSO_VERSION ); |
|
257 | - wp_enqueue_script( 'gen_settings_countries' ); |
|
258 | - wp_enqueue_style( 'organization-css' ); |
|
255 | + wp_register_script('gen_settings_countries', GEN_SET_ASSETS_URL.'gen_settings_countries.js', array('ee_admin_js'), EVENT_ESPRESSO_VERSION, TRUE); |
|
256 | + wp_register_style('organization-css', GEN_SET_ASSETS_URL.'organization.css', array(), EVENT_ESPRESSO_VERSION); |
|
257 | + wp_enqueue_script('gen_settings_countries'); |
|
258 | + wp_enqueue_style('organization-css'); |
|
259 | 259 | |
260 | 260 | } |
261 | 261 | |
@@ -272,31 +272,31 @@ discard block |
||
272 | 272 | $this->_transient_garbage_collection(); |
273 | 273 | $this->_template_args['values'] = $this->_yes_no_values; |
274 | 274 | |
275 | - $this->_template_args['reg_page_id'] = isset(EE_Registry::instance()->CFG->core->reg_page_id ) ?EE_Registry::instance()->CFG->core->reg_page_id : NULL; |
|
276 | - $this->_template_args['reg_page_obj'] = isset(EE_Registry::instance()->CFG->core->reg_page_id ) ? get_page(EE_Registry::instance()->CFG->core->reg_page_id ) : FALSE; |
|
275 | + $this->_template_args['reg_page_id'] = isset(EE_Registry::instance()->CFG->core->reg_page_id) ? EE_Registry::instance()->CFG->core->reg_page_id : NULL; |
|
276 | + $this->_template_args['reg_page_obj'] = isset(EE_Registry::instance()->CFG->core->reg_page_id) ? get_page(EE_Registry::instance()->CFG->core->reg_page_id) : FALSE; |
|
277 | 277 | |
278 | - $this->_template_args['txn_page_id'] = isset(EE_Registry::instance()->CFG->core->txn_page_id) ?EE_Registry::instance()->CFG->core->txn_page_id : NULL; |
|
279 | - $this->_template_args['txn_page_obj'] = isset(EE_Registry::instance()->CFG->core->txn_page_id ) ? get_page(EE_Registry::instance()->CFG->core->txn_page_id ) : FALSE; |
|
278 | + $this->_template_args['txn_page_id'] = isset(EE_Registry::instance()->CFG->core->txn_page_id) ? EE_Registry::instance()->CFG->core->txn_page_id : NULL; |
|
279 | + $this->_template_args['txn_page_obj'] = isset(EE_Registry::instance()->CFG->core->txn_page_id) ? get_page(EE_Registry::instance()->CFG->core->txn_page_id) : FALSE; |
|
280 | 280 | |
281 | - $this->_template_args['thank_you_page_id'] = isset(EE_Registry::instance()->CFG->core->thank_you_page_id ) ?EE_Registry::instance()->CFG->core->thank_you_page_id : NULL; |
|
282 | - $this->_template_args['thank_you_page_obj'] = isset(EE_Registry::instance()->CFG->core->thank_you_page_id ) ? get_page(EE_Registry::instance()->CFG->core->thank_you_page_id ) : FALSE; |
|
281 | + $this->_template_args['thank_you_page_id'] = isset(EE_Registry::instance()->CFG->core->thank_you_page_id) ? EE_Registry::instance()->CFG->core->thank_you_page_id : NULL; |
|
282 | + $this->_template_args['thank_you_page_obj'] = isset(EE_Registry::instance()->CFG->core->thank_you_page_id) ? get_page(EE_Registry::instance()->CFG->core->thank_you_page_id) : FALSE; |
|
283 | 283 | |
284 | - $this->_template_args['cancel_page_id'] = isset(EE_Registry::instance()->CFG->core->cancel_page_id ) ?EE_Registry::instance()->CFG->core->cancel_page_id : NULL; |
|
285 | - $this->_template_args['cancel_page_obj'] = isset(EE_Registry::instance()->CFG->core->cancel_page_id ) ? get_page(EE_Registry::instance()->CFG->core->cancel_page_id ) : FALSE; |
|
284 | + $this->_template_args['cancel_page_id'] = isset(EE_Registry::instance()->CFG->core->cancel_page_id) ? EE_Registry::instance()->CFG->core->cancel_page_id : NULL; |
|
285 | + $this->_template_args['cancel_page_obj'] = isset(EE_Registry::instance()->CFG->core->cancel_page_id) ? get_page(EE_Registry::instance()->CFG->core->cancel_page_id) : FALSE; |
|
286 | 286 | |
287 | - $this->_set_add_edit_form_tags( 'update_espresso_page_settings' ); |
|
288 | - $this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE ); |
|
289 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( GEN_SET_TEMPLATE_PATH . 'espresso_page_settings.template.php', $this->_template_args, TRUE ); |
|
287 | + $this->_set_add_edit_form_tags('update_espresso_page_settings'); |
|
288 | + $this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE); |
|
289 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'espresso_page_settings.template.php', $this->_template_args, TRUE); |
|
290 | 290 | $this->display_admin_page_with_sidebar(); |
291 | 291 | |
292 | 292 | } |
293 | 293 | |
294 | 294 | protected function _update_espresso_page_settings() { |
295 | 295 | // capture incoming request data |
296 | - $reg_page_id = isset( $this->_req_data['reg_page_id'] ) ? absint( $this->_req_data['reg_page_id'] ) : EE_Registry::instance()->CFG->core->reg_page_id; |
|
297 | - $txn_page_id = isset( $this->_req_data['txn_page_id'] ) ? absint( $this->_req_data['txn_page_id'] ) : EE_Registry::instance()->CFG->core->txn_page_id; |
|
298 | - $thank_you_page_id = isset( $this->_req_data['thank_you_page_id'] ) ? absint( $this->_req_data['thank_you_page_id'] ) : EE_Registry::instance()->CFG->core->thank_you_page_id; |
|
299 | - $cancel_page_id = isset( $this->_req_data['cancel_page_id'] ) ? absint( $this->_req_data['cancel_page_id'] ) : EE_Registry::instance()->CFG->core->cancel_page_id; |
|
296 | + $reg_page_id = isset($this->_req_data['reg_page_id']) ? absint($this->_req_data['reg_page_id']) : EE_Registry::instance()->CFG->core->reg_page_id; |
|
297 | + $txn_page_id = isset($this->_req_data['txn_page_id']) ? absint($this->_req_data['txn_page_id']) : EE_Registry::instance()->CFG->core->txn_page_id; |
|
298 | + $thank_you_page_id = isset($this->_req_data['thank_you_page_id']) ? absint($this->_req_data['thank_you_page_id']) : EE_Registry::instance()->CFG->core->thank_you_page_id; |
|
299 | + $cancel_page_id = isset($this->_req_data['cancel_page_id']) ? absint($this->_req_data['cancel_page_id']) : EE_Registry::instance()->CFG->core->cancel_page_id; |
|
300 | 300 | // pack critical_pages into an array |
301 | 301 | $critical_pages = array( |
302 | 302 | 'reg_page_id' => $reg_page_id, |
@@ -304,17 +304,17 @@ discard block |
||
304 | 304 | 'thank_you_page_id' => $thank_you_page_id, |
305 | 305 | 'cancel_page_id' => $cancel_page_id |
306 | 306 | ); |
307 | - foreach ( $critical_pages as $critical_page_name => $critical_page_id ) { |
|
307 | + foreach ($critical_pages as $critical_page_name => $critical_page_id) { |
|
308 | 308 | // has the page changed ? |
309 | - if ( EE_Registry::instance()->CFG->core->{$critical_page_name} !== $critical_page_id ) { |
|
309 | + if (EE_Registry::instance()->CFG->core->{$critical_page_name} !== $critical_page_id) { |
|
310 | 310 | // grab post object for old page |
311 | - $post = get_post( EE_Registry::instance()->CFG->core->{$critical_page_name} ); |
|
311 | + $post = get_post(EE_Registry::instance()->CFG->core->{$critical_page_name} ); |
|
312 | 312 | // update post shortcodes for old page |
313 | - EventEspresso\core\admin\PostShortcodeTracking::parse_post_content_on_save( $critical_page_id, $post ); |
|
313 | + EventEspresso\core\admin\PostShortcodeTracking::parse_post_content_on_save($critical_page_id, $post); |
|
314 | 314 | // grab post object for new page |
315 | - $post = get_post( $critical_page_id ); |
|
315 | + $post = get_post($critical_page_id); |
|
316 | 316 | // update post shortcodes for new page |
317 | - EventEspresso\core\admin\PostShortcodeTracking::parse_post_content_on_save( $critical_page_id, $post ); |
|
317 | + EventEspresso\core\admin\PostShortcodeTracking::parse_post_content_on_save($critical_page_id, $post); |
|
318 | 318 | } |
319 | 319 | } |
320 | 320 | // set page IDs |
@@ -323,14 +323,14 @@ discard block |
||
323 | 323 | EE_Registry::instance()->CFG->core->thank_you_page_id = $thank_you_page_id; |
324 | 324 | EE_Registry::instance()->CFG->core->cancel_page_id = $cancel_page_id; |
325 | 325 | |
326 | - EE_Registry::instance()->CFG->core = apply_filters( 'FHEE__General_Settings_Admin_Page___update_espresso_page_settings__CFG_core', EE_Registry::instance()->CFG->core, $this->_req_data ); |
|
326 | + EE_Registry::instance()->CFG->core = apply_filters('FHEE__General_Settings_Admin_Page___update_espresso_page_settings__CFG_core', EE_Registry::instance()->CFG->core, $this->_req_data); |
|
327 | 327 | |
328 | 328 | $what = __('Critical Pages & Shortcodes', 'event_espresso'); |
329 | - $success = $this->_update_espresso_configuration( $what, EE_Registry::instance()->CFG->core, __FILE__, __FUNCTION__, __LINE__ ); |
|
329 | + $success = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG->core, __FILE__, __FUNCTION__, __LINE__); |
|
330 | 330 | $query_args = array( |
331 | 331 | 'action' => 'critical_pages' |
332 | 332 | ); |
333 | - $this->_redirect_after_action( FALSE, '', '', $query_args, TRUE ); |
|
333 | + $this->_redirect_after_action(FALSE, '', '', $query_args, TRUE); |
|
334 | 334 | |
335 | 335 | } |
336 | 336 | |
@@ -345,34 +345,34 @@ discard block |
||
345 | 345 | |
346 | 346 | protected function _your_organization_settings() { |
347 | 347 | |
348 | - $this->_template_args['site_license_key'] = isset( EE_Registry::instance()->NET_CFG->core->site_license_key ) ? EE_Registry::instance()->NET_CFG->core->get_pretty( 'site_license_key' ) : ''; |
|
349 | - $this->_template_args['organization_name'] = isset( EE_Registry::instance()->CFG->organization->name ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'name' ) : ''; |
|
350 | - $this->_template_args['organization_address_1'] = isset( EE_Registry::instance()->CFG->organization->address_1 ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'address_1' ) : ''; |
|
351 | - $this->_template_args['organization_address_2'] = isset( EE_Registry::instance()->CFG->organization->address_2 ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'address_2' ) : ''; |
|
352 | - $this->_template_args['organization_city'] = isset( EE_Registry::instance()->CFG->organization->city ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'city' ) : ''; |
|
353 | - $this->_template_args['organization_zip'] = isset( EE_Registry::instance()->CFG->organization->zip ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'zip' ) : ''; |
|
354 | - $this->_template_args['organization_email'] = isset( EE_Registry::instance()->CFG->organization->email ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'email' ) : ''; |
|
355 | - $this->_template_args['organization_phone'] = isset( EE_Registry::instance()->CFG->organization->phone ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'phone' ) : ''; |
|
356 | - $this->_template_args['organization_vat'] = isset( EE_Registry::instance()->CFG->organization->vat ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'vat' ) : ''; |
|
357 | - $this->_template_args['currency_sign'] = isset( EE_Registry::instance()->CFG->currency->sign ) ? EE_Registry::instance()->CFG->currency->get_pretty( 'sign' ) : '$'; |
|
358 | - $this->_template_args['organization_logo_url'] = isset( EE_Registry::instance()->CFG->organization->logo_url ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' ) : FALSE; |
|
359 | - $this->_template_args['organization_facebook'] = isset( EE_Registry::instance()->CFG->organization->facebook ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' ) : ''; |
|
360 | - $this->_template_args['organization_twitter'] = isset( EE_Registry::instance()->CFG->organization->twitter ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' ) : ''; |
|
361 | - $this->_template_args['organization_linkedin'] = isset( EE_Registry::instance()->CFG->organization->linkedin ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' ) : ''; |
|
362 | - $this->_template_args['organization_pinterest'] = isset( EE_Registry::instance()->CFG->organization->pinterest ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' ) : ''; |
|
363 | - $this->_template_args['organization_google'] = isset( EE_Registry::instance()->CFG->organization->google ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'google' ) : ''; |
|
364 | - $this->_template_args['organization_instagram'] = isset( EE_Registry::instance()->CFG->organization->instagram ) ? EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' ) : ''; |
|
348 | + $this->_template_args['site_license_key'] = isset(EE_Registry::instance()->NET_CFG->core->site_license_key) ? EE_Registry::instance()->NET_CFG->core->get_pretty('site_license_key') : ''; |
|
349 | + $this->_template_args['organization_name'] = isset(EE_Registry::instance()->CFG->organization->name) ? EE_Registry::instance()->CFG->organization->get_pretty('name') : ''; |
|
350 | + $this->_template_args['organization_address_1'] = isset(EE_Registry::instance()->CFG->organization->address_1) ? EE_Registry::instance()->CFG->organization->get_pretty('address_1') : ''; |
|
351 | + $this->_template_args['organization_address_2'] = isset(EE_Registry::instance()->CFG->organization->address_2) ? EE_Registry::instance()->CFG->organization->get_pretty('address_2') : ''; |
|
352 | + $this->_template_args['organization_city'] = isset(EE_Registry::instance()->CFG->organization->city) ? EE_Registry::instance()->CFG->organization->get_pretty('city') : ''; |
|
353 | + $this->_template_args['organization_zip'] = isset(EE_Registry::instance()->CFG->organization->zip) ? EE_Registry::instance()->CFG->organization->get_pretty('zip') : ''; |
|
354 | + $this->_template_args['organization_email'] = isset(EE_Registry::instance()->CFG->organization->email) ? EE_Registry::instance()->CFG->organization->get_pretty('email') : ''; |
|
355 | + $this->_template_args['organization_phone'] = isset(EE_Registry::instance()->CFG->organization->phone) ? EE_Registry::instance()->CFG->organization->get_pretty('phone') : ''; |
|
356 | + $this->_template_args['organization_vat'] = isset(EE_Registry::instance()->CFG->organization->vat) ? EE_Registry::instance()->CFG->organization->get_pretty('vat') : ''; |
|
357 | + $this->_template_args['currency_sign'] = isset(EE_Registry::instance()->CFG->currency->sign) ? EE_Registry::instance()->CFG->currency->get_pretty('sign') : '$'; |
|
358 | + $this->_template_args['organization_logo_url'] = isset(EE_Registry::instance()->CFG->organization->logo_url) ? EE_Registry::instance()->CFG->organization->get_pretty('logo_url') : FALSE; |
|
359 | + $this->_template_args['organization_facebook'] = isset(EE_Registry::instance()->CFG->organization->facebook) ? EE_Registry::instance()->CFG->organization->get_pretty('facebook') : ''; |
|
360 | + $this->_template_args['organization_twitter'] = isset(EE_Registry::instance()->CFG->organization->twitter) ? EE_Registry::instance()->CFG->organization->get_pretty('twitter') : ''; |
|
361 | + $this->_template_args['organization_linkedin'] = isset(EE_Registry::instance()->CFG->organization->linkedin) ? EE_Registry::instance()->CFG->organization->get_pretty('linkedin') : ''; |
|
362 | + $this->_template_args['organization_pinterest'] = isset(EE_Registry::instance()->CFG->organization->pinterest) ? EE_Registry::instance()->CFG->organization->get_pretty('pinterest') : ''; |
|
363 | + $this->_template_args['organization_google'] = isset(EE_Registry::instance()->CFG->organization->google) ? EE_Registry::instance()->CFG->organization->get_pretty('google') : ''; |
|
364 | + $this->_template_args['organization_instagram'] = isset(EE_Registry::instance()->CFG->organization->instagram) ? EE_Registry::instance()->CFG->organization->get_pretty('instagram') : ''; |
|
365 | 365 | //UXIP settings |
366 | - $this->_template_args['ee_ueip_optin'] = isset( EE_Registry::instance()->CFG->core->ee_ueip_optin ) ? EE_Registry::instance()->CFG->core->get_pretty( 'ee_ueip_optin' ) : TRUE; |
|
366 | + $this->_template_args['ee_ueip_optin'] = isset(EE_Registry::instance()->CFG->core->ee_ueip_optin) ? EE_Registry::instance()->CFG->core->get_pretty('ee_ueip_optin') : TRUE; |
|
367 | 367 | |
368 | - $STA_ID = isset( EE_Registry::instance()->CFG->organization->STA_ID ) ? EE_Registry::instance()->CFG->organization->STA_ID : 4; |
|
368 | + $STA_ID = isset(EE_Registry::instance()->CFG->organization->STA_ID) ? EE_Registry::instance()->CFG->organization->STA_ID : 4; |
|
369 | 369 | $this->_template_args['states'] = new EE_Question_Form_Input( |
370 | - EE_Question::new_instance ( array( |
|
370 | + EE_Question::new_instance(array( |
|
371 | 371 | 'QST_ID'=> 0, |
372 | 372 | 'QST_display_text'=> __('State/Province', 'event_espresso'), |
373 | 373 | 'QST_system'=>'admin-state' |
374 | 374 | )), |
375 | - EE_Answer::new_instance ( array( |
|
375 | + EE_Answer::new_instance(array( |
|
376 | 376 | 'ANS_ID' => 0, |
377 | 377 | 'ANS_value' => $STA_ID |
378 | 378 | )), |
@@ -384,14 +384,14 @@ discard block |
||
384 | 384 | ) |
385 | 385 | ); |
386 | 386 | |
387 | - $CNT_ISO = isset( EE_Registry::instance()->CFG->organization->CNT_ISO ) ? EE_Registry::instance()->CFG->organization->CNT_ISO : 'US'; |
|
387 | + $CNT_ISO = isset(EE_Registry::instance()->CFG->organization->CNT_ISO) ? EE_Registry::instance()->CFG->organization->CNT_ISO : 'US'; |
|
388 | 388 | $this->_template_args['countries'] = new EE_Question_Form_Input( |
389 | - EE_Question::new_instance ( array( |
|
389 | + EE_Question::new_instance(array( |
|
390 | 390 | 'QST_ID'=> 0, |
391 | 391 | 'QST_display_text'=> __('Country', 'event_espresso'), |
392 | 392 | 'QST_system'=>'admin-country' |
393 | 393 | )), |
394 | - EE_Answer::new_instance ( array( |
|
394 | + EE_Answer::new_instance(array( |
|
395 | 395 | 'ANS_ID' => 0, |
396 | 396 | 'ANS_value' => $CNT_ISO |
397 | 397 | )), |
@@ -403,51 +403,51 @@ discard block |
||
403 | 403 | ) |
404 | 404 | ); |
405 | 405 | |
406 | - add_filter( 'FHEE__EEH_Form_Fields__label_html', array( $this, 'country_form_field_label_wrap' ), 10, 2 ); |
|
407 | - add_filter( 'FHEE__EEH_Form_Fields__input_html', array( $this, 'country_form_field_input__wrap' ), 10, 2 ); |
|
406 | + add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2); |
|
407 | + add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2); |
|
408 | 408 | |
409 | 409 | //PUE verification stuff |
410 | - $ver_option_key = 'puvererr_' . basename( EE_PLUGIN_BASENAME ); |
|
411 | - $verify_fail = get_option( $ver_option_key ); |
|
412 | - $this->_template_args['site_license_key_verified'] = $verify_fail || !empty( $verify_fail ) || ( empty( $this->_template_args['site_license_key'] ) && empty( $verify_fail ) )? '<span class="dashicons dashicons-admin-network ee-icon-color-ee-red ee-icon-size-20"></span>' : '<span class="dashicons dashicons-admin-network ee-icon-color-ee-green ee-icon-size-20"></span>'; |
|
410 | + $ver_option_key = 'puvererr_'.basename(EE_PLUGIN_BASENAME); |
|
411 | + $verify_fail = get_option($ver_option_key); |
|
412 | + $this->_template_args['site_license_key_verified'] = $verify_fail || ! empty($verify_fail) || (empty($this->_template_args['site_license_key']) && empty($verify_fail)) ? '<span class="dashicons dashicons-admin-network ee-icon-color-ee-red ee-icon-size-20"></span>' : '<span class="dashicons dashicons-admin-network ee-icon-color-ee-green ee-icon-size-20"></span>'; |
|
413 | 413 | |
414 | - $this->_set_add_edit_form_tags( 'update_your_organization_settings' ); |
|
415 | - $this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE ); |
|
416 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( GEN_SET_TEMPLATE_PATH . 'your_organization_settings.template.php', $this->_template_args, TRUE ); |
|
414 | + $this->_set_add_edit_form_tags('update_your_organization_settings'); |
|
415 | + $this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE); |
|
416 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'your_organization_settings.template.php', $this->_template_args, TRUE); |
|
417 | 417 | |
418 | 418 | $this->display_admin_page_with_sidebar(); |
419 | 419 | } |
420 | 420 | |
421 | 421 | protected function _update_your_organization_settings() { |
422 | - if ( is_main_site() ) |
|
423 | - EE_Registry::instance()->NET_CFG->core->site_license_key = isset( $this->_req_data['site_license_key'] ) ? sanitize_text_field( $this->_req_data['site_license_key'] ) : EE_Registry::instance()->NET_CFG->core->site_license_key; |
|
424 | - EE_Registry::instance()->CFG->organization->name = isset( $this->_req_data['organization_name'] ) ? sanitize_text_field( $this->_req_data['organization_name'] ) : EE_Registry::instance()->CFG->organization->name; |
|
425 | - EE_Registry::instance()->CFG->organization->address_1 = isset( $this->_req_data['organization_address_1'] ) ? sanitize_text_field( $this->_req_data['organization_address_1'] ) : EE_Registry::instance()->CFG->organization->address_1; |
|
426 | - EE_Registry::instance()->CFG->organization->address_2 = isset( $this->_req_data['organization_address_2'] ) ? sanitize_text_field( $this->_req_data['organization_address_2'] ) : EE_Registry::instance()->CFG->organization->address_2; |
|
427 | - EE_Registry::instance()->CFG->organization->city = isset( $this->_req_data['organization_city'] ) ? sanitize_text_field( $this->_req_data['organization_city'] ) : EE_Registry::instance()->CFG->organization->city; |
|
428 | - EE_Registry::instance()->CFG->organization->STA_ID = isset( $this->_req_data['organization_state'] ) ? absint( $this->_req_data['organization_state'] ) : EE_Registry::instance()->CFG->organization->STA_ID; |
|
429 | - EE_Registry::instance()->CFG->organization->CNT_ISO = isset( $this->_req_data['organization_country'] ) ? sanitize_text_field( $this->_req_data['organization_country'] ) : EE_Registry::instance()->CFG->organization->CNT_ISO; |
|
430 | - EE_Registry::instance()->CFG->organization->zip = isset( $this->_req_data['organization_zip'] ) ? sanitize_text_field( $this->_req_data['organization_zip'] ) : EE_Registry::instance()->CFG->organization->zip; |
|
431 | - EE_Registry::instance()->CFG->organization->email = isset( $this->_req_data['organization_email'] ) ? sanitize_email( $this->_req_data['organization_email'] ) : EE_Registry::instance()->CFG->organization->email; |
|
432 | - EE_Registry::instance()->CFG->organization->vat = isset( $this->_req_data['organization_vat'] ) ? sanitize_text_field( $this->_req_data['organization_vat'] ) : EE_Registry::instance()->CFG->organization->vat; |
|
433 | - EE_Registry::instance()->CFG->organization->phone = isset( $this->_req_data['organization_phone'] ) ? sanitize_text_field( $this->_req_data['organization_phone'] ) : EE_Registry::instance()->CFG->organization->phone; |
|
434 | - EE_Registry::instance()->CFG->organization->logo_url = isset( $this->_req_data['organization_logo_url'] ) ? esc_url_raw( $this->_req_data['organization_logo_url'] ) : EE_Registry::instance()->CFG->organization->logo_url; |
|
435 | - EE_Registry::instance()->CFG->organization->facebook = isset( $this->_req_data['organization_facebook'] ) ? esc_url_raw( $this->_req_data['organization_facebook'] ) : EE_Registry::instance()->CFG->organization->facebook; |
|
436 | - EE_Registry::instance()->CFG->organization->twitter = isset( $this->_req_data['organization_twitter'] ) ? esc_url_raw( $this->_req_data['organization_twitter'] ) : EE_Registry::instance()->CFG->organization->twitter; |
|
437 | - EE_Registry::instance()->CFG->organization->linkedin = isset( $this->_req_data['organization_linkedin'] ) ? esc_url_raw( $this->_req_data['organization_linkedin'] ) : EE_Registry::instance()->CFG->organization->linkedin; |
|
438 | - EE_Registry::instance()->CFG->organization->pinterest = isset( $this->_req_data['organization_pinterest'] ) ? esc_url_raw( $this->_req_data['organization_pinterest'] ) : EE_Registry::instance()->CFG->organization->pinterest; |
|
439 | - EE_Registry::instance()->CFG->organization->google = isset( $this->_req_data['organization_google'] ) ? esc_url_raw( $this->_req_data['organization_google'] ) : EE_Registry::instance()->CFG->organization->google; |
|
440 | - EE_Registry::instance()->CFG->organization->instagram = isset( $this->_req_data['organization_instagram'] ) ? esc_url_raw( $this->_req_data['organization_instagram'] ) : EE_Registry::instance()->CFG->organization->instagram; |
|
441 | - EE_Registry::instance()->CFG->core->ee_ueip_optin = isset( $this->_req_data['ueip_optin'] ) && !empty( $this->_req_data['ueip_optin'] ) ? $this->_req_data['ueip_optin'] : EE_Registry::instance()->CFG->core->ee_ueip_optin; |
|
442 | - |
|
443 | - EE_Registry::instance()->CFG->currency = new EE_Currency_Config( EE_Registry::instance()->CFG->organization->CNT_ISO ); |
|
444 | - |
|
445 | - EE_Registry::instance()->CFG = apply_filters( 'FHEE__General_Settings_Admin_Page___update_your_organization_settings__CFG', EE_Registry::instance()->CFG ); |
|
422 | + if (is_main_site()) |
|
423 | + EE_Registry::instance()->NET_CFG->core->site_license_key = isset($this->_req_data['site_license_key']) ? sanitize_text_field($this->_req_data['site_license_key']) : EE_Registry::instance()->NET_CFG->core->site_license_key; |
|
424 | + EE_Registry::instance()->CFG->organization->name = isset($this->_req_data['organization_name']) ? sanitize_text_field($this->_req_data['organization_name']) : EE_Registry::instance()->CFG->organization->name; |
|
425 | + EE_Registry::instance()->CFG->organization->address_1 = isset($this->_req_data['organization_address_1']) ? sanitize_text_field($this->_req_data['organization_address_1']) : EE_Registry::instance()->CFG->organization->address_1; |
|
426 | + EE_Registry::instance()->CFG->organization->address_2 = isset($this->_req_data['organization_address_2']) ? sanitize_text_field($this->_req_data['organization_address_2']) : EE_Registry::instance()->CFG->organization->address_2; |
|
427 | + EE_Registry::instance()->CFG->organization->city = isset($this->_req_data['organization_city']) ? sanitize_text_field($this->_req_data['organization_city']) : EE_Registry::instance()->CFG->organization->city; |
|
428 | + EE_Registry::instance()->CFG->organization->STA_ID = isset($this->_req_data['organization_state']) ? absint($this->_req_data['organization_state']) : EE_Registry::instance()->CFG->organization->STA_ID; |
|
429 | + EE_Registry::instance()->CFG->organization->CNT_ISO = isset($this->_req_data['organization_country']) ? sanitize_text_field($this->_req_data['organization_country']) : EE_Registry::instance()->CFG->organization->CNT_ISO; |
|
430 | + EE_Registry::instance()->CFG->organization->zip = isset($this->_req_data['organization_zip']) ? sanitize_text_field($this->_req_data['organization_zip']) : EE_Registry::instance()->CFG->organization->zip; |
|
431 | + EE_Registry::instance()->CFG->organization->email = isset($this->_req_data['organization_email']) ? sanitize_email($this->_req_data['organization_email']) : EE_Registry::instance()->CFG->organization->email; |
|
432 | + EE_Registry::instance()->CFG->organization->vat = isset($this->_req_data['organization_vat']) ? sanitize_text_field($this->_req_data['organization_vat']) : EE_Registry::instance()->CFG->organization->vat; |
|
433 | + EE_Registry::instance()->CFG->organization->phone = isset($this->_req_data['organization_phone']) ? sanitize_text_field($this->_req_data['organization_phone']) : EE_Registry::instance()->CFG->organization->phone; |
|
434 | + EE_Registry::instance()->CFG->organization->logo_url = isset($this->_req_data['organization_logo_url']) ? esc_url_raw($this->_req_data['organization_logo_url']) : EE_Registry::instance()->CFG->organization->logo_url; |
|
435 | + EE_Registry::instance()->CFG->organization->facebook = isset($this->_req_data['organization_facebook']) ? esc_url_raw($this->_req_data['organization_facebook']) : EE_Registry::instance()->CFG->organization->facebook; |
|
436 | + EE_Registry::instance()->CFG->organization->twitter = isset($this->_req_data['organization_twitter']) ? esc_url_raw($this->_req_data['organization_twitter']) : EE_Registry::instance()->CFG->organization->twitter; |
|
437 | + EE_Registry::instance()->CFG->organization->linkedin = isset($this->_req_data['organization_linkedin']) ? esc_url_raw($this->_req_data['organization_linkedin']) : EE_Registry::instance()->CFG->organization->linkedin; |
|
438 | + EE_Registry::instance()->CFG->organization->pinterest = isset($this->_req_data['organization_pinterest']) ? esc_url_raw($this->_req_data['organization_pinterest']) : EE_Registry::instance()->CFG->organization->pinterest; |
|
439 | + EE_Registry::instance()->CFG->organization->google = isset($this->_req_data['organization_google']) ? esc_url_raw($this->_req_data['organization_google']) : EE_Registry::instance()->CFG->organization->google; |
|
440 | + EE_Registry::instance()->CFG->organization->instagram = isset($this->_req_data['organization_instagram']) ? esc_url_raw($this->_req_data['organization_instagram']) : EE_Registry::instance()->CFG->organization->instagram; |
|
441 | + EE_Registry::instance()->CFG->core->ee_ueip_optin = isset($this->_req_data['ueip_optin']) && ! empty($this->_req_data['ueip_optin']) ? $this->_req_data['ueip_optin'] : EE_Registry::instance()->CFG->core->ee_ueip_optin; |
|
442 | + |
|
443 | + EE_Registry::instance()->CFG->currency = new EE_Currency_Config(EE_Registry::instance()->CFG->organization->CNT_ISO); |
|
444 | + |
|
445 | + EE_Registry::instance()->CFG = apply_filters('FHEE__General_Settings_Admin_Page___update_your_organization_settings__CFG', EE_Registry::instance()->CFG); |
|
446 | 446 | |
447 | 447 | $what = 'Your Organization Settings'; |
448 | - $success = $this->_update_espresso_configuration( $what, EE_Registry::instance()->CFG, __FILE__, __FUNCTION__, __LINE__ ); |
|
448 | + $success = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG, __FILE__, __FUNCTION__, __LINE__); |
|
449 | 449 | |
450 | - $this->_redirect_after_action( $success, $what, 'updated', array( 'action' => 'default' ) ); |
|
450 | + $this->_redirect_after_action($success, $what, 'updated', array('action' => 'default')); |
|
451 | 451 | |
452 | 452 | } |
453 | 453 | |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | ), |
514 | 514 | 'Admin Options', |
515 | 515 | 'updated', |
516 | - array( 'action' => 'admin_option_settings' ) |
|
516 | + array('action' => 'admin_option_settings') |
|
517 | 517 | ); |
518 | 518 | |
519 | 519 | } |
@@ -527,20 +527,20 @@ discard block |
||
527 | 527 | |
528 | 528 | protected function _country_settings() { |
529 | 529 | |
530 | - $CNT_ISO = isset( EE_Registry::instance()->CFG->organization->CNT_ISO ) ? EE_Registry::instance()->CFG->organization->CNT_ISO : 'US'; |
|
531 | - $CNT_ISO = isset( $this->_req_data['country'] ) ? strtoupper( sanitize_text_field( $this->_req_data['country'] )) : $CNT_ISO; |
|
530 | + $CNT_ISO = isset(EE_Registry::instance()->CFG->organization->CNT_ISO) ? EE_Registry::instance()->CFG->organization->CNT_ISO : 'US'; |
|
531 | + $CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : $CNT_ISO; |
|
532 | 532 | |
533 | 533 | //load field generator helper |
534 | 534 | |
535 | 535 | $this->_template_args['values'] = $this->_yes_no_values; |
536 | 536 | |
537 | 537 | $this->_template_args['countries'] = new EE_Question_Form_Input( |
538 | - EE_Question::new_instance ( array( |
|
538 | + EE_Question::new_instance(array( |
|
539 | 539 | 'QST_ID'=> 0, |
540 | 540 | 'QST_display_text'=> __('Select Country', 'event_espresso'), |
541 | 541 | 'QST_system'=>'admin-country' |
542 | 542 | )), |
543 | - EE_Answer::new_instance ( array( |
|
543 | + EE_Answer::new_instance(array( |
|
544 | 544 | 'ANS_ID' => 0, |
545 | 545 | 'ANS_value' => $CNT_ISO |
546 | 546 | )), |
@@ -553,14 +553,14 @@ discard block |
||
553 | 553 | ); |
554 | 554 | // EEH_Debug_Tools::printr( $this->_template_args['countries'], 'countries <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
555 | 555 | |
556 | - add_filter( 'FHEE__EEH_Form_Fields__label_html', array( $this, 'country_form_field_label_wrap' ), 10, 2 ); |
|
557 | - add_filter( 'FHEE__EEH_Form_Fields__input_html', array( $this, 'country_form_field_input__wrap' ), 10, 2 ); |
|
556 | + add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2); |
|
557 | + add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2); |
|
558 | 558 | $this->_template_args['country_details_settings'] = $this->display_country_settings(); |
559 | 559 | $this->_template_args['country_states_settings'] = $this->display_country_states(); |
560 | 560 | |
561 | - $this->_set_add_edit_form_tags( 'update_country_settings' ); |
|
562 | - $this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE ); |
|
563 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( GEN_SET_TEMPLATE_PATH . 'countries_settings.template.php', $this->_template_args, TRUE ); |
|
561 | + $this->_set_add_edit_form_tags('update_country_settings'); |
|
562 | + $this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE); |
|
563 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'countries_settings.template.php', $this->_template_args, TRUE); |
|
564 | 564 | $this->display_admin_page_with_no_sidebar(); |
565 | 565 | } |
566 | 566 | |
@@ -573,43 +573,43 @@ discard block |
||
573 | 573 | * @param string $CNT_ISO |
574 | 574 | * @return mixed string | array |
575 | 575 | */ |
576 | - public function display_country_settings( $CNT_ISO = '' ) { |
|
576 | + public function display_country_settings($CNT_ISO = '') { |
|
577 | 577 | |
578 | - $CNT_ISO = isset( $this->_req_data['country'] ) ? strtoupper( sanitize_text_field( $this->_req_data['country'] )) : $CNT_ISO; |
|
579 | - if ( ! $CNT_ISO ) { |
|
578 | + $CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : $CNT_ISO; |
|
579 | + if ( ! $CNT_ISO) { |
|
580 | 580 | return ''; |
581 | 581 | } |
582 | 582 | |
583 | 583 | // for ajax |
584 | - remove_all_filters( 'FHEE__EEH_Form_Fields__label_html' ); |
|
585 | - remove_all_filters( 'FHEE__EEH_Form_Fields__input_html' ); |
|
586 | - add_filter( 'FHEE__EEH_Form_Fields__label_html', array( $this, 'country_form_field_label_wrap' ), 10, 2 ); |
|
587 | - add_filter( 'FHEE__EEH_Form_Fields__input_html', array( $this, 'country_form_field_input__wrap' ), 10, 2 ); |
|
588 | - $country = EEM_Country::instance()->get_one_by_ID( $CNT_ISO ); |
|
584 | + remove_all_filters('FHEE__EEH_Form_Fields__label_html'); |
|
585 | + remove_all_filters('FHEE__EEH_Form_Fields__input_html'); |
|
586 | + add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2); |
|
587 | + add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2); |
|
588 | + $country = EEM_Country::instance()->get_one_by_ID($CNT_ISO); |
|
589 | 589 | //EEH_Debug_Tools::printr( $country, '$country <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
590 | 590 | $country_input_types = array( |
591 | - 'CNT_active' => array( 'type' => 'RADIO_BTN', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => '', 'options' => $this->_yes_no_values, 'use_desc_4_label' => TRUE ), |
|
592 | - 'CNT_ISO' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'small-text' ), |
|
593 | - 'CNT_ISO3' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'small-text' ), |
|
594 | - 'RGN_ID' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'small-text' ), |
|
595 | - 'CNT_name' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'regular-text' ), |
|
596 | - 'CNT_cur_code' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'small-text' ), |
|
597 | - 'CNT_cur_single' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'medium-text' ), |
|
598 | - 'CNT_cur_plural' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'medium-text' ), |
|
599 | - 'CNT_cur_sign' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'small-text', 'htmlentities' => FALSE ), |
|
600 | - 'CNT_cur_sign_b4' => array( 'type' => 'RADIO_BTN', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => '', 'options' => $this->_yes_no_values, 'use_desc_4_label' => TRUE ), |
|
601 | - 'CNT_cur_dec_plc' => array( 'type' => 'RADIO_BTN', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => '', 'options' => array( array( 'id' => 0, 'text' => '' ), array( 'id' => 1, 'text' => '' ), array( 'id' => 2, 'text' => '' ), array( 'id' => 3, 'text' => '' ))), |
|
602 | - 'CNT_cur_dec_mrk' => array( 'type' => 'RADIO_BTN', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => '', 'options' => array( array( 'id' => ',', 'text' => __(', (comma)', 'event_espresso')), array( 'id' => '.', 'text' => __('. (decimal)', 'event_espresso'))), 'use_desc_4_label' => TRUE ), |
|
603 | - 'CNT_cur_thsnds' => array( 'type' => 'RADIO_BTN', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => '', 'options' => array( array( 'id' => ',', 'text' => __(', (comma)', 'event_espresso')), array( 'id' => '.', 'text' => __('. (decimal)', 'event_espresso'))), 'use_desc_4_label' => TRUE ), |
|
604 | - 'CNT_tel_code' => array( 'type' => 'TEXT', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => 'small-text' ), |
|
605 | - 'CNT_is_EU' => array( 'type' => 'RADIO_BTN', 'input_name' => 'cntry[' . $CNT_ISO . ']', 'class' => '', 'options' => $this->_yes_no_values, 'use_desc_4_label' => TRUE ) |
|
591 | + 'CNT_active' => array('type' => 'RADIO_BTN', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => '', 'options' => $this->_yes_no_values, 'use_desc_4_label' => TRUE), |
|
592 | + 'CNT_ISO' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'small-text'), |
|
593 | + 'CNT_ISO3' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'small-text'), |
|
594 | + 'RGN_ID' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'small-text'), |
|
595 | + 'CNT_name' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'regular-text'), |
|
596 | + 'CNT_cur_code' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'small-text'), |
|
597 | + 'CNT_cur_single' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'medium-text'), |
|
598 | + 'CNT_cur_plural' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'medium-text'), |
|
599 | + 'CNT_cur_sign' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'small-text', 'htmlentities' => FALSE), |
|
600 | + 'CNT_cur_sign_b4' => array('type' => 'RADIO_BTN', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => '', 'options' => $this->_yes_no_values, 'use_desc_4_label' => TRUE), |
|
601 | + 'CNT_cur_dec_plc' => array('type' => 'RADIO_BTN', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => '', 'options' => array(array('id' => 0, 'text' => ''), array('id' => 1, 'text' => ''), array('id' => 2, 'text' => ''), array('id' => 3, 'text' => ''))), |
|
602 | + 'CNT_cur_dec_mrk' => array('type' => 'RADIO_BTN', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => '', 'options' => array(array('id' => ',', 'text' => __(', (comma)', 'event_espresso')), array('id' => '.', 'text' => __('. (decimal)', 'event_espresso'))), 'use_desc_4_label' => TRUE), |
|
603 | + 'CNT_cur_thsnds' => array('type' => 'RADIO_BTN', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => '', 'options' => array(array('id' => ',', 'text' => __(', (comma)', 'event_espresso')), array('id' => '.', 'text' => __('. (decimal)', 'event_espresso'))), 'use_desc_4_label' => TRUE), |
|
604 | + 'CNT_tel_code' => array('type' => 'TEXT', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => 'small-text'), |
|
605 | + 'CNT_is_EU' => array('type' => 'RADIO_BTN', 'input_name' => 'cntry['.$CNT_ISO.']', 'class' => '', 'options' => $this->_yes_no_values, 'use_desc_4_label' => TRUE) |
|
606 | 606 | ); |
607 | - $this->_template_args['inputs'] = EE_Question_Form_Input::generate_question_form_inputs_for_object( $country, $country_input_types ); |
|
608 | - $country_details_settings = EEH_Template::display_template( GEN_SET_TEMPLATE_PATH . 'country_details_settings.template.php', $this->_template_args, TRUE ); |
|
607 | + $this->_template_args['inputs'] = EE_Question_Form_Input::generate_question_form_inputs_for_object($country, $country_input_types); |
|
608 | + $country_details_settings = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'country_details_settings.template.php', $this->_template_args, TRUE); |
|
609 | 609 | |
610 | - if ( defined( 'DOING_AJAX' )) { |
|
611 | - $notices = EE_Error::get_notices( FALSE, FALSE, FALSE ); |
|
612 | - echo json_encode( array( 'return_data' => $country_details_settings, 'success' => $notices['success'], 'errors' => $notices['errors'] )); |
|
610 | + if (defined('DOING_AJAX')) { |
|
611 | + $notices = EE_Error::get_notices(FALSE, FALSE, FALSE); |
|
612 | + echo json_encode(array('return_data' => $country_details_settings, 'success' => $notices['success'], 'errors' => $notices['errors'])); |
|
613 | 613 | die(); |
614 | 614 | } else { |
615 | 615 | return $country_details_settings; |
@@ -627,49 +627,49 @@ discard block |
||
627 | 627 | * @param string $CNT_ISO |
628 | 628 | * @return string |
629 | 629 | */ |
630 | - public function display_country_states( $CNT_ISO = '' ) { |
|
630 | + public function display_country_states($CNT_ISO = '') { |
|
631 | 631 | |
632 | - $CNT_ISO = isset( $this->_req_data['country'] ) ? sanitize_text_field( $this->_req_data['country'] ) : $CNT_ISO; |
|
632 | + $CNT_ISO = isset($this->_req_data['country']) ? sanitize_text_field($this->_req_data['country']) : $CNT_ISO; |
|
633 | 633 | |
634 | - if ( ! $CNT_ISO ) { |
|
634 | + if ( ! $CNT_ISO) { |
|
635 | 635 | return ''; |
636 | 636 | } |
637 | 637 | // for ajax |
638 | - remove_all_filters( 'FHEE__EEH_Form_Fields__label_html' ); |
|
639 | - remove_all_filters( 'FHEE__EEH_Form_Fields__input_html' ); |
|
640 | - add_filter( 'FHEE__EEH_Form_Fields__label_html', array( $this, 'state_form_field_label_wrap' ), 10, 2 ); |
|
641 | - add_filter( 'FHEE__EEH_Form_Fields__input_html', array( $this, 'state_form_field_input__wrap' ), 10, 2 ); |
|
642 | - $states = EEM_State::instance()->get_all_states_for_these_countries( array( $CNT_ISO => $CNT_ISO )); |
|
638 | + remove_all_filters('FHEE__EEH_Form_Fields__label_html'); |
|
639 | + remove_all_filters('FHEE__EEH_Form_Fields__input_html'); |
|
640 | + add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'state_form_field_label_wrap'), 10, 2); |
|
641 | + add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'state_form_field_input__wrap'), 10, 2); |
|
642 | + $states = EEM_State::instance()->get_all_states_for_these_countries(array($CNT_ISO => $CNT_ISO)); |
|
643 | 643 | |
644 | 644 | // echo '<h4>$CNT_ISO : ' . $CNT_ISO . ' <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>'; |
645 | 645 | // global $wpdb; |
646 | 646 | // echo '<h4>' . $wpdb->last_query . ' <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>'; |
647 | 647 | // EEH_Debug_Tools::printr( $states, '$states <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
648 | - if ( $states ) { |
|
649 | - foreach ( $states as $STA_ID => $state ) { |
|
650 | - if ( $state instanceof EE_State ) { |
|
648 | + if ($states) { |
|
649 | + foreach ($states as $STA_ID => $state) { |
|
650 | + if ($state instanceof EE_State) { |
|
651 | 651 | //STA_abbrev STA_name STA_active |
652 | 652 | $state_input_types = array( |
653 | - 'STA_abbrev' => array( 'type' => 'TEXT', 'input_name' => 'states[' . $STA_ID . ']', 'class' => 'mid-text' ), |
|
654 | - 'STA_name' => array( 'type' => 'TEXT', 'input_name' => 'states[' . $STA_ID . ']', 'class' => 'regular-text' ), |
|
655 | - 'STA_active' => array( 'type' => 'RADIO_BTN', 'input_name' => 'states[' . $STA_ID . ']', 'options' => $this->_yes_no_values, 'use_desc_4_label' => true ) |
|
653 | + 'STA_abbrev' => array('type' => 'TEXT', 'input_name' => 'states['.$STA_ID.']', 'class' => 'mid-text'), |
|
654 | + 'STA_name' => array('type' => 'TEXT', 'input_name' => 'states['.$STA_ID.']', 'class' => 'regular-text'), |
|
655 | + 'STA_active' => array('type' => 'RADIO_BTN', 'input_name' => 'states['.$STA_ID.']', 'options' => $this->_yes_no_values, 'use_desc_4_label' => true) |
|
656 | 656 | ); |
657 | - $this->_template_args[ 'states' ][ $STA_ID ][ 'inputs' ] = EE_Question_Form_Input::generate_question_form_inputs_for_object( $state, $state_input_types ); |
|
658 | - $query_args = array( 'action' => 'delete_state', 'STA_ID' => $STA_ID, 'CNT_ISO' => $CNT_ISO, 'STA_abbrev' => $state->abbrev() ); |
|
659 | - $this->_template_args[ 'states' ][ $STA_ID ][ 'delete_state_url' ] = EE_Admin_Page::add_query_args_and_nonce( $query_args, GEN_SET_ADMIN_URL ); |
|
657 | + $this->_template_args['states'][$STA_ID]['inputs'] = EE_Question_Form_Input::generate_question_form_inputs_for_object($state, $state_input_types); |
|
658 | + $query_args = array('action' => 'delete_state', 'STA_ID' => $STA_ID, 'CNT_ISO' => $CNT_ISO, 'STA_abbrev' => $state->abbrev()); |
|
659 | + $this->_template_args['states'][$STA_ID]['delete_state_url'] = EE_Admin_Page::add_query_args_and_nonce($query_args, GEN_SET_ADMIN_URL); |
|
660 | 660 | } |
661 | 661 | } |
662 | 662 | } else { |
663 | 663 | $this->_template_args['states'] = FALSE; |
664 | 664 | } |
665 | 665 | // EEH_Debug_Tools::printr( $this->_template_args['states'], 'states <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
666 | - $this->_template_args['add_new_state_url'] = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'add_new_state' ), GEN_SET_ADMIN_URL ); |
|
666 | + $this->_template_args['add_new_state_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'add_new_state'), GEN_SET_ADMIN_URL); |
|
667 | 667 | |
668 | - $state_details_settings = EEH_Template::display_template( GEN_SET_TEMPLATE_PATH . 'state_details_settings.template.php', $this->_template_args, TRUE ); |
|
668 | + $state_details_settings = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'state_details_settings.template.php', $this->_template_args, TRUE); |
|
669 | 669 | |
670 | - if ( defined( 'DOING_AJAX' )) { |
|
671 | - $notices = EE_Error::get_notices( FALSE, FALSE, FALSE ); |
|
672 | - echo json_encode( array( 'return_data' => $state_details_settings, 'success' => $notices['success'], 'errors' => $notices['errors'] )); |
|
670 | + if (defined('DOING_AJAX')) { |
|
671 | + $notices = EE_Error::get_notices(FALSE, FALSE, FALSE); |
|
672 | + echo json_encode(array('return_data' => $state_details_settings, 'success' => $notices['success'], 'errors' => $notices['errors'])); |
|
673 | 673 | die(); |
674 | 674 | } else { |
675 | 675 | return $state_details_settings; |
@@ -690,40 +690,39 @@ discard block |
||
690 | 690 | |
691 | 691 | $success = TRUE; |
692 | 692 | |
693 | - $CNT_ISO = isset( $this->_req_data['CNT_ISO'] ) ? strtoupper( sanitize_text_field( $this->_req_data['CNT_ISO'] )) : FALSE; |
|
694 | - if ( ! $CNT_ISO ) { |
|
695 | - EE_Error::add_error( __( 'No Country ISO code or an invalid Country ISO code was received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
693 | + $CNT_ISO = isset($this->_req_data['CNT_ISO']) ? strtoupper(sanitize_text_field($this->_req_data['CNT_ISO'])) : FALSE; |
|
694 | + if ( ! $CNT_ISO) { |
|
695 | + EE_Error::add_error(__('No Country ISO code or an invalid Country ISO code was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
696 | 696 | $success = FALSE; |
697 | 697 | } |
698 | - $STA_abbrev = isset( $this->_req_data['STA_abbrev'] ) ? sanitize_text_field( $this->_req_data['STA_abbrev'] ) : FALSE; |
|
699 | - if ( ! $STA_abbrev ) { |
|
700 | - EE_Error::add_error( __( 'No State ISO code or an invalid State ISO code was received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
698 | + $STA_abbrev = isset($this->_req_data['STA_abbrev']) ? sanitize_text_field($this->_req_data['STA_abbrev']) : FALSE; |
|
699 | + if ( ! $STA_abbrev) { |
|
700 | + EE_Error::add_error(__('No State ISO code or an invalid State ISO code was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
701 | 701 | $success = FALSE; |
702 | 702 | } |
703 | - $STA_name = isset( $this->_req_data['STA_name'] ) ? sanitize_text_field( $this->_req_data['STA_name'] ) : |
|
704 | - FALSE; |
|
705 | - if ( ! $STA_name ) { |
|
706 | - EE_Error::add_error( __( 'No State name or an invalid State name was received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
703 | + $STA_name = isset($this->_req_data['STA_name']) ? sanitize_text_field($this->_req_data['STA_name']) : FALSE; |
|
704 | + if ( ! $STA_name) { |
|
705 | + EE_Error::add_error(__('No State name or an invalid State name was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
707 | 706 | $success = FALSE; |
708 | 707 | } |
709 | 708 | |
710 | - if ( $success ) { |
|
709 | + if ($success) { |
|
711 | 710 | $cols_n_values = array( |
712 | 711 | 'CNT_ISO' => $CNT_ISO, |
713 | 712 | 'STA_abbrev' => $STA_abbrev, |
714 | 713 | 'STA_name' => $STA_name, |
715 | 714 | 'STA_active' => TRUE |
716 | 715 | ); |
717 | - $success = EEM_State::instance()->insert ( $cols_n_values ); |
|
718 | - EE_Error::add_success( __( 'The State was added successfully.', 'event_espresso' ) ); |
|
716 | + $success = EEM_State::instance()->insert($cols_n_values); |
|
717 | + EE_Error::add_success(__('The State was added successfully.', 'event_espresso')); |
|
719 | 718 | } |
720 | 719 | |
721 | - if ( defined( 'DOING_AJAX' )) { |
|
722 | - $notices = EE_Error::get_notices( FALSE, FALSE, FALSE ); |
|
723 | - echo json_encode( array_merge( $notices, array( 'return_data' => $CNT_ISO ) ) ); |
|
720 | + if (defined('DOING_AJAX')) { |
|
721 | + $notices = EE_Error::get_notices(FALSE, FALSE, FALSE); |
|
722 | + echo json_encode(array_merge($notices, array('return_data' => $CNT_ISO))); |
|
724 | 723 | die(); |
725 | 724 | } else { |
726 | - $this->_redirect_after_action( $success, 'State', 'added', array( 'action' => 'country_settings' ) ); |
|
725 | + $this->_redirect_after_action($success, 'State', 'added', array('action' => 'country_settings')); |
|
727 | 726 | } |
728 | 727 | } |
729 | 728 | |
@@ -736,25 +735,25 @@ discard block |
||
736 | 735 | * @return boolean | void |
737 | 736 | */ |
738 | 737 | public function delete_state() { |
739 | - $CNT_ISO = isset( $this->_req_data['CNT_ISO'] ) ? strtoupper( sanitize_text_field( $this->_req_data['CNT_ISO'] )) : FALSE; |
|
740 | - $STA_ID = isset( $this->_req_data['STA_ID'] ) ? sanitize_text_field( $this->_req_data['STA_ID'] ) : FALSE; |
|
741 | - $STA_abbrev = isset( $this->_req_data['STA_abbrev'] ) ? sanitize_text_field( $this->_req_data['STA_abbrev'] ) : FALSE; |
|
742 | - if ( ! $STA_ID ) { |
|
743 | - EE_Error::add_error( __( 'No State ID or an invalid State ID was received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
738 | + $CNT_ISO = isset($this->_req_data['CNT_ISO']) ? strtoupper(sanitize_text_field($this->_req_data['CNT_ISO'])) : FALSE; |
|
739 | + $STA_ID = isset($this->_req_data['STA_ID']) ? sanitize_text_field($this->_req_data['STA_ID']) : FALSE; |
|
740 | + $STA_abbrev = isset($this->_req_data['STA_abbrev']) ? sanitize_text_field($this->_req_data['STA_abbrev']) : FALSE; |
|
741 | + if ( ! $STA_ID) { |
|
742 | + EE_Error::add_error(__('No State ID or an invalid State ID was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
744 | 743 | return FALSE; |
745 | 744 | } |
746 | - $success = EEM_State::instance()->delete_by_ID( $STA_ID ); |
|
747 | - if ( $success !== FALSE ) { |
|
748 | - do_action( 'AHEE__General_Settings_Admin_Page__delete_state__state_deleted', $CNT_ISO, $STA_ID, array( 'STA_abbrev' => $STA_abbrev )); |
|
749 | - EE_Error::add_success( __( 'The State was deleted successfully.', 'event_espresso' )); |
|
745 | + $success = EEM_State::instance()->delete_by_ID($STA_ID); |
|
746 | + if ($success !== FALSE) { |
|
747 | + do_action('AHEE__General_Settings_Admin_Page__delete_state__state_deleted', $CNT_ISO, $STA_ID, array('STA_abbrev' => $STA_abbrev)); |
|
748 | + EE_Error::add_success(__('The State was deleted successfully.', 'event_espresso')); |
|
750 | 749 | } |
751 | - if ( defined( 'DOING_AJAX' )) { |
|
752 | - $notices = EE_Error::get_notices( FALSE, FALSE ); |
|
750 | + if (defined('DOING_AJAX')) { |
|
751 | + $notices = EE_Error::get_notices(FALSE, FALSE); |
|
753 | 752 | $notices['return_data'] = TRUE; |
754 | - echo json_encode( $notices ); |
|
753 | + echo json_encode($notices); |
|
755 | 754 | die(); |
756 | 755 | } else { |
757 | - $this->_redirect_after_action( $success, 'State', 'deleted', array( 'action' => 'country_settings' ) ); |
|
756 | + $this->_redirect_after_action($success, 'State', 'deleted', array('action' => 'country_settings')); |
|
758 | 757 | } |
759 | 758 | } |
760 | 759 | |
@@ -770,63 +769,63 @@ discard block |
||
770 | 769 | protected function _update_country_settings() { |
771 | 770 | // EEH_Debug_Tools::printr( $this->_req_data, '$this->_req_data <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
772 | 771 | // grab the country ISO code |
773 | - $CNT_ISO = isset( $this->_req_data['country'] ) ? strtoupper( sanitize_text_field( $this->_req_data['country'] )) : FALSE; |
|
774 | - if ( ! $CNT_ISO ) { |
|
775 | - EE_Error::add_error( __( 'No Country ISO code or an invalid Country ISO code was received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
772 | + $CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : FALSE; |
|
773 | + if ( ! $CNT_ISO) { |
|
774 | + EE_Error::add_error(__('No Country ISO code or an invalid Country ISO code was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
776 | 775 | return; |
777 | 776 | } |
778 | 777 | $cols_n_values = array(); |
779 | - $cols_n_values['CNT_ISO3'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_ISO3'] ) ? strtoupper( sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_ISO3'] )) : FALSE; |
|
780 | - $cols_n_values['RGN_ID'] = isset( $this->_req_data['cntry'][$CNT_ISO]['RGN_ID'] ) ? absint( $this->_req_data['cntry'][$CNT_ISO]['RGN_ID'] ) : NULL; |
|
781 | - $cols_n_values['CNT_name'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_name'] ) ? sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_name'] ) : NULL; |
|
782 | - $cols_n_values['CNT_cur_code'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_code'] ) ? strtoupper( sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_code'] )) : 'USD'; |
|
783 | - $cols_n_values['CNT_cur_single'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_single'] ) ? sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_single'] ) : 'dollar'; |
|
784 | - $cols_n_values['CNT_cur_plural'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_plural'] ) ? sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_plural'] ) : 'dollars'; |
|
785 | - $cols_n_values['CNT_cur_sign'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign'] ) ? sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign'] ) : '$'; |
|
786 | - $cols_n_values['CNT_cur_sign_b4'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign_b4'] ) ? absint( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign_b4'] ) : TRUE; |
|
787 | - $cols_n_values['CNT_cur_dec_plc'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_plc'] ) ? absint( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_plc'] ) : 2; |
|
788 | - $cols_n_values['CNT_cur_dec_mrk'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_mrk'] ) ? sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_mrk'] ) : '.'; |
|
789 | - $cols_n_values['CNT_cur_thsnds'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_thsnds'] ) ? sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_cur_thsnds'] ) : ','; |
|
790 | - $cols_n_values['CNT_tel_code'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_tel_code'] ) ? sanitize_text_field( $this->_req_data['cntry'][$CNT_ISO]['CNT_tel_code'] ) : NULL; |
|
791 | - $cols_n_values['CNT_is_EU'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_is_EU'] ) ? absint( $this->_req_data['cntry'][$CNT_ISO]['CNT_is_EU'] ) : FALSE; |
|
792 | - $cols_n_values['CNT_active'] = isset( $this->_req_data['cntry'][$CNT_ISO]['CNT_active'] ) ? absint( $this->_req_data['cntry'][$CNT_ISO]['CNT_active'] ) : FALSE; |
|
778 | + $cols_n_values['CNT_ISO3'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_ISO3']) ? strtoupper(sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_ISO3'])) : FALSE; |
|
779 | + $cols_n_values['RGN_ID'] = isset($this->_req_data['cntry'][$CNT_ISO]['RGN_ID']) ? absint($this->_req_data['cntry'][$CNT_ISO]['RGN_ID']) : NULL; |
|
780 | + $cols_n_values['CNT_name'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_name']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_name']) : NULL; |
|
781 | + $cols_n_values['CNT_cur_code'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_code']) ? strtoupper(sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_code'])) : 'USD'; |
|
782 | + $cols_n_values['CNT_cur_single'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_single']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_single']) : 'dollar'; |
|
783 | + $cols_n_values['CNT_cur_plural'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_plural']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_plural']) : 'dollars'; |
|
784 | + $cols_n_values['CNT_cur_sign'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign']) : '$'; |
|
785 | + $cols_n_values['CNT_cur_sign_b4'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign_b4']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign_b4']) : TRUE; |
|
786 | + $cols_n_values['CNT_cur_dec_plc'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_plc']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_plc']) : 2; |
|
787 | + $cols_n_values['CNT_cur_dec_mrk'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_mrk']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_mrk']) : '.'; |
|
788 | + $cols_n_values['CNT_cur_thsnds'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_thsnds']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_thsnds']) : ','; |
|
789 | + $cols_n_values['CNT_tel_code'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_tel_code']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_tel_code']) : NULL; |
|
790 | + $cols_n_values['CNT_is_EU'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_is_EU']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_is_EU']) : FALSE; |
|
791 | + $cols_n_values['CNT_active'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_active']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_active']) : FALSE; |
|
793 | 792 | // allow filtering of country data |
794 | - $cols_n_values = apply_filters( 'FHEE__General_Settings_Admin_Page___update_country_settings__cols_n_values', $cols_n_values ); |
|
793 | + $cols_n_values = apply_filters('FHEE__General_Settings_Admin_Page___update_country_settings__cols_n_values', $cols_n_values); |
|
795 | 794 | //EEH_Debug_Tools::printr( $cols_n_values, '$cols_n_values <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
796 | 795 | // where values |
797 | - $where_cols_n_values = array( array( 'CNT_ISO' => $CNT_ISO )); |
|
796 | + $where_cols_n_values = array(array('CNT_ISO' => $CNT_ISO)); |
|
798 | 797 | // run the update |
799 | - $success = EEM_Country::instance()->update( $cols_n_values, $where_cols_n_values ); |
|
798 | + $success = EEM_Country::instance()->update($cols_n_values, $where_cols_n_values); |
|
800 | 799 | // global $wpdb; |
801 | 800 | // echo '<h4>' . $wpdb->last_query . ' <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>'; |
802 | 801 | // echo '<h4>$success : ' . $success . ' <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>'; |
803 | - if ( isset( $this->_req_data['states'] ) && is_array( $this->_req_data['states'] ) && $success !== FALSE ) { |
|
802 | + if (isset($this->_req_data['states']) && is_array($this->_req_data['states']) && $success !== FALSE) { |
|
804 | 803 | // allow filtering of states data |
805 | - $states = apply_filters( 'FHEE__General_Settings_Admin_Page___update_country_settings__states', $this->_req_data['states'] ); |
|
804 | + $states = apply_filters('FHEE__General_Settings_Admin_Page___update_country_settings__states', $this->_req_data['states']); |
|
806 | 805 | // EEH_Debug_Tools::printr( $states, '$states <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
807 | 806 | // loop thru state data ( looks like : states[75][STA_name] ) |
808 | - foreach( $states as $STA_ID => $state ) { |
|
807 | + foreach ($states as $STA_ID => $state) { |
|
809 | 808 | $cols_n_values = array( |
810 | 809 | 'CNT_ISO' => $CNT_ISO, |
811 | - 'STA_abbrev' => sanitize_text_field( $state['STA_abbrev'] ), |
|
812 | - 'STA_name' => sanitize_text_field( $state['STA_name'] ), |
|
813 | - 'STA_active' => (bool)absint( $state['STA_active'] ) |
|
810 | + 'STA_abbrev' => sanitize_text_field($state['STA_abbrev']), |
|
811 | + 'STA_name' => sanitize_text_field($state['STA_name']), |
|
812 | + 'STA_active' => (bool) absint($state['STA_active']) |
|
814 | 813 | ); |
815 | 814 | // where values |
816 | - $where_cols_n_values = array( array( 'STA_ID' => $STA_ID )); |
|
815 | + $where_cols_n_values = array(array('STA_ID' => $STA_ID)); |
|
817 | 816 | // run the update |
818 | - $success = EEM_State::instance()->update( $cols_n_values, $where_cols_n_values ); |
|
819 | - if ( $success !== FALSE ) { |
|
820 | - do_action( 'AHEE__General_Settings_Admin_Page__update_country_settings__state_saved', $CNT_ISO, $STA_ID, $cols_n_values ); |
|
817 | + $success = EEM_State::instance()->update($cols_n_values, $where_cols_n_values); |
|
818 | + if ($success !== FALSE) { |
|
819 | + do_action('AHEE__General_Settings_Admin_Page__update_country_settings__state_saved', $CNT_ISO, $STA_ID, $cols_n_values); |
|
821 | 820 | } |
822 | 821 | } |
823 | 822 | } |
824 | 823 | // check if country being edited matches org option country, and if so, then update EE_Config with new settings |
825 | - if ( isset( EE_Registry::instance()->CFG->organization->CNT_ISO ) && $CNT_ISO == EE_Registry::instance()->CFG->organization->CNT_ISO ) { |
|
826 | - EE_Registry::instance()->CFG->currency = new EE_Currency_Config( $CNT_ISO ); |
|
824 | + if (isset(EE_Registry::instance()->CFG->organization->CNT_ISO) && $CNT_ISO == EE_Registry::instance()->CFG->organization->CNT_ISO) { |
|
825 | + EE_Registry::instance()->CFG->currency = new EE_Currency_Config($CNT_ISO); |
|
827 | 826 | EE_Registry::instance()->CFG->update_espresso_config(); |
828 | 827 | } |
829 | - $this->_redirect_after_action( $success, 'Countries', 'updated', array( 'action' => 'country_settings', 'country' => $CNT_ISO )); |
|
828 | + $this->_redirect_after_action($success, 'Countries', 'updated', array('action' => 'country_settings', 'country' => $CNT_ISO)); |
|
830 | 829 | } |
831 | 830 | |
832 | 831 | |
@@ -840,11 +839,11 @@ discard block |
||
840 | 839 | * @param string $label |
841 | 840 | * @return string |
842 | 841 | */ |
843 | - public function country_form_field_label_wrap( $label, $required_text ) { |
|
842 | + public function country_form_field_label_wrap($label, $required_text) { |
|
844 | 843 | return ' |
845 | 844 | <tr> |
846 | 845 | <th> |
847 | - ' . $label . ' |
|
846 | + ' . $label.' |
|
848 | 847 | </th>'; |
849 | 848 | } |
850 | 849 | |
@@ -858,10 +857,10 @@ discard block |
||
858 | 857 | * @param string $label |
859 | 858 | * @return string |
860 | 859 | */ |
861 | - public function country_form_field_input__wrap( $input, $label ) { |
|
860 | + public function country_form_field_input__wrap($input, $label) { |
|
862 | 861 | return ' |
863 | 862 | <td class="general-settings-country-input-td"> |
864 | - ' . $input . ' |
|
863 | + ' . $input.' |
|
865 | 864 | </td> |
866 | 865 | </tr>'; |
867 | 866 | } |
@@ -877,7 +876,7 @@ discard block |
||
877 | 876 | * @param string $required_text |
878 | 877 | * @return string |
879 | 878 | */ |
880 | - public function state_form_field_label_wrap( $label, $required_text ) { |
|
879 | + public function state_form_field_label_wrap($label, $required_text) { |
|
881 | 880 | return $required_text; |
882 | 881 | } |
883 | 882 | |
@@ -891,10 +890,10 @@ discard block |
||
891 | 890 | * @param string $label |
892 | 891 | * @return string |
893 | 892 | */ |
894 | - public function state_form_field_input__wrap( $input, $label ) { |
|
893 | + public function state_form_field_input__wrap($input, $label) { |
|
895 | 894 | return ' |
896 | 895 | <td class="general-settings-country-state-input-td"> |
897 | - ' . $input . ' |
|
896 | + ' . $input.' |
|
898 | 897 | </td>'; |
899 | 898 | |
900 | 899 | } |
@@ -917,10 +916,10 @@ discard block |
||
917 | 916 | * @param int $ee_page_id |
918 | 917 | * @return string |
919 | 918 | */ |
920 | - public static function edit_view_links( $ee_page_id ) { |
|
921 | - $links = '<a href="' . add_query_arg( array( 'post' => $ee_page_id, 'action' => 'edit' ), admin_url( 'post.php' )) . '" >' . __('Edit', 'event_espresso') . '</a>'; |
|
919 | + public static function edit_view_links($ee_page_id) { |
|
920 | + $links = '<a href="'.add_query_arg(array('post' => $ee_page_id, 'action' => 'edit'), admin_url('post.php')).'" >'.__('Edit', 'event_espresso').'</a>'; |
|
922 | 921 | $links .= ' | '; |
923 | - $links .= '<a href="' . get_permalink( $ee_page_id ) . '" >' . __('View', 'event_espresso') . '</a>'; |
|
922 | + $links .= '<a href="'.get_permalink($ee_page_id).'" >'.__('View', 'event_espresso').'</a>'; |
|
924 | 923 | return $links; |
925 | 924 | } |
926 | 925 | |
@@ -933,27 +932,27 @@ discard block |
||
933 | 932 | * @param WP page object $ee_page |
934 | 933 | * @return string |
935 | 934 | */ |
936 | - public static function page_and_shortcode_status( $ee_page, $shortcode ) { |
|
935 | + public static function page_and_shortcode_status($ee_page, $shortcode) { |
|
937 | 936 | |
938 | 937 | // page status |
939 | - if ( isset( $ee_page->post_status ) && $ee_page->post_status == 'publish') { |
|
938 | + if (isset($ee_page->post_status) && $ee_page->post_status == 'publish') { |
|
940 | 939 | $pg_colour = 'green'; |
941 | - $pg_status = sprintf( __('Page%sStatus%sOK', 'event_espresso'), ' ' , ' ' ); |
|
940 | + $pg_status = sprintf(__('Page%sStatus%sOK', 'event_espresso'), ' ', ' '); |
|
942 | 941 | } else { |
943 | 942 | $pg_colour = 'red'; |
944 | - $pg_status = sprintf( __('Page%sVisibility%sProblem', 'event_espresso'), ' ', ' ' ); |
|
943 | + $pg_status = sprintf(__('Page%sVisibility%sProblem', 'event_espresso'), ' ', ' '); |
|
945 | 944 | } |
946 | 945 | |
947 | 946 | // shortcode status |
948 | - if ( isset( $ee_page->post_content ) && strpos( $ee_page->post_content, $shortcode ) !== FALSE ) { |
|
947 | + if (isset($ee_page->post_content) && strpos($ee_page->post_content, $shortcode) !== FALSE) { |
|
949 | 948 | $sc_colour = 'green'; |
950 | - $sc_status = sprintf( __('Shortcode%sOK', 'event_espresso'), ' ' ); |
|
949 | + $sc_status = sprintf(__('Shortcode%sOK', 'event_espresso'), ' '); |
|
951 | 950 | } else { |
952 | 951 | $sc_colour = 'red'; |
953 | - $sc_status = sprintf( __('Shortcode%sProblem', 'event_espresso'), ' ' ); |
|
952 | + $sc_status = sprintf(__('Shortcode%sProblem', 'event_espresso'), ' '); |
|
954 | 953 | } |
955 | 954 | |
956 | - return '<span style="color:' . $pg_colour . '; margin-right:2em;"><strong>' . $pg_status . '</strong></span><span style="color:' . $sc_colour . '"><strong>' . $sc_status . '</strong></span>'; |
|
955 | + return '<span style="color:'.$pg_colour.'; margin-right:2em;"><strong>'.$pg_status.'</strong></span><span style="color:'.$sc_colour.'"><strong>'.$sc_status.'</strong></span>'; |
|
957 | 956 | |
958 | 957 | } |
959 | 958 | |
@@ -968,20 +967,20 @@ discard block |
||
968 | 967 | * @param unknown_type $level |
969 | 968 | * @return unknown |
970 | 969 | */ |
971 | - public static function page_settings_dropdown( $default = 0, $parent = 0, $level = 0 ) { |
|
970 | + public static function page_settings_dropdown($default = 0, $parent = 0, $level = 0) { |
|
972 | 971 | global $wpdb; |
973 | - $items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' AND post_status != 'trash' ORDER BY menu_order", $parent) ); |
|
972 | + $items = $wpdb->get_results($wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' AND post_status != 'trash' ORDER BY menu_order", $parent)); |
|
974 | 973 | |
975 | - if ( $items ) { |
|
976 | - foreach ( $items as $item ) { |
|
977 | - $pad = str_repeat( ' ', $level * 3 ); |
|
978 | - if ( $item->ID == $default) |
|
974 | + if ($items) { |
|
975 | + foreach ($items as $item) { |
|
976 | + $pad = str_repeat(' ', $level * 3); |
|
977 | + if ($item->ID == $default) |
|
979 | 978 | $current = ' selected="selected"'; |
980 | 979 | else |
981 | 980 | $current = ''; |
982 | 981 | |
983 | - echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . "</option>"; |
|
984 | - parent_dropdown( $default, $item->ID, $level +1 ); |
|
982 | + echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad ".esc_html($item->post_title)."</option>"; |
|
983 | + parent_dropdown($default, $item->ID, $level + 1); |
|
985 | 984 | } |
986 | 985 | } else { |
987 | 986 | return false; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | |
34 | 34 | public function __construct() { |
35 | 35 | //define some constants |
36 | - define( 'GEN_SET_PG_SLUG', 'espresso_general_settings' ); |
|
37 | - define( 'GEN_SET_LABEL', __('General Settings', 'event_espresso')); |
|
38 | - define( 'GEN_SET_ADMIN', EE_ADMIN_PAGES . 'general_settings' . DS ); |
|
39 | - define( 'GEN_SET_ADMIN_URL', admin_url( 'admin.php?page=' . GEN_SET_PG_SLUG )); |
|
40 | - define( 'GEN_SET_TEMPLATE_PATH', GEN_SET_ADMIN . 'templates' . DS ); |
|
41 | - define( 'GEN_SET_ASSETS_URL', EE_ADMIN_PAGES_URL . 'general_settings/assets/' ); |
|
36 | + define('GEN_SET_PG_SLUG', 'espresso_general_settings'); |
|
37 | + define('GEN_SET_LABEL', __('General Settings', 'event_espresso')); |
|
38 | + define('GEN_SET_ADMIN', EE_ADMIN_PAGES.'general_settings'.DS); |
|
39 | + define('GEN_SET_ADMIN_URL', admin_url('admin.php?page='.GEN_SET_PG_SLUG)); |
|
40 | + define('GEN_SET_TEMPLATE_PATH', GEN_SET_ADMIN.'templates'.DS); |
|
41 | + define('GEN_SET_ASSETS_URL', EE_ADMIN_PAGES_URL.'general_settings/assets/'); |
|
42 | 42 | |
43 | 43 | parent::__construct(); |
44 | 44 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | protected function _set_menu_map() { |
51 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
51 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
52 | 52 | 'menu_group' => 'settings', |
53 | 53 | 'menu_order' => 20, |
54 | 54 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -7,7 +7,7 @@ |
||
7 | 7 | <?php _e('Enter your support license key in this field to benefit from one-click updates. To manage your support license key, please <a href="http://eventespresso.com/wp-login.php">login to your Event Espresso account</a>. Then click on Edit Account Details which appears in the left sidebar menu.', 'event_espresso'); ?> |
8 | 8 | </p> |
9 | 9 | <p class="ee-attention"> |
10 | -<?php printf( __('Site license keys are now called support license keys. Your support license key should only be entered on live/production sites. If this is a development or test site, %sdo not%s enter your support license key.', 'event_espresso'), '<strong>', '</strong>' ); ?> |
|
10 | +<?php printf(__('Site license keys are now called support license keys. Your support license key should only be entered on live/production sites. If this is a development or test site, %sdo not%s enter your support license key.', 'event_espresso'), '<strong>', '</strong>'); ?> |
|
11 | 11 | </p> |
12 | 12 | <h3><?php _e('Contact Information', 'event_espresso'); ?></h3> |
13 | 13 | <p> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -81,24 +81,24 @@ discard block |
||
81 | 81 | |
82 | 82 | |
83 | 83 | protected function _start() { |
84 | - $content = '<h3>' . __('Admin Options', 'event_espresso') . '</h3>'; |
|
85 | - $content .= '<p>' . __('This tour of the Admin Options page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
84 | + $content = '<h3>'.__('Admin Options', 'event_espresso').'</h3>'; |
|
85 | + $content .= '<p>'.__('This tour of the Admin Options page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
86 | 86 | return $content; |
87 | 87 | } |
88 | 88 | |
89 | 89 | protected function _use_full_logging_stop() { |
90 | - return '<p>' . __('When enabled, a log file is created which can be useful for debugging. Please disable this option when you are finished debugging.', 'event_espresso') . '</p>'; |
|
90 | + return '<p>'.__('When enabled, a log file is created which can be useful for debugging. Please disable this option when you are finished debugging.', 'event_espresso').'</p>'; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | protected function _use_remote_logging_stop() { |
94 | - return '<p>' . __(' This option sends all Event Espresso debugging data and get / post variables to the specified URL below.', 'event_espresso') . '</p>'; |
|
94 | + return '<p>'.__(' This option sends all Event Espresso debugging data and get / post variables to the specified URL below.', 'event_espresso').'</p>'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | protected function _show_reg_footer_stop() { |
98 | - return '<p>' . __('Support us by adding a small link to Event Espresso in your event pages. You can even earn money for yourself by adding your affiliate link there!', 'event_espresso') . '</p>'; |
|
98 | + return '<p>'.__('Support us by adding a small link to Event Espresso in your event pages. You can even earn money for yourself by adding your affiliate link there!', 'event_espresso').'</p>'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | protected function _help_tour_activation_stop() { |
102 | - return '<p>' . __('Turn these help tours on / off for Event Espresso pages.', 'event_espresso') . '</p>'; |
|
102 | + return '<p>'.__('Turn these help tours on / off for Event Espresso pages.', 'event_espresso').'</p>'; |
|
103 | 103 | } |
104 | 104 | } |
105 | 105 | \ No newline at end of file |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -71,20 +71,20 @@ discard block |
||
71 | 71 | |
72 | 72 | |
73 | 73 | protected function _start() { |
74 | - $content = '<h3>' . __('Countries Settings', 'event_espresso') . '</h3>'; |
|
75 | - $content .= '<p>' . __('This tour of the Countries Page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
74 | + $content = '<h3>'.__('Countries Settings', 'event_espresso').'</h3>'; |
|
75 | + $content .= '<p>'.__('This tour of the Countries Page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
76 | 76 | return $content; |
77 | 77 | } |
78 | 78 | |
79 | 79 | protected function _country_selector_stop() { |
80 | - return '<p>' . __('Select the country where your business or organization is located. This affects the currency that is used in Event Espresso.', 'event_espresso') . '</p>'; |
|
80 | + return '<p>'.__('Select the country where your business or organization is located. This affects the currency that is used in Event Espresso.', 'event_espresso').'</p>'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | protected function _country_details_stop() { |
84 | - return '<p>' . __('Here you can fine tune country and currency settings.', 'event_espresso') . '</p>'; |
|
84 | + return '<p>'.__('Here you can fine tune country and currency settings.', 'event_espresso').'</p>'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | protected function _country_states_settings_stop() { |
88 | - return '<p>' . __('Used in certain areas of the plugin, here you can define what states/provinces will be displayed in case you do not do business in certain areas.', 'event_espresso') . '</p>'; |
|
88 | + return '<p>'.__('Used in certain areas of the plugin, here you can define what states/provinces will be displayed in case you do not do business in certain areas.', 'event_espresso').'</p>'; |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | \ No newline at end of file |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -80,25 +80,25 @@ discard block |
||
80 | 80 | |
81 | 81 | |
82 | 82 | protected function _start() { |
83 | - $content = '<h3>' . __('Critical Pages', 'event_espresso') . '</h3>'; |
|
84 | - $content .= '<p>' . __('This section lists the pages that Event Espresso needs in order to function. Should you wish to change a page that is used you will need to move the shortcode to the new page and then allocate it here. Otherwise your registrations will not work correctly.', 'event_espresso') . '</p>'; |
|
85 | - $content .= '<p>' . __('This section also provides a status of the page to show you at a glance if something is not right.', 'event_espresso') . '</p>'; |
|
83 | + $content = '<h3>'.__('Critical Pages', 'event_espresso').'</h3>'; |
|
84 | + $content .= '<p>'.__('This section lists the pages that Event Espresso needs in order to function. Should you wish to change a page that is used you will need to move the shortcode to the new page and then allocate it here. Otherwise your registrations will not work correctly.', 'event_espresso').'</p>'; |
|
85 | + $content .= '<p>'.__('This section also provides a status of the page to show you at a glance if something is not right.', 'event_espresso').'</p>'; |
|
86 | 86 | return $content; |
87 | 87 | } |
88 | 88 | |
89 | 89 | protected function _reg_page_id_stop() { |
90 | - return '<p>' . __('This page processes the registrations and is required, even if it is not visible in your menus. ', 'event_espresso') . '</p>'; |
|
90 | + return '<p>'.__('This page processes the registrations and is required, even if it is not visible in your menus. ', 'event_espresso').'</p>'; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | protected function _txn_page_id_stop() { |
94 | - return '<p>' . __('This page processes payments. It should not be visible on your menus, and the page should not contain anything other than the shortcode.', 'event_espresso') . '</p>'; |
|
94 | + return '<p>'.__('This page processes payments. It should not be visible on your menus, and the page should not contain anything other than the shortcode.', 'event_espresso').'</p>'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | protected function _thank_you_page_id_stop() { |
98 | - return '<p>' . __('This page is displayed after a successful transaction. Feel free to add extra content to this page to personalise it!', 'event_espresso') . '</p>'; |
|
98 | + return '<p>'.__('This page is displayed after a successful transaction. Feel free to add extra content to this page to personalise it!', 'event_espresso').'</p>'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | protected function _cancel_page_id_stop() { |
102 | - return '<p>' . __('This page is displayed after an unsuccessful transaction. Feel free to add extra content to this page to personalise it!', 'event_espresso') . '</p>'; |
|
102 | + return '<p>'.__('This page is displayed after an unsuccessful transaction. Feel free to add extra content to this page to personalise it!', 'event_espresso').'</p>'; |
|
103 | 103 | } |
104 | 104 | } |
105 | 105 | \ No newline at end of file |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |