@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -125,44 +125,44 @@ discard block |
||
125 | 125 | |
126 | 126 | |
127 | 127 | protected function _start() { |
128 | - $content = '<h3>' . __('Venue Overview', 'event_espresso') . '</h3>'; |
|
129 | - $content .= '<p>' . __('This tour of the Venues Overview page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
128 | + $content = '<h3>'.__('Venue Overview', 'event_espresso').'</h3>'; |
|
129 | + $content .= '<p>'.__('This tour of the Venues Overview page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
130 | 130 | return $content; |
131 | 131 | } |
132 | 132 | |
133 | 133 | protected function _id_stop() { |
134 | - return '<p>' . __('View the venue ID. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
134 | + return '<p>'.__('View the venue ID. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | protected function _name_stop() { |
138 | - return '<p>' . __('View the name of each venue. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
138 | + return '<p>'.__('View the name of each venue. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | protected function _address_stop() { |
142 | - return '<p>' . __('View the address for each venue.', 'event_espresso') . '</p>'; |
|
142 | + return '<p>'.__('View the address for each venue.', 'event_espresso').'</p>'; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | protected function _city_stop() { |
146 | - return '<p>' . __('View the city for each venue. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
146 | + return '<p>'.__('View the city for each venue. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | protected function _capacity_stop() { |
150 | - return '<p>' . __('View the capacity for each venue. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
150 | + return '<p>'.__('View the capacity for each venue. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | protected function _shortcode_stop() { |
154 | - return '<p>' . __('View the shortcode for a venue. This shortcode can be added to an event, WordPress post, or WordPress page. ', 'event_espresso') . '</p>'; |
|
154 | + return '<p>'.__('View the shortcode for a venue. This shortcode can be added to an event, WordPress post, or WordPress page. ', 'event_espresso').'</p>'; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | protected function _bulk_actions_stop() { |
158 | - return '<p>' . __('Perform bulk actions to multiple venues.', 'event_espresso') . '</p>'; |
|
158 | + return '<p>'.__('Perform bulk actions to multiple venues.', 'event_espresso').'</p>'; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | protected function _search_stop() { |
162 | - return '<p>' . __('Search through venues. The following sources will be searched: Venue Name, Venue Description, Venue Short Description, Venue Address, Venue City, Venue Zip/Postal Code, Venue Phone, Venue URL, Venue Virtual Phone, Venue Google Map link, Event Name, Event Description, Event Phone, and Event External URL.', 'event_espresso') . '</p>'; |
|
162 | + return '<p>'.__('Search through venues. The following sources will be searched: Venue Name, Venue Description, Venue Short Description, Venue Address, Venue City, Venue Zip/Postal Code, Venue Phone, Venue URL, Venue Virtual Phone, Venue Google Map link, Event Name, Event Description, Event Phone, and Event External URL.', 'event_espresso').'</p>'; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | protected function _new_venue_stop() { |
166 | - return '<p>' . __('Click here to add a new venue.', 'event_espresso') . '</p>'; |
|
166 | + return '<p>'.__('Click here to add a new venue.', 'event_espresso').'</p>'; |
|
167 | 167 | } |
168 | 168 | } |
169 | 169 | \ No newline at end of file |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -3,11 +3,11 @@ discard block |
||
3 | 3 | <td valign="top" class="use-ven-manager"> |
4 | 4 | <label><?php _e('Select from Venue Manager List', 'event_espresso'); ?></label> |
5 | 5 | <?php echo $venue_selector; ?> |
6 | - <?php foreach ( $venues as $venue ) : |
|
6 | + <?php foreach ($venues as $venue) : |
|
7 | 7 | $selected = $evt_venue_id == $venue->ID() ? '' : ' style="display:none;"'; |
8 | - $edit_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'edit', 'post' => $venue->ID() ), EE_VENUES_ADMIN_URL ); |
|
9 | - $state_name = is_object( $venue->state_obj() ) ? $venue->state_obj()->name() : NULL; |
|
10 | - $country_name = is_object( $venue->country_obj() ) ? $venue->country_obj()->name() : NULL; |
|
8 | + $edit_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $venue->ID()), EE_VENUES_ADMIN_URL); |
|
9 | + $state_name = is_object($venue->state_obj()) ? $venue->state_obj()->name() : NULL; |
|
10 | + $country_name = is_object($venue->country_obj()) ? $venue->country_obj()->name() : NULL; |
|
11 | 11 | ?> |
12 | 12 | <fieldset id="eebox_<?php echo $venue->ID(); ?>" class="eebox"<?php echo $selected; ?>> |
13 | 13 | <ul class="address-view"> |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | <span><?php _e('State:', 'event_espresso'); ?></span> <?php echo $state_name; ?><br /> |
19 | 19 | <span><?php _e('Country:', 'event_espresso'); ?></span> <?php echo $country_name; ?><br /> |
20 | 20 | <span><?php _e('Venue ID:', 'event_espresso'); ?></span> <?php echo $venue->ID(); ?><br /></p> |
21 | - <!-- <?php printf( __('This venue\'s shortcode: %s[ESPRESSO_VENUE id="%d"]%s', 'event_espresso'), '<strong class="highlight">', $venue->ID(), '</strong>' ); ?><br /> --> |
|
21 | + <!-- <?php printf(__('This venue\'s shortcode: %s[ESPRESSO_VENUE id="%d"]%s', 'event_espresso'), '<strong class="highlight">', $venue->ID(), '</strong>'); ?><br /> --> |
|
22 | 22 | <a href="<?php echo $edit_url; ?>" target="_blank"><?php _e('Edit this Venue', 'event_espresso'); ?></a> |
23 | 23 | </li> |
24 | 24 | </ul> |
@@ -87,19 +87,19 @@ discard block |
||
87 | 87 | <td> |
88 | 88 | <label for="event_details_control_type-default" class="ee-admin-radio-lbl"> |
89 | 89 | <?php $checked = $map_settings->event_details_control_type == 'default' ? 'checked="checked"' : ''; ?> |
90 | - <input id="event_details_control_type-default" type="radio" name="event_details_control_type" value="default"<?php echo $checked;?>/> |
|
90 | + <input id="event_details_control_type-default" type="radio" name="event_details_control_type" value="default"<?php echo $checked; ?>/> |
|
91 | 91 | <?php _e(' Default', 'event_espresso') ?> |
92 | 92 | </label> |
93 | 93 | |
94 | 94 | <label for="event_details_control_type-horizontal" class="ee-admin-radio-lbl"> |
95 | 95 | <?php $checked = $map_settings->event_details_control_type == 'horizontal' ? 'checked="checked"' : ''; ?> |
96 | - <input id="event_details_control_type-horizontal" type="radio" name="event_details_control_type" value="horizontal"<?php echo $checked;?>/> |
|
96 | + <input id="event_details_control_type-horizontal" type="radio" name="event_details_control_type" value="horizontal"<?php echo $checked; ?>/> |
|
97 | 97 | <?php _e(' Horizontal', 'event_espresso') ?> |
98 | 98 | </label> |
99 | 99 | |
100 | 100 | <label for="event_details_control_type-dropdown" class="ee-admin-radio-lbl"> |
101 | 101 | <?php $checked = $map_settings->event_details_control_type == 'dropdown' ? 'checked="checked"' : ''; ?> |
102 | - <input id="event_details_control_type-dropdown" type="radio" name="event_details_control_type" value="dropdown"<?php echo $checked;?>/> |
|
102 | + <input id="event_details_control_type-dropdown" type="radio" name="event_details_control_type" value="dropdown"<?php echo $checked; ?>/> |
|
103 | 103 | <?php _e(' Dropdown', 'event_espresso') ?> |
104 | 104 | </label> |
105 | 105 | </td> |
@@ -112,25 +112,25 @@ discard block |
||
112 | 112 | <td> |
113 | 113 | <label for="event_details_map_align-none" class="ee-admin-radio-lbl"> |
114 | 114 | <?php $checked = $map_settings->event_details_map_align == 'none' ? 'checked="checked"' : ''; ?> |
115 | - <input id="event_details_map_align-none" type="radio" name="event_details_map_align" value="none"<?php echo $checked;?>/> |
|
115 | + <input id="event_details_map_align-none" type="radio" name="event_details_map_align" value="none"<?php echo $checked; ?>/> |
|
116 | 116 | <?php _e(' None', 'event_espresso') ?> |
117 | 117 | </label> |
118 | 118 | |
119 | 119 | <label for="event_details_map_align-left" class="ee-admin-radio-lbl"> |
120 | 120 | <?php $checked = $map_settings->event_details_map_align == 'left' ? 'checked="checked"' : ''; ?> |
121 | - <input id="event_details_map_align-left" type="radio" name="event_details_map_align" value="left"<?php echo $checked;?>/> |
|
121 | + <input id="event_details_map_align-left" type="radio" name="event_details_map_align" value="left"<?php echo $checked; ?>/> |
|
122 | 122 | <?php _e(' Align Left', 'event_espresso') ?> |
123 | 123 | </label> |
124 | 124 | |
125 | 125 | <label for="event_details_map_align-center" class="ee-admin-radio-lbl"> |
126 | 126 | <?php $checked = $map_settings->event_details_map_align == 'center' ? 'checked="checked"' : ''; ?> |
127 | - <input id="event_details_map_align-center" type="radio" name="event_details_map_align" value="center"<?php echo $checked;?>/> |
|
127 | + <input id="event_details_map_align-center" type="radio" name="event_details_map_align" value="center"<?php echo $checked; ?>/> |
|
128 | 128 | <?php _e(' Align Center', 'event_espresso') ?> |
129 | 129 | </label> |
130 | 130 | |
131 | 131 | <label for="event_details_map_align-right" class="ee-admin-radio-lbl"> |
132 | 132 | <?php $checked = $map_settings->event_details_map_align == 'right' ? 'checked="checked"' : ''; ?> |
133 | - <input id="event_details_map_align-right" type="radio" name="event_details_map_align" value="right"<?php echo $checked;?>/> |
|
133 | + <input id="event_details_map_align-right" type="radio" name="event_details_map_align" value="right"<?php echo $checked; ?>/> |
|
134 | 134 | <?php _e(' Align Right', 'event_espresso') ?> |
135 | 135 | </label> |
136 | 136 | </td> |
@@ -205,19 +205,19 @@ discard block |
||
205 | 205 | <td> |
206 | 206 | <label for="event_list_control_type-default" class="ee-admin-radio-lbl"> |
207 | 207 | <?php $checked = $map_settings->event_list_control_type == 'default' ? 'checked="checked"' : ''; ?> |
208 | - <input id="event_list_control_type-default" type="radio" name="event_list_control_type" value="default"<?php echo $checked;?>/> |
|
208 | + <input id="event_list_control_type-default" type="radio" name="event_list_control_type" value="default"<?php echo $checked; ?>/> |
|
209 | 209 | <?php _e(' Default', 'event_espresso') ?> |
210 | 210 | </label> |
211 | 211 | |
212 | 212 | <label for="event_list_control_type-horizontal" class="ee-admin-radio-lbl"> |
213 | 213 | <?php $checked = $map_settings->event_list_control_type == 'horizontal' ? 'checked="checked"' : ''; ?> |
214 | - <input id="event_list_control_type-horizontal" type="radio" name="event_list_control_type" value="horizontal"<?php echo $checked;?>/> |
|
214 | + <input id="event_list_control_type-horizontal" type="radio" name="event_list_control_type" value="horizontal"<?php echo $checked; ?>/> |
|
215 | 215 | <?php _e(' Horizontal', 'event_espresso') ?> |
216 | 216 | </label> |
217 | 217 | |
218 | 218 | <label for="event_list_control_type-dropdown" class="ee-admin-radio-lbl"> |
219 | 219 | <?php $checked = $map_settings->event_list_control_type == 'dropdown' ? 'checked="checked"' : ''; ?> |
220 | - <input id="event_list_control_type-dropdown" type="radio" name="event_list_control_type" value="dropdown"<?php echo $checked;?>/> |
|
220 | + <input id="event_list_control_type-dropdown" type="radio" name="event_list_control_type" value="dropdown"<?php echo $checked; ?>/> |
|
221 | 221 | <?php _e(' Dropdown', 'event_espresso') ?> |
222 | 222 | </label> |
223 | 223 | |
@@ -231,25 +231,25 @@ discard block |
||
231 | 231 | <td> |
232 | 232 | <label for="event_list_map_align-none" class="ee-admin-radio-lbl"> |
233 | 233 | <?php $checked = $map_settings->event_list_map_align == 'none' ? 'checked="checked"' : ''; ?> |
234 | - <input id="event_list_map_align-none" type="radio" name="event_list_map_align" value="none"<?php echo $checked;?>/> |
|
234 | + <input id="event_list_map_align-none" type="radio" name="event_list_map_align" value="none"<?php echo $checked; ?>/> |
|
235 | 235 | <?php _e(' None', 'event_espresso') ?> |
236 | 236 | </label> |
237 | 237 | |
238 | 238 | <label for="event_list_map_align-left" class="ee-admin-radio-lbl"> |
239 | 239 | <?php $checked = $map_settings->event_list_map_align == 'left' ? 'checked="checked"' : ''; ?> |
240 | - <input id="event_list_map_align-left" type="radio" name="event_list_map_align" value="left"<?php echo $checked;?>/> |
|
240 | + <input id="event_list_map_align-left" type="radio" name="event_list_map_align" value="left"<?php echo $checked; ?>/> |
|
241 | 241 | <?php _e(' Align Left', 'event_espresso') ?> |
242 | 242 | </label> |
243 | 243 | |
244 | 244 | <label for="event_list_map_align-center" class="ee-admin-radio-lbl"> |
245 | 245 | <?php $checked = $map_settings->event_list_map_align == 'center' ? 'checked="checked"' : ''; ?> |
246 | - <input id="event_list_map_align-center" type="radio" name="event_list_map_align" value="center"<?php echo $checked;?>/> |
|
246 | + <input id="event_list_map_align-center" type="radio" name="event_list_map_align" value="center"<?php echo $checked; ?>/> |
|
247 | 247 | <?php _e(' Align Center', 'event_espresso') ?> |
248 | 248 | </label> |
249 | 249 | |
250 | 250 | <label for="event_list_map_align-right" class="ee-admin-radio-lbl"> |
251 | 251 | <?php $checked = $map_settings->event_list_map_align == 'right' ? 'checked="checked"' : ''; ?> |
252 | - <input id="event_list_map_align-right" type="radio" name="event_list_map_align" value="right"<?php echo $checked;?>/> |
|
252 | + <input id="event_list_map_align-right" type="radio" name="event_list_map_align" value="right"<?php echo $checked; ?>/> |
|
253 | 253 | <?php _e(' Align Right', 'event_espresso') ?> |
254 | 254 | </label> |
255 | 255 |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <tr> |
3 | 3 | <td valign="top"> |
4 | 4 | <fieldset> |
5 | - <?php if( isset( EE_Registry::instance()->CFG->map_settings ) && isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) && EE_Registry::instance()->CFG->map_settings->use_google_maps ) { ?> |
|
5 | + <?php if (isset(EE_Registry::instance()->CFG->map_settings) && isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) && EE_Registry::instance()->CFG->map_settings->use_google_maps) { ?> |
|
6 | 6 | <p> |
7 | 7 | <label for="enable_for_gmap"> |
8 | 8 | <?php _e('Display Google Map for this venue? ', 'event_espresso') ?> |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | <input type="text" name="vnu_google_map_link" value="<?php echo $vnu_google_map_link; ?>" class="all-options" /> |
15 | 15 | </p> --> |
16 | 16 | <?php } ?> |
17 | - <?php if( ! isset( EE_Registry::instance()->CFG->map_settings ) || ! isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) || ! EE_Registry::instance()->CFG->map_settings->use_google_maps ) { ?> |
|
17 | + <?php if ( ! isset(EE_Registry::instance()->CFG->map_settings) || ! isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) || ! EE_Registry::instance()->CFG->map_settings->use_google_maps) { ?> |
|
18 | 18 | <p class="ee-notice"> |
19 | 19 | <?php |
20 | 20 | echo sprintf( |
21 | - __('To display a Google Map for event venues, go to %sEvent Espresso General Settings%sGoogle Maps%s, and set "Activate Google Maps" to "Yes"', 'event_espresso' ), |
|
21 | + __('To display a Google Map for event venues, go to %sEvent Espresso General Settings%sGoogle Maps%s, and set "Activate Google Maps" to "Yes"', 'event_espresso'), |
|
22 | 22 | '<b>', |
23 | 23 | '</b> » <b>', |
24 | 24 | '</b>' |
@@ -33,7 +33,7 @@ |
||
33 | 33 | <tbody> |
34 | 34 | <tr> |
35 | 35 | <td> |
36 | - <h2><?php printf( __('Hello, %s:', 'event_espresso'), '[RECIPIENT_FNAME]' ); ?></h2> |
|
36 | + <h2><?php printf(__('Hello, %s:', 'event_espresso'), '[RECIPIENT_FNAME]'); ?></h2> |
|
37 | 37 | <p class="lead"><?php _e("We've got a few things we want to share with you!", 'event_espresso'); ?></p> |
38 | 38 | <div> |
39 | 39 | [NEWSLETTER_CONTENT] |
@@ -1,1 +1,1 @@ |
||
1 | -<?php printf( __('Message from %s', 'event_espresso'), EE_Registry::instance()->CFG->organization->get_pretty( 'name' ) ); ?> |
|
1 | +<?php printf(__('Message from %s', 'event_espresso'), EE_Registry::instance()->CFG->organization->get_pretty('name')); ?> |
@@ -80,7 +80,7 @@ |
||
80 | 80 | //remove unwanted transaction shortcode |
81 | 81 | foreach ( $this->_valid_shortcodes as $context => $shortcodes ) { |
82 | 82 | if( ($key = array_search('transaction', $shortcodes) ) !== false) { |
83 | - unset($this->_valid_shortcodes[$context][$key]); |
|
83 | + unset($this->_valid_shortcodes[$context][$key]); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | } |
@@ -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 | /** |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | parent::_set_valid_shortcodes(); |
79 | 79 | |
80 | 80 | //remove unwanted transaction shortcode |
81 | - foreach ( $this->_valid_shortcodes as $context => $shortcodes ) { |
|
82 | - if( ($key = array_search('transaction', $shortcodes) ) !== false) { |
|
81 | + foreach ($this->_valid_shortcodes as $context => $shortcodes) { |
|
82 | + if (($key = array_search('transaction', $shortcodes)) !== false) { |
|
83 | 83 | unset($this->_valid_shortcodes[$context][$key]); |
84 | 84 | } |
85 | 85 | } |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | * @param EE_Attendee[] $data expecting an array of EE_Attendee objects. |
27 | 27 | * @access protected |
28 | 28 | */ |
29 | - public function __construct( $data = array() ) { |
|
29 | + public function __construct($data = array()) { |
|
30 | 30 | |
31 | 31 | //validate that the first element in the array is an EE_Attendee object. Note that the array may be indexed by REG_ID so we will just shift off the first element. |
32 | - $ctc_chk = reset( $data ); |
|
33 | - if ( ! $ctc_chk instanceof EE_Attendee ) |
|
34 | - throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') ); |
|
32 | + $ctc_chk = reset($data); |
|
33 | + if ( ! $ctc_chk instanceof EE_Attendee) |
|
34 | + throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso')); |
|
35 | 35 | |
36 | - parent::__construct( $data ); |
|
36 | + parent::__construct($data); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $this->payment = NULL; |
59 | 59 | $this->billing = array(); |
60 | 60 | $this->reg_objs = array(); |
61 | - $this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer = $this->registrations = array(); |
|
61 | + $this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer = $this->registrations = array(); |
|
62 | 62 | $this->total_ticket_count = 0; |
63 | 63 | $this->primary_attendee_data = array( |
64 | 64 | 'registration_id' => 0, |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'primary_reg_obj' => NULL |
69 | 69 | ); |
70 | 70 | |
71 | - foreach ( $this->_data as $contact ) { |
|
71 | + foreach ($this->_data as $contact) { |
|
72 | 72 | $id = $contact->ID(); |
73 | 73 | $reg = $contact->get_first_related('Registration'); |
74 | 74 | $this->attendees[$id]['att_obj'] = $contact; |
@@ -5,7 +5,9 @@ discard block |
||
5 | 5 | * @subpackage helpers |
6 | 6 | * @since 4.3.0 |
7 | 7 | */ |
8 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
8 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
9 | + exit('No direct script access allowed'); |
|
10 | +} |
|
9 | 11 | |
10 | 12 | /** |
11 | 13 | * This prepares data for message types that send messages for multiple contacts and handles |
@@ -30,8 +32,9 @@ discard block |
||
30 | 32 | |
31 | 33 | //validate that the first element in the array is an EE_Attendee object. Note that the array may be indexed by REG_ID so we will just shift off the first element. |
32 | 34 | $ctc_chk = reset( $data ); |
33 | - if ( ! $ctc_chk instanceof EE_Attendee ) |
|
34 | - throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') ); |
|
35 | + if ( ! $ctc_chk instanceof EE_Attendee ) { |
|
36 | + throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') ); |
|
37 | + } |
|
35 | 38 | |
36 | 39 | parent::__construct( $data ); |
37 | 40 | } |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file contains the EE_Messages_Contacts_incoming_data class. |
|
4 | - * @package Event Espresso |
|
5 | - * @subpackage helpers |
|
6 | - * @since 4.3.0 |
|
7 | - */ |
|
3 | + * This file contains the EE_Messages_Contacts_incoming_data class. |
|
4 | + * @package Event Espresso |
|
5 | + * @subpackage helpers |
|
6 | + * @since 4.3.0 |
|
7 | + */ |
|
8 | 8 | if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
9 | 9 | |
10 | 10 | /** |
@@ -19,63 +19,63 @@ discard block |
||
19 | 19 | class EE_Messages_Contacts_incoming_data extends EE_Messages_incoming_data { |
20 | 20 | |
21 | 21 | |
22 | - /** |
|
23 | - * Constructor. |
|
24 | - * |
|
25 | - * @since 4.3.0 |
|
26 | - * @param EE_Attendee[] $data expecting an array of EE_Attendee objects. |
|
27 | - * @access protected |
|
28 | - */ |
|
29 | - public function __construct( $data = array() ) { |
|
22 | + /** |
|
23 | + * Constructor. |
|
24 | + * |
|
25 | + * @since 4.3.0 |
|
26 | + * @param EE_Attendee[] $data expecting an array of EE_Attendee objects. |
|
27 | + * @access protected |
|
28 | + */ |
|
29 | + public function __construct( $data = array() ) { |
|
30 | 30 | |
31 | - //validate that the first element in the array is an EE_Attendee object. Note that the array may be indexed by REG_ID so we will just shift off the first element. |
|
32 | - $ctc_chk = reset( $data ); |
|
33 | - if ( ! $ctc_chk instanceof EE_Attendee ) |
|
34 | - throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') ); |
|
31 | + //validate that the first element in the array is an EE_Attendee object. Note that the array may be indexed by REG_ID so we will just shift off the first element. |
|
32 | + $ctc_chk = reset( $data ); |
|
33 | + if ( ! $ctc_chk instanceof EE_Attendee ) |
|
34 | + throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') ); |
|
35 | 35 | |
36 | - parent::__construct( $data ); |
|
37 | - } |
|
36 | + parent::__construct( $data ); |
|
37 | + } |
|
38 | 38 | |
39 | 39 | |
40 | 40 | |
41 | - /** |
|
42 | - * setup the data. |
|
43 | - * |
|
44 | - * Sets up the expected data object for the messages prep using incoming registration objects. |
|
45 | - * |
|
46 | - * @since 4.3.0 |
|
47 | - * |
|
48 | - * @return void |
|
49 | - * @access protected |
|
50 | - */ |
|
51 | - protected function _setup_data() { |
|
41 | + /** |
|
42 | + * setup the data. |
|
43 | + * |
|
44 | + * Sets up the expected data object for the messages prep using incoming registration objects. |
|
45 | + * |
|
46 | + * @since 4.3.0 |
|
47 | + * |
|
48 | + * @return void |
|
49 | + * @access protected |
|
50 | + */ |
|
51 | + protected function _setup_data() { |
|
52 | 52 | |
53 | - //we'll loop through each contact and setup the data needed. Note that many properties will just be set as empty because the contacts data handler is for a very specific set of data (i.e. just what's related to the contact). |
|
54 | - $this->txn = NULL; |
|
55 | - $this->taxes = NULL; |
|
56 | - $this->grand_total_price_object = ''; |
|
57 | - $this->user_id = $this->ip_address = $this->user_agent = $this->init_access = ''; |
|
58 | - $this->payment = NULL; |
|
59 | - $this->billing = array(); |
|
60 | - $this->reg_objs = array(); |
|
61 | - $this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer = $this->registrations = array(); |
|
62 | - $this->total_ticket_count = 0; |
|
63 | - $this->primary_attendee_data = array( |
|
64 | - 'registration_id' => 0, |
|
65 | - 'att_obj' => NULL, |
|
66 | - 'reg_obj' => NULL, |
|
67 | - 'primary_att_obj' => NULL, |
|
68 | - 'primary_reg_obj' => NULL |
|
69 | - ); |
|
53 | + //we'll loop through each contact and setup the data needed. Note that many properties will just be set as empty because the contacts data handler is for a very specific set of data (i.e. just what's related to the contact). |
|
54 | + $this->txn = NULL; |
|
55 | + $this->taxes = NULL; |
|
56 | + $this->grand_total_price_object = ''; |
|
57 | + $this->user_id = $this->ip_address = $this->user_agent = $this->init_access = ''; |
|
58 | + $this->payment = NULL; |
|
59 | + $this->billing = array(); |
|
60 | + $this->reg_objs = array(); |
|
61 | + $this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer = $this->registrations = array(); |
|
62 | + $this->total_ticket_count = 0; |
|
63 | + $this->primary_attendee_data = array( |
|
64 | + 'registration_id' => 0, |
|
65 | + 'att_obj' => NULL, |
|
66 | + 'reg_obj' => NULL, |
|
67 | + 'primary_att_obj' => NULL, |
|
68 | + 'primary_reg_obj' => NULL |
|
69 | + ); |
|
70 | 70 | |
71 | - foreach ( $this->_data as $contact ) { |
|
72 | - $id = $contact->ID(); |
|
73 | - $reg = $contact->get_first_related('Registration'); |
|
74 | - $this->attendees[$id]['att_obj'] = $contact; |
|
75 | - $this->attendees[$id]['reg_objs'][$reg->ID()] = $reg; |
|
76 | - $this->attendees[$id]['attendee_email'] = $contact->email(); |
|
77 | - $this->attendees[$id]['tkt_objs'] = array(); |
|
78 | - $this->attendees[$id]['evt_objs'] = array(); |
|
79 | - } |
|
80 | - } |
|
71 | + foreach ( $this->_data as $contact ) { |
|
72 | + $id = $contact->ID(); |
|
73 | + $reg = $contact->get_first_related('Registration'); |
|
74 | + $this->attendees[$id]['att_obj'] = $contact; |
|
75 | + $this->attendees[$id]['reg_objs'][$reg->ID()] = $reg; |
|
76 | + $this->attendees[$id]['attendee_email'] = $contact->email(); |
|
77 | + $this->attendees[$id]['tkt_objs'] = array(); |
|
78 | + $this->attendees[$id]['evt_objs'] = array(); |
|
79 | + } |
|
80 | + } |
|
81 | 81 | } |
@@ -18,27 +18,27 @@ |
||
18 | 18 | * @author Darren Ethier |
19 | 19 | */ |
20 | 20 | class EE_Messages_Email_Newsletter_Validator extends EE_Messages_Validator { |
21 | - public function __construct( $fields, $context ) { |
|
21 | + public function __construct($fields, $context) { |
|
22 | 22 | $this->_m_name = 'email'; |
23 | 23 | $this->_mt_name = 'newsletter'; |
24 | 24 | |
25 | - parent::__construct( $fields, $context ); |
|
25 | + parent::__construct($fields, $context); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
29 | 29 | * custom validator (restricting what was originally set by the messenger) |
30 | 30 | */ |
31 | 31 | protected function _modify_validator() { |
32 | - if ( $this->_context == 'attendee' ) |
|
32 | + if ($this->_context == 'attendee') |
|
33 | 33 | $this->_valid_shortcodes_modifier[$this->_context]['from'] = array('recipient_details', 'email', 'organization'); |
34 | 34 | |
35 | 35 | //excluded shortcodes |
36 | - $fields = array('to','from','subject','content','newsletter_content'); |
|
37 | - foreach ( $fields as $field ) { |
|
36 | + $fields = array('to', 'from', 'subject', 'content', 'newsletter_content'); |
|
37 | + foreach ($fields as $field) { |
|
38 | 38 | $this->_specific_shortcode_excludes[$field] = array('[RECIPIENT_REGISTRATION_CODE]', '[RECIPIENT_EDIT_REGISTRATION_LINK]', '[EVENT_AUTHOR_FORMATTED_EMAIL]', '[EVENT_AUTHOR_EMAIL]'); |
39 | 39 | } |
40 | - $add_excludes = array( '[RECIPIENT_FNAME]', '[RECIPIENT_LNAME]', '[RECIPIENT_EMAIL]', '[COMPANY]', '[CO_ADD1]','[CO_ADD2]', '[CO_CITY]', '[CO_STATE]','[CO_ZIP]','[CO_LOGO]','[CO_PHONE]','[CO_LOGO_URL]','[CO_FACEBOOK_URL]','[CO_TWITTER_URL]','[CO_PINTEREST_URL]','[CO_GOOGLE_URL]','[CO_LINKEDIN_URL]','[CO_INSTAGRAM_URL]'); |
|
40 | + $add_excludes = array('[RECIPIENT_FNAME]', '[RECIPIENT_LNAME]', '[RECIPIENT_EMAIL]', '[COMPANY]', '[CO_ADD1]', '[CO_ADD2]', '[CO_CITY]', '[CO_STATE]', '[CO_ZIP]', '[CO_LOGO]', '[CO_PHONE]', '[CO_LOGO_URL]', '[CO_FACEBOOK_URL]', '[CO_TWITTER_URL]', '[CO_PINTEREST_URL]', '[CO_GOOGLE_URL]', '[CO_LINKEDIN_URL]', '[CO_INSTAGRAM_URL]'); |
|
41 | 41 | $this->_specific_shortcode_excludes['from'] = array_merge($this->_specific_shortcode_excludes['from'], $add_excludes); |
42 | - $this->_specific_shortcode_excludes['content'] = array_merge( $this->_specific_shortcode_excludes['content'], array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]') ); |
|
42 | + $this->_specific_shortcode_excludes['content'] = array_merge($this->_specific_shortcode_excludes['content'], array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]')); |
|
43 | 43 | } |
44 | 44 | } |
@@ -5,7 +5,9 @@ discard block |
||
5 | 5 | * @subpackage helpers |
6 | 6 | * @since 4.3.0 |
7 | 7 | */ |
8 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
8 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
9 | + exit('No direct script access allowed'); |
|
10 | +} |
|
9 | 11 | |
10 | 12 | /** |
11 | 13 | * Holds any special validation rules for template fields with Email messenger and Newsletter |
@@ -29,8 +31,9 @@ discard block |
||
29 | 31 | * custom validator (restricting what was originally set by the messenger) |
30 | 32 | */ |
31 | 33 | protected function _modify_validator() { |
32 | - if ( $this->_context == 'attendee' ) |
|
33 | - $this->_valid_shortcodes_modifier[$this->_context]['from'] = array('recipient_details', 'email', 'organization'); |
|
34 | + if ( $this->_context == 'attendee' ) { |
|
35 | + $this->_valid_shortcodes_modifier[$this->_context]['from'] = array('recipient_details', 'email', 'organization'); |
|
36 | + } |
|
34 | 37 | |
35 | 38 | //excluded shortcodes |
36 | 39 | $fields = array('to','from','subject','content','newsletter_content'); |
@@ -18,27 +18,27 @@ |
||
18 | 18 | * @author Darren Ethier |
19 | 19 | */ |
20 | 20 | class EE_Messages_Email_Newsletter_Validator extends EE_Messages_Validator { |
21 | - public function __construct( $fields, $context ) { |
|
22 | - $this->_m_name = 'email'; |
|
23 | - $this->_mt_name = 'newsletter'; |
|
21 | + public function __construct( $fields, $context ) { |
|
22 | + $this->_m_name = 'email'; |
|
23 | + $this->_mt_name = 'newsletter'; |
|
24 | 24 | |
25 | - parent::__construct( $fields, $context ); |
|
26 | - } |
|
25 | + parent::__construct( $fields, $context ); |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * custom validator (restricting what was originally set by the messenger) |
|
30 | - */ |
|
31 | - protected function _modify_validator() { |
|
32 | - if ( $this->_context == 'attendee' ) |
|
33 | - $this->_valid_shortcodes_modifier[$this->_context]['from'] = array('recipient_details', 'email', 'organization'); |
|
28 | + /** |
|
29 | + * custom validator (restricting what was originally set by the messenger) |
|
30 | + */ |
|
31 | + protected function _modify_validator() { |
|
32 | + if ( $this->_context == 'attendee' ) |
|
33 | + $this->_valid_shortcodes_modifier[$this->_context]['from'] = array('recipient_details', 'email', 'organization'); |
|
34 | 34 | |
35 | - //excluded shortcodes |
|
36 | - $fields = array('to','from','subject','content','newsletter_content'); |
|
37 | - foreach ( $fields as $field ) { |
|
38 | - $this->_specific_shortcode_excludes[$field] = array('[RECIPIENT_REGISTRATION_CODE]', '[RECIPIENT_EDIT_REGISTRATION_LINK]', '[EVENT_AUTHOR_FORMATTED_EMAIL]', '[EVENT_AUTHOR_EMAIL]'); |
|
39 | - } |
|
40 | - $add_excludes = array( '[RECIPIENT_FNAME]', '[RECIPIENT_LNAME]', '[RECIPIENT_EMAIL]', '[COMPANY]', '[CO_ADD1]','[CO_ADD2]', '[CO_CITY]', '[CO_STATE]','[CO_ZIP]','[CO_LOGO]','[CO_PHONE]','[CO_LOGO_URL]','[CO_FACEBOOK_URL]','[CO_TWITTER_URL]','[CO_PINTEREST_URL]','[CO_GOOGLE_URL]','[CO_LINKEDIN_URL]','[CO_INSTAGRAM_URL]'); |
|
41 | - $this->_specific_shortcode_excludes['from'] = array_merge($this->_specific_shortcode_excludes['from'], $add_excludes); |
|
42 | - $this->_specific_shortcode_excludes['content'] = array_merge( $this->_specific_shortcode_excludes['content'], array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]') ); |
|
43 | - } |
|
35 | + //excluded shortcodes |
|
36 | + $fields = array('to','from','subject','content','newsletter_content'); |
|
37 | + foreach ( $fields as $field ) { |
|
38 | + $this->_specific_shortcode_excludes[$field] = array('[RECIPIENT_REGISTRATION_CODE]', '[RECIPIENT_EDIT_REGISTRATION_LINK]', '[EVENT_AUTHOR_FORMATTED_EMAIL]', '[EVENT_AUTHOR_EMAIL]'); |
|
39 | + } |
|
40 | + $add_excludes = array( '[RECIPIENT_FNAME]', '[RECIPIENT_LNAME]', '[RECIPIENT_EMAIL]', '[COMPANY]', '[CO_ADD1]','[CO_ADD2]', '[CO_CITY]', '[CO_STATE]','[CO_ZIP]','[CO_LOGO]','[CO_PHONE]','[CO_LOGO_URL]','[CO_FACEBOOK_URL]','[CO_TWITTER_URL]','[CO_PINTEREST_URL]','[CO_GOOGLE_URL]','[CO_LINKEDIN_URL]','[CO_INSTAGRAM_URL]'); |
|
41 | + $this->_specific_shortcode_excludes['from'] = array_merge($this->_specific_shortcode_excludes['from'], $add_excludes); |
|
42 | + $this->_specific_shortcode_excludes['content'] = array_merge( $this->_specific_shortcode_excludes['content'], array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]') ); |
|
43 | + } |
|
44 | 44 | } |