@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | return; |
20 | 20 | } |
21 | 21 | // load debugging tools |
22 | - if (WP_DEBUG === true && is_readable(EE_HELPERS . 'EEH_Debug_Tools.helper.php')) { |
|
23 | - require_once EE_HELPERS . 'EEH_Debug_Tools.helper.php'; |
|
22 | + if (WP_DEBUG === true && is_readable(EE_HELPERS.'EEH_Debug_Tools.helper.php')) { |
|
23 | + require_once EE_HELPERS.'EEH_Debug_Tools.helper.php'; |
|
24 | 24 | EEH_Debug_Tools::instance(); |
25 | 25 | } |
26 | 26 | // load error handling |
27 | - if (is_readable(EE_CORE . 'EE_Error.core.php')) { |
|
28 | - require_once EE_CORE . 'EE_Error.core.php'; |
|
27 | + if (is_readable(EE_CORE.'EE_Error.core.php')) { |
|
28 | + require_once EE_CORE.'EE_Error.core.php'; |
|
29 | 29 | // if you're a dev and want to receive all errors via email |
30 | 30 | // add this to your wp-config.php: define( 'EE_ERROR_EMAILS', TRUE ); |
31 | 31 | if ( |
@@ -84,52 +84,52 @@ discard block |
||
84 | 84 | */ |
85 | 85 | function bootstrap_espresso() |
86 | 86 | { |
87 | - require_once __DIR__ . '/espresso_definitions.php'; |
|
87 | + require_once __DIR__.'/espresso_definitions.php'; |
|
88 | 88 | try { |
89 | 89 | espresso_load_error_handling(); |
90 | 90 | // include WordPress shims for functions introduced in later versions of WordPress |
91 | 91 | espresso_load_required( |
92 | 92 | '', |
93 | - EE_CORE . 'wordpress-shims.php' |
|
93 | + EE_CORE.'wordpress-shims.php' |
|
94 | 94 | ); |
95 | 95 | espresso_load_required( |
96 | 96 | '', |
97 | - EE_CORE . 'third-party-compatibility.php' |
|
97 | + EE_CORE.'third-party-compatibility.php' |
|
98 | 98 | ); |
99 | 99 | espresso_load_required( |
100 | 100 | 'EEH_Base', |
101 | - EE_CORE . 'helpers/EEH_Base.helper.php' |
|
101 | + EE_CORE.'helpers/EEH_Base.helper.php' |
|
102 | 102 | ); |
103 | 103 | espresso_load_required( |
104 | 104 | 'EEH_File', |
105 | - EE_CORE . 'interfaces/EEHI_File.interface.php' |
|
105 | + EE_CORE.'interfaces/EEHI_File.interface.php' |
|
106 | 106 | ); |
107 | 107 | espresso_load_required( |
108 | 108 | 'EEH_File', |
109 | - EE_CORE . 'helpers/EEH_File.helper.php' |
|
109 | + EE_CORE.'helpers/EEH_File.helper.php' |
|
110 | 110 | ); |
111 | 111 | espresso_load_required( |
112 | 112 | 'EEH_Array', |
113 | - EE_CORE . 'helpers/EEH_Array.helper.php' |
|
113 | + EE_CORE.'helpers/EEH_Array.helper.php' |
|
114 | 114 | ); |
115 | 115 | espresso_load_required( |
116 | 116 | 'EE_Base', |
117 | - EE_CORE . 'EE_Base.core.php' |
|
117 | + EE_CORE.'EE_Base.core.php' |
|
118 | 118 | ); |
119 | 119 | // instantiate and configure PSR4 autoloader |
120 | 120 | espresso_load_required( |
121 | 121 | 'Psr4Autoloader', |
122 | - EE_CORE . 'Psr4Autoloader.php' |
|
122 | + EE_CORE.'Psr4Autoloader.php' |
|
123 | 123 | ); |
124 | 124 | espresso_load_required( |
125 | 125 | 'EE_Psr4AutoloaderInit', |
126 | - EE_CORE . 'EE_Psr4AutoloaderInit.core.php' |
|
126 | + EE_CORE.'EE_Psr4AutoloaderInit.core.php' |
|
127 | 127 | ); |
128 | 128 | $AutoloaderInit = new EE_Psr4AutoloaderInit(); |
129 | 129 | $AutoloaderInit->initializeAutoloader(); |
130 | 130 | new EventEspresso\core\services\bootstrap\BootstrapCore(); |
131 | 131 | } catch (Exception $e) { |
132 | - require_once EE_CORE . 'exceptions/ExceptionStackTraceDisplay.php'; |
|
132 | + require_once EE_CORE.'exceptions/ExceptionStackTraceDisplay.php'; |
|
133 | 133 | new EventEspresso\core\exceptions\ExceptionStackTraceDisplay($e); |
134 | 134 | } |
135 | 135 | } |
@@ -14,33 +14,33 @@ discard block |
||
14 | 14 | */ |
15 | 15 | function espresso_load_error_handling() |
16 | 16 | { |
17 | - static $error_handling_loaded = false; |
|
18 | - if ($error_handling_loaded) { |
|
19 | - return; |
|
20 | - } |
|
21 | - // load debugging tools |
|
22 | - if (WP_DEBUG === true && is_readable(EE_HELPERS . 'EEH_Debug_Tools.helper.php')) { |
|
23 | - require_once EE_HELPERS . 'EEH_Debug_Tools.helper.php'; |
|
24 | - EEH_Debug_Tools::instance(); |
|
25 | - } |
|
26 | - // load error handling |
|
27 | - if (is_readable(EE_CORE . 'EE_Error.core.php')) { |
|
28 | - require_once EE_CORE . 'EE_Error.core.php'; |
|
29 | - // if you're a dev and want to receive all errors via email |
|
30 | - // add this to your wp-config.php: define( 'EE_ERROR_EMAILS', TRUE ); |
|
31 | - if ( |
|
32 | - defined('WP_DEBUG') |
|
33 | - && WP_DEBUG === true |
|
34 | - && defined('EE_ERROR_EMAILS') |
|
35 | - && EE_ERROR_EMAILS === true |
|
36 | - ) { |
|
37 | - set_error_handler(['EE_Error', 'error_handler']); |
|
38 | - register_shutdown_function(['EE_Error', 'fatal_error_handler']); |
|
39 | - } |
|
40 | - } else { |
|
41 | - wp_die(esc_html__('The EE_Error core class could not be loaded.', 'event_espresso')); |
|
42 | - } |
|
43 | - $error_handling_loaded = true; |
|
17 | + static $error_handling_loaded = false; |
|
18 | + if ($error_handling_loaded) { |
|
19 | + return; |
|
20 | + } |
|
21 | + // load debugging tools |
|
22 | + if (WP_DEBUG === true && is_readable(EE_HELPERS . 'EEH_Debug_Tools.helper.php')) { |
|
23 | + require_once EE_HELPERS . 'EEH_Debug_Tools.helper.php'; |
|
24 | + EEH_Debug_Tools::instance(); |
|
25 | + } |
|
26 | + // load error handling |
|
27 | + if (is_readable(EE_CORE . 'EE_Error.core.php')) { |
|
28 | + require_once EE_CORE . 'EE_Error.core.php'; |
|
29 | + // if you're a dev and want to receive all errors via email |
|
30 | + // add this to your wp-config.php: define( 'EE_ERROR_EMAILS', TRUE ); |
|
31 | + if ( |
|
32 | + defined('WP_DEBUG') |
|
33 | + && WP_DEBUG === true |
|
34 | + && defined('EE_ERROR_EMAILS') |
|
35 | + && EE_ERROR_EMAILS === true |
|
36 | + ) { |
|
37 | + set_error_handler(['EE_Error', 'error_handler']); |
|
38 | + register_shutdown_function(['EE_Error', 'fatal_error_handler']); |
|
39 | + } |
|
40 | + } else { |
|
41 | + wp_die(esc_html__('The EE_Error core class could not be loaded.', 'event_espresso')); |
|
42 | + } |
|
43 | + $error_handling_loaded = true; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
@@ -54,21 +54,21 @@ discard block |
||
54 | 54 | */ |
55 | 55 | function espresso_load_required(string $classname, string $full_path_to_file) |
56 | 56 | { |
57 | - if (is_readable($full_path_to_file)) { |
|
58 | - require_once $full_path_to_file; |
|
59 | - } else { |
|
60 | - throw new EE_Error( |
|
61 | - sprintf( |
|
62 | - esc_html__( |
|
63 | - 'The %1$s class file could not be located or is not readable due to file permissions. %3$s supplied path: %2$s', |
|
64 | - 'event_espresso' |
|
65 | - ), |
|
66 | - $classname, |
|
67 | - $full_path_to_file, |
|
68 | - '<br>' |
|
69 | - ) |
|
70 | - ); |
|
71 | - } |
|
57 | + if (is_readable($full_path_to_file)) { |
|
58 | + require_once $full_path_to_file; |
|
59 | + } else { |
|
60 | + throw new EE_Error( |
|
61 | + sprintf( |
|
62 | + esc_html__( |
|
63 | + 'The %1$s class file could not be located or is not readable due to file permissions. %3$s supplied path: %2$s', |
|
64 | + 'event_espresso' |
|
65 | + ), |
|
66 | + $classname, |
|
67 | + $full_path_to_file, |
|
68 | + '<br>' |
|
69 | + ) |
|
70 | + ); |
|
71 | + } |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
@@ -86,52 +86,52 @@ discard block |
||
86 | 86 | */ |
87 | 87 | function bootstrap_espresso() |
88 | 88 | { |
89 | - require_once __DIR__ . '/espresso_definitions.php'; |
|
90 | - try { |
|
91 | - espresso_load_error_handling(); |
|
92 | - // include WordPress shims for functions introduced in later versions of WordPress |
|
93 | - espresso_load_required( |
|
94 | - '', |
|
95 | - EE_CORE . 'wordpress-shims.php' |
|
96 | - ); |
|
97 | - espresso_load_required( |
|
98 | - '', |
|
99 | - EE_CORE . 'third-party-compatibility.php' |
|
100 | - ); |
|
101 | - espresso_load_required( |
|
102 | - 'EEH_Base', |
|
103 | - EE_CORE . 'helpers/EEH_Base.helper.php' |
|
104 | - ); |
|
105 | - espresso_load_required( |
|
106 | - 'EEH_File', |
|
107 | - EE_CORE . 'interfaces/EEHI_File.interface.php' |
|
108 | - ); |
|
109 | - espresso_load_required( |
|
110 | - 'EEH_File', |
|
111 | - EE_CORE . 'helpers/EEH_File.helper.php' |
|
112 | - ); |
|
113 | - espresso_load_required( |
|
114 | - 'EEH_Array', |
|
115 | - EE_CORE . 'helpers/EEH_Array.helper.php' |
|
116 | - ); |
|
117 | - espresso_load_required( |
|
118 | - 'EE_Base', |
|
119 | - EE_CORE . 'EE_Base.core.php' |
|
120 | - ); |
|
121 | - // instantiate and configure PSR4 autoloader |
|
122 | - espresso_load_required( |
|
123 | - 'Psr4Autoloader', |
|
124 | - EE_CORE . 'Psr4Autoloader.php' |
|
125 | - ); |
|
126 | - espresso_load_required( |
|
127 | - 'EE_Psr4AutoloaderInit', |
|
128 | - EE_CORE . 'EE_Psr4AutoloaderInit.core.php' |
|
129 | - ); |
|
130 | - $AutoloaderInit = new EE_Psr4AutoloaderInit(); |
|
131 | - $AutoloaderInit->initializeAutoloader(); |
|
132 | - new EventEspresso\core\services\bootstrap\BootstrapCore(); |
|
133 | - } catch (Exception $e) { |
|
134 | - require_once EE_CORE . 'exceptions/ExceptionStackTraceDisplay.php'; |
|
135 | - new EventEspresso\core\exceptions\ExceptionStackTraceDisplay($e); |
|
136 | - } |
|
89 | + require_once __DIR__ . '/espresso_definitions.php'; |
|
90 | + try { |
|
91 | + espresso_load_error_handling(); |
|
92 | + // include WordPress shims for functions introduced in later versions of WordPress |
|
93 | + espresso_load_required( |
|
94 | + '', |
|
95 | + EE_CORE . 'wordpress-shims.php' |
|
96 | + ); |
|
97 | + espresso_load_required( |
|
98 | + '', |
|
99 | + EE_CORE . 'third-party-compatibility.php' |
|
100 | + ); |
|
101 | + espresso_load_required( |
|
102 | + 'EEH_Base', |
|
103 | + EE_CORE . 'helpers/EEH_Base.helper.php' |
|
104 | + ); |
|
105 | + espresso_load_required( |
|
106 | + 'EEH_File', |
|
107 | + EE_CORE . 'interfaces/EEHI_File.interface.php' |
|
108 | + ); |
|
109 | + espresso_load_required( |
|
110 | + 'EEH_File', |
|
111 | + EE_CORE . 'helpers/EEH_File.helper.php' |
|
112 | + ); |
|
113 | + espresso_load_required( |
|
114 | + 'EEH_Array', |
|
115 | + EE_CORE . 'helpers/EEH_Array.helper.php' |
|
116 | + ); |
|
117 | + espresso_load_required( |
|
118 | + 'EE_Base', |
|
119 | + EE_CORE . 'EE_Base.core.php' |
|
120 | + ); |
|
121 | + // instantiate and configure PSR4 autoloader |
|
122 | + espresso_load_required( |
|
123 | + 'Psr4Autoloader', |
|
124 | + EE_CORE . 'Psr4Autoloader.php' |
|
125 | + ); |
|
126 | + espresso_load_required( |
|
127 | + 'EE_Psr4AutoloaderInit', |
|
128 | + EE_CORE . 'EE_Psr4AutoloaderInit.core.php' |
|
129 | + ); |
|
130 | + $AutoloaderInit = new EE_Psr4AutoloaderInit(); |
|
131 | + $AutoloaderInit->initializeAutoloader(); |
|
132 | + new EventEspresso\core\services\bootstrap\BootstrapCore(); |
|
133 | + } catch (Exception $e) { |
|
134 | + require_once EE_CORE . 'exceptions/ExceptionStackTraceDisplay.php'; |
|
135 | + new EventEspresso\core\exceptions\ExceptionStackTraceDisplay($e); |
|
136 | + } |
|
137 | 137 | } |
@@ -11,23 +11,23 @@ |
||
11 | 11 | */ |
12 | 12 | class PaymentsInfoCSV |
13 | 13 | { |
14 | - /** |
|
15 | - * Extracts payment information using the payment records |
|
16 | - * |
|
17 | - * @param array $payments_info |
|
18 | - * @return array |
|
19 | - */ |
|
20 | - public static function extractPaymentInfo(array $payments_info): array |
|
21 | - { |
|
22 | - $payment_methods = []; |
|
23 | - $gateway_txn_ids_etc = []; |
|
24 | - $payment_times = []; |
|
25 | - foreach ($payments_info as $payment_method_and_gateway_txn_id) { |
|
26 | - $payment_methods[] = $payment_method_and_gateway_txn_id['name'] |
|
27 | - ?? esc_html__('Unknown', 'event_espresso'); |
|
28 | - $gateway_txn_ids_etc[] = $payment_method_and_gateway_txn_id['gateway_txn_id'] ?? ''; |
|
29 | - $payment_times[] = $payment_method_and_gateway_txn_id['payment_time'] ?? ''; |
|
30 | - } |
|
31 | - return [$payment_methods, $gateway_txn_ids_etc, $payment_times]; |
|
32 | - } |
|
14 | + /** |
|
15 | + * Extracts payment information using the payment records |
|
16 | + * |
|
17 | + * @param array $payments_info |
|
18 | + * @return array |
|
19 | + */ |
|
20 | + public static function extractPaymentInfo(array $payments_info): array |
|
21 | + { |
|
22 | + $payment_methods = []; |
|
23 | + $gateway_txn_ids_etc = []; |
|
24 | + $payment_times = []; |
|
25 | + foreach ($payments_info as $payment_method_and_gateway_txn_id) { |
|
26 | + $payment_methods[] = $payment_method_and_gateway_txn_id['name'] |
|
27 | + ?? esc_html__('Unknown', 'event_espresso'); |
|
28 | + $gateway_txn_ids_etc[] = $payment_method_and_gateway_txn_id['gateway_txn_id'] ?? ''; |
|
29 | + $payment_times[] = $payment_method_and_gateway_txn_id['payment_time'] ?? ''; |
|
30 | + } |
|
31 | + return [$payment_methods, $gateway_txn_ids_etc, $payment_times]; |
|
32 | + } |
|
33 | 33 | } |
@@ -17,67 +17,67 @@ |
||
17 | 17 | */ |
18 | 18 | class RegistrationCSV |
19 | 19 | { |
20 | - /** |
|
21 | - * Adds registration columns to the CSV row |
|
22 | - * |
|
23 | - * @param array $fields |
|
24 | - * @param array $reg_row |
|
25 | - * @param array $data |
|
26 | - * @return array |
|
27 | - * @throws EE_Error |
|
28 | - * @throws ReflectionException |
|
29 | - */ |
|
30 | - public static function addRegistrationColumns(array $fields, array $reg_row, array $data): array |
|
31 | - { |
|
32 | - $reg_model = EEM_Registration::instance(); |
|
33 | - foreach ($fields as $field_name) { |
|
34 | - $field = $reg_model->field_settings_for($field_name); |
|
35 | - switch ($field_name) { |
|
36 | - case 'REG_final_price': |
|
37 | - $value = EEH_Export::prepare_value_from_db_for_display( |
|
38 | - $reg_model, |
|
39 | - $field_name, |
|
40 | - $reg_row['Registration.REG_final_price'], |
|
41 | - 'localized_float' |
|
42 | - ); |
|
43 | - break; |
|
44 | - case 'REG_count': |
|
45 | - $value = sprintf( |
|
46 | - /* translators: 1: number of registration in group (REG_count), 2: registration group size (REG_group_size) */ |
|
47 | - esc_html__('%1$s of %2$s', 'event_espresso'), |
|
48 | - EEH_Export::prepare_value_from_db_for_display( |
|
49 | - $reg_model, |
|
50 | - 'REG_count', |
|
51 | - $reg_row['Registration.REG_count'] |
|
52 | - ), |
|
53 | - EEH_Export::prepare_value_from_db_for_display( |
|
54 | - $reg_model, |
|
55 | - 'REG_group_size', |
|
56 | - $reg_row['Registration.REG_group_size'] |
|
57 | - ) |
|
58 | - ); |
|
59 | - break; |
|
60 | - case 'REG_date': |
|
61 | - $value = EEH_Export::prepare_value_from_db_for_display( |
|
62 | - $reg_model, |
|
63 | - $field_name, |
|
64 | - $reg_row['Registration.REG_date'], |
|
65 | - 'no_html' |
|
66 | - ); |
|
67 | - break; |
|
68 | - default: |
|
69 | - $value = EEH_Export::prepare_value_from_db_for_display( |
|
70 | - $reg_model, |
|
71 | - $field_name, |
|
72 | - $reg_row[ $field->get_qualified_column() ] |
|
73 | - ); |
|
74 | - } |
|
75 | - $data[ EEH_Export::get_column_name_for_field($field) ] = $value; |
|
76 | - if ($field_name == 'REG_final_price') { |
|
77 | - // add a column named Currency after the final price |
|
78 | - $data[ esc_html__("Currency", "event_espresso") ] = EE_Config::instance()->currency->code; |
|
79 | - } |
|
80 | - } |
|
81 | - return $data; |
|
82 | - } |
|
20 | + /** |
|
21 | + * Adds registration columns to the CSV row |
|
22 | + * |
|
23 | + * @param array $fields |
|
24 | + * @param array $reg_row |
|
25 | + * @param array $data |
|
26 | + * @return array |
|
27 | + * @throws EE_Error |
|
28 | + * @throws ReflectionException |
|
29 | + */ |
|
30 | + public static function addRegistrationColumns(array $fields, array $reg_row, array $data): array |
|
31 | + { |
|
32 | + $reg_model = EEM_Registration::instance(); |
|
33 | + foreach ($fields as $field_name) { |
|
34 | + $field = $reg_model->field_settings_for($field_name); |
|
35 | + switch ($field_name) { |
|
36 | + case 'REG_final_price': |
|
37 | + $value = EEH_Export::prepare_value_from_db_for_display( |
|
38 | + $reg_model, |
|
39 | + $field_name, |
|
40 | + $reg_row['Registration.REG_final_price'], |
|
41 | + 'localized_float' |
|
42 | + ); |
|
43 | + break; |
|
44 | + case 'REG_count': |
|
45 | + $value = sprintf( |
|
46 | + /* translators: 1: number of registration in group (REG_count), 2: registration group size (REG_group_size) */ |
|
47 | + esc_html__('%1$s of %2$s', 'event_espresso'), |
|
48 | + EEH_Export::prepare_value_from_db_for_display( |
|
49 | + $reg_model, |
|
50 | + 'REG_count', |
|
51 | + $reg_row['Registration.REG_count'] |
|
52 | + ), |
|
53 | + EEH_Export::prepare_value_from_db_for_display( |
|
54 | + $reg_model, |
|
55 | + 'REG_group_size', |
|
56 | + $reg_row['Registration.REG_group_size'] |
|
57 | + ) |
|
58 | + ); |
|
59 | + break; |
|
60 | + case 'REG_date': |
|
61 | + $value = EEH_Export::prepare_value_from_db_for_display( |
|
62 | + $reg_model, |
|
63 | + $field_name, |
|
64 | + $reg_row['Registration.REG_date'], |
|
65 | + 'no_html' |
|
66 | + ); |
|
67 | + break; |
|
68 | + default: |
|
69 | + $value = EEH_Export::prepare_value_from_db_for_display( |
|
70 | + $reg_model, |
|
71 | + $field_name, |
|
72 | + $reg_row[ $field->get_qualified_column() ] |
|
73 | + ); |
|
74 | + } |
|
75 | + $data[ EEH_Export::get_column_name_for_field($field) ] = $value; |
|
76 | + if ($field_name == 'REG_final_price') { |
|
77 | + // add a column named Currency after the final price |
|
78 | + $data[ esc_html__("Currency", "event_espresso") ] = EE_Config::instance()->currency->code; |
|
79 | + } |
|
80 | + } |
|
81 | + return $data; |
|
82 | + } |
|
83 | 83 | } |
@@ -69,13 +69,13 @@ |
||
69 | 69 | $value = EEH_Export::prepare_value_from_db_for_display( |
70 | 70 | $reg_model, |
71 | 71 | $field_name, |
72 | - $reg_row[ $field->get_qualified_column() ] |
|
72 | + $reg_row[$field->get_qualified_column()] |
|
73 | 73 | ); |
74 | 74 | } |
75 | - $data[ EEH_Export::get_column_name_for_field($field) ] = $value; |
|
75 | + $data[EEH_Export::get_column_name_for_field($field)] = $value; |
|
76 | 76 | if ($field_name == 'REG_final_price') { |
77 | 77 | // add a column named Currency after the final price |
78 | - $data[ esc_html__("Currency", "event_espresso") ] = EE_Config::instance()->currency->code; |
|
78 | + $data[esc_html__("Currency", "event_espresso")] = EE_Config::instance()->currency->code; |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | return $data; |
@@ -18,53 +18,53 @@ |
||
18 | 18 | */ |
19 | 19 | class AttendeeCSV |
20 | 20 | { |
21 | - /** |
|
22 | - * Adds attendee columns to the CSV row |
|
23 | - * |
|
24 | - * @param array $fields |
|
25 | - * @param array $reg_row |
|
26 | - * @param array $data |
|
27 | - * @return array |
|
28 | - * @throws EE_Error |
|
29 | - * @throws ReflectionException |
|
30 | - */ |
|
31 | - public static function addAttendeeColumns(array $fields, array $reg_row, array $data): array |
|
32 | - { |
|
33 | - $att_model = EEM_Attendee::instance(); |
|
34 | - $state_model = EEM_State::instance(); |
|
35 | - $country_model = EEM_Country::instance(); |
|
36 | - foreach ($fields as $field_name) { |
|
37 | - $field_obj = $att_model->field_settings_for($field_name); |
|
38 | - if ($reg_row['Attendee_CPT.ID']) { |
|
39 | - switch ($field_name) { |
|
40 | - case 'STA_ID': |
|
41 | - $value = $state_model->get_var( |
|
42 | - [ |
|
43 | - ['STA_ID' => $reg_row['Attendee_Meta.STA_ID']] |
|
44 | - ], |
|
45 | - 'STA_name' |
|
46 | - ); |
|
47 | - break; |
|
48 | - case 'CNT_ISO': |
|
49 | - $value = $country_model->get_var( |
|
50 | - [ |
|
51 | - ['CNT_ISO' => $reg_row['Attendee_Meta.CNT_ISO']] |
|
52 | - ], |
|
53 | - 'CNT_name' |
|
54 | - ); |
|
55 | - break; |
|
56 | - default: |
|
57 | - $value = EEH_Export::prepare_value_from_db_for_display( |
|
58 | - $att_model, |
|
59 | - $field_name, |
|
60 | - $reg_row[ $field_obj->get_qualified_column() ] |
|
61 | - ); |
|
62 | - } |
|
63 | - } else { |
|
64 | - $value = ''; |
|
65 | - } |
|
66 | - $data[ EEH_Export::get_column_name_for_field($field_obj) ] = $value; |
|
67 | - } |
|
68 | - return $data; |
|
69 | - } |
|
21 | + /** |
|
22 | + * Adds attendee columns to the CSV row |
|
23 | + * |
|
24 | + * @param array $fields |
|
25 | + * @param array $reg_row |
|
26 | + * @param array $data |
|
27 | + * @return array |
|
28 | + * @throws EE_Error |
|
29 | + * @throws ReflectionException |
|
30 | + */ |
|
31 | + public static function addAttendeeColumns(array $fields, array $reg_row, array $data): array |
|
32 | + { |
|
33 | + $att_model = EEM_Attendee::instance(); |
|
34 | + $state_model = EEM_State::instance(); |
|
35 | + $country_model = EEM_Country::instance(); |
|
36 | + foreach ($fields as $field_name) { |
|
37 | + $field_obj = $att_model->field_settings_for($field_name); |
|
38 | + if ($reg_row['Attendee_CPT.ID']) { |
|
39 | + switch ($field_name) { |
|
40 | + case 'STA_ID': |
|
41 | + $value = $state_model->get_var( |
|
42 | + [ |
|
43 | + ['STA_ID' => $reg_row['Attendee_Meta.STA_ID']] |
|
44 | + ], |
|
45 | + 'STA_name' |
|
46 | + ); |
|
47 | + break; |
|
48 | + case 'CNT_ISO': |
|
49 | + $value = $country_model->get_var( |
|
50 | + [ |
|
51 | + ['CNT_ISO' => $reg_row['Attendee_Meta.CNT_ISO']] |
|
52 | + ], |
|
53 | + 'CNT_name' |
|
54 | + ); |
|
55 | + break; |
|
56 | + default: |
|
57 | + $value = EEH_Export::prepare_value_from_db_for_display( |
|
58 | + $att_model, |
|
59 | + $field_name, |
|
60 | + $reg_row[ $field_obj->get_qualified_column() ] |
|
61 | + ); |
|
62 | + } |
|
63 | + } else { |
|
64 | + $value = ''; |
|
65 | + } |
|
66 | + $data[ EEH_Export::get_column_name_for_field($field_obj) ] = $value; |
|
67 | + } |
|
68 | + return $data; |
|
69 | + } |
|
70 | 70 | } |
@@ -57,13 +57,13 @@ |
||
57 | 57 | $value = EEH_Export::prepare_value_from_db_for_display( |
58 | 58 | $att_model, |
59 | 59 | $field_name, |
60 | - $reg_row[ $field_obj->get_qualified_column() ] |
|
60 | + $reg_row[$field_obj->get_qualified_column()] |
|
61 | 61 | ); |
62 | 62 | } |
63 | 63 | } else { |
64 | 64 | $value = ''; |
65 | 65 | } |
66 | - $data[ EEH_Export::get_column_name_for_field($field_obj) ] = $value; |
|
66 | + $data[EEH_Export::get_column_name_for_field($field_obj)] = $value; |
|
67 | 67 | } |
68 | 68 | return $data; |
69 | 69 | } |
@@ -11,60 +11,60 @@ |
||
11 | 11 | */ |
12 | 12 | class ServerSanitizer |
13 | 13 | { |
14 | - /** |
|
15 | - * @param string $key |
|
16 | - * @param string $value |
|
17 | - * @return mixed|string |
|
18 | - */ |
|
19 | - public function clean($key, $value) |
|
20 | - { |
|
21 | - switch ($key) { |
|
22 | - case 'AUTH_TYPE': |
|
23 | - $valid_types = [ |
|
24 | - 'Basic', |
|
25 | - 'Bearer', |
|
26 | - 'Digest', |
|
27 | - 'HOBA', |
|
28 | - 'Mutual', |
|
29 | - 'Negotiate', |
|
30 | - 'OAuth', |
|
31 | - 'SCRAM-SHA-1', |
|
32 | - 'SCRAM-SHA-256', |
|
33 | - 'vapid', |
|
34 | - ]; |
|
35 | - return in_array($value, $valid_types, true) ? $value : 'Basic'; |
|
36 | - case 'argc': |
|
37 | - case 'HTTP_DNT': |
|
38 | - case 'HTTP_UPGRADE_INSECURE_REQUESTS': |
|
39 | - case 'SERVER_PORT': |
|
40 | - case 'REMOTE_PORT': |
|
41 | - case 'REQUEST_TIME': |
|
42 | - return (int) filter_var($value, FILTER_SANITIZE_NUMBER_INT); |
|
43 | - case 'REQUEST_TIME_FLOAT': |
|
44 | - return (float) filter_var($value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
45 | - case 'REQUEST_METHOD': |
|
46 | - $valid_types = [ |
|
47 | - 'CONNECT', |
|
48 | - 'DELETE', |
|
49 | - 'GET', |
|
50 | - 'HEAD', |
|
51 | - 'OPTIONS', |
|
52 | - 'PATCH', |
|
53 | - 'POST', |
|
54 | - 'PUT', |
|
55 | - 'TRACE', |
|
56 | - ]; |
|
57 | - return in_array($value, $valid_types, true) ? $value : 'GET'; |
|
58 | - case 'HTTP_HOST': |
|
59 | - case 'QUERY_STRING': |
|
60 | - case 'REQUEST_URI': |
|
61 | - case 'SCRIPT_NAME': |
|
62 | - case 'SERVER_NAME': |
|
63 | - return filter_var($value, FILTER_SANITIZE_URL); |
|
64 | - case 'SERVER_ADMIN': |
|
65 | - return filter_var($value, FILTER_SANITIZE_EMAIL); |
|
66 | - default: |
|
67 | - return filter_var($value, FILTER_UNSAFE_RAW); |
|
68 | - } |
|
69 | - } |
|
14 | + /** |
|
15 | + * @param string $key |
|
16 | + * @param string $value |
|
17 | + * @return mixed|string |
|
18 | + */ |
|
19 | + public function clean($key, $value) |
|
20 | + { |
|
21 | + switch ($key) { |
|
22 | + case 'AUTH_TYPE': |
|
23 | + $valid_types = [ |
|
24 | + 'Basic', |
|
25 | + 'Bearer', |
|
26 | + 'Digest', |
|
27 | + 'HOBA', |
|
28 | + 'Mutual', |
|
29 | + 'Negotiate', |
|
30 | + 'OAuth', |
|
31 | + 'SCRAM-SHA-1', |
|
32 | + 'SCRAM-SHA-256', |
|
33 | + 'vapid', |
|
34 | + ]; |
|
35 | + return in_array($value, $valid_types, true) ? $value : 'Basic'; |
|
36 | + case 'argc': |
|
37 | + case 'HTTP_DNT': |
|
38 | + case 'HTTP_UPGRADE_INSECURE_REQUESTS': |
|
39 | + case 'SERVER_PORT': |
|
40 | + case 'REMOTE_PORT': |
|
41 | + case 'REQUEST_TIME': |
|
42 | + return (int) filter_var($value, FILTER_SANITIZE_NUMBER_INT); |
|
43 | + case 'REQUEST_TIME_FLOAT': |
|
44 | + return (float) filter_var($value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
45 | + case 'REQUEST_METHOD': |
|
46 | + $valid_types = [ |
|
47 | + 'CONNECT', |
|
48 | + 'DELETE', |
|
49 | + 'GET', |
|
50 | + 'HEAD', |
|
51 | + 'OPTIONS', |
|
52 | + 'PATCH', |
|
53 | + 'POST', |
|
54 | + 'PUT', |
|
55 | + 'TRACE', |
|
56 | + ]; |
|
57 | + return in_array($value, $valid_types, true) ? $value : 'GET'; |
|
58 | + case 'HTTP_HOST': |
|
59 | + case 'QUERY_STRING': |
|
60 | + case 'REQUEST_URI': |
|
61 | + case 'SCRIPT_NAME': |
|
62 | + case 'SERVER_NAME': |
|
63 | + return filter_var($value, FILTER_SANITIZE_URL); |
|
64 | + case 'SERVER_ADMIN': |
|
65 | + return filter_var($value, FILTER_SANITIZE_EMAIL); |
|
66 | + default: |
|
67 | + return filter_var($value, FILTER_UNSAFE_RAW); |
|
68 | + } |
|
69 | + } |
|
70 | 70 | } |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | </h2> |
18 | 18 | <p class="ee-attention"> |
19 | 19 | <?php printf( |
20 | - esc_html__( |
|
21 | - 'The following shortcodes and page settings are required for Event Espresso to function properly. These shortcodes should not be replaced with any other shortcodes. Please view %sthis page%s for a list of optional shortcodes you can use on other pages.', |
|
22 | - 'event_espresso' |
|
23 | - ), |
|
24 | - '<a href="admin.php?page=espresso_support">', |
|
25 | - '</a>' |
|
26 | - ); |
|
20 | + esc_html__( |
|
21 | + 'The following shortcodes and page settings are required for Event Espresso to function properly. These shortcodes should not be replaced with any other shortcodes. Please view %sthis page%s for a list of optional shortcodes you can use on other pages.', |
|
22 | + 'event_espresso' |
|
23 | + ), |
|
24 | + '<a href="admin.php?page=espresso_support">', |
|
25 | + '</a>' |
|
26 | + ); |
|
27 | 27 | ?> |
28 | 28 | </p> |
29 | 29 | |
@@ -54,19 +54,19 @@ discard block |
||
54 | 54 | </select> |
55 | 55 | <div class="ee-page-status__wrapper"> |
56 | 56 | <?php echo General_Settings_Admin_Page::page_and_shortcode_status( |
57 | - $reg_page_obj, |
|
58 | - '[ESPRESSO_CHECKOUT]' |
|
59 | - ); // already escaped ?> |
|
57 | + $reg_page_obj, |
|
58 | + '[ESPRESSO_CHECKOUT]' |
|
59 | + ); // already escaped ?> |
|
60 | 60 | </div> |
61 | 61 | <br /> |
62 | 62 | <p class="description"> |
63 | 63 | <?php printf( |
64 | - esc_html__( |
|
65 | - 'This page can be hidden from navigation if desired, but should always contain the %s shortcode.', |
|
66 | - 'event_espresso' |
|
67 | - ), |
|
68 | - '<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_CHECKOUT]</span>' |
|
69 | - ); |
|
64 | + esc_html__( |
|
65 | + 'This page can be hidden from navigation if desired, but should always contain the %s shortcode.', |
|
66 | + 'event_espresso' |
|
67 | + ), |
|
68 | + '<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_CHECKOUT]</span>' |
|
69 | + ); |
|
70 | 70 | ?> |
71 | 71 | </p> |
72 | 72 | <br /><br /> |
@@ -101,19 +101,19 @@ discard block |
||
101 | 101 | </select> |
102 | 102 | <div class='ee-page-status__wrapper'> |
103 | 103 | <?php echo General_Settings_Admin_Page::page_and_shortcode_status( |
104 | - $txn_page_obj, |
|
105 | - '[ESPRESSO_TXN_PAGE]' |
|
106 | - ); // already escaped ?> |
|
104 | + $txn_page_obj, |
|
105 | + '[ESPRESSO_TXN_PAGE]' |
|
106 | + ); // already escaped ?> |
|
107 | 107 | </div> |
108 | 108 | <br /> |
109 | 109 | <p class="description"> |
110 | 110 | <?php printf( |
111 | - esc_html__( |
|
112 | - 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', |
|
113 | - 'event_espresso' |
|
114 | - ), |
|
115 | - '<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_TXN_PAGE]</span>' |
|
116 | - ); |
|
111 | + esc_html__( |
|
112 | + 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', |
|
113 | + 'event_espresso' |
|
114 | + ), |
|
115 | + '<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_TXN_PAGE]</span>' |
|
116 | + ); |
|
117 | 117 | ?> |
118 | 118 | </p> |
119 | 119 | <br /><br /> |
@@ -144,19 +144,19 @@ discard block |
||
144 | 144 | </select> |
145 | 145 | <div class='ee-page-status__wrapper'> |
146 | 146 | <?php echo General_Settings_Admin_Page::page_and_shortcode_status( |
147 | - $thank_you_page_obj, |
|
148 | - '[ESPRESSO_THANK_YOU]' |
|
149 | - ); // already escaped ?> |
|
147 | + $thank_you_page_obj, |
|
148 | + '[ESPRESSO_THANK_YOU]' |
|
149 | + ); // already escaped ?> |
|
150 | 150 | </div> |
151 | 151 | <br /> |
152 | 152 | <p class="description"> |
153 | 153 | <?php printf( |
154 | - esc_html__( |
|
155 | - 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', |
|
156 | - 'event_espresso' |
|
157 | - ), |
|
158 | - '<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_THANK_YOU]</span>' |
|
159 | - ); |
|
154 | + esc_html__( |
|
155 | + 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', |
|
156 | + 'event_espresso' |
|
157 | + ), |
|
158 | + '<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_THANK_YOU]</span>' |
|
159 | + ); |
|
160 | 160 | ?> |
161 | 161 | </p> |
162 | 162 | <br /><br /> |
@@ -187,19 +187,19 @@ discard block |
||
187 | 187 | </select> |
188 | 188 | <div class='ee-page-status__wrapper'> |
189 | 189 | <?php echo General_Settings_Admin_Page::page_and_shortcode_status( |
190 | - $cancel_page_obj, |
|
191 | - '[ESPRESSO_CANCELLED]' |
|
192 | - ); // already escaped ?> |
|
190 | + $cancel_page_obj, |
|
191 | + '[ESPRESSO_CANCELLED]' |
|
192 | + ); // already escaped ?> |
|
193 | 193 | </div> |
194 | 194 | <br /> |
195 | 195 | <p class="description"> |
196 | 196 | <?php printf( |
197 | - esc_html__( |
|
198 | - 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain a "cancelled transaction" message and the %s shortcode.', |
|
199 | - 'event_espresso' |
|
200 | - ), |
|
201 | - '<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_CANCELLED]</span>' |
|
202 | - ); |
|
197 | + esc_html__( |
|
198 | + 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain a "cancelled transaction" message and the %s shortcode.', |
|
199 | + 'event_espresso' |
|
200 | + ), |
|
201 | + '<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_CANCELLED]</span>' |
|
202 | + ); |
|
203 | 203 | ?> |
204 | 204 | </p> |
205 | 205 | <br /><br /> |
@@ -222,19 +222,19 @@ discard block |
||
222 | 222 | <td> |
223 | 223 | <p class="description"> |
224 | 224 | <?php esc_html_e( |
225 | - 'Events are custom post types and use WordPress\' normal archive pages for displaying events.', |
|
226 | - 'event_espresso' |
|
227 | - ) ?> |
|
225 | + 'Events are custom post types and use WordPress\' normal archive pages for displaying events.', |
|
226 | + 'event_espresso' |
|
227 | + ) ?> |
|
228 | 228 | </p> |
229 | 229 | <p class="description"> |
230 | 230 | <?php printf( |
231 | - esc_html__( |
|
232 | - 'If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', |
|
233 | - 'event_espresso' |
|
234 | - ), |
|
235 | - '<a href="admin.php?page=espresso_support">', |
|
236 | - '</a>' |
|
237 | - ); ?> |
|
231 | + esc_html__( |
|
232 | + 'If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', |
|
233 | + 'event_espresso' |
|
234 | + ), |
|
235 | + '<a href="admin.php?page=espresso_support">', |
|
236 | + '</a>' |
|
237 | + ); ?> |
|
238 | 238 | </p> |
239 | 239 | <br /><br /> |
240 | 240 | </td> |
@@ -256,19 +256,19 @@ discard block |
||
256 | 256 | <td> |
257 | 257 | <p class="description"> |
258 | 258 | <?php esc_html_e( |
259 | - 'Venues are custom post types and use WordPress\' normal archive pages for displaying events.', |
|
260 | - 'event_espresso' |
|
261 | - ) ?> |
|
259 | + 'Venues are custom post types and use WordPress\' normal archive pages for displaying events.', |
|
260 | + 'event_espresso' |
|
261 | + ) ?> |
|
262 | 262 | </p> |
263 | 263 | <p class="description"> |
264 | 264 | <?php printf( |
265 | - esc_html__( |
|
266 | - 'If you would still like your venues on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', |
|
267 | - 'event_espresso' |
|
268 | - ), |
|
269 | - '<a href="admin.php?page=espresso_support">', |
|
270 | - '</a>' |
|
271 | - ); ?> |
|
265 | + esc_html__( |
|
266 | + 'If you would still like your venues on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', |
|
267 | + 'event_espresso' |
|
268 | + ), |
|
269 | + '<a href="admin.php?page=espresso_support">', |
|
270 | + '</a>' |
|
271 | + ); ?> |
|
272 | 272 | </p> |
273 | 273 | </td> |
274 | 274 | </tr> |
@@ -2,75 +2,75 @@ discard block |
||
2 | 2 | <div class='padding'> |
3 | 3 | <div class="headline-feature"> |
4 | 4 | <h2 class="about-headline-callout"><?php |
5 | - esc_html_e('Welcome to Event Espresso 4!', 'event_espresso'); ?></h2> |
|
5 | + esc_html_e('Welcome to Event Espresso 4!', 'event_espresso'); ?></h2> |
|
6 | 6 | <p> |
7 | 7 | <?php |
8 | - printf( |
|
9 | - esc_html__( |
|
10 | - 'Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Caffeinated/Regular version of Event Espresso, but we also have a hosted version called %sEvent Smart%s for customers that want to cut back on their hosting and security expenses.', |
|
11 | - 'event_espresso' |
|
12 | - ), |
|
13 | - '<a href="https://eventsmart.com//?utm_source=ee4_decaf&utm_medium=link&utm_campaign=espresso_about_tab&utm_content=EE4+Caffeinated">', |
|
14 | - '</a>' |
|
15 | - ); ?> |
|
8 | + printf( |
|
9 | + esc_html__( |
|
10 | + 'Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Caffeinated/Regular version of Event Espresso, but we also have a hosted version called %sEvent Smart%s for customers that want to cut back on their hosting and security expenses.', |
|
11 | + 'event_espresso' |
|
12 | + ), |
|
13 | + '<a href="https://eventsmart.com//?utm_source=ee4_decaf&utm_medium=link&utm_campaign=espresso_about_tab&utm_content=EE4+Caffeinated">', |
|
14 | + '</a>' |
|
15 | + ); ?> |
|
16 | 16 | </p> |
17 | 17 | <h2> |
18 | 18 | <?php |
19 | - esc_html_e( |
|
20 | - 'Powering 40,000+ event websites; $100 million in ticket sales per year!', |
|
21 | - 'event_espresso' |
|
22 | - ); ?> |
|
19 | + esc_html_e( |
|
20 | + 'Powering 40,000+ event websites; $100 million in ticket sales per year!', |
|
21 | + 'event_espresso' |
|
22 | + ); ?> |
|
23 | 23 | </h2> |
24 | 24 | <p> |
25 | 25 | <?php |
26 | - printf( |
|
27 | - esc_html__( |
|
28 | - 'Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The lite version of the plugin provides everything that you need to manage your event using WordPress.', |
|
29 | - 'event_espresso' |
|
30 | - ), |
|
31 | - '<a href="https://eventespresso.com/?utm_source=wordpress_org&utm_medium=link&utm_campaign=espresso_about_tab&utm_content=EE4+Decaf" rel="nofollow">', |
|
32 | - '</a>' |
|
33 | - ); ?> |
|
26 | + printf( |
|
27 | + esc_html__( |
|
28 | + 'Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The lite version of the plugin provides everything that you need to manage your event using WordPress.', |
|
29 | + 'event_espresso' |
|
30 | + ), |
|
31 | + '<a href="https://eventespresso.com/?utm_source=wordpress_org&utm_medium=link&utm_campaign=espresso_about_tab&utm_content=EE4+Decaf" rel="nofollow">', |
|
32 | + '</a>' |
|
33 | + ); ?> |
|
34 | 34 | </p> |
35 | 35 | </div> |
36 | 36 | <div class="feature-section has-3-columns is-fullwidth three-col"> |
37 | 37 | <div class="column col"> |
38 | 38 | <img src="<?php |
39 | - echo EEH_Template::getScreenshotUrl('publish_meta_box'); ?>"> |
|
39 | + echo EEH_Template::getScreenshotUrl('publish_meta_box'); ?>"> |
|
40 | 40 | <h3><?php |
41 | - esc_html_e('Optimized aesthetic', 'event_espresso'); ?></h3> |
|
41 | + esc_html_e('Optimized aesthetic', 'event_espresso'); ?></h3> |
|
42 | 42 | <p> |
43 | 43 | <?php |
44 | - esc_html_e( |
|
45 | - 'The Event Espresso 4 dashboard has a fresh, uncluttered design that embraces clarity and simplicity.', |
|
46 | - 'event_espresso' |
|
47 | - ); ?> |
|
44 | + esc_html_e( |
|
45 | + 'The Event Espresso 4 dashboard has a fresh, uncluttered design that embraces clarity and simplicity.', |
|
46 | + 'event_espresso' |
|
47 | + ); ?> |
|
48 | 48 | </p> |
49 | 49 | </div> |
50 | 50 | <div class="column col"> |
51 | 51 | <img src="<?php |
52 | - echo EEH_Template::getScreenshotUrl('registrations-overview'); ?>"> |
|
52 | + echo EEH_Template::getScreenshotUrl('registrations-overview'); ?>"> |
|
53 | 53 | <h3><?php |
54 | - esc_html_e('Integrated management', 'event_espresso'); ?></h3> |
|
54 | + esc_html_e('Integrated management', 'event_espresso'); ?></h3> |
|
55 | 55 | <p> |
56 | 56 | <?php |
57 | - esc_html_e( |
|
58 | - 'We’ve made it easier to know who your customers are and how they’ve done business with you over time.', |
|
59 | - 'event_espresso' |
|
60 | - ); ?> |
|
57 | + esc_html_e( |
|
58 | + 'We’ve made it easier to know who your customers are and how they’ve done business with you over time.', |
|
59 | + 'event_espresso' |
|
60 | + ); ?> |
|
61 | 61 | </p> |
62 | 62 | </div> |
63 | 63 | <div class="column col last-feature"> |
64 | 64 | <img src="<?php |
65 | - echo EEH_Template::getScreenshotUrl('refined-bookkeeping'); ?>"> |
|
65 | + echo EEH_Template::getScreenshotUrl('refined-bookkeeping'); ?>"> |
|
66 | 66 | <h3><?php |
67 | - esc_html_e('Easy bookkeeping', 'event_espresso'); ?></h3> |
|
67 | + esc_html_e('Easy bookkeeping', 'event_espresso'); ?></h3> |
|
68 | 68 | <p> |
69 | 69 | <?php |
70 | - esc_html_e( |
|
71 | - 'Registrations, payment, and transactions have been substantially improved in Event Espresso 4.', |
|
72 | - 'event_espresso' |
|
73 | - ); ?> |
|
70 | + esc_html_e( |
|
71 | + 'Registrations, payment, and transactions have been substantially improved in Event Espresso 4.', |
|
72 | + 'event_espresso' |
|
73 | + ); ?> |
|
74 | 74 | </p> |
75 | 75 | </div> |
76 | 76 | </div> |
@@ -80,61 +80,61 @@ discard block |
||
80 | 80 | <div class="feature-section has-2-columns is-fullwidth two-col"> |
81 | 81 | <div class="column col"> |
82 | 82 | <h3><?php |
83 | - esc_html_e('Higher customer retention', 'event_espresso'); ?></h3> |
|
83 | + esc_html_e('Higher customer retention', 'event_espresso'); ?></h3> |
|
84 | 84 | <p> |
85 | 85 | <?php |
86 | - esc_html_e( |
|
87 | - 'The Event Espresso 4 registration process is faster than ever. With quick ticket selections, single page check-out, and customizable notifications! Registration that can scale to your business needs.', |
|
88 | - 'event_espresso' |
|
89 | - ); ?> |
|
86 | + esc_html_e( |
|
87 | + 'The Event Espresso 4 registration process is faster than ever. With quick ticket selections, single page check-out, and customizable notifications! Registration that can scale to your business needs.', |
|
88 | + 'event_espresso' |
|
89 | + ); ?> |
|
90 | 90 | </p> |
91 | 91 | <h4><?php |
92 | - esc_html_e('Ticket selection boxes on any post page or post', 'event_espresso'); ?></h4> |
|
92 | + esc_html_e('Ticket selection boxes on any post page or post', 'event_espresso'); ?></h4> |
|
93 | 93 | <p> |
94 | 94 | <?php |
95 | - esc_html_e( |
|
96 | - 'Customers can easily register for classes, events, or conferences, in just a few simple steps. No matter how you use it, Event Espresso 4 will adapt to a multitude of different ticketing and pricing scenarios.', |
|
97 | - 'event_espresso' |
|
98 | - ); ?> |
|
95 | + esc_html_e( |
|
96 | + 'Customers can easily register for classes, events, or conferences, in just a few simple steps. No matter how you use it, Event Espresso 4 will adapt to a multitude of different ticketing and pricing scenarios.', |
|
97 | + 'event_espresso' |
|
98 | + ); ?> |
|
99 | 99 | </p> |
100 | 100 | </div> |
101 | 101 | <div class="column col last-feature about-colors-img"> |
102 | 102 | <img src="<?php |
103 | - echo EEH_Template::getScreenshotUrl('registration-page-large'); ?>"> |
|
103 | + echo EEH_Template::getScreenshotUrl('registration-page-large'); ?>"> |
|
104 | 104 | </div> |
105 | 105 | </div> |
106 | 106 | |
107 | 107 | <div class="feature-section has-2-columns is-fullwidth two-col"> |
108 | 108 | <div class="column col"> |
109 | 109 | <h3><?php |
110 | - esc_html_e('Refined event management', 'event_espresso'); ?></h3> |
|
110 | + esc_html_e('Refined event management', 'event_espresso'); ?></h3> |
|
111 | 111 | <p> |
112 | 112 | <?php |
113 | - esc_html_e( |
|
114 | - 'The new event management screen lets you survey your events at a glance. Want more information? Click to view more. Quickly add/edit prices, dates, or information in any event.', |
|
115 | - 'event_espresso' |
|
116 | - ); ?> |
|
113 | + esc_html_e( |
|
114 | + 'The new event management screen lets you survey your events at a glance. Want more information? Click to view more. Quickly add/edit prices, dates, or information in any event.', |
|
115 | + 'event_espresso' |
|
116 | + ); ?> |
|
117 | 117 | </p> |
118 | 118 | <h4><?php |
119 | - esc_html_e('Smoother price types, taxes, and price modifiers', 'event_espresso'); ?></h4> |
|
119 | + esc_html_e('Smoother price types, taxes, and price modifiers', 'event_espresso'); ?></h4> |
|
120 | 120 | <p> |
121 | 121 | <?php |
122 | - esc_html_e( |
|
123 | - 'Price Types allow you to create new prices that adjust the default ticket (base) price for your system-default ticket', |
|
124 | - 'event_espresso' |
|
125 | - ); ?>. |
|
122 | + esc_html_e( |
|
123 | + 'Price Types allow you to create new prices that adjust the default ticket (base) price for your system-default ticket', |
|
124 | + 'event_espresso' |
|
125 | + ); ?>. |
|
126 | 126 | </p> |
127 | 127 | <p> |
128 | 128 | <?php |
129 | - esc_html_e( |
|
130 | - 'Easily categorize a price modifier and indicate how that price gets applied to the running total when a transaction occurs.', |
|
131 | - 'event_espresso' |
|
132 | - ); ?> |
|
129 | + esc_html_e( |
|
130 | + 'Easily categorize a price modifier and indicate how that price gets applied to the running total when a transaction occurs.', |
|
131 | + 'event_espresso' |
|
132 | + ); ?> |
|
133 | 133 | </p> |
134 | 134 | </div> |
135 | 135 | <div class="column col last-feature about-themes-img"> |
136 | 136 | <img src="<?php |
137 | - echo EEH_Template::getScreenshotUrl('event-management'); ?>"> |
|
137 | + echo EEH_Template::getScreenshotUrl('event-management'); ?>"> |
|
138 | 138 | </div> |
139 | 139 | </div> |
140 | 140 | |
@@ -142,50 +142,50 @@ discard block |
||
142 | 142 | |
143 | 143 | <h2 class="about-headline-callout"> |
144 | 144 | <?php |
145 | - esc_html_e( |
|
146 | - 'People Like You Manage Event Registration with WordPress', |
|
147 | - 'event_espresso' |
|
148 | - ); ?> |
|
145 | + esc_html_e( |
|
146 | + 'People Like You Manage Event Registration with WordPress', |
|
147 | + 'event_espresso' |
|
148 | + ); ?> |
|
149 | 149 | </h2> |
150 | 150 | <div class="feature-section has-2-columns is-fullwidth two-col"> |
151 | 151 | <div class="column col"> |
152 | 152 | <p> |
153 | 153 | <?php |
154 | - printf( |
|
155 | - esc_html__( |
|
156 | - 'Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.', |
|
157 | - 'event_espresso' |
|
158 | - ), |
|
159 | - '<strong>', |
|
160 | - '</strong>' |
|
161 | - ); ?> |
|
154 | + printf( |
|
155 | + esc_html__( |
|
156 | + 'Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.', |
|
157 | + 'event_espresso' |
|
158 | + ), |
|
159 | + '<strong>', |
|
160 | + '</strong>' |
|
161 | + ); ?> |
|
162 | 162 | </p> |
163 | 163 | <p> |
164 | 164 | <?php |
165 | - esc_html_e( |
|
166 | - 'Event Espresso works perfectly for classes, workshops, fundraisers, sporting, trainings, conferences, networking, religion, social, non-profit, and nearly any other type of event.', |
|
167 | - 'event_espresso' |
|
168 | - ); ?> |
|
165 | + esc_html_e( |
|
166 | + 'Event Espresso works perfectly for classes, workshops, fundraisers, sporting, trainings, conferences, networking, religion, social, non-profit, and nearly any other type of event.', |
|
167 | + 'event_espresso' |
|
168 | + ); ?> |
|
169 | 169 | </p> |
170 | 170 | </div> |
171 | 171 | <div class="column col"> |
172 | 172 | <p> |
173 | 173 | <?php |
174 | - printf( |
|
175 | - esc_html__( |
|
176 | - 'Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.', |
|
177 | - 'event_espresso' |
|
178 | - ), |
|
179 | - '<strong>', |
|
180 | - '</strong>' |
|
181 | - ); ?> |
|
174 | + printf( |
|
175 | + esc_html__( |
|
176 | + 'Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.', |
|
177 | + 'event_espresso' |
|
178 | + ), |
|
179 | + '<strong>', |
|
180 | + '</strong>' |
|
181 | + ); ?> |
|
182 | 182 | </p> |
183 | 183 | <p> |
184 | 184 | <?php |
185 | - esc_html_e( |
|
186 | - 'If you\'re doing event registration and ticketing any other way, then you’re wasting time and money. We offer packages and prices to fit any budget, so get started with your online event registration and ticketing management system today.', |
|
187 | - 'event_espresso' |
|
188 | - ); ?> |
|
185 | + esc_html_e( |
|
186 | + 'If you\'re doing event registration and ticketing any other way, then you’re wasting time and money. We offer packages and prices to fit any budget, so get started with your online event registration and ticketing management system today.', |
|
187 | + 'event_espresso' |
|
188 | + ); ?> |
|
189 | 189 | </p> |
190 | 190 | </div> |
191 | 191 | </div> |
@@ -194,37 +194,37 @@ discard block |
||
194 | 194 | <div class="column col"> |
195 | 195 | <h3> |
196 | 196 | <?php |
197 | - esc_html_e( |
|
198 | - 'Turn your blog into a complete event registration and management system', |
|
199 | - 'event_espresso' |
|
200 | - ); ?> |
|
197 | + esc_html_e( |
|
198 | + 'Turn your blog into a complete event registration and management system', |
|
199 | + 'event_espresso' |
|
200 | + ); ?> |
|
201 | 201 | </h3> |
202 | 202 | <p> |
203 | 203 | <?php |
204 | - esc_html_e( |
|
205 | - 'Create a beautiful event page with ticket selection, venue details, and an integrated single page checkout system. With WordPress, Event Espresso, and Espresso Arabica 2014 (based on the "Twenty Fourteen" theme by WordPress), your events will certainly sell out faster than ever!', |
|
206 | - 'event_espresso' |
|
207 | - ); ?> |
|
204 | + esc_html_e( |
|
205 | + 'Create a beautiful event page with ticket selection, venue details, and an integrated single page checkout system. With WordPress, Event Espresso, and Espresso Arabica 2014 (based on the "Twenty Fourteen" theme by WordPress), your events will certainly sell out faster than ever!', |
|
206 | + 'event_espresso' |
|
207 | + ); ?> |
|
208 | 208 | </p> |
209 | 209 | <p> |
210 | 210 | <?php |
211 | - esc_html_e( |
|
212 | - 'With a striking design that does not compromise the simplicity of WordPress and Event Espresso 4, Espresso Arabica 2014 will be the best event theme on the market.', |
|
213 | - 'event_espresso' |
|
214 | - ); ?> |
|
211 | + esc_html_e( |
|
212 | + 'With a striking design that does not compromise the simplicity of WordPress and Event Espresso 4, Espresso Arabica 2014 will be the best event theme on the market.', |
|
213 | + 'event_espresso' |
|
214 | + ); ?> |
|
215 | 215 | </p> |
216 | 216 | <p> |
217 | 217 | <?php |
218 | - echo sprintf( |
|
219 | - esc_html__('%sLearn more >>%s', 'event_espresso'), |
|
220 | - '<a href="https://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">', |
|
221 | - '</a>' |
|
222 | - ); ?> |
|
218 | + echo sprintf( |
|
219 | + esc_html__('%sLearn more >>%s', 'event_espresso'), |
|
220 | + '<a href="https://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">', |
|
221 | + '</a>' |
|
222 | + ); ?> |
|
223 | 223 | </p> |
224 | 224 | </div> |
225 | 225 | <div class="column col"> |
226 | 226 | <img src="<?php |
227 | - echo EEH_Template::getScreenshotUrl('single-event-page'); ?>"> |
|
227 | + echo EEH_Template::getScreenshotUrl('single-event-page'); ?>"> |
|
228 | 228 | </div> |
229 | 229 | </div> |
230 | 230 | |
@@ -232,19 +232,19 @@ discard block |
||
232 | 232 | |
233 | 233 | <h2 class="about-headline-callout"> |
234 | 234 | <?php |
235 | - esc_html_e('Pick a theme, any theme', 'event_espresso'); ?> |
|
235 | + esc_html_e('Pick a theme, any theme', 'event_espresso'); ?> |
|
236 | 236 | </h2> |
237 | 237 | <div class="feature-section has-1-column is-fullwidth is-wide one-col"> |
238 | 238 | <div class="column col"> |
239 | 239 | <p><?php |
240 | - esc_html_e( |
|
241 | - 'We’ve made it super easy to integrate Event Espresso with almost any properly coded WordPress theme, including many of the thousands of themes available on WordPress.org. The image below shows the same Event Espresso ticketing page across three diffrent WordPress themes.', |
|
242 | - 'event_espresso' |
|
243 | - ); ?></p> |
|
240 | + esc_html_e( |
|
241 | + 'We’ve made it super easy to integrate Event Espresso with almost any properly coded WordPress theme, including many of the thousands of themes available on WordPress.org. The image below shows the same Event Espresso ticketing page across three diffrent WordPress themes.', |
|
242 | + 'event_espresso' |
|
243 | + ); ?></p> |
|
244 | 244 | <p> |
245 | 245 | <img class="about-overview-img" |
246 | 246 | src="<?php |
247 | - echo EEH_Template::getScreenshotUrl('multiple-themes'); ?>" |
|
247 | + echo EEH_Template::getScreenshotUrl('multiple-themes'); ?>" |
|
248 | 248 | /> |
249 | 249 | </p> |
250 | 250 | </div> |
@@ -14,26 +14,26 @@ |
||
14 | 14 | */ |
15 | 15 | abstract class CommandHandler implements CommandHandlerInterface |
16 | 16 | { |
17 | - /** |
|
18 | - * Verifies the Command class matches the Handler class |
|
19 | - * by simply removing "Handler" from the Command class and then comparing. |
|
20 | - * IF the Command Handler has been changed via CommandHandlerManager::addCommandHandler, |
|
21 | - * or via the filter in CommandHandlerManager::getCommandHandler(), |
|
22 | - * then this method MUST be overridden in the new Command Handler class. |
|
23 | - * PLZ NOTE: that it also needs to return itself ($this) |
|
24 | - * because the CommandBus utilizes method chaining. |
|
25 | - * |
|
26 | - * @param CommandInterface $command |
|
27 | - * @return CommandHandlerInterface |
|
28 | - * @throws InvalidEntityException |
|
29 | - * @since 4.9.80.p |
|
30 | - */ |
|
31 | - public function verify(CommandInterface $command): CommandHandlerInterface |
|
32 | - { |
|
33 | - $expected = str_replace('CommandHandler', 'Command', get_class($this)); |
|
34 | - if (! $command instanceof $expected) { |
|
35 | - throw new InvalidEntityException($command, $expected); |
|
36 | - } |
|
37 | - return $this; |
|
38 | - } |
|
17 | + /** |
|
18 | + * Verifies the Command class matches the Handler class |
|
19 | + * by simply removing "Handler" from the Command class and then comparing. |
|
20 | + * IF the Command Handler has been changed via CommandHandlerManager::addCommandHandler, |
|
21 | + * or via the filter in CommandHandlerManager::getCommandHandler(), |
|
22 | + * then this method MUST be overridden in the new Command Handler class. |
|
23 | + * PLZ NOTE: that it also needs to return itself ($this) |
|
24 | + * because the CommandBus utilizes method chaining. |
|
25 | + * |
|
26 | + * @param CommandInterface $command |
|
27 | + * @return CommandHandlerInterface |
|
28 | + * @throws InvalidEntityException |
|
29 | + * @since 4.9.80.p |
|
30 | + */ |
|
31 | + public function verify(CommandInterface $command): CommandHandlerInterface |
|
32 | + { |
|
33 | + $expected = str_replace('CommandHandler', 'Command', get_class($this)); |
|
34 | + if (! $command instanceof $expected) { |
|
35 | + throw new InvalidEntityException($command, $expected); |
|
36 | + } |
|
37 | + return $this; |
|
38 | + } |
|
39 | 39 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | public function verify(CommandInterface $command): CommandHandlerInterface |
32 | 32 | { |
33 | 33 | $expected = str_replace('CommandHandler', 'Command', get_class($this)); |
34 | - if (! $command instanceof $expected) { |
|
34 | + if ( ! $command instanceof $expected) { |
|
35 | 35 | throw new InvalidEntityException($command, $expected); |
36 | 36 | } |
37 | 37 | return $this; |
@@ -9,24 +9,24 @@ |
||
9 | 9 | */ |
10 | 10 | interface CommandHandlerInterface |
11 | 11 | { |
12 | - /** |
|
13 | - * verifies that the supplied command is the correct class for the handler. |
|
14 | - * |
|
15 | - * !!! IMPORTANT !!! |
|
16 | - * Must return $this (ie: the handler itself) |
|
17 | - * as the CommandBus utilizes method chaining |
|
18 | - * |
|
19 | - * @param CommandInterface $command |
|
20 | - * @return CommandHandlerInterface |
|
21 | - * @since 4.9.80.p |
|
22 | - */ |
|
23 | - public function verify(CommandInterface $command): CommandHandlerInterface; |
|
12 | + /** |
|
13 | + * verifies that the supplied command is the correct class for the handler. |
|
14 | + * |
|
15 | + * !!! IMPORTANT !!! |
|
16 | + * Must return $this (ie: the handler itself) |
|
17 | + * as the CommandBus utilizes method chaining |
|
18 | + * |
|
19 | + * @param CommandInterface $command |
|
20 | + * @return CommandHandlerInterface |
|
21 | + * @since 4.9.80.p |
|
22 | + */ |
|
23 | + public function verify(CommandInterface $command): CommandHandlerInterface; |
|
24 | 24 | |
25 | - /** |
|
26 | - * Performs the command handler's logic. |
|
27 | - * |
|
28 | - * @param CommandInterface $command |
|
29 | - * @return mixed |
|
30 | - */ |
|
31 | - public function handle(CommandInterface $command); |
|
25 | + /** |
|
26 | + * Performs the command handler's logic. |
|
27 | + * |
|
28 | + * @param CommandInterface $command |
|
29 | + * @return mixed |
|
30 | + */ |
|
31 | + public function handle(CommandInterface $command); |
|
32 | 32 | } |