@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | namespace EventEspresso\core\libraries\rest_api\controllers\config; |
3 | 3 | |
4 | 4 | if (! defined('EVENT_ESPRESSO_VERSION')) { |
5 | - exit('No direct script access allowed'); |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -18,74 +18,74 @@ discard block |
||
18 | 18 | class Read |
19 | 19 | { |
20 | 20 | |
21 | - /** |
|
22 | - * @param \WP_REST_Request $request |
|
23 | - * @return \EE_Config|\WP_Error |
|
24 | - */ |
|
25 | - public static function handle_request(\WP_REST_Request $request) |
|
26 | - { |
|
27 | - $cap = \EE_Restriction_Generator_Base::get_default_restrictions_cap(); |
|
28 | - if (\EE_Capabilities::instance()->current_user_can($cap, 'read_over_api')) { |
|
29 | - return \EE_Config::instance(); |
|
30 | - } else { |
|
31 | - return new \WP_Error( |
|
32 | - 'cannot_read_config', |
|
33 | - sprintf( |
|
34 | - __( |
|
35 | - 'You do not have the necessary capabilities (%s) to read Event Espresso Configuration data', |
|
36 | - 'event_espresso' |
|
37 | - ), |
|
38 | - $cap |
|
39 | - ), |
|
40 | - array('status' => 403) |
|
41 | - ); |
|
42 | - } |
|
43 | - } |
|
21 | + /** |
|
22 | + * @param \WP_REST_Request $request |
|
23 | + * @return \EE_Config|\WP_Error |
|
24 | + */ |
|
25 | + public static function handle_request(\WP_REST_Request $request) |
|
26 | + { |
|
27 | + $cap = \EE_Restriction_Generator_Base::get_default_restrictions_cap(); |
|
28 | + if (\EE_Capabilities::instance()->current_user_can($cap, 'read_over_api')) { |
|
29 | + return \EE_Config::instance(); |
|
30 | + } else { |
|
31 | + return new \WP_Error( |
|
32 | + 'cannot_read_config', |
|
33 | + sprintf( |
|
34 | + __( |
|
35 | + 'You do not have the necessary capabilities (%s) to read Event Espresso Configuration data', |
|
36 | + 'event_espresso' |
|
37 | + ), |
|
38 | + $cap |
|
39 | + ), |
|
40 | + array('status' => 403) |
|
41 | + ); |
|
42 | + } |
|
43 | + } |
|
44 | 44 | |
45 | 45 | |
46 | 46 | |
47 | - /** |
|
48 | - * Handles the request for public site info |
|
49 | - * |
|
50 | - * @global $wp_json_basic_auth_success boolean set by the basic auth plugin, indicates if the |
|
51 | - * current user could be authenticated using basic auth data |
|
52 | - * @global $wp_json_basic_auth_received_data boolean set by the basic auth plugin, indicates if |
|
53 | - * basic auth data was somehow received |
|
54 | - * @param \WP_REST_Request $request |
|
55 | - * @return \EE_Config|\WP_Error |
|
56 | - */ |
|
57 | - public static function handle_request_site_info(\WP_REST_Request $request) |
|
58 | - { |
|
59 | - global $wp_json_basic_auth_success, $wp_json_basic_auth_received_data; |
|
60 | - $insecure_usage_of_basic_auth = apply_filters( |
|
61 | - 'EventEspresso__core__libraries__rest_api__controllers__config__handle_request_site_info__insecure_usage_of_basic_auth', |
|
62 | - $wp_json_basic_auth_success && ! is_ssl(), |
|
63 | - $request |
|
64 | - ); |
|
65 | - if ($insecure_usage_of_basic_auth) { |
|
66 | - $warning = sprintf( |
|
67 | - esc_html__('Notice: We strongly recommend installing an SSL Certificate on your website to keep your data secure. %1$sPlease see our recommendations.%2$s', |
|
68 | - 'event_espresso'), |
|
69 | - '<a href="https://eventespresso.com/wiki/rest-api-security-recommendations/">', |
|
70 | - '</a>' |
|
71 | - ); |
|
72 | - } else { |
|
73 | - $warning = ''; |
|
74 | - } |
|
75 | - return array( |
|
76 | - 'default_timezone' => array( |
|
77 | - 'pretty' => \EEH_DTT_Helper::get_timezone_string_for_display(), |
|
78 | - 'string' => get_option('timezone_string'), |
|
79 | - 'offset' => \EEH_DTT_Helper::get_site_timezone_gmt_offset(), |
|
80 | - ), |
|
81 | - 'default_currency' => \EE_Config::instance()->currency, |
|
82 | - 'authentication' => array( |
|
83 | - 'received_basic_auth_data' => (bool)$wp_json_basic_auth_received_data, |
|
84 | - 'insecure_usage_of_basic_auth' => (bool)$insecure_usage_of_basic_auth, |
|
85 | - 'warning' => $warning |
|
86 | - ) |
|
87 | - ); |
|
88 | - } |
|
47 | + /** |
|
48 | + * Handles the request for public site info |
|
49 | + * |
|
50 | + * @global $wp_json_basic_auth_success boolean set by the basic auth plugin, indicates if the |
|
51 | + * current user could be authenticated using basic auth data |
|
52 | + * @global $wp_json_basic_auth_received_data boolean set by the basic auth plugin, indicates if |
|
53 | + * basic auth data was somehow received |
|
54 | + * @param \WP_REST_Request $request |
|
55 | + * @return \EE_Config|\WP_Error |
|
56 | + */ |
|
57 | + public static function handle_request_site_info(\WP_REST_Request $request) |
|
58 | + { |
|
59 | + global $wp_json_basic_auth_success, $wp_json_basic_auth_received_data; |
|
60 | + $insecure_usage_of_basic_auth = apply_filters( |
|
61 | + 'EventEspresso__core__libraries__rest_api__controllers__config__handle_request_site_info__insecure_usage_of_basic_auth', |
|
62 | + $wp_json_basic_auth_success && ! is_ssl(), |
|
63 | + $request |
|
64 | + ); |
|
65 | + if ($insecure_usage_of_basic_auth) { |
|
66 | + $warning = sprintf( |
|
67 | + esc_html__('Notice: We strongly recommend installing an SSL Certificate on your website to keep your data secure. %1$sPlease see our recommendations.%2$s', |
|
68 | + 'event_espresso'), |
|
69 | + '<a href="https://eventespresso.com/wiki/rest-api-security-recommendations/">', |
|
70 | + '</a>' |
|
71 | + ); |
|
72 | + } else { |
|
73 | + $warning = ''; |
|
74 | + } |
|
75 | + return array( |
|
76 | + 'default_timezone' => array( |
|
77 | + 'pretty' => \EEH_DTT_Helper::get_timezone_string_for_display(), |
|
78 | + 'string' => get_option('timezone_string'), |
|
79 | + 'offset' => \EEH_DTT_Helper::get_site_timezone_gmt_offset(), |
|
80 | + ), |
|
81 | + 'default_currency' => \EE_Config::instance()->currency, |
|
82 | + 'authentication' => array( |
|
83 | + 'received_basic_auth_data' => (bool)$wp_json_basic_auth_received_data, |
|
84 | + 'insecure_usage_of_basic_auth' => (bool)$insecure_usage_of_basic_auth, |
|
85 | + 'warning' => $warning |
|
86 | + ) |
|
87 | + ); |
|
88 | + } |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | // End of file Read.php |
92 | 92 | \ No newline at end of file |
@@ -13,386 +13,386 @@ |
||
13 | 13 | { |
14 | 14 | |
15 | 15 | |
16 | - /** |
|
17 | - * Creates the array for the tips |
|
18 | - */ |
|
19 | - protected function _set_tips_array() |
|
20 | - { |
|
21 | - $this->_qtipsa = array( |
|
22 | - 2 => array( |
|
23 | - 'content_id' => 'dtt-evt-name-label', |
|
24 | - 'target' => '.DTT_name_label', |
|
25 | - 'content' => $this->_get_event_name_label_info(), |
|
26 | - ), |
|
27 | - 3 => array( |
|
28 | - 'content_id' => 'dtt-evt-start-label', |
|
29 | - 'target' => '.DTT_EVT_start_label', |
|
30 | - 'content' => $this->_get_event_start_label_info(), |
|
31 | - ), |
|
32 | - 5 => array( |
|
33 | - 'content_id' => 'dtt-evt-end-label', |
|
34 | - 'target' => '.DTT_EVT_end_label', |
|
35 | - 'content' => $this->_get_event_end_label_info(), |
|
36 | - ), |
|
37 | - 10 => array( |
|
38 | - 'content_id' => 'dtt-reg-limit-label', |
|
39 | - 'target' => '.DTT_reg_limit_label', |
|
40 | - 'content' => $this->_get_event_datetime_DTT_reg_limit_label_info(), |
|
41 | - ), |
|
42 | - 15 => array( |
|
43 | - 'content_id' => 'dtt-sold-label', |
|
44 | - 'target' => '.DTT_sold_label', |
|
45 | - 'content' => $this->_get_event_datetime_DTT_sold_label_info(), |
|
46 | - ), |
|
47 | - 17 => array( |
|
48 | - 'content_id' => 'dtt-reserved-label', |
|
49 | - 'target' => '.DTT_reserved_label', |
|
50 | - 'content' => $this->_get_event_datetime_DTT_reserved_label_info(), |
|
51 | - ), |
|
52 | - 20 => array( |
|
53 | - 'content_id' => 'tkt-name-label', |
|
54 | - 'target' => '.TKT_name_label', |
|
55 | - 'content' => $this->_get_event_ticket_TKT_name_label_info(), |
|
56 | - ), |
|
57 | - 25 => array( |
|
58 | - 'content_id' => 'tkt-goes-on-sale-label', |
|
59 | - 'target' => '.TKT_goes_on_sale_label', |
|
60 | - 'content' => $this->_get_event_ticket_TKT_goes_on_sale_label_info(), |
|
61 | - ), |
|
62 | - 30 => array( |
|
63 | - 'content_id' => 'tkt-sell-until-label', |
|
64 | - 'target' => '.TKT_sell_until_label', |
|
65 | - 'content' => $this->_get_event_ticket_TKT_sell_until_label_info(), |
|
66 | - ), |
|
67 | - 35 => array( |
|
68 | - 'content_id' => 'tkt-price-label', |
|
69 | - 'target' => '.TKT_price_label', |
|
70 | - 'content' => $this->_get_event_ticket_TKT_price_label_info(), |
|
71 | - ), |
|
72 | - 40 => array( |
|
73 | - 'content_id' => 'tkt-qty-label', |
|
74 | - 'target' => '.TKT_qty_label', |
|
75 | - 'content' => $this->_get_event_ticket_TKT_qty_label_info(), |
|
76 | - ), |
|
77 | - 45 => array( |
|
78 | - 'content_id' => 'tkt-sold-label', |
|
79 | - 'target' => '.TKT_sold_label', |
|
80 | - 'content' => $this->_get_event_ticket_TKT_sold_label_info(), |
|
81 | - ), |
|
82 | - 47 => array( |
|
83 | - 'content_id' => 'tkt-reserved-label', |
|
84 | - 'target' => '.TKT_reserved_label', |
|
85 | - 'content' => $this->_get_event_ticket_TKT_reserved_label_info(), |
|
86 | - ), |
|
87 | - 50 => array( |
|
88 | - 'content_id' => 'tkt-regs-label', |
|
89 | - 'target' => '.TKT_regs_label', |
|
90 | - 'content' => $this->_get_event_ticket_TKT_regs_label_info(), |
|
91 | - ), |
|
92 | - 55 => array( |
|
93 | - 'content_id' => 'ant-tkt-name-label', |
|
94 | - 'target' => '.ANT_TKT_name_label', |
|
95 | - 'content' => $this->_get_event_ticket_ANT_TKT_name_label_info(), |
|
96 | - ), |
|
97 | - 60 => array( |
|
98 | - 'content_id' => 'ant-tkt-goes-on-sale-label', |
|
99 | - 'target' => '.ANT_TKT_goes_on_sale_label', |
|
100 | - 'content' => $this->_get_event_ticket_ANT_TKT_goes_on_sale_label_info(), |
|
101 | - ), |
|
102 | - 65 => array( |
|
103 | - 'content_id' => 'ant-tkt-sell-until-label', |
|
104 | - 'target' => '.ANT_TKT_sell_until_label', |
|
105 | - 'content' => $this->_get_event_ticket_ANT_TKT_sell_until_label_info(), |
|
106 | - ), |
|
107 | - 70 => array( |
|
108 | - 'content_id' => 'ant-tkt-price-label', |
|
109 | - 'target' => '.ANT_TKT_price_label', |
|
110 | - 'content' => $this->_get_event_ticket_ANT_TKT_price_label_info(), |
|
111 | - ), |
|
112 | - 75 => array( |
|
113 | - 'content_id' => 'ant-tkt-qty-label', |
|
114 | - 'target' => '.ANT_TKT_qty_label', |
|
115 | - 'content' => $this->_get_event_ticket_ANT_TKT_qty_label_info(), |
|
116 | - ), |
|
117 | - 80 => array( |
|
118 | - 'content_id' => 'ane-dtt-evt-start-label', |
|
119 | - 'target' => '.add-new-event-datetime-DTT_EVT_start_label', |
|
120 | - 'content' => $this->_get_add_new_event_start_label_info(), |
|
121 | - ), |
|
122 | - 85 => array( |
|
123 | - 'content_id' => 'ane-dtt-evt-end-label', |
|
124 | - 'target' => '.add-new-event-datetime-DTT_EVT_end_label', |
|
125 | - 'content' => $this->_get_add_new_event_end_label_info(), |
|
126 | - ), |
|
127 | - 90 => array( |
|
128 | - 'content_id' => 'ane_dtt-reg-limit-label', |
|
129 | - 'target' => '.add-new-event-datetime-DTT_reg_limit_label', |
|
130 | - 'content' => $this->_get_add_new_event_datetime_DTT_reg_limit_label_info(), |
|
131 | - ), |
|
132 | - 100 => array( |
|
133 | - 'content_id' => 'td-tkt-number-datetimes-label', |
|
134 | - 'target' => '.TD_TKT_number_datetimes_label', |
|
135 | - 'content' => $this->_get_event_ticket_TD_TKT_number_datetimes_label_info(), |
|
136 | - ), |
|
137 | - 110 => array( |
|
138 | - 'content_id' => 'td-tkt-min-qty-label', |
|
139 | - 'target' => '.TD_TKT_min_qty_label', |
|
140 | - 'content' => $this->_get_event_ticket_TD_TKT_min_qty_label_info(), |
|
141 | - ), |
|
142 | - 120 => array( |
|
143 | - 'content_id' => 'td-tkt-max-qty-label', |
|
144 | - 'target' => '.TD_TKT_max_qty_label', |
|
145 | - 'content' => $this->_get_event_ticket_TD_TKT_max_qty_label_info(), |
|
146 | - ), |
|
147 | - 130 => array( |
|
148 | - 'content_id' => 'ticket-lock-icon', |
|
149 | - 'target' => '.ticket-archived .ee-lock-icon', |
|
150 | - 'content' => esc_html__( |
|
151 | - 'This ticket was automatically locked and archived because it has a sold quantity and the price was modified. Existing ticket holders will still be verified using these ticket details. However, Event Espresso has automatically created a new active ticket with the modified price for new registrants. This lock is meant to prevent accidental trashing of this ticket. Certain details of this ticket can still be edited (non disabled inputs).', |
|
152 | - 'event_espresso' |
|
153 | - ), |
|
154 | - ), |
|
155 | - 135 => array( |
|
156 | - 'content_id' => 'ticket-lock-icon-event-editor', |
|
157 | - 'target' => '.ee-lock-icon', |
|
158 | - 'content' => esc_html__( |
|
159 | - 'This datetime can no longer be duplicated or deleted because tickets associated with this datetime have already been sold.', |
|
160 | - 'event_espresso' |
|
161 | - ), |
|
162 | - ), |
|
163 | - ); |
|
164 | - } |
|
16 | + /** |
|
17 | + * Creates the array for the tips |
|
18 | + */ |
|
19 | + protected function _set_tips_array() |
|
20 | + { |
|
21 | + $this->_qtipsa = array( |
|
22 | + 2 => array( |
|
23 | + 'content_id' => 'dtt-evt-name-label', |
|
24 | + 'target' => '.DTT_name_label', |
|
25 | + 'content' => $this->_get_event_name_label_info(), |
|
26 | + ), |
|
27 | + 3 => array( |
|
28 | + 'content_id' => 'dtt-evt-start-label', |
|
29 | + 'target' => '.DTT_EVT_start_label', |
|
30 | + 'content' => $this->_get_event_start_label_info(), |
|
31 | + ), |
|
32 | + 5 => array( |
|
33 | + 'content_id' => 'dtt-evt-end-label', |
|
34 | + 'target' => '.DTT_EVT_end_label', |
|
35 | + 'content' => $this->_get_event_end_label_info(), |
|
36 | + ), |
|
37 | + 10 => array( |
|
38 | + 'content_id' => 'dtt-reg-limit-label', |
|
39 | + 'target' => '.DTT_reg_limit_label', |
|
40 | + 'content' => $this->_get_event_datetime_DTT_reg_limit_label_info(), |
|
41 | + ), |
|
42 | + 15 => array( |
|
43 | + 'content_id' => 'dtt-sold-label', |
|
44 | + 'target' => '.DTT_sold_label', |
|
45 | + 'content' => $this->_get_event_datetime_DTT_sold_label_info(), |
|
46 | + ), |
|
47 | + 17 => array( |
|
48 | + 'content_id' => 'dtt-reserved-label', |
|
49 | + 'target' => '.DTT_reserved_label', |
|
50 | + 'content' => $this->_get_event_datetime_DTT_reserved_label_info(), |
|
51 | + ), |
|
52 | + 20 => array( |
|
53 | + 'content_id' => 'tkt-name-label', |
|
54 | + 'target' => '.TKT_name_label', |
|
55 | + 'content' => $this->_get_event_ticket_TKT_name_label_info(), |
|
56 | + ), |
|
57 | + 25 => array( |
|
58 | + 'content_id' => 'tkt-goes-on-sale-label', |
|
59 | + 'target' => '.TKT_goes_on_sale_label', |
|
60 | + 'content' => $this->_get_event_ticket_TKT_goes_on_sale_label_info(), |
|
61 | + ), |
|
62 | + 30 => array( |
|
63 | + 'content_id' => 'tkt-sell-until-label', |
|
64 | + 'target' => '.TKT_sell_until_label', |
|
65 | + 'content' => $this->_get_event_ticket_TKT_sell_until_label_info(), |
|
66 | + ), |
|
67 | + 35 => array( |
|
68 | + 'content_id' => 'tkt-price-label', |
|
69 | + 'target' => '.TKT_price_label', |
|
70 | + 'content' => $this->_get_event_ticket_TKT_price_label_info(), |
|
71 | + ), |
|
72 | + 40 => array( |
|
73 | + 'content_id' => 'tkt-qty-label', |
|
74 | + 'target' => '.TKT_qty_label', |
|
75 | + 'content' => $this->_get_event_ticket_TKT_qty_label_info(), |
|
76 | + ), |
|
77 | + 45 => array( |
|
78 | + 'content_id' => 'tkt-sold-label', |
|
79 | + 'target' => '.TKT_sold_label', |
|
80 | + 'content' => $this->_get_event_ticket_TKT_sold_label_info(), |
|
81 | + ), |
|
82 | + 47 => array( |
|
83 | + 'content_id' => 'tkt-reserved-label', |
|
84 | + 'target' => '.TKT_reserved_label', |
|
85 | + 'content' => $this->_get_event_ticket_TKT_reserved_label_info(), |
|
86 | + ), |
|
87 | + 50 => array( |
|
88 | + 'content_id' => 'tkt-regs-label', |
|
89 | + 'target' => '.TKT_regs_label', |
|
90 | + 'content' => $this->_get_event_ticket_TKT_regs_label_info(), |
|
91 | + ), |
|
92 | + 55 => array( |
|
93 | + 'content_id' => 'ant-tkt-name-label', |
|
94 | + 'target' => '.ANT_TKT_name_label', |
|
95 | + 'content' => $this->_get_event_ticket_ANT_TKT_name_label_info(), |
|
96 | + ), |
|
97 | + 60 => array( |
|
98 | + 'content_id' => 'ant-tkt-goes-on-sale-label', |
|
99 | + 'target' => '.ANT_TKT_goes_on_sale_label', |
|
100 | + 'content' => $this->_get_event_ticket_ANT_TKT_goes_on_sale_label_info(), |
|
101 | + ), |
|
102 | + 65 => array( |
|
103 | + 'content_id' => 'ant-tkt-sell-until-label', |
|
104 | + 'target' => '.ANT_TKT_sell_until_label', |
|
105 | + 'content' => $this->_get_event_ticket_ANT_TKT_sell_until_label_info(), |
|
106 | + ), |
|
107 | + 70 => array( |
|
108 | + 'content_id' => 'ant-tkt-price-label', |
|
109 | + 'target' => '.ANT_TKT_price_label', |
|
110 | + 'content' => $this->_get_event_ticket_ANT_TKT_price_label_info(), |
|
111 | + ), |
|
112 | + 75 => array( |
|
113 | + 'content_id' => 'ant-tkt-qty-label', |
|
114 | + 'target' => '.ANT_TKT_qty_label', |
|
115 | + 'content' => $this->_get_event_ticket_ANT_TKT_qty_label_info(), |
|
116 | + ), |
|
117 | + 80 => array( |
|
118 | + 'content_id' => 'ane-dtt-evt-start-label', |
|
119 | + 'target' => '.add-new-event-datetime-DTT_EVT_start_label', |
|
120 | + 'content' => $this->_get_add_new_event_start_label_info(), |
|
121 | + ), |
|
122 | + 85 => array( |
|
123 | + 'content_id' => 'ane-dtt-evt-end-label', |
|
124 | + 'target' => '.add-new-event-datetime-DTT_EVT_end_label', |
|
125 | + 'content' => $this->_get_add_new_event_end_label_info(), |
|
126 | + ), |
|
127 | + 90 => array( |
|
128 | + 'content_id' => 'ane_dtt-reg-limit-label', |
|
129 | + 'target' => '.add-new-event-datetime-DTT_reg_limit_label', |
|
130 | + 'content' => $this->_get_add_new_event_datetime_DTT_reg_limit_label_info(), |
|
131 | + ), |
|
132 | + 100 => array( |
|
133 | + 'content_id' => 'td-tkt-number-datetimes-label', |
|
134 | + 'target' => '.TD_TKT_number_datetimes_label', |
|
135 | + 'content' => $this->_get_event_ticket_TD_TKT_number_datetimes_label_info(), |
|
136 | + ), |
|
137 | + 110 => array( |
|
138 | + 'content_id' => 'td-tkt-min-qty-label', |
|
139 | + 'target' => '.TD_TKT_min_qty_label', |
|
140 | + 'content' => $this->_get_event_ticket_TD_TKT_min_qty_label_info(), |
|
141 | + ), |
|
142 | + 120 => array( |
|
143 | + 'content_id' => 'td-tkt-max-qty-label', |
|
144 | + 'target' => '.TD_TKT_max_qty_label', |
|
145 | + 'content' => $this->_get_event_ticket_TD_TKT_max_qty_label_info(), |
|
146 | + ), |
|
147 | + 130 => array( |
|
148 | + 'content_id' => 'ticket-lock-icon', |
|
149 | + 'target' => '.ticket-archived .ee-lock-icon', |
|
150 | + 'content' => esc_html__( |
|
151 | + 'This ticket was automatically locked and archived because it has a sold quantity and the price was modified. Existing ticket holders will still be verified using these ticket details. However, Event Espresso has automatically created a new active ticket with the modified price for new registrants. This lock is meant to prevent accidental trashing of this ticket. Certain details of this ticket can still be edited (non disabled inputs).', |
|
152 | + 'event_espresso' |
|
153 | + ), |
|
154 | + ), |
|
155 | + 135 => array( |
|
156 | + 'content_id' => 'ticket-lock-icon-event-editor', |
|
157 | + 'target' => '.ee-lock-icon', |
|
158 | + 'content' => esc_html__( |
|
159 | + 'This datetime can no longer be duplicated or deleted because tickets associated with this datetime have already been sold.', |
|
160 | + 'event_espresso' |
|
161 | + ), |
|
162 | + ), |
|
163 | + ); |
|
164 | + } |
|
165 | 165 | |
166 | - /** |
|
167 | - * @return string |
|
168 | - */ |
|
169 | - private function _get_event_name_label_info() |
|
170 | - { |
|
171 | - return esc_html__( |
|
172 | - 'This is the name or title for an event datetime.', |
|
173 | - 'event_espresso' |
|
174 | - ); |
|
175 | - } |
|
166 | + /** |
|
167 | + * @return string |
|
168 | + */ |
|
169 | + private function _get_event_name_label_info() |
|
170 | + { |
|
171 | + return esc_html__( |
|
172 | + 'This is the name or title for an event datetime.', |
|
173 | + 'event_espresso' |
|
174 | + ); |
|
175 | + } |
|
176 | 176 | |
177 | - /** |
|
178 | - * @return string |
|
179 | - */ |
|
180 | - private function _get_event_start_label_info() |
|
181 | - { |
|
182 | - return esc_html__( |
|
183 | - 'This shows when this event datetime starts.', |
|
184 | - 'event_espresso' |
|
185 | - ); |
|
186 | - } |
|
177 | + /** |
|
178 | + * @return string |
|
179 | + */ |
|
180 | + private function _get_event_start_label_info() |
|
181 | + { |
|
182 | + return esc_html__( |
|
183 | + 'This shows when this event datetime starts.', |
|
184 | + 'event_espresso' |
|
185 | + ); |
|
186 | + } |
|
187 | 187 | |
188 | - /** |
|
189 | - * @return string |
|
190 | - */ |
|
191 | - private function _get_event_end_label_info() |
|
192 | - { |
|
193 | - return esc_html__('This shows when this event datetime ends.', 'event_espresso'); |
|
194 | - } |
|
188 | + /** |
|
189 | + * @return string |
|
190 | + */ |
|
191 | + private function _get_event_end_label_info() |
|
192 | + { |
|
193 | + return esc_html__('This shows when this event datetime ends.', 'event_espresso'); |
|
194 | + } |
|
195 | 195 | |
196 | - /** |
|
197 | - * @return string |
|
198 | - */ |
|
199 | - private function _get_event_datetime_DTT_reg_limit_label_info() |
|
200 | - { |
|
201 | - return esc_html__( |
|
202 | - 'This field allows you to set a maximum number of tickets that you want to make available for an event datetime.', |
|
203 | - 'event_espresso' |
|
204 | - ); |
|
205 | - } |
|
196 | + /** |
|
197 | + * @return string |
|
198 | + */ |
|
199 | + private function _get_event_datetime_DTT_reg_limit_label_info() |
|
200 | + { |
|
201 | + return esc_html__( |
|
202 | + 'This field allows you to set a maximum number of tickets that you want to make available for an event datetime.', |
|
203 | + 'event_espresso' |
|
204 | + ); |
|
205 | + } |
|
206 | 206 | |
207 | - /** |
|
208 | - * @return string |
|
209 | - */ |
|
210 | - private function _get_event_datetime_DTT_sold_label_info() |
|
211 | - { |
|
212 | - return esc_html__( |
|
213 | - 'This shows the number of tickets that have been sold that have access to this event datetime.', |
|
214 | - 'event_espresso' |
|
215 | - ); |
|
216 | - } |
|
207 | + /** |
|
208 | + * @return string |
|
209 | + */ |
|
210 | + private function _get_event_datetime_DTT_sold_label_info() |
|
211 | + { |
|
212 | + return esc_html__( |
|
213 | + 'This shows the number of tickets that have been sold that have access to this event datetime.', |
|
214 | + 'event_espresso' |
|
215 | + ); |
|
216 | + } |
|
217 | 217 | |
218 | - /** |
|
219 | - * @return string |
|
220 | - */ |
|
221 | - private function _get_event_datetime_DTT_reserved_label_info() |
|
222 | - { |
|
223 | - return esc_html__( |
|
224 | - 'This shows the number of reserved tickets that have access to this event datetime.', |
|
225 | - 'event_espresso' |
|
226 | - ); |
|
227 | - } |
|
218 | + /** |
|
219 | + * @return string |
|
220 | + */ |
|
221 | + private function _get_event_datetime_DTT_reserved_label_info() |
|
222 | + { |
|
223 | + return esc_html__( |
|
224 | + 'This shows the number of reserved tickets that have access to this event datetime.', |
|
225 | + 'event_espresso' |
|
226 | + ); |
|
227 | + } |
|
228 | 228 | |
229 | - /** |
|
230 | - * @return string |
|
231 | - */ |
|
232 | - private function _get_event_ticket_TKT_name_label_info() |
|
233 | - { |
|
234 | - return esc_html__('This is the name of this ticket option.', 'event_espresso'); |
|
235 | - } |
|
229 | + /** |
|
230 | + * @return string |
|
231 | + */ |
|
232 | + private function _get_event_ticket_TKT_name_label_info() |
|
233 | + { |
|
234 | + return esc_html__('This is the name of this ticket option.', 'event_espresso'); |
|
235 | + } |
|
236 | 236 | |
237 | - /** |
|
238 | - * @return string |
|
239 | - */ |
|
240 | - private function _get_event_ticket_TKT_goes_on_sale_label_info() |
|
241 | - { |
|
242 | - return esc_html__('This shows when the first ticket is available for sale.', 'event_espresso'); |
|
243 | - } |
|
237 | + /** |
|
238 | + * @return string |
|
239 | + */ |
|
240 | + private function _get_event_ticket_TKT_goes_on_sale_label_info() |
|
241 | + { |
|
242 | + return esc_html__('This shows when the first ticket is available for sale.', 'event_espresso'); |
|
243 | + } |
|
244 | 244 | |
245 | - /** |
|
246 | - * @return string |
|
247 | - */ |
|
248 | - private function _get_event_ticket_TKT_sell_until_label_info() |
|
249 | - { |
|
250 | - return esc_html__('This shows the date that ticket sales end for this ticket.', 'event_espresso'); |
|
251 | - } |
|
245 | + /** |
|
246 | + * @return string |
|
247 | + */ |
|
248 | + private function _get_event_ticket_TKT_sell_until_label_info() |
|
249 | + { |
|
250 | + return esc_html__('This shows the date that ticket sales end for this ticket.', 'event_espresso'); |
|
251 | + } |
|
252 | 252 | |
253 | - /** |
|
254 | - * @return string |
|
255 | - */ |
|
256 | - private function _get_event_ticket_TKT_price_label_info() |
|
257 | - { |
|
258 | - return esc_html__('This is the price for this ticket.', 'event_espresso'); |
|
259 | - } |
|
253 | + /** |
|
254 | + * @return string |
|
255 | + */ |
|
256 | + private function _get_event_ticket_TKT_price_label_info() |
|
257 | + { |
|
258 | + return esc_html__('This is the price for this ticket.', 'event_espresso'); |
|
259 | + } |
|
260 | 260 | |
261 | - /** |
|
262 | - * @return string |
|
263 | - */ |
|
264 | - private function _get_event_ticket_TKT_qty_label_info() |
|
265 | - { |
|
266 | - return esc_html__( |
|
267 | - 'This field shows the quantity of tickets that are available for this type of ticket.', |
|
268 | - 'event_espresso' |
|
269 | - ); |
|
270 | - } |
|
261 | + /** |
|
262 | + * @return string |
|
263 | + */ |
|
264 | + private function _get_event_ticket_TKT_qty_label_info() |
|
265 | + { |
|
266 | + return esc_html__( |
|
267 | + 'This field shows the quantity of tickets that are available for this type of ticket.', |
|
268 | + 'event_espresso' |
|
269 | + ); |
|
270 | + } |
|
271 | 271 | |
272 | - /** |
|
273 | - * @return string |
|
274 | - */ |
|
275 | - private function _get_event_ticket_TKT_sold_label_info() |
|
276 | - { |
|
277 | - return esc_html__('This shows the number of tickets that have been sold for this ticket.', 'event_espresso'); |
|
278 | - } |
|
272 | + /** |
|
273 | + * @return string |
|
274 | + */ |
|
275 | + private function _get_event_ticket_TKT_sold_label_info() |
|
276 | + { |
|
277 | + return esc_html__('This shows the number of tickets that have been sold for this ticket.', 'event_espresso'); |
|
278 | + } |
|
279 | 279 | |
280 | - /** |
|
281 | - * @return string |
|
282 | - */ |
|
283 | - private function _get_event_ticket_TKT_reserved_label_info() |
|
284 | - { |
|
285 | - return esc_html__('This shows the number of tickets that are reserved for this ticket.', 'event_espresso'); |
|
286 | - } |
|
280 | + /** |
|
281 | + * @return string |
|
282 | + */ |
|
283 | + private function _get_event_ticket_TKT_reserved_label_info() |
|
284 | + { |
|
285 | + return esc_html__('This shows the number of tickets that are reserved for this ticket.', 'event_espresso'); |
|
286 | + } |
|
287 | 287 | |
288 | - /** |
|
289 | - * @return string |
|
290 | - */ |
|
291 | - private function _get_event_ticket_TKT_regs_label_info() |
|
292 | - { |
|
293 | - return esc_html__( |
|
294 | - 'This shows the number of registrations that have occurred from ticket sales.', |
|
295 | - 'event_espresso' |
|
296 | - ); |
|
297 | - } |
|
288 | + /** |
|
289 | + * @return string |
|
290 | + */ |
|
291 | + private function _get_event_ticket_TKT_regs_label_info() |
|
292 | + { |
|
293 | + return esc_html__( |
|
294 | + 'This shows the number of registrations that have occurred from ticket sales.', |
|
295 | + 'event_espresso' |
|
296 | + ); |
|
297 | + } |
|
298 | 298 | |
299 | - /** |
|
300 | - * @return string |
|
301 | - */ |
|
302 | - private function _get_event_ticket_ANT_TKT_name_label_info() |
|
303 | - { |
|
304 | - return esc_html__('This is the name of this ticket option.', 'event_espresso'); |
|
305 | - } |
|
299 | + /** |
|
300 | + * @return string |
|
301 | + */ |
|
302 | + private function _get_event_ticket_ANT_TKT_name_label_info() |
|
303 | + { |
|
304 | + return esc_html__('This is the name of this ticket option.', 'event_espresso'); |
|
305 | + } |
|
306 | 306 | |
307 | - /** |
|
308 | - * @return string |
|
309 | - */ |
|
310 | - private function _get_event_ticket_ANT_TKT_goes_on_sale_label_info() |
|
311 | - { |
|
312 | - return esc_html__('This shows when the first ticket is available for sale.', 'event_espresso'); |
|
313 | - } |
|
307 | + /** |
|
308 | + * @return string |
|
309 | + */ |
|
310 | + private function _get_event_ticket_ANT_TKT_goes_on_sale_label_info() |
|
311 | + { |
|
312 | + return esc_html__('This shows when the first ticket is available for sale.', 'event_espresso'); |
|
313 | + } |
|
314 | 314 | |
315 | - /** |
|
316 | - * @return string |
|
317 | - */ |
|
318 | - private function _get_event_ticket_ANT_TKT_sell_until_label_info() |
|
319 | - { |
|
320 | - return esc_html__('This shows the date that ticket sales end for this ticket.', 'event_espresso'); |
|
321 | - } |
|
315 | + /** |
|
316 | + * @return string |
|
317 | + */ |
|
318 | + private function _get_event_ticket_ANT_TKT_sell_until_label_info() |
|
319 | + { |
|
320 | + return esc_html__('This shows the date that ticket sales end for this ticket.', 'event_espresso'); |
|
321 | + } |
|
322 | 322 | |
323 | - /** |
|
324 | - * @return string |
|
325 | - */ |
|
326 | - private function _get_event_ticket_ANT_TKT_price_label_info() |
|
327 | - { |
|
328 | - return esc_html__('This is the price for this ticket.', 'event_espresso'); |
|
329 | - } |
|
323 | + /** |
|
324 | + * @return string |
|
325 | + */ |
|
326 | + private function _get_event_ticket_ANT_TKT_price_label_info() |
|
327 | + { |
|
328 | + return esc_html__('This is the price for this ticket.', 'event_espresso'); |
|
329 | + } |
|
330 | 330 | |
331 | - /** |
|
332 | - * @return string |
|
333 | - */ |
|
334 | - private function _get_event_ticket_ANT_TKT_qty_label_info() |
|
335 | - { |
|
336 | - return esc_html__( |
|
337 | - 'This field shows the quantity of tickets that are available for this type of ticket.', |
|
338 | - 'event_espresso' |
|
339 | - ); |
|
340 | - } |
|
331 | + /** |
|
332 | + * @return string |
|
333 | + */ |
|
334 | + private function _get_event_ticket_ANT_TKT_qty_label_info() |
|
335 | + { |
|
336 | + return esc_html__( |
|
337 | + 'This field shows the quantity of tickets that are available for this type of ticket.', |
|
338 | + 'event_espresso' |
|
339 | + ); |
|
340 | + } |
|
341 | 341 | |
342 | - /** |
|
343 | - * @return string |
|
344 | - */ |
|
345 | - private function _get_add_new_event_start_label_info() |
|
346 | - { |
|
347 | - return esc_html__('This shows when this event datetime starts.', 'event_espresso'); |
|
348 | - } |
|
342 | + /** |
|
343 | + * @return string |
|
344 | + */ |
|
345 | + private function _get_add_new_event_start_label_info() |
|
346 | + { |
|
347 | + return esc_html__('This shows when this event datetime starts.', 'event_espresso'); |
|
348 | + } |
|
349 | 349 | |
350 | - /** |
|
351 | - * @return string |
|
352 | - */ |
|
353 | - private function _get_add_new_event_end_label_info() |
|
354 | - { |
|
355 | - return esc_html__('This shows when this event datetime ends.', 'event_espresso'); |
|
356 | - } |
|
350 | + /** |
|
351 | + * @return string |
|
352 | + */ |
|
353 | + private function _get_add_new_event_end_label_info() |
|
354 | + { |
|
355 | + return esc_html__('This shows when this event datetime ends.', 'event_espresso'); |
|
356 | + } |
|
357 | 357 | |
358 | - /** |
|
359 | - * @return string |
|
360 | - */ |
|
361 | - private function _get_add_new_event_datetime_DTT_reg_limit_label_info() |
|
362 | - { |
|
363 | - return esc_html__( |
|
364 | - 'This field allows you to set a maximum number of tickets that you want to make available for an event datetime.', |
|
365 | - 'event_espresso' |
|
366 | - ); |
|
367 | - } |
|
358 | + /** |
|
359 | + * @return string |
|
360 | + */ |
|
361 | + private function _get_add_new_event_datetime_DTT_reg_limit_label_info() |
|
362 | + { |
|
363 | + return esc_html__( |
|
364 | + 'This field allows you to set a maximum number of tickets that you want to make available for an event datetime.', |
|
365 | + 'event_espresso' |
|
366 | + ); |
|
367 | + } |
|
368 | 368 | |
369 | - /** |
|
370 | - * @return string |
|
371 | - */ |
|
372 | - private function _get_event_ticket_TD_TKT_number_datetimes_label_info() |
|
373 | - { |
|
374 | - return esc_html__( |
|
375 | - 'This field allows you to set the number of datetimes that a ticket should have access to.', |
|
376 | - 'event_espresso' |
|
377 | - ); |
|
378 | - } |
|
369 | + /** |
|
370 | + * @return string |
|
371 | + */ |
|
372 | + private function _get_event_ticket_TD_TKT_number_datetimes_label_info() |
|
373 | + { |
|
374 | + return esc_html__( |
|
375 | + 'This field allows you to set the number of datetimes that a ticket should have access to.', |
|
376 | + 'event_espresso' |
|
377 | + ); |
|
378 | + } |
|
379 | 379 | |
380 | - /** |
|
381 | - * @return string |
|
382 | - */ |
|
383 | - private function _get_event_ticket_TD_TKT_min_qty_label_info() |
|
384 | - { |
|
385 | - return esc_html__( |
|
386 | - 'This shows the minimum quantity that can be purchased for this ticket.', |
|
387 | - 'event_espresso' |
|
388 | - ); |
|
389 | - } |
|
380 | + /** |
|
381 | + * @return string |
|
382 | + */ |
|
383 | + private function _get_event_ticket_TD_TKT_min_qty_label_info() |
|
384 | + { |
|
385 | + return esc_html__( |
|
386 | + 'This shows the minimum quantity that can be purchased for this ticket.', |
|
387 | + 'event_espresso' |
|
388 | + ); |
|
389 | + } |
|
390 | 390 | |
391 | - /** |
|
392 | - * @return string |
|
393 | - */ |
|
394 | - private function _get_event_ticket_TD_TKT_max_qty_label_info() |
|
395 | - { |
|
396 | - return esc_html__('This shows the maximum quantity that can be purchased for this ticket.', 'event_espresso'); |
|
397 | - } |
|
391 | + /** |
|
392 | + * @return string |
|
393 | + */ |
|
394 | + private function _get_event_ticket_TD_TKT_max_qty_label_info() |
|
395 | + { |
|
396 | + return esc_html__('This shows the maximum quantity that can be purchased for this ticket.', 'event_espresso'); |
|
397 | + } |
|
398 | 398 | } |
399 | 399 | \ No newline at end of file |
@@ -1,9 +1,9 @@ discard block |
||
1 | - <tr valign="top" class="ee-ticket-sortable ticket-row<?php echo $ticket_archive_class; if(WP_DEBUG){ echo ' ee-wp-debug'; } ?>" id="display-ticketrow-<?php echo $tkt_row; ?>"> |
|
1 | + <tr valign="top" class="ee-ticket-sortable ticket-row<?php echo $ticket_archive_class; if (WP_DEBUG) { echo ' ee-wp-debug'; } ?>" id="display-ticketrow-<?php echo $tkt_row; ?>"> |
|
2 | 2 | <!--<td class="ee-tkt-order-field"><span class="dashicons dashicons-sort<?php echo $tkt_status_class; ?>"><input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_order]" class="edit-ticket-TKT_order" value ="<?php echo $TKT_order; ?>" ></span></td>--> |
3 | 3 | <td class="ee-tkt-order-field"><span class="ee-status-strip-td ee-status-strip<?php echo $tkt_status_class; ?>"></span><input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_order]" class="edit-ticket-TKT_order" value ="<?php echo $TKT_order; ?>"></td> |
4 | 4 | <td><input maxlength="245" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_name]" class="edit-ticket-TKT_name ee-large-text-inp" placeholder="Ticket Title" value="<?php echo $TKT_name; ?>"></td> |
5 | 5 | <td> |
6 | - <?php if ( $disabled ) : ?> |
|
6 | + <?php if ($disabled) : ?> |
|
7 | 7 | <input type="hidden" id="edit-ticket-TKT_start_date-<?php echo $tkt_row; ?>" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>" > |
8 | 8 | <input type="text" name="archived_ticket[TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>" disabled> |
9 | 9 | <?php else : ?> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | <?php endif; ?> |
12 | 12 | </td> |
13 | 13 | <td> |
14 | - <?php if ( $disabled ) : ?> |
|
14 | + <?php if ($disabled) : ?> |
|
15 | 15 | <input type="hidden" id="edit-ticket-TKT_end_date-<?php echo $tkt_row; ?>" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>" > |
16 | 16 | <input type="text" name="archived_ticket[TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>" disabled> |
17 | 17 | <?php else : ?> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | <?php endif; ?> |
20 | 20 | </td> |
21 | 21 | <td> |
22 | - <?php if ( $disabled ) : ?> |
|
22 | + <?php if ($disabled) : ?> |
|
23 | 23 | <input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; ?>" type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>"> |
24 | 24 | <input type="text" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>" disabled> |
25 | 25 | <?php else : ?> |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | <input type="hidden" id="edit-ticket-TKT_base_price_ID-<?php echo $tkt_row; ?>" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price_ID]" value="<?php echo $TKT_base_price_ID; ?>"> |
29 | 29 | </td> |
30 | 30 | <td> |
31 | - <?php if ( $disabled ) : ?> |
|
31 | + <?php if ($disabled) : ?> |
|
32 | 32 | <input type="hidden" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>"> |
33 | 33 | <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>" disabled> |
34 | 34 | <?php else : ?> |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | <input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_ID]" class="edit-ticket-TKT_ID" value="<?php echo $TKT_ID; ?>"> |
57 | 57 | <input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_row]" class="edit-ticket-TKT_row" value="<?php echo $tkt_row; ?>"> |
58 | 58 | |
59 | - <!--<div class="total-price-container"><?php printf( esc_html__('Total Final Price: %s', 'event_espresso'), '<span class="ticket-price-amount">' . $TKT_price . '</span>'); ?> </div>--> |
|
59 | + <!--<div class="total-price-container"><?php printf(esc_html__('Total Final Price: %s', 'event_espresso'), '<span class="ticket-price-amount">'.$TKT_price.'</span>'); ?> </div>--> |
|
60 | 60 | <textarea name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_description]" class="edit-ticket-TKT_description ee-full-textarea-inp" placeholder="Ticket Description"><?php echo $TKT_description; ?></textarea> |
61 | 61 | |
62 | - <?php do_action( 'AHEE__event_tickets_datetime_ticket_row_template_after_desc', $tkt_row, $TKT_ID ); ?> |
|
62 | + <?php do_action('AHEE__event_tickets_datetime_ticket_row_template_after_desc', $tkt_row, $TKT_ID); ?> |
|
63 | 63 | |
64 | 64 | <div class="basic-ticket-container"> |
65 | 65 | <h4 class="tickets-heading"><?php esc_html_e('Ticket Details', 'event_espresso'); ?></h4> |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | <tbody> |
76 | 76 | <tr> |
77 | 77 | <td> |
78 | - <?php if ( $disabled ) : ?> |
|
78 | + <?php if ($disabled) : ?> |
|
79 | 79 | <input type="hidden" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>"> |
80 | 80 | <input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>" disabled> |
81 | 81 | <?php else : ?> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | <?php endif; ?> |
84 | 84 | </td> |
85 | 85 | <td> |
86 | - <?php if ( $disabled ) : ?> |
|
86 | + <?php if ($disabled) : ?> |
|
87 | 87 | <input type="hidden" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>"> |
88 | 88 | <input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>" disabled> |
89 | 89 | <?php else: ?> |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | <?php endif; ?> |
92 | 92 | </td> |
93 | 93 | <td> |
94 | - <?php if ( $disabled ) : ?> |
|
94 | + <?php if ($disabled) : ?> |
|
95 | 95 | <input type="hidden" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>"> |
96 | 96 | <input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>" disabled> |
97 | 97 | <?php else : ?> |
@@ -109,15 +109,15 @@ discard block |
||
109 | 109 | <label for="edit-ticket-TKT_required"><?php esc_html_e('This ticket is required (will appear first in frontend ticket lists).', 'event_espresso'); ?></label> |
110 | 110 | </div> |
111 | 111 | <div class="ticket-is-taxable-container"> |
112 | - <?php if ( !empty($tax_rows) ) { ?> |
|
113 | - <?php if ( $disabled ) : ?> |
|
112 | + <?php if ( ! empty($tax_rows)) { ?> |
|
113 | + <?php if ($disabled) : ?> |
|
114 | 114 | <?php |
115 | - $tax_value = !empty( $TKT_taxable ) ? 1 : 0; |
|
115 | + $tax_value = ! empty($TKT_taxable) ? 1 : 0; |
|
116 | 116 | ?> |
117 | - <input class="TKT-taxable-checkbox" type="hidden" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="<?php echo $tax_value; ?>"> |
|
117 | + <input class="TKT-taxable-checkbox" type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="<?php echo $tax_value; ?>"> |
|
118 | 118 | <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?> disabled> |
119 | 119 | <?php else : ?> |
120 | - <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?>> |
|
120 | + <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?>> |
|
121 | 121 | <?php endif; ?> |
122 | 122 | <label for="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"> <?php esc_html_e('This ticket is taxable.', 'event_espresso'); ?> |
123 | 123 | <?php } //end tax_rows check ?> |
@@ -174,10 +174,10 @@ discard block |
||
174 | 174 | <?php echo $ticket_datetimes_list; ?> |
175 | 175 | </ul> |
176 | 176 | |
177 | - <?php do_action( 'AHEE__event_tickets_datetime_ticket_row_template__advanced_details_end', $tkt_row, $TKT_ID ); ?> |
|
177 | + <?php do_action('AHEE__event_tickets_datetime_ticket_row_template__advanced_details_end', $tkt_row, $TKT_ID); ?> |
|
178 | 178 | <div class="ee-editor-footer-container"> |
179 | 179 | <div class="ee-editor-id-container"> |
180 | - <span class="ee-item-id"><?php echo $TKT_ID ? sprintf( esc_html__( 'Ticket ID: %d', 'event_espresso' ), $TKT_ID ) : ''; ?></span> |
|
180 | + <span class="ee-item-id"><?php echo $TKT_ID ? sprintf(esc_html__('Ticket ID: %d', 'event_espresso'), $TKT_ID) : ''; ?></span> |
|
181 | 181 | </div> |
182 | 182 | <div class="save-cancel-button-container"> |
183 | 183 | <label for="edit-ticket-TKT_is_default_selector"><?php esc_html_e('use this new ticket as a default ticket for any new events', 'event_espresso'); ?></label> |
@@ -6,24 +6,33 @@ discard block |
||
6 | 6 | <?php if ( $disabled ) : ?> |
7 | 7 | <input type="hidden" id="edit-ticket-TKT_start_date-<?php echo $tkt_row; ?>" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>" > |
8 | 8 | <input type="text" name="archived_ticket[TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>" disabled> |
9 | - <?php else : ?> |
|
10 | - <input id="edit-ticket-TKT_start_date-<?php echo $tkt_row; ?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp ee-datepicker" value="<?php echo $TKT_start_date; ?>" data-context="start-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>" data-related-field=".edit-ticket-TKT_end_date" data-next-field=".edit-ticket-TKT_end_date"> |
|
9 | + <?php else { |
|
10 | + : ?> |
|
11 | + <input id="edit-ticket-TKT_start_date-<?php echo $tkt_row; |
|
12 | +} |
|
13 | +?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp ee-datepicker" value="<?php echo $TKT_start_date; ?>" data-context="start-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>" data-related-field=".edit-ticket-TKT_end_date" data-next-field=".edit-ticket-TKT_end_date"> |
|
11 | 14 | <?php endif; ?> |
12 | 15 | </td> |
13 | 16 | <td> |
14 | 17 | <?php if ( $disabled ) : ?> |
15 | 18 | <input type="hidden" id="edit-ticket-TKT_end_date-<?php echo $tkt_row; ?>" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>" > |
16 | 19 | <input type="text" name="archived_ticket[TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>" disabled> |
17 | - <?php else : ?> |
|
18 | - <input id="edit-ticket-TKT_end_date-<?php echo $tkt_row; ?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp ee-datepicker" value="<?php echo $TKT_end_date; ?>" data-context="end-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>" data-related-field=".edit-ticket-TKT_start_date" data-next-field=".edit-ticket-TKT_qty"> |
|
20 | + <?php else { |
|
21 | + : ?> |
|
22 | + <input id="edit-ticket-TKT_end_date-<?php echo $tkt_row; |
|
23 | +} |
|
24 | +?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp ee-datepicker" value="<?php echo $TKT_end_date; ?>" data-context="end-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>" data-related-field=".edit-ticket-TKT_start_date" data-next-field=".edit-ticket-TKT_qty"> |
|
19 | 25 | <?php endif; ?> |
20 | 26 | </td> |
21 | 27 | <td> |
22 | 28 | <?php if ( $disabled ) : ?> |
23 | 29 | <input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; ?>" type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>"> |
24 | 30 | <input type="text" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>" disabled> |
25 | - <?php else : ?> |
|
26 | - <input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; ?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>"> |
|
31 | + <?php else { |
|
32 | + : ?> |
|
33 | + <input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; |
|
34 | +} |
|
35 | +?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>"> |
|
27 | 36 | <?php endif; ?> |
28 | 37 | <input type="hidden" id="edit-ticket-TKT_base_price_ID-<?php echo $tkt_row; ?>" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price_ID]" value="<?php echo $TKT_base_price_ID; ?>"> |
29 | 38 | </td> |
@@ -31,8 +40,11 @@ discard block |
||
31 | 40 | <?php if ( $disabled ) : ?> |
32 | 41 | <input type="hidden" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>"> |
33 | 42 | <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>" disabled> |
34 | - <?php else : ?> |
|
35 | - <input type="text" id="edit-ticket-TKT_qty-<?php echo $tkt_row; ?>" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>"> |
|
43 | + <?php else { |
|
44 | + : ?> |
|
45 | + <input type="text" id="edit-ticket-TKT_qty-<?php echo $tkt_row; |
|
46 | +} |
|
47 | +?>" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>"> |
|
36 | 48 | <?php endif; ?> |
37 | 49 | </td> |
38 | 50 | <!--<td><span class="ticket-display-row-TKT_price"><?php //echo $TKT_price; ?></span></td>--> |
@@ -78,24 +90,33 @@ discard block |
||
78 | 90 | <?php if ( $disabled ) : ?> |
79 | 91 | <input type="hidden" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>"> |
80 | 92 | <input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>" disabled> |
81 | - <?php else : ?> |
|
82 | - <input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>"> |
|
93 | + <?php else { |
|
94 | + : ?> |
|
95 | + <input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; |
|
96 | +} |
|
97 | +?>[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>"> |
|
83 | 98 | <?php endif; ?> |
84 | 99 | </td> |
85 | 100 | <td> |
86 | 101 | <?php if ( $disabled ) : ?> |
87 | 102 | <input type="hidden" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>"> |
88 | 103 | <input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>" disabled> |
89 | - <?php else: ?> |
|
90 | - <input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>"> |
|
104 | + <?php else { |
|
105 | + : ?> |
|
106 | + <input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; |
|
107 | +} |
|
108 | +?>[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>"> |
|
91 | 109 | <?php endif; ?> |
92 | 110 | </td> |
93 | 111 | <td> |
94 | 112 | <?php if ( $disabled ) : ?> |
95 | 113 | <input type="hidden" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>"> |
96 | 114 | <input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>" disabled> |
97 | - <?php else : ?> |
|
98 | - <input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>"> |
|
115 | + <?php else { |
|
116 | + : ?> |
|
117 | + <input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; |
|
118 | +} |
|
119 | +?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>"> |
|
99 | 120 | <?php endif; ?> |
100 | 121 | </td> |
101 | 122 | </tr> |
@@ -116,8 +137,11 @@ discard block |
||
116 | 137 | ?> |
117 | 138 | <input class="TKT-taxable-checkbox" type="hidden" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="<?php echo $tax_value; ?>"> |
118 | 139 | <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?> disabled> |
119 | - <?php else : ?> |
|
120 | - <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?>> |
|
140 | + <?php else { |
|
141 | + : ?> |
|
142 | + <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; |
|
143 | +} |
|
144 | +?>" type="checkbox" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?>> |
|
121 | 145 | <?php endif; ?> |
122 | 146 | <label for="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"> <?php esc_html_e('This ticket is taxable.', 'event_espresso'); ?> |
123 | 147 | <?php } //end tax_rows check ?> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <p> |
2 | 2 | <?php esc_html_e( |
3 | - 'Use this to control what the default will be for maximum tickets on an order when creating a new event.', |
|
4 | - 'event_espresso' |
|
5 | - ); ?> |
|
3 | + 'Use this to control what the default will be for maximum tickets on an order when creating a new event.', |
|
4 | + 'event_espresso' |
|
5 | + ); ?> |
|
6 | 6 | </p> |
7 | 7 | \ No newline at end of file |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace EventEspresso\core\services\commands; |
4 | 4 | |
5 | -if (! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
6 | 6 | exit('No direct script access allowed'); |
7 | 7 | } |
8 | 8 |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | namespace EventEspresso\core\services\commands; |
4 | 4 | |
5 | 5 | if (! defined('EVENT_ESPRESSO_VERSION')) { |
6 | - exit('No direct script access allowed'); |
|
6 | + exit('No direct script access allowed'); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | |
@@ -16,22 +16,22 @@ discard block |
||
16 | 16 | interface CommandHandlerManagerInterface |
17 | 17 | { |
18 | 18 | |
19 | - /** |
|
20 | - * @param CommandHandlerInterface $command_handler |
|
21 | - * @param string $fqcn_for_command Fully Qualified ClassName for Command |
|
22 | - * @return void |
|
23 | - * @throws InvalidCommandHandlerException |
|
24 | - */ |
|
25 | - public function addCommandHandler(CommandHandlerInterface $command_handler, $fqcn_for_command = ''); |
|
19 | + /** |
|
20 | + * @param CommandHandlerInterface $command_handler |
|
21 | + * @param string $fqcn_for_command Fully Qualified ClassName for Command |
|
22 | + * @return void |
|
23 | + * @throws InvalidCommandHandlerException |
|
24 | + */ |
|
25 | + public function addCommandHandler(CommandHandlerInterface $command_handler, $fqcn_for_command = ''); |
|
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | - /** |
|
30 | - * @param CommandInterface $command |
|
31 | - * @param CommandBusInterface $command_bus |
|
32 | - * @return mixed |
|
33 | - */ |
|
34 | - public function getCommandHandler(CommandInterface $command, CommandBusInterface $command_bus = null); |
|
29 | + /** |
|
30 | + * @param CommandInterface $command |
|
31 | + * @param CommandBusInterface $command_bus |
|
32 | + * @return mixed |
|
33 | + */ |
|
34 | + public function getCommandHandler(CommandInterface $command, CommandBusInterface $command_bus = null); |
|
35 | 35 | |
36 | 36 | } |
37 | 37 | // End of file CommandHandlerManagerInterface.php |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | use EventEspresso\core\services\commands\CommandInterface; |
6 | 6 | |
7 | 7 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
8 | - exit('No direct script access allowed'); |
|
8 | + exit('No direct script access allowed'); |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | interface CommandBusMiddlewareInterface |
19 | 19 | { |
20 | 20 | |
21 | - /** |
|
22 | - * @param CommandInterface $command |
|
23 | - * @param Closure $next |
|
24 | - * @return mixed |
|
25 | - */ |
|
26 | - public function handle(CommandInterface $command, Closure $next); |
|
21 | + /** |
|
22 | + * @param CommandInterface $command |
|
23 | + * @param Closure $next |
|
24 | + * @return mixed |
|
25 | + */ |
|
26 | + public function handle(CommandInterface $command, Closure $next); |
|
27 | 27 | |
28 | 28 | } |
29 | 29 | // End of file CommandBusMiddlewareInterface.php |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function handle(CommandInterface $command, Closure $next) |
57 | 57 | { |
58 | - if ( $command instanceof CommandRequiresCapCheckInterface) { |
|
58 | + if ($command instanceof CommandRequiresCapCheckInterface) { |
|
59 | 59 | $this->capabilities_checker->processCapCheck( |
60 | 60 | $command->getCapCheck() |
61 | 61 | ); |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | use EventEspresso\core\services\commands\CommandRequiresCapCheckInterface; |
8 | 8 | |
9 | 9 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
10 | - exit('No direct script access allowed'); |
|
10 | + exit('No direct script access allowed'); |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | |
@@ -27,41 +27,41 @@ discard block |
||
27 | 27 | class CapChecker implements CommandBusMiddlewareInterface |
28 | 28 | { |
29 | 29 | |
30 | - /** |
|
31 | - * @type CapabilitiesCheckerInterface $capabilities_checker |
|
32 | - */ |
|
33 | - private $capabilities_checker; |
|
30 | + /** |
|
31 | + * @type CapabilitiesCheckerInterface $capabilities_checker |
|
32 | + */ |
|
33 | + private $capabilities_checker; |
|
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | - /** |
|
38 | - * CapChecker constructor |
|
39 | - * |
|
40 | - * @param CapabilitiesCheckerInterface $capabilities_checker |
|
41 | - */ |
|
42 | - public function __construct(CapabilitiesCheckerInterface $capabilities_checker) |
|
43 | - { |
|
44 | - $this->capabilities_checker = $capabilities_checker; |
|
45 | - } |
|
37 | + /** |
|
38 | + * CapChecker constructor |
|
39 | + * |
|
40 | + * @param CapabilitiesCheckerInterface $capabilities_checker |
|
41 | + */ |
|
42 | + public function __construct(CapabilitiesCheckerInterface $capabilities_checker) |
|
43 | + { |
|
44 | + $this->capabilities_checker = $capabilities_checker; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | 48 | |
49 | - /** |
|
50 | - * @param CommandInterface $command |
|
51 | - * @param Closure $next |
|
52 | - * @return mixed |
|
53 | - * @throws \EventEspresso\core\exceptions\InsufficientPermissionsException |
|
54 | - * @throws \EventEspresso\core\exceptions\InvalidClassException |
|
55 | - */ |
|
56 | - public function handle(CommandInterface $command, Closure $next) |
|
57 | - { |
|
58 | - if ( $command instanceof CommandRequiresCapCheckInterface) { |
|
59 | - $this->capabilities_checker->processCapCheck( |
|
60 | - $command->getCapCheck() |
|
61 | - ); |
|
62 | - } |
|
63 | - return $next($command); |
|
64 | - } |
|
49 | + /** |
|
50 | + * @param CommandInterface $command |
|
51 | + * @param Closure $next |
|
52 | + * @return mixed |
|
53 | + * @throws \EventEspresso\core\exceptions\InsufficientPermissionsException |
|
54 | + * @throws \EventEspresso\core\exceptions\InvalidClassException |
|
55 | + */ |
|
56 | + public function handle(CommandInterface $command, Closure $next) |
|
57 | + { |
|
58 | + if ( $command instanceof CommandRequiresCapCheckInterface) { |
|
59 | + $this->capabilities_checker->processCapCheck( |
|
60 | + $command->getCapCheck() |
|
61 | + ); |
|
62 | + } |
|
63 | + return $next($command); |
|
64 | + } |
|
65 | 65 | |
66 | 66 | |
67 | 67 | } |
@@ -20,24 +20,24 @@ |
||
20 | 20 | class AddActionHook implements CommandBusMiddlewareInterface |
21 | 21 | { |
22 | 22 | |
23 | - /** |
|
24 | - * @param CommandInterface $command |
|
25 | - * @param Closure $next |
|
26 | - * @return mixed |
|
27 | - */ |
|
28 | - public function handle(CommandInterface $command, Closure $next) |
|
29 | - { |
|
30 | - do_action( |
|
31 | - 'AHEE__EventEspresso_core_services_commands_middleware_AddActionHook__handle__before', |
|
32 | - $command |
|
33 | - ); |
|
34 | - $results = $next($command); |
|
35 | - do_action( |
|
36 | - 'AHEE__EventEspresso_core_services_commands_middleware_AddActionHook__handle__after', |
|
37 | - $command |
|
38 | - ); |
|
39 | - return $results; |
|
40 | - } |
|
23 | + /** |
|
24 | + * @param CommandInterface $command |
|
25 | + * @param Closure $next |
|
26 | + * @return mixed |
|
27 | + */ |
|
28 | + public function handle(CommandInterface $command, Closure $next) |
|
29 | + { |
|
30 | + do_action( |
|
31 | + 'AHEE__EventEspresso_core_services_commands_middleware_AddActionHook__handle__before', |
|
32 | + $command |
|
33 | + ); |
|
34 | + $results = $next($command); |
|
35 | + do_action( |
|
36 | + 'AHEE__EventEspresso_core_services_commands_middleware_AddActionHook__handle__after', |
|
37 | + $command |
|
38 | + ); |
|
39 | + return $results; |
|
40 | + } |
|
41 | 41 | } |
42 | 42 | // End of file AddActionHook.php |
43 | 43 | // Location: EventEspresso\core\services\commands\middleware/AddActionHook.php |
44 | 44 | \ No newline at end of file |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace EventEspresso\core\services\commands; |
4 | 4 | |
5 | -if (! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
6 | 6 | exit('No direct script access allowed'); |
7 | 7 | } |
8 | 8 |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | namespace EventEspresso\core\services\commands; |
4 | 4 | |
5 | 5 | if (! defined('EVENT_ESPRESSO_VERSION')) { |
6 | - exit('No direct script access allowed'); |
|
6 | + exit('No direct script access allowed'); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | |
@@ -21,59 +21,59 @@ discard block |
||
21 | 21 | abstract class CompositeCommandHandler extends CommandHandler |
22 | 22 | { |
23 | 23 | |
24 | - /** |
|
25 | - * @type CommandBusInterface $command_bus |
|
26 | - */ |
|
27 | - private $command_bus; |
|
24 | + /** |
|
25 | + * @type CommandBusInterface $command_bus |
|
26 | + */ |
|
27 | + private $command_bus; |
|
28 | 28 | |
29 | - /** |
|
30 | - * @type CommandFactoryInterface $command_factory |
|
31 | - */ |
|
32 | - private $command_factory; |
|
29 | + /** |
|
30 | + * @type CommandFactoryInterface $command_factory |
|
31 | + */ |
|
32 | + private $command_factory; |
|
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | - /** |
|
37 | - * CompositeCommandHandler constructor. |
|
38 | - * |
|
39 | - * @param CommandBusInterface $command_bus |
|
40 | - * @param CommandFactoryInterface $command_factory |
|
41 | - */ |
|
42 | - public function __construct(CommandBusInterface $command_bus, CommandFactoryInterface $command_factory) |
|
43 | - { |
|
44 | - $this->command_bus = $command_bus; |
|
45 | - $this->command_factory = $command_factory; |
|
46 | - } |
|
36 | + /** |
|
37 | + * CompositeCommandHandler constructor. |
|
38 | + * |
|
39 | + * @param CommandBusInterface $command_bus |
|
40 | + * @param CommandFactoryInterface $command_factory |
|
41 | + */ |
|
42 | + public function __construct(CommandBusInterface $command_bus, CommandFactoryInterface $command_factory) |
|
43 | + { |
|
44 | + $this->command_bus = $command_bus; |
|
45 | + $this->command_factory = $command_factory; |
|
46 | + } |
|
47 | 47 | |
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * @param CommandBusInterface $command_bus |
|
52 | - */ |
|
53 | - public function setCommandBus(CommandBusInterface $command_bus) |
|
54 | - { |
|
55 | - $this->command_bus = $command_bus; |
|
56 | - } |
|
50 | + /** |
|
51 | + * @param CommandBusInterface $command_bus |
|
52 | + */ |
|
53 | + public function setCommandBus(CommandBusInterface $command_bus) |
|
54 | + { |
|
55 | + $this->command_bus = $command_bus; |
|
56 | + } |
|
57 | 57 | |
58 | 58 | |
59 | 59 | |
60 | - /** |
|
61 | - * @return CommandBusInterface |
|
62 | - */ |
|
63 | - public function commandBus() |
|
64 | - { |
|
65 | - return $this->command_bus; |
|
66 | - } |
|
60 | + /** |
|
61 | + * @return CommandBusInterface |
|
62 | + */ |
|
63 | + public function commandBus() |
|
64 | + { |
|
65 | + return $this->command_bus; |
|
66 | + } |
|
67 | 67 | |
68 | 68 | |
69 | 69 | |
70 | - /** |
|
71 | - * @return CommandFactoryInterface |
|
72 | - */ |
|
73 | - public function commandFactory() |
|
74 | - { |
|
75 | - return $this->command_factory; |
|
76 | - } |
|
70 | + /** |
|
71 | + * @return CommandFactoryInterface |
|
72 | + */ |
|
73 | + public function commandFactory() |
|
74 | + { |
|
75 | + return $this->command_factory; |
|
76 | + } |
|
77 | 77 | |
78 | 78 | |
79 | 79 |