Completed
Branch BUG/11211/html-entities-being-... (7e723d)
by
unknown
41:55 queued 30:51
created
admin_pages/events/help_tabs/event_editor_venue_details.help_tab.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,5 +3,5 @@
 block discarded – undo
3 3
 <?php _e('A venue is the place or location that is hosting your event. This setting is optional which means that you are not required to select a venue for your event.', 'event_espresso'); ?>
4 4
 </p>
5 5
 <p>
6
-<?php echo sprintf(__('Venues can be managed through the %sVenues page%s.', 'event_espresso'),'<a href="admin.php?page=espresso_venues">','</a>'); ?>
6
+<?php echo sprintf(__('Venues can be managed through the %sVenues page%s.', 'event_espresso'), '<a href="admin.php?page=espresso_venues">', '</a>'); ?>
7 7
 </p>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/events/templates/event_tickets_metabox_main.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php do_action( 'AHEE__event_tickets_metabox_main__before_content' ); ?>
1
+<?php do_action('AHEE__event_tickets_metabox_main__before_content'); ?>
2 2
 <div id="event-and-ticket-form-content">
3 3
 	<h4 class="event-tickets-datetimes-title"><?php _e('Event Datetime', 'event_espresso'); ?></h4><?php echo $event_datetime_help_link; ?>
4 4
 	<div class="event-datetimes-container">
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 						</td>
30 30
 						<td class="event-datetime-column reg-limit-column">
31 31
 							<?php
32
-								$reg_limit = $time->get_pretty('DTT_reg_limit','input');
32
+								$reg_limit = $time->get_pretty('DTT_reg_limit', 'input');
33 33
 							?>
34 34
 							<input type="text" name="edit_event_datetimes[1][DTT_reg_limit]" id="event-datetime-DTT_reg_limit-1" class="ee-small-text-inp ee-inp-right event-datetime-DTT_reg_limit" value="<?php echo $reg_limit; ?>">
35 35
 						</td>
36
-						<td class="datetime-tickets-sold"><?php printf( __('Tickets Sold: %s', 'event_espresso'), $time->get('DTT_sold') ); ?></td>
36
+						<td class="datetime-tickets-sold"><?php printf(__('Tickets Sold: %s', 'event_espresso'), $time->get('DTT_sold')); ?></td>
37 37
 					</tr>
38 38
 				</tbody>
39 39
 			</table>
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	<div style="clear:both"></div>
72 72
 </div> <!-- end #event-and-ticket-form-content -->
73 73
 
74
-<?php do_action( 'AHEE__event_tickets_metabox_main__after_content' ); ?>
74
+<?php do_action('AHEE__event_tickets_metabox_main__after_content'); ?>
75 75
 
76 76
 <table id="new-ticket-row-form" class="hidden">
77 77
 	<tbody><?php echo $ticket_js_structure; ?></tbody>
Please login to merge, or discard this patch.
general_settings/help_tabs/general_settings_critical_pages.help_tab.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,41 +6,41 @@
 block discarded – undo
6 6
 <ul>
7 7
 <li>
8 8
 <strong><?php _e('Registration Checkout Page', 'event_espresso'); ?></strong><br />
9
-<?php printf( __('This page displays all your events and is required. It is important that this page always contain the %s shortcode. It is not required to be in your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_CHECKOUT]</strong>' ); ?>
9
+<?php printf(__('This page displays all your events and is required. It is important that this page always contain the %s shortcode. It is not required to be in your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_CHECKOUT]</strong>'); ?>
10 10
 </li>
11 11
 <li>
12 12
 <strong><?php _e('Transactions Page', 'event_espresso'); ?></strong><br />
13
-<?php printf( __('This page processes the payments and is required. It should only contain the %s shortcode. No other content should be added and it should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_TXN_PAGE]</strong>' ); ?>
13
+<?php printf(__('This page processes the payments and is required. It should only contain the %s shortcode. No other content should be added and it should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_TXN_PAGE]</strong>'); ?>
14 14
 </li>
15 15
 <li>
16 16
 <strong><?php _e('Thank You Page', 'event_espresso'); ?></strong><br />
17
-<?php printf( __('This page is displayed after a successful transaction and is required. It should contain the %s shortcode. Additionally, you may customize this page by adding extra content to the page. It should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_THANK_YOU]</strong>' ); ?>
17
+<?php printf(__('This page is displayed after a successful transaction and is required. It should contain the %s shortcode. Additionally, you may customize this page by adding extra content to the page. It should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_THANK_YOU]</strong>'); ?>
18 18
 </li>
19 19
 <li>
20 20
 <strong><?php _e('Cancel / Return Page', 'event_espresso'); ?></strong><br />
21
-<?php printf( __('This page is displayed after an unsuccessful transaction and is required.  It should contain the %s shortcode. Additionally, you may customize this page by adding extra content to the page. It should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_CANCELLED]</strong>' ); ?>
21
+<?php printf(__('This page is displayed after an unsuccessful transaction and is required.  It should contain the %s shortcode. Additionally, you may customize this page by adding extra content to the page. It should be hidden from your navigation menu.', 'event_espresso'), '<strong>[ESPRESSO_CANCELLED]</strong>'); ?>
22 22
 </li>
23 23
 <li>
24 24
 <strong><?php _e('Event List', 'event_espresso'); ?></strong><br />
25
-<?php printf(__('If you would like to style the look of your events archive page, then follow the WordPress instructions for %1$screating a custom template for archive pages%2$s.', 'event_espresso'), '<a href="http://codex.wordpress.org/Post_Type_Templates">','</a>'); ?>
25
+<?php printf(__('If you would like to style the look of your events archive page, then follow the WordPress instructions for %1$screating a custom template for archive pages%2$s.', 'event_espresso'), '<a href="http://codex.wordpress.org/Post_Type_Templates">', '</a>'); ?>
26 26
 <ul>
27 27
 <li style="list-style-type: circle;">
28
-<?php printf( __('Build a template for your events - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>archive-espresso_events.php</strong>','wp-content/themes/twenty-fourteen' ); ?>
28
+<?php printf(__('Build a template for your events - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>archive-espresso_events.php</strong>', 'wp-content/themes/twenty-fourteen'); ?>
29 29
 </li>
30 30
 <li style="list-style-type: circle;">
31
-<?php printf( __('Build a template for a single event - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>single-espresso_events.php</strong>','wp-content/themes/twenty-fourteen' ); ?>
31
+<?php printf(__('Build a template for a single event - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>single-espresso_events.php</strong>', 'wp-content/themes/twenty-fourteen'); ?>
32 32
 </li>
33 33
 </ul>
34 34
 </li>
35 35
 <li>
36 36
 <strong><?php _e('Venue List', 'event_espresso'); ?></strong><br />
37
-<?php printf(__('If you would like to style the look of your venues archive page, then follow the WordPress instructions for %1$screating a custom template for archive pages%2$s.', 'event_espresso'), '<a href="http://codex.wordpress.org/Post_Type_Templates">','</a>'); ?>
37
+<?php printf(__('If you would like to style the look of your venues archive page, then follow the WordPress instructions for %1$screating a custom template for archive pages%2$s.', 'event_espresso'), '<a href="http://codex.wordpress.org/Post_Type_Templates">', '</a>'); ?>
38 38
 <ul>
39 39
 <li style="list-style-type: circle;">
40
-<?php printf( __('Build a template for your events - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>archive-espresso_venues.php</strong>','wp-content/themes/twenty-fourteen' ); ?>
40
+<?php printf(__('Build a template for your events - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>archive-espresso_venues.php</strong>', 'wp-content/themes/twenty-fourteen'); ?>
41 41
 </li>
42 42
 <li style="list-style-type: circle;">
43
-<?php printf( __('Build a template for a single event - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>single-espresso_venues.php</strong>','wp-content/themes/twenty-fourteen' ); ?>
43
+<?php printf(__('Build a template for a single event - create a theme template named %1$s Then place it in your theme\'s root directory. For the default WordPress Twenty Thirteen theme, this location will be %2$s.', 'event_espresso'), '<strong>single-espresso_venues.php</strong>', 'wp-content/themes/twenty-fourteen'); ?>
44 44
 </li>
45 45
 </ul>
46 46
 </li>
Please login to merge, or discard this patch.
admin_pages/general_settings/templates/espresso_page_settings.template.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 						</strong>
25 25
 						<?php echo EEH_Template::get_help_tab_link('registration_page_info'); ?>
26 26
 						<br />
27
-						<?php echo General_Settings_Admin_Page::edit_view_links( $reg_page_id );?>
27
+						<?php echo General_Settings_Admin_Page::edit_view_links($reg_page_id); ?>
28 28
 					</label>
29 29
 				</th>
30 30
 				<td>
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 						<option value="0">
33 33
 							<?php _e('Main Page', 'event_espresso'); ?>
34 34
 						</option>
35
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $reg_page_id ); ?>
35
+						<?php General_Settings_Admin_Page::page_settings_dropdown($reg_page_id); ?>
36 36
 					</select>
37 37
 					<span>
38
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $reg_page_obj, '[ESPRESSO_CHECKOUT]' ); ?>
38
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($reg_page_obj, '[ESPRESSO_CHECKOUT]'); ?>
39 39
 					</span>
40 40
 					<br />
41 41
 					<p class="description">
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 						<?php echo EEH_Template::get_help_tab_link('notify_url_info'); ?>
60 60
 						<br />
61 61
 						<span class="lt-grey-text"><?php _e('Notify URL (processes payments)', 'event_espresso'); ?></span><br/>
62
-						<?php echo General_Settings_Admin_Page::edit_view_links( $txn_page_id );?>
62
+						<?php echo General_Settings_Admin_Page::edit_view_links($txn_page_id); ?>
63 63
 					</label>
64 64
 				</th>
65 65
 				<td>
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
 						<option value="0">
68 68
 							<?php _e('Main Page', 'event_espresso'); ?>
69 69
 						</option>
70
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $txn_page_id ); ?>
70
+						<?php General_Settings_Admin_Page::page_settings_dropdown($txn_page_id); ?>
71 71
 					</select>
72 72
 					<span>
73
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $txn_page_obj, '[ESPRESSO_TXN_PAGE]' ); ?>
73
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($txn_page_obj, '[ESPRESSO_TXN_PAGE]'); ?>
74 74
 					</span>
75 75
 					<br />
76 76
 					<p class="description">
77 77
 						<?php
78 78
 						echo sprintf(
79
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso' ),
79
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso'),
80 80
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_TXN_PAGE]</span>'
81 81
 						);
82 82
 						?>
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 						</strong>
94 94
 						<?php echo EEH_Template::get_help_tab_link('return_url_info'); ?>
95 95
 						<br />
96
-						<?php echo General_Settings_Admin_Page::edit_view_links( $thank_you_page_id );?>
96
+						<?php echo General_Settings_Admin_Page::edit_view_links($thank_you_page_id); ?>
97 97
 					</label>
98 98
 				</th>
99 99
 				<td>
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 						<option value="0">
102 102
 							<?php _e('Main Page', 'event_espresso'); ?>
103 103
 						</option>
104
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $thank_you_page_id ); ?>
104
+						<?php General_Settings_Admin_Page::page_settings_dropdown($thank_you_page_id); ?>
105 105
 					</select>
106 106
 					<span>
107
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $thank_you_page_obj, '[ESPRESSO_THANK_YOU]' ); ?>
107
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($thank_you_page_obj, '[ESPRESSO_THANK_YOU]'); ?>
108 108
 					</span>
109 109
 					<br />
110 110
 					<p class="description">
111 111
 						<?php
112 112
 						echo sprintf(
113
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso' ),
113
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso'),
114 114
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_THANK_YOU]</span>'
115 115
 						);
116 116
 						?>
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 						</strong>
128 128
 						<?php echo EEH_Template::get_help_tab_link('cancel_return_info'); ?>
129 129
 						<br />
130
-						<?php echo General_Settings_Admin_Page::edit_view_links( $cancel_page_id );?>
130
+						<?php echo General_Settings_Admin_Page::edit_view_links($cancel_page_id); ?>
131 131
 					</label>
132 132
 				</th>
133 133
 				<td>
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
 						<option value="0">
136 136
 							<?php _e('Main Page', 'event_espresso'); ?>
137 137
 						</option>
138
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $cancel_page_id ); ?>
138
+						<?php General_Settings_Admin_Page::page_settings_dropdown($cancel_page_id); ?>
139 139
 					</select>
140 140
 					<span>
141
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $cancel_page_obj, '[ESPRESSO_CANCELLED]' ); ?>
141
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($cancel_page_obj, '[ESPRESSO_CANCELLED]'); ?>
142 142
 					</span>
143 143
 					<br />
144 144
 					<p class="description">
145 145
 						<?php
146 146
 						echo sprintf(
147
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain a "cancelled transaction" message and the %s shortcode.', 'event_espresso' ),
147
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain a "cancelled transaction" message and the %s shortcode.', 'event_espresso'),
148 148
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_CANCELLED]</span>'
149 149
 						);
150 150
 						?>
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 						</strong>
162 162
 						<?php echo EEH_Template::get_help_tab_link('event_list_cpt_info'); ?>
163 163
 						<br />
164
-						<a href='<?php echo get_post_type_archive_link('espresso_events') ?>'><?php	_e('View', 'event_espresso');?></a>
164
+						<a href='<?php echo get_post_type_archive_link('espresso_events') ?>'><?php	_e('View', 'event_espresso'); ?></a>
165 165
 					</label>
166 166
 				</th>
167 167
 				<td>
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 						<?php echo __('Events are custom post types and use WordPress\' normal archive pages for displaying events.', 'event_espresso') ?>
170 170
 					</p>
171 171
 					<p class="description">
172
-						<?php printf(__('If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', 'event_espresso'),'<a href="admin.php?page=espresso_support">','</a>') ?>
172
+						<?php printf(__('If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', 'event_espresso'), '<a href="admin.php?page=espresso_support">', '</a>') ?>
173 173
 					</p>
174 174
 					<br/><br/>
175 175
 				</td>
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 						</strong>
184 184
 						<?php echo EEH_Template::get_help_tab_link('venue_list_cpt_info'); ?>
185 185
 						<br />
186
-						<a href='<?php echo get_post_type_archive_link('espresso_venues') ?>'><?php	_e('View', 'event_espresso');?></a>
186
+						<a href='<?php echo get_post_type_archive_link('espresso_venues') ?>'><?php	_e('View', 'event_espresso'); ?></a>
187 187
 					</label>
188 188
 				</th>
189 189
 				<td>
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 						<?php echo __('Venues are custom post types and use WordPress\' normal archive pages for displaying events.', 'event_espresso') ?>
192 192
 					</p>
193 193
 					<p class="description">
194
-						<?php printf(__('If you would still like your venues on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', 'event_espresso'),'<a href="admin.php?page=espresso_support">','</a>') ?>
194
+						<?php printf(__('If you would still like your venues on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s', 'event_espresso'), '<a href="admin.php?page=espresso_support">', '</a>') ?>
195 195
 					</p>
196 196
 				</td>
197 197
 			</tr>
Please login to merge, or discard this patch.
admin_pages/messages/templates/shortcode_selector_skeleton.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
  * @type    string  $fieldname  The name of the field the chooser is associated with.
8 8
  * @type    string  $linked_input_id The name of the input that the shortcode gets inserted to.
9 9
  */
10
-if ( ! empty( $shortcodes ) ) : ?>
10
+if ( ! empty($shortcodes)) : ?>
11 11
 <span class="ee-messages-shortcodes-chooser js-open-list-trigger dashicons dashicons-menu">
12 12
 	<ul id="ee_shortcode_chooser_<?php echo $fieldname; ?>" class="ee_shortcode_chooser_container hidden">
13
-		<?php foreach( $shortcodes as $shortcode => $label ) : ?>
13
+		<?php foreach ($shortcodes as $shortcode => $label) : ?>
14 14
 			<li>
15
-				<span class="js-shortcode-selection" data-value="<?php echo esc_attr( $shortcode ); ?>" data-linked-input-id="<?php echo esc_attr( $linked_input_id ); ?>"><?php echo $shortcode; ?></span>
15
+				<span class="js-shortcode-selection" data-value="<?php echo esc_attr($shortcode); ?>" data-linked-input-id="<?php echo esc_attr($linked_input_id); ?>"><?php echo $shortcode; ?></span>
16 16
 			</li>
17 17
 		<?php endforeach; ?>
18 18
 	</ul>
19 19
 </span>
20
-<?php endif ; ?>
21 20
\ No newline at end of file
21
+<?php endif; ?>
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/venues/Venue_Categories_Admin_List_Table.class.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 /**
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 
36 36
 
37 37
 	protected function _setup_data() {
38
-		$this->_data = $this->_admin_page->get_categories( $this->_per_page, $this->_current_page);
39
-		$this->_all_data_count = $this->_admin_page->get_categories( $this->_per_page, $this->_current_page, TRUE );
38
+		$this->_data = $this->_admin_page->get_categories($this->_per_page, $this->_current_page);
39
+		$this->_all_data_count = $this->_admin_page->get_categories($this->_per_page, $this->_current_page, TRUE);
40 40
 	}
41 41
 
42 42
 
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 
46 46
 	protected function _set_properties() {
47 47
 		$this->_wp_list_args = array(
48
-			'singular' => __('venue category', 'event_espresso' ),
49
-			'plural' => __('venue categories', 'event_espresso' ),
48
+			'singular' => __('venue category', 'event_espresso'),
49
+			'plural' => __('venue categories', 'event_espresso'),
50 50
 			'ajax' => TRUE, //for now,
51 51
 			'screen' => $this->_admin_page->get_current_screen()->id
52 52
 			);
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 			);
61 61
 
62 62
 		$this->_sortable_columns = array(
63
-			'id' => array( 'Term.term_id' => true ),
64
-			'name' => array( 'Term.slug' => false ),
65
-			'count' => array( 'term_count' => false )
63
+			'id' => array('Term.term_id' => true),
64
+			'name' => array('Term.slug' => false),
65
+			'count' => array('term_count' => false)
66 66
 			);
67 67
 
68 68
 		$this->_hidden_columns = array();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
 
94 94
 	public function column_cb($item) {
95
-		return sprintf( '<input type="checkbox" name="VEN_CAT_ID[]" value="%s" />', $item->get('term_id') );
95
+		return sprintf('<input type="checkbox" name="VEN_CAT_ID[]" value="%s" />', $item->get('term_id'));
96 96
 	}
97 97
 
98 98
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 	public function column_id($item) {
104 104
 		$content = $item->get('term_id');
105
-		$content .= '  <span class="show-on-mobile-view-only">' . $item->get_first_related('Term')->get('name') . '</span>';
105
+		$content .= '  <span class="show-on-mobile-view-only">'.$item->get_first_related('Term')->get('name').'</span>';
106 106
 		return $content;
107 107
 	}
108 108
 
@@ -122,17 +122,17 @@  discard block
 block discarded – undo
122 122
 			'VEN_CAT_ID' => $item->get('term_id')
123 123
 		);
124 124
 
125
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_VENUES_ADMIN_URL );
126
-		$delete_link = EE_Admin_Page::add_query_args_and_nonce( $delete_query_args, EE_VENUES_ADMIN_URL );
125
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_VENUES_ADMIN_URL);
126
+		$delete_link = EE_Admin_Page::add_query_args_and_nonce($delete_query_args, EE_VENUES_ADMIN_URL);
127 127
 
128 128
 		$actions = array(
129
-			'edit' => '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Category', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>'
129
+			'edit' => '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Category', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'
130 130
 			);
131 131
 
132 132
 
133
-		$actions['delete'] = '<a href="' . $delete_link . '" title="' . esc_attr__('Delete Category', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>';
133
+		$actions['delete'] = '<a href="'.$delete_link.'" title="'.esc_attr__('Delete Category', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>';
134 134
 
135
-		$content = '<strong><a class="row-title" href="' . $edit_link . '">' . $item->get_first_related('Term')->get('name') . '</a></strong>';
135
+		$content = '<strong><a class="row-title" href="'.$edit_link.'">'.$item->get_first_related('Term')->get('name').'</a></strong>';
136 136
 		$content .= $this->row_actions($actions);
137 137
 		return $content;
138 138
 	}
@@ -141,20 +141,20 @@  discard block
 block discarded – undo
141 141
 
142 142
 
143 143
 	public function column_shortcode($item) {
144
-		$content = '[EVENT_ESPRESSO_CATEGORY category_id="' . $item->get_first_related('Term')->get('slug') . '"]';
144
+		$content = '[EVENT_ESPRESSO_CATEGORY category_id="'.$item->get_first_related('Term')->get('slug').'"]';
145 145
 		return $content;
146 146
 	}
147 147
 
148 148
 
149 149
 
150 150
 
151
-	public function column_count( $item ) {
151
+	public function column_count($item) {
152 152
 		$e_args = array(
153 153
 			'action' => 'default',
154 154
 			'category' => $item->get_first_related('Term')->ID()
155 155
 			);
156
-		$e_link = EE_Admin_Page::add_query_args_and_nonce( $e_args, EE_VENUES_ADMIN_URL );
157
-		$content = '<a href="' . $e_link . '">' . $item->get('term_count') . '</a>';
156
+		$e_link = EE_Admin_Page::add_query_args_and_nonce($e_args, EE_VENUES_ADMIN_URL);
157
+		$content = '<a href="'.$e_link.'">'.$item->get('term_count').'</a>';
158 158
 		return $content;
159 159
 	}
160 160
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/venues/Venues_Admin_List_Table.class.php 2 patches
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 /**
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 class Venues_Admin_List_Table extends EE_Admin_List_Table {
33 33
 
34
-	public function __construct( $admin_page ) {
34
+	public function __construct($admin_page) {
35 35
 		parent::__construct($admin_page);
36 36
 	}
37 37
 
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 
41 41
 	protected function _setup_data() {
42
-		$this->_data = $this->_admin_page->get_venues( $this->_per_page);
43
-		$this->_all_data_count = $this->_admin_page->get_venues( $this->_per_page, TRUE );
42
+		$this->_data = $this->_admin_page->get_venues($this->_per_page);
43
+		$this->_all_data_count = $this->_admin_page->get_venues($this->_per_page, TRUE);
44 44
 	}
45 45
 
46 46
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
 	protected function _set_properties() {
51 51
 		$this->_wp_list_args = array(
52
-			'singular' => __('Event Venue', 'event_espresso' ),
53
-			'plural' => __('Event Venues', 'event_espresso' ),
52
+			'singular' => __('Event Venue', 'event_espresso'),
53
+			'plural' => __('Event Venues', 'event_espresso'),
54 54
 			'ajax' => TRUE, //for now,
55 55
 			'screen' => $this->_admin_page->get_current_screen()->id
56 56
 			);
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 			);
67 67
 
68 68
 		$this->_sortable_columns = array(
69
-			'id' => array( 'id' => true ),
70
-			'name' => array( 'name' => false ),
71
-			'city' => array( 'city' => false ),
72
-			'capacity' => array( 'capacity' => false )
69
+			'id' => array('id' => true),
70
+			'name' => array('name' => false),
71
+			'city' => array('city' => false),
72
+			'capacity' => array('capacity' => false)
73 73
 			);
74 74
 
75 75
 		$this->_hidden_columns = array();
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 	protected function _add_view_counts() {
93 93
 		$this->_views['all']['count'] = EEM_Venue::instance()->count();
94
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venues', 'espresso_venues_trash_venues' ) ) {
94
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venues', 'espresso_venues_trash_venues')) {
95 95
 			$this->_views['trash']['count'] = EEM_Venue::instance()->count_deleted();
96 96
 		}
97 97
 	}
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
 	public function column_cb($item) {
105 105
 
106
-		return $item->count_related('Event') > 0 && $item->get( 'status' ) === 'trash' ? '<span class="ee-lock-icon"></span>' : sprintf( '<input type="checkbox" name="venue_id[]" value="%s" />', $item->ID());
106
+		return $item->count_related('Event') > 0 && $item->get('status') === 'trash' ? '<span class="ee-lock-icon"></span>' : sprintf('<input type="checkbox" name="venue_id[]" value="%s" />', $item->ID());
107 107
 	}
108 108
 
109 109
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
 	public function column_id($item) {
113 113
 		$content = $item->ID();
114
-		$content .= '  <span class="show-on-mobile-view-only">' . $item->name() . '</span>';
114
+		$content .= '  <span class="show-on-mobile-view-only">'.$item->name().'</span>';
115 115
 		return $content;
116 116
 	}
117 117
 
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 			'post' => $item->ID()
123 123
 		);
124 124
 
125
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_VENUES_ADMIN_URL );
125
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_VENUES_ADMIN_URL);
126 126
 
127 127
 		$statuses = EEM_Venue::instance()->get_status_array();
128
-		$actions = $this->_column_name_action_setup( $item );
129
-		$content = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_venue', 'espresso_venues_edit', $item->ID() ) ? '<strong><a class="row-title" href="' . $edit_link . '">' . stripslashes_deep($item->name()) . '</a></strong>' : $item->name();
130
-		$content .= $item->status() == 'draft' ? ' - <span class="post-state">' . $statuses['draft'] . '</span>' : '';
128
+		$actions = $this->_column_name_action_setup($item);
129
+		$content = EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID()) ? '<strong><a class="row-title" href="'.$edit_link.'">'.stripslashes_deep($item->name()).'</a></strong>' : $item->name();
130
+		$content .= $item->status() == 'draft' ? ' - <span class="post-state">'.$statuses['draft'].'</span>' : '';
131 131
 		$content .= $this->row_actions($actions);
132 132
 		return $content;
133 133
 	}
@@ -138,59 +138,59 @@  discard block
 block discarded – undo
138 138
 	 * @param EE_Venue $item
139 139
 	 * @return array()
140 140
 	 */
141
-	protected function _column_name_action_setup( EE_Venue $item ) {
141
+	protected function _column_name_action_setup(EE_Venue $item) {
142 142
 		$actions = array();
143 143
 
144
-		if ( EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID() ) ) {
144
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID())) {
145 145
 			$edit_query_args = array(
146 146
 				'action' => 'edit',
147 147
 				'post' => $item->ID()
148 148
 			);
149
-			$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_VENUES_ADMIN_URL );
150
-			$actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Venue', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>';
149
+			$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_VENUES_ADMIN_URL);
150
+			$actions['edit'] = '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Venue', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
151 151
 
152 152
 		}
153 153
 
154 154
 
155
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_trash_venue', $item->ID() ) ) {
155
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_trash_venue', $item->ID())) {
156 156
 			$trash_event_query_arg = array(
157 157
 				'action' => 'trash_venue',
158 158
 				'VNU_ID' => $item->ID()
159 159
 			);
160
-			$trash_venue_link = EE_Admin_Page::add_query_args_and_nonce( $trash_event_query_arg, EE_VENUES_ADMIN_URL );
160
+			$trash_venue_link = EE_Admin_Page::add_query_args_and_nonce($trash_event_query_arg, EE_VENUES_ADMIN_URL);
161 161
 		}
162 162
 
163
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_restore_venue', $item->ID() ) ) {
163
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_restore_venue', $item->ID())) {
164 164
 			$restore_venue_query_args = array(
165 165
 				'action' => 'restore_venue',
166 166
 				'VNU_ID' => $item->ID()
167 167
 			);
168
-			$restore_venue_link = EE_Admin_Page::add_query_args_and_nonce( $restore_venue_query_args, EE_VENUES_ADMIN_URL );
168
+			$restore_venue_link = EE_Admin_Page::add_query_args_and_nonce($restore_venue_query_args, EE_VENUES_ADMIN_URL);
169 169
 		}
170 170
 
171
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_delete_venue', $item->ID() ) ) {
171
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_delete_venue', $item->ID())) {
172 172
 			$delete_venue_query_args = array(
173 173
 				'action' => 'delete_venue',
174 174
 				'VNU_ID' => $item->ID()
175 175
 			);
176
-			$delete_venue_link = EE_Admin_Page::add_query_args_and_nonce( $delete_venue_query_args, EE_VENUES_ADMIN_URL );
176
+			$delete_venue_link = EE_Admin_Page::add_query_args_and_nonce($delete_venue_query_args, EE_VENUES_ADMIN_URL);
177 177
 		}
178 178
 
179 179
 		$view_link = get_permalink($item->ID());
180 180
 
181
-		switch ( $item->get( 'status' ) ) {
181
+		switch ($item->get('status')) {
182 182
 			case 'trash' :
183
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_restore_venue', $item->ID() ) ) {
184
-					$actions['restore_from_trash'] = '<a href="' . $restore_venue_link . '" title="' . esc_attr__('Restore from Trash', 'event_espresso') . '">' . __('Restore from Trash', 'event_espresso') . '</a>';
183
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_restore_venue', $item->ID())) {
184
+					$actions['restore_from_trash'] = '<a href="'.$restore_venue_link.'" title="'.esc_attr__('Restore from Trash', 'event_espresso').'">'.__('Restore from Trash', 'event_espresso').'</a>';
185 185
 				}
186
-				if (  $item->count_related('Event') === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_delete_venue', $item->ID() ) ) {
187
-					$actions['delete permanently'] = '<a href="' . $delete_venue_link . '" title="' . esc_attr__('Delete Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>';
186
+				if ($item->count_related('Event') === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_delete_venue', $item->ID())) {
187
+					$actions['delete permanently'] = '<a href="'.$delete_venue_link.'" title="'.esc_attr__('Delete Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
188 188
 				}
189 189
 				break;
190 190
 			default :
191
-				$actions['view'] = '<a href="' . $view_link . '" title="' . esc_attr__('View Venue', 'event_espresso') . '">' . __('View', 'event_espresso') . '</a>';
192
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_trash_venue', $item->ID() ) ) {
193
-					$actions['move to trash'] = '<a href="' . $trash_venue_link . '" title="' . esc_attr__('Trash Event', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
191
+				$actions['view'] = '<a href="'.$view_link.'" title="'.esc_attr__('View Venue', 'event_espresso').'">'.__('View', 'event_espresso').'</a>';
192
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_trash_venue', $item->ID())) {
193
+					$actions['move to trash'] = '<a href="'.$trash_venue_link.'" title="'.esc_attr__('Trash Event', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
194 194
 				}
195 195
 		}
196 196
 		return $actions;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
 
219 219
 	public function column_shortcode($item) {
220
-		$content = '[ESPRESSO_VENUE id=' . $item->ID() . ']';
220
+		$content = '[ESPRESSO_VENUE id='.$item->ID().']';
221 221
 		return $content;
222 222
 	}
223 223
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/venues/Venues_Admin_Page_Init.core.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 /**
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function __construct() {
34 34
 		//define some event categories related constants
35
-		define( 'EE_VENUES_PG_SLUG', 'espresso_venues' );
36
-		define( 'EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG ));
37
-		define( 'EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/');
38
-		define( 'EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/' );
35
+		define('EE_VENUES_PG_SLUG', 'espresso_venues');
36
+		define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page='.EE_VENUES_PG_SLUG));
37
+		define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL.'venues/assets/');
38
+		define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES.'venues/templates/');
39 39
 
40 40
 		parent::__construct();
41
-		$this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . DS;
41
+		$this->_folder_path = EE_ADMIN_PAGES.$this->_folder_name.DS;
42 42
 	}
43 43
 
44 44
 	protected function _set_init_properties() {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 
51 51
 	protected function _set_menu_map() {
52
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
52
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
53 53
 			'menu_group' => 'management',
54 54
 			'menu_order' => 40,
55 55
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/venues/espresso_events_Venues_Hooks.class.php 2 patches
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
@@ -163,11 +164,14 @@  discard block
 block discarded – undo
163 164
 		$evt_venue = $evtobj->venues();
164 165
 		$evt_venue = !empty( $evt_venue ) ? array_shift( $evt_venue ) : NULL;
165 166
 
166
-		if ( !empty( $evt_venue ) && $evt_venue->ID() != $venue_id )
167
-			$evtobj->_remove_relation_to( $evt_venue->ID(), 'Venue' );
167
+		if ( !empty( $evt_venue ) && $evt_venue->ID() != $venue_id ) {
168
+					$evtobj->_remove_relation_to( $evt_venue->ID(), 'Venue' );
169
+		}
168 170
 
169
-		if ( empty( $venue_id ) )
170
-			return TRUE; //no venue to attach
171
+		if ( empty( $venue_id ) ) {
172
+					return TRUE;
173
+		}
174
+		//no venue to attach
171 175
 
172 176
 		// this should take care of adding to revisions as well as main post object
173 177
 		$success = $evtobj->_add_relation_to( $venue_id, 'Venue' );
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 	protected $_event;
34 34
 
35 35
 
36
-	public function __construct( EE_Admin_Page $admin_page ) {
37
-		parent::__construct( $admin_page );
36
+	public function __construct(EE_Admin_Page $admin_page) {
37
+		parent::__construct($admin_page);
38 38
 	}
39 39
 
40 40
 
@@ -49,18 +49,18 @@  discard block
 block discarded – undo
49 49
 				'priority' => 'high',
50 50
 				'context' => 'normal'
51 51
 				)
52
-		);/**/
52
+		); /**/
53 53
 
54 54
 		$this->_scripts_styles = array(
55 55
 			'registers' => array(
56 56
 				'ee_event_venues' => array(
57 57
 					'type' => 'js',
58
-					'url' => EE_VENUES_ASSETS_URL . 'ee-event-venues-admin.js',
58
+					'url' => EE_VENUES_ASSETS_URL.'ee-event-venues-admin.js',
59 59
 					'depends' => array('jquery')
60 60
 					),
61 61
 				'ee_event_venues_css' => array(
62 62
 					'type' => 'css',
63
-					'url' => EE_VENUES_ASSETS_URL . 'ee-event-venues-admin.css',
63
+					'url' => EE_VENUES_ASSETS_URL.'ee-event-venues-admin.css',
64 64
 					)
65 65
 				),
66 66
 			'enqueues' => array(
@@ -70,24 +70,24 @@  discard block
 block discarded – undo
70 70
 			);
71 71
 
72 72
 		//hook into the handler for saving venue
73
-		add_filter( 'FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks', array( $this, 'modify_callbacks' ), 10 );
73
+		add_filter('FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks', array($this, 'modify_callbacks'), 10);
74 74
 
75 75
 		//remove default ee_autosave returns for DECAF venues (not needed for CAF venues cause we have a dropdown selector)
76
-		add_filter( 'FHEE__Events_Admin_Page__ee_autosave_edit_do_decaf_venue_save', '__return_false' );
76
+		add_filter('FHEE__Events_Admin_Page__ee_autosave_edit_do_decaf_venue_save', '__return_false');
77 77
 
78 78
 	}
79 79
 
80 80
 
81
-	public function modify_callbacks( $callbacks ) {
81
+	public function modify_callbacks($callbacks) {
82 82
 		// first remove default venue callback
83
-		foreach ( $callbacks as $key => $callback ) {
84
-			if ( $callback[1] == '_default_venue_update' ) {
85
-				unset( $callbacks[$key] );
83
+		foreach ($callbacks as $key => $callback) {
84
+			if ($callback[1] == '_default_venue_update') {
85
+				unset($callbacks[$key]);
86 86
 			}
87 87
 		}
88 88
 
89 89
 		//now let's add the caf version
90
-		$callbacks[] = array( $this, 'caf_venue_update' );
90
+		$callbacks[] = array($this, 'caf_venue_update');
91 91
 		return $callbacks;
92 92
 	}
93 93
 
@@ -103,69 +103,69 @@  discard block
 block discarded – undo
103 103
 		$evt_id = $evt_obj->ID();
104 104
 
105 105
 		//first let's see if we have a venue already
106
-		$evt_venues = !empty( $evt_id ) ? $evt_obj->venues() : array();
107
-		$evt_venue = $evt_venues && is_array( $evt_venues ) ? reset( $evt_venues ) : null;
106
+		$evt_venues = ! empty($evt_id) ? $evt_obj->venues() : array();
107
+		$evt_venue = $evt_venues && is_array($evt_venues) ? reset($evt_venues) : null;
108 108
 		$evt_venue_id = $evt_venue instanceof EE_Venue ? $evt_venue->ID() : null;
109 109
 
110 110
 		//possibly private venues.
111
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_venues', 'get_venues' ) ) {
112
-			$vnu_where['status']= array( 'IN' , array( 'publish', 'private' ) );
111
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')) {
112
+			$vnu_where['status'] = array('IN', array('publish', 'private'));
113 113
 		} else {
114 114
 			$vnu_where['status'] = 'publish';
115 115
 		}
116 116
 
117 117
 		//cap checks
118
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_venues', 'get_venues' ) ) {
118
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_venues', 'get_venues')) {
119 119
 			$vnu_where['VNU_wp_user'] = get_current_user_id();
120 120
 		}
121 121
 
122
-		$vnumdl = EE_Registry::instance()->load_model( 'Venue' );
123
-		$venues = $vnumdl->get_all( array( $vnu_where, 'order_by' => array( 'VNU_name' => 'ASC' ) ) );
122
+		$vnumdl = EE_Registry::instance()->load_model('Venue');
123
+		$venues = $vnumdl->get_all(array($vnu_where, 'order_by' => array('VNU_name' => 'ASC')));
124 124
 
125 125
 		$ven_select = array();
126 126
 		$ven_select[0] = __('Select a Venue', 'event_espresso');
127 127
 		//setup venues for selector
128
-		foreach ( $venues as $venue ) {
128
+		foreach ($venues as $venue) {
129 129
 			$ven_select[$venue->ID()] = $venue->name();
130 130
 		}
131 131
 
132 132
 		//if $ven_select does not have the existing venue attached to event then let's add that because we'll always
133 133
 		//show existing attached venues even if it's trashed (or some other restricted status).
134 134
 
135
-		if ( $evt_venue_id && ! isset( $ven_select[$evt_venue_id] ) ) {
135
+		if ($evt_venue_id && ! isset($ven_select[$evt_venue_id])) {
136 136
 			$ven_select[$evt_venue_id] = $evt_venue->name();
137
-			$venues = array_merge( $venues, array( $evt_venue ) );
137
+			$venues = array_merge($venues, array($evt_venue));
138 138
 		}
139 139
 
140 140
 		$template_args['venues'] = $venues;
141 141
 		$template_args['evt_venue_id'] = $evt_venue_id;
142
-		$template_args['venue_selector'] = EEH_Form_Fields::select_input('venue_id', $ven_select, $evt_venue_id, 'id="venue_id"' );
143
-		$template_args['enable_for_gmap'] = EEH_Form_Fields::select_input('enable_for_gmap', $values, is_object( $evt_venue ) ? $evt_venue->enable_for_gmap() : NULL, 'id="enable_for_gmap"');
144
-		$template_path = empty( $venues ) ? EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content.template.php' : EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content_from_manager.template.php';
145
-		EEH_Template::display_template( $template_path, $template_args );
142
+		$template_args['venue_selector'] = EEH_Form_Fields::select_input('venue_id', $ven_select, $evt_venue_id, 'id="venue_id"');
143
+		$template_args['enable_for_gmap'] = EEH_Form_Fields::select_input('enable_for_gmap', $values, is_object($evt_venue) ? $evt_venue->enable_for_gmap() : NULL, 'id="enable_for_gmap"');
144
+		$template_path = empty($venues) ? EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content.template.php' : EE_VENUES_TEMPLATE_PATH.'event_venues_metabox_content_from_manager.template.php';
145
+		EEH_Template::display_template($template_path, $template_args);
146 146
 	}
147 147
 
148 148
 
149 149
 
150 150
 
151
-	public function caf_venue_update( $evtobj, $data ) {
151
+	public function caf_venue_update($evtobj, $data) {
152 152
 		EE_Registry::instance()->load_model('Venue');
153
-		$venue_id = !empty( $data['venue_id'] ) ? $data['venue_id'] : NULL;
153
+		$venue_id = ! empty($data['venue_id']) ? $data['venue_id'] : NULL;
154 154
 
155 155
 
156 156
 		//first let's check if the selected venue matches any existing venue attached to the event
157 157
 		$evt_venue = $evtobj->venues();
158
-		$evt_venue = !empty( $evt_venue ) ? array_shift( $evt_venue ) : NULL;
158
+		$evt_venue = ! empty($evt_venue) ? array_shift($evt_venue) : NULL;
159 159
 
160
-		if ( !empty( $evt_venue ) && $evt_venue->ID() != $venue_id )
161
-			$evtobj->_remove_relation_to( $evt_venue->ID(), 'Venue' );
160
+		if ( ! empty($evt_venue) && $evt_venue->ID() != $venue_id)
161
+			$evtobj->_remove_relation_to($evt_venue->ID(), 'Venue');
162 162
 
163
-		if ( empty( $venue_id ) )
163
+		if (empty($venue_id))
164 164
 			return TRUE; //no venue to attach
165 165
 
166 166
 		// this should take care of adding to revisions as well as main post object
167
-		$success = $evtobj->_add_relation_to( $venue_id, 'Venue' );
168
-		return !empty($success) ? TRUE : FALSE;
167
+		$success = $evtobj->_add_relation_to($venue_id, 'Venue');
168
+		return ! empty($success) ? TRUE : FALSE;
169 169
 	}
170 170
 
171 171
 
Please login to merge, or discard this patch.