@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -97,67 +97,67 @@ discard block |
||
97 | 97 | 'message_type' => $message_type, |
98 | 98 | 'message' => $message |
99 | 99 | ); |
100 | - $this->_init_data( $template, $data, $valid_shortcodes, $extra_data ); |
|
100 | + $this->_init_data($template, $data, $valid_shortcodes, $extra_data); |
|
101 | 101 | $this->_template = is_array($template) ? $template['main'] : $template; |
102 | 102 | return $this->_parse_message_template(); |
103 | 103 | } |
104 | 104 | |
105 | 105 | |
106 | - public function parse_attendee_list_template( $template, EE_Registration $registration, $valid_shortcodes, $extra_data = array() ) { |
|
107 | - $this->_init_data( $template, $registration, $valid_shortcodes, $extra_data ); |
|
106 | + public function parse_attendee_list_template($template, EE_Registration $registration, $valid_shortcodes, $extra_data = array()) { |
|
107 | + $this->_init_data($template, $registration, $valid_shortcodes, $extra_data); |
|
108 | 108 | $this->_template = is_array($template) ? $template['attendee_list'] : $template; |
109 | 109 | return $this->_parse_message_template(); |
110 | 110 | } |
111 | 111 | |
112 | - public function parse_event_list_template( $template, EE_Event $event, $valid_shortcodes, $extra_data = array() ) { |
|
113 | - $this->_init_data( $template, $event, $valid_shortcodes, $extra_data ); |
|
112 | + public function parse_event_list_template($template, EE_Event $event, $valid_shortcodes, $extra_data = array()) { |
|
113 | + $this->_init_data($template, $event, $valid_shortcodes, $extra_data); |
|
114 | 114 | $this->_template = is_array($template) ? $template['event_list'] : $template; |
115 | 115 | return $this->_parse_message_template(); |
116 | 116 | } |
117 | 117 | |
118 | 118 | |
119 | - public function parse_ticket_list_template( $template, EE_Ticket $ticket, $valid_shortcodes, $extra_data = array() ) { |
|
120 | - $this->_init_data( $template, $ticket, $valid_shortcodes, $extra_data ); |
|
119 | + public function parse_ticket_list_template($template, EE_Ticket $ticket, $valid_shortcodes, $extra_data = array()) { |
|
120 | + $this->_init_data($template, $ticket, $valid_shortcodes, $extra_data); |
|
121 | 121 | $this->_template = is_array($template) ? $template['ticket_list'] : $template; |
122 | 122 | return $this->_parse_message_template(); |
123 | 123 | } |
124 | 124 | |
125 | 125 | |
126 | 126 | |
127 | - public function parse_line_item_list_template( $template, EE_Line_Item $line_item, $valid_shortcodes, $extra_data = array() ) { |
|
128 | - $this->_init_data( $template, $line_item, $valid_shortcodes, $extra_data ); |
|
129 | - $this->_template = is_array( $template ) ? $template['ticket_line_item_no_pms'] : $template; |
|
127 | + public function parse_line_item_list_template($template, EE_Line_Item $line_item, $valid_shortcodes, $extra_data = array()) { |
|
128 | + $this->_init_data($template, $line_item, $valid_shortcodes, $extra_data); |
|
129 | + $this->_template = is_array($template) ? $template['ticket_line_item_no_pms'] : $template; |
|
130 | 130 | return $this->_parse_message_template(); |
131 | 131 | } |
132 | 132 | |
133 | 133 | |
134 | - public function parse_payment_list_template( $template, EE_Payment $payment_item, $valid_shortcodes, $extra_data = array() ) { |
|
135 | - $this->_init_data( $template, $payment_item, $valid_shortcodes, $extra_data ); |
|
136 | - $this->_template = is_array( $template ) ? $template['payment_list'] : $template; |
|
134 | + public function parse_payment_list_template($template, EE_Payment $payment_item, $valid_shortcodes, $extra_data = array()) { |
|
135 | + $this->_init_data($template, $payment_item, $valid_shortcodes, $extra_data); |
|
136 | + $this->_template = is_array($template) ? $template['payment_list'] : $template; |
|
137 | 137 | return $this->_parse_message_template(); |
138 | 138 | } |
139 | 139 | |
140 | 140 | |
141 | - public function parse_datetime_list_template( $template, EE_Datetime $datetime, $valid_shortcodes, $extra_data = array() ) { |
|
142 | - $this->_init_data( $template, $datetime, $valid_shortcodes, $extra_data ); |
|
141 | + public function parse_datetime_list_template($template, EE_Datetime $datetime, $valid_shortcodes, $extra_data = array()) { |
|
142 | + $this->_init_data($template, $datetime, $valid_shortcodes, $extra_data); |
|
143 | 143 | $this->_template = is_array($template) ? $template['datetime_list'] : $template; |
144 | 144 | return $this->_parse_message_template(); |
145 | 145 | } |
146 | 146 | |
147 | 147 | |
148 | - public function parse_question_list_template( $template, EE_Answer $answer, $valid_shortcodes, $extra_data = array() ) { |
|
149 | - $this->_init_data( $template, $answer, $valid_shortcodes, $extra_data ); |
|
148 | + public function parse_question_list_template($template, EE_Answer $answer, $valid_shortcodes, $extra_data = array()) { |
|
149 | + $this->_init_data($template, $answer, $valid_shortcodes, $extra_data); |
|
150 | 150 | $this->_template = is_array($template) ? $template['question_list'] : $template; |
151 | 151 | return $this->_parse_message_template(); |
152 | 152 | } |
153 | 153 | |
154 | 154 | |
155 | - private function _init_data( $template, $data, $valid_shortcodes, $extra_data = array() ) { |
|
155 | + private function _init_data($template, $data, $valid_shortcodes, $extra_data = array()) { |
|
156 | 156 | $this->_reset_props(); |
157 | 157 | $this->_data['template'] = $template; |
158 | 158 | $this->_data['data'] = $data; |
159 | 159 | $this->_data['extra_data'] = $extra_data; |
160 | - $this->_set_shortcodes( $valid_shortcodes ); |
|
160 | + $this->_set_shortcodes($valid_shortcodes); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | private function _parse_message_template() { |
177 | 177 | //now let's get a list of shortcodes that are found in the given template |
178 | - preg_match_all( '/(\[.+?\])/', $this->_template, $matches ); |
|
178 | + preg_match_all('/(\[.+?\])/', $this->_template, $matches); |
|
179 | 179 | $shortcodes = (array) $matches[0]; //this should be an array of shortcodes in the template string. |
180 | 180 | |
181 | 181 | $matched_code = array(); |
@@ -200,30 +200,30 @@ discard block |
||
200 | 200 | '[PAYMENT_LIST_*]' |
201 | 201 | ); |
202 | 202 | |
203 | - $list_type_shortcodes = apply_filters( 'FHEE__EEH_Parse_Shortcodes___parse_message_template__list_type_shortcodes', $list_type_shortcodes ); |
|
203 | + $list_type_shortcodes = apply_filters('FHEE__EEH_Parse_Shortcodes___parse_message_template__list_type_shortcodes', $list_type_shortcodes); |
|
204 | 204 | |
205 | 205 | //now lets go ahead and loop through our parsers for each shortcode and setup the values |
206 | - foreach ( $shortcodes as $shortcode ) { |
|
206 | + foreach ($shortcodes as $shortcode) { |
|
207 | 207 | |
208 | - foreach ( $this->_shortcode_objs as $sc_obj ) { |
|
209 | - if ( $sc_obj instanceof EE_Shortcodes ){ |
|
208 | + foreach ($this->_shortcode_objs as $sc_obj) { |
|
209 | + if ($sc_obj instanceof EE_Shortcodes) { |
|
210 | 210 | //we need to setup any dynamic shortcodes so that they work with the array_key_exists |
211 | - preg_match_all( '/(\[[A-Za-z0-9\_]+_\*)/', $shortcode, $matches ); |
|
212 | - $sc_to_verify = !empty($matches[0] ) ? $matches[0][0] . ']' : $shortcode; |
|
211 | + preg_match_all('/(\[[A-Za-z0-9\_]+_\*)/', $shortcode, $matches); |
|
212 | + $sc_to_verify = ! empty($matches[0]) ? $matches[0][0].']' : $shortcode; |
|
213 | 213 | |
214 | - if ( !array_key_exists( $sc_to_verify, $sc_obj->get_shortcodes() ) ) { |
|
214 | + if ( ! array_key_exists($sc_to_verify, $sc_obj->get_shortcodes())) { |
|
215 | 215 | continue; //the given shortcode isn't in this object |
216 | 216 | } |
217 | 217 | |
218 | 218 | //if this isn't a "list" type shortcode then we'll send along the data vanilla instead of in an array. |
219 | - if ( ! in_array( $sc_to_verify, $list_type_shortcodes ) ) { |
|
220 | - $data_send = !is_object($this->_data) && isset($this->_data['data']) ? $this->_data['data'] : $this->_data; |
|
219 | + if ( ! in_array($sc_to_verify, $list_type_shortcodes)) { |
|
220 | + $data_send = ! is_object($this->_data) && isset($this->_data['data']) ? $this->_data['data'] : $this->_data; |
|
221 | 221 | } else { |
222 | 222 | $data_send = $this->_data; |
223 | 223 | } |
224 | 224 | |
225 | 225 | |
226 | - $parsed = $sc_obj->parser( $shortcode, $data_send, $this->_data['extra_data'] ); |
|
226 | + $parsed = $sc_obj->parser($shortcode, $data_send, $this->_data['extra_data']); |
|
227 | 227 | |
228 | 228 | $matched_code[] = $shortcode; |
229 | 229 | $sc_values[] = $parsed; |
@@ -246,12 +246,12 @@ discard block |
||
246 | 246 | * @param array $valid_shortcodes an array of strings corresponding to EE_Shortcode Library objects |
247 | 247 | * @return void |
248 | 248 | */ |
249 | - private function _set_shortcodes( $valid_shortcodes ) { |
|
250 | - foreach ( $valid_shortcodes as $shortcode_ref ) { |
|
251 | - $ref = ucwords( str_replace('_', ' ', $shortcode_ref ) ); |
|
252 | - $ref = str_replace( ' ', '_', $ref ); |
|
253 | - $classname = 'EE_' . $ref . '_Shortcodes'; |
|
254 | - if ( class_exists( $classname ) ) { |
|
249 | + private function _set_shortcodes($valid_shortcodes) { |
|
250 | + foreach ($valid_shortcodes as $shortcode_ref) { |
|
251 | + $ref = ucwords(str_replace('_', ' ', $shortcode_ref)); |
|
252 | + $ref = str_replace(' ', '_', $ref); |
|
253 | + $classname = 'EE_'.$ref.'_Shortcodes'; |
|
254 | + if (class_exists($classname)) { |
|
255 | 255 | $this->_shortcode_objs[] = new $classname; |
256 | 256 | } |
257 | 257 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Cancelled_Registration_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'cancelled_registration'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
47 | 47 | 'required' => array('[EVENT_LIST]') |
48 | 48 | ); |
49 | - $this->_messenger->set_validator_config( $new_config ); |
|
49 | + $this->_messenger->set_validator_config($new_config); |
|
50 | 50 | |
51 | - if ( $this->_context != 'admin' ) |
|
51 | + if ($this->_context != 'admin') |
|
52 | 52 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
53 | 53 | |
54 | 54 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Cancelled_Registration_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'cancelled_registration'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
47 | 47 | 'required' => array('[EVENT_LIST]') |
48 | 48 | ); |
49 | - $this->_messenger->set_validator_config( $new_config ); |
|
49 | + $this->_messenger->set_validator_config($new_config); |
|
50 | 50 | |
51 | - if ( $this->_context != 'admin' ) |
|
51 | + if ($this->_context != 'admin') |
|
52 | 52 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
53 | 53 | |
54 | 54 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Cancelled_Registration_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'cancelled_registration'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
47 | 47 | 'required' => array('[EVENT_LIST]') |
48 | 48 | ); |
49 | - $this->_messenger->set_validator_config( $new_config ); |
|
49 | + $this->_messenger->set_validator_config($new_config); |
|
50 | 50 | |
51 | - if ( $this->_context != 'admin' ) |
|
51 | + if ($this->_context != 'admin') |
|
52 | 52 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
53 | 53 | |
54 | 54 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Payment_Reminder_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'payment_reminder'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | |
46 | 46 | //modify just event_list |
47 | 47 | $new_config['event_list'] = array( |
48 | - 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
48 | + 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
49 | 49 | ); |
50 | 50 | $new_config['ticket_list'] = array( |
51 | 51 | 'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction') |
52 | 52 | ); |
53 | 53 | $new_config['content'] = array( |
54 | - 'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
54 | + 'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
55 | 55 | ); |
56 | - $this->_messenger->set_validator_config( $new_config ); |
|
56 | + $this->_messenger->set_validator_config($new_config); |
|
57 | 57 | |
58 | - if ( $this->_context != 'admin' ) |
|
58 | + if ($this->_context != 'admin') |
|
59 | 59 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
60 | 60 | |
61 | 61 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Cancelled_Registration_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'cancelled_registration'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
47 | 47 | 'required' => array('[EVENT_LIST]') |
48 | 48 | ); |
49 | - $this->_messenger->set_validator_config( $new_config ); |
|
49 | + $this->_messenger->set_validator_config($new_config); |
|
50 | 50 | |
51 | - if ( $this->_context != 'admin' ) |
|
51 | + if ($this->_context != 'admin') |
|
52 | 52 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
53 | 53 | |
54 | 54 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Payment_Reminder_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'payment_reminder'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | |
46 | 46 | //modify just event_list |
47 | 47 | $new_config['event_list'] = array( |
48 | - 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
48 | + 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
49 | 49 | ); |
50 | 50 | $new_config['ticket_list'] = array( |
51 | 51 | 'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction') |
52 | 52 | ); |
53 | 53 | $new_config['content'] = array( |
54 | - 'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
54 | + 'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
55 | 55 | ); |
56 | - $this->_messenger->set_validator_config( $new_config ); |
|
56 | + $this->_messenger->set_validator_config($new_config); |
|
57 | 57 | |
58 | - if ( $this->_context != 'admin' ) |
|
58 | + if ($this->_context != 'admin') |
|
59 | 59 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
60 | 60 | |
61 | 61 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * Identifier properties for the recipient |
23 | 23 | */ |
24 | - public $user_id; //if available we'll use this to set the fname and lname (admin) |
|
24 | + public $user_id; //if available we'll use this to set the fname and lname (admin) |
|
25 | 25 | public $fname; //this will always be the admin fname (set later via incoming user_id) |
26 | 26 | public $lname; //this will always be the admin lname (set later via incoming user_id) |
27 | 27 | public $primary_registration_id; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * @access public |
151 | 151 | * @param array $addressee_data We're expecting an incoming array of data that will be used to fill the properties for the object. |
152 | 152 | */ |
153 | - public function __construct( $addressee_data ) { |
|
153 | + public function __construct($addressee_data) { |
|
154 | 154 | $this->_data = $addressee_data; |
155 | 155 | $this->_set_properties(); |
156 | 156 | } |
@@ -166,15 +166,15 @@ discard block |
||
166 | 166 | */ |
167 | 167 | protected function _set_properties() { |
168 | 168 | |
169 | - foreach ( $this->_data as $prop => $value ) { |
|
170 | - if( property_exists( $this, $prop ) ) |
|
169 | + foreach ($this->_data as $prop => $value) { |
|
170 | + if (property_exists($this, $prop)) |
|
171 | 171 | $this->$prop = $value; |
172 | 172 | } |
173 | 173 | |
174 | 174 | //if user_id present we'll use this to set the fname and lname and admin_email. |
175 | - if ( !empty( $this->user_id ) ) { |
|
175 | + if ( ! empty($this->user_id)) { |
|
176 | 176 | $this->user_id = (int) $this->user_id; |
177 | - $user = get_userdata( $this->user_id ); |
|
177 | + $user = get_userdata($this->user_id); |
|
178 | 178 | $this->fname = $user->user_firstname; |
179 | 179 | $this->lname = $user->user_lastname; |
180 | 180 | $this->admin_email = $user->user_email; |
@@ -1,7 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** |
7 | 8 | * EE_Messages_Addressee |
@@ -167,8 +168,9 @@ discard block |
||
167 | 168 | protected function _set_properties() { |
168 | 169 | |
169 | 170 | foreach ( $this->_data as $prop => $value ) { |
170 | - if( property_exists( $this, $prop ) ) |
|
171 | - $this->{$prop} = $value; |
|
171 | + if( property_exists( $this, $prop ) ) { |
|
172 | + $this->{$prop} = $value; |
|
173 | + } |
|
172 | 174 | } |
173 | 175 | |
174 | 176 | //if user_id present we'll use this to set the fname and lname and admin_email. |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | |
57 | 57 | protected function _set_admin_pages() { |
58 | - $this->admin_registered_pages = array( 'events_edit' => TRUE ); |
|
58 | + $this->admin_registered_pages = array('events_edit' => TRUE); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | |
@@ -68,17 +68,17 @@ discard block |
||
68 | 68 | |
69 | 69 | protected function _set_with_messengers() { |
70 | 70 | $this->_with_messengers = array( |
71 | - 'html' => array( 'pdf' ) |
|
71 | + 'html' => array('pdf') |
|
72 | 72 | ); |
73 | 73 | } |
74 | 74 | |
75 | 75 | |
76 | 76 | |
77 | - protected function _get_data_for_context( $context, EE_Registration $registration, $id ) { |
|
77 | + protected function _get_data_for_context($context, EE_Registration $registration, $id) { |
|
78 | 78 | //receipt message type data handler is 'Gateways' and it expects a transaction object. |
79 | 79 | $transaction = $registration->transaction(); |
80 | - if ( $transaction instanceof EE_Transaction ) { |
|
81 | - return array( $transaction ); |
|
80 | + if ($transaction instanceof EE_Transaction) { |
|
81 | + return array($transaction); |
|
82 | 82 | } |
83 | 83 | return array(); |
84 | 84 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return void |
118 | 118 | */ |
119 | 119 | protected function _set_valid_shortcodes() { |
120 | - $this->_valid_shortcodes[ 'purchaser' ] = array( |
|
120 | + $this->_valid_shortcodes['purchaser'] = array( |
|
121 | 121 | 'attendee_list', |
122 | 122 | 'attendee', |
123 | 123 | 'datetime_list', |