Completed
Branch FET-9222-rest-api-writes (64ff44)
by
unknown
95:49 queued 82:41
created
core/admin/EE_Admin_Page_Loader.core.php 3 patches
Braces   +14 added lines, -9 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
@@ -237,8 +238,9 @@  discard block
 block discarded – undo
237 238
 		//first let's order the menu groups by their internal menu order (note usort type hinting to ensure the incoming array is EE_Admin_Page_Menu_Map objects )
238 239
 		usort( $this->_admin_menu_groups, array( $this, '_sort_menu_maps' ) );
239 240
 		foreach ( $this->_admin_menu_groups as $group ) {
240
-			if ( ! $group instanceof EE_Admin_Page_Menu_Group )
241
-				throw new EE_Error( sprintf( __('Unable to continue sorting the menu groups array because there is an invalid value for the menu groups.  All values in this array are required to be a EE_Admin_Page_Menu_Group object.  Instead there was: %s', 'event_espresso'), print_r($group, TRUE) ) );
241
+			if ( ! $group instanceof EE_Admin_Page_Menu_Group ) {
242
+							throw new EE_Error( sprintf( __('Unable to continue sorting the menu groups array because there is an invalid value for the menu groups.  All values in this array are required to be a EE_Admin_Page_Menu_Group object.  Instead there was: %s', 'event_espresso'), print_r($group, TRUE) ) );
243
+			}
242 244
 			$groups[$group->menu_slug] = $group;
243 245
 		}
244 246
 		return $groups;
@@ -494,8 +496,9 @@  discard block
 block discarded – undo
494 496
 		//let's sort the groups, make sure it's a valid group, add header (if to show).
495 497
 		foreach ( $pages_array as $group => $menu_maps ) {
496 498
 			//valid_group?
497
-			if ( ! array_key_exists( $group, $menu_groups ) )
498
-				continue;
499
+			if ( ! array_key_exists( $group, $menu_groups ) ) {
500
+							continue;
501
+			}
499 502
 
500 503
 			//sort pages.
501 504
 			usort( $menu_maps, array( $this, '_sort_menu_maps' ) );
@@ -510,8 +513,9 @@  discard block
 block discarded – undo
510 513
 
511 514
 		//now let's setup the _prepped_menu_maps property
512 515
 		foreach ( $menu_groups as $group => $group_objs ) {
513
-			if ( isset( $pages_array[$group] ) )
514
-				$this->_prepped_menu_maps = array_merge( $this->_prepped_menu_maps, $pages_array[$group] );
516
+			if ( isset( $pages_array[$group] ) ) {
517
+							$this->_prepped_menu_maps = array_merge( $this->_prepped_menu_maps, $pages_array[$group] );
518
+			}
515 519
 		}/**/
516 520
 
517 521
 	}
@@ -656,8 +660,9 @@  discard block
 block discarded – undo
656 660
 	 * @return int    sort order
657 661
 	 */
658 662
 	private function _sort_menu_maps( EE_Admin_Page_Menu_Map $a, EE_Admin_Page_Menu_Map $b ) {
659
-		if ( $a->menu_order == $b->menu_order )
660
-			return 0;
663
+		if ( $a->menu_order == $b->menu_order ) {
664
+					return 0;
665
+		}
661 666
 		return ($a->menu_order < $b->menu_order) ? -1 : 1;
662 667
 	}
663 668
 
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -402,21 +402,21 @@
 block discarded – undo
402 402
 		$class_name = $this->_get_classname_for_admin_init_page( $page );
403 403
  		EE_Registry::instance()->load_file( $path, $class_name, 'core' );
404 404
 		if ( ! class_exists( $class_name )) {
405
-            $inner_error_msg = '<br />' . sprintf(
406
-                esc_html__(
407
-                    'Make sure you have %1$s defined. If this is a non-EE-core admin page then you also must have an autoloader in place for your class',
408
-                    'event_espresso'
409
-                ),
410
-                '<strong>' . $class_name . '</strong>'
411
-            );
405
+			$inner_error_msg = '<br />' . sprintf(
406
+				esc_html__(
407
+					'Make sure you have %1$s defined. If this is a non-EE-core admin page then you also must have an autoloader in place for your class',
408
+					'event_espresso'
409
+				),
410
+				'<strong>' . $class_name . '</strong>'
411
+			);
412 412
 			$error_msg[] = sprintf( __('Something went wrong with loading the %s admin page.', 'event_espresso' ), $page);
413 413
 			$error_msg[] = $error_msg[0]
414
-                           . "\r\n"
415
-                           . sprintf(
416
-                               esc_html__( 'There is no Init class in place for the %s admin page.', 'event_espresso'),
417
-                               $page
418
-                           )
419
-                           . $inner_error_msg;
414
+						   . "\r\n"
415
+						   . sprintf(
416
+							   esc_html__( 'There is no Init class in place for the %s admin page.', 'event_espresso'),
417
+							   $page
418
+						   )
419
+						   . $inner_error_msg;
420 420
 			throw new EE_Error( implode( '||', $error_msg ));
421 421
 		}
422 422
 		$a = new ReflectionClass($class_name);
Please login to merge, or discard this patch.
Spacing   +124 added lines, -124 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
 /**
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 		//let's do a scan and see what installed pages we have
120 120
 		$this->_get_installed_pages();
121 121
 		//set menus (has to be done on every load - we're not actually loading the page just setting the menus and where they point to).
122
-		add_action('admin_menu', array( $this, 'set_menus' ));
123
-		add_action( 'network_admin_menu', array( $this, 'set_network_menus' ) );
122
+		add_action('admin_menu', array($this, 'set_menus'));
123
+		add_action('network_admin_menu', array($this, 'set_network_menus'));
124 124
 	}
125 125
 
126 126
 
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
 	 * @return void
134 134
 	 */
135 135
 	private function _define_caffeinated_constants() {
136
-		if ( ! defined( 'EE_CORE_CAF_ADMIN'  ) ) {
137
-			define( 'EE_CORE_CAF_ADMIN', EE_PLUGIN_DIR_PATH . 'caffeinated/admin/');
138
-			define( 'EE_CORE_CAF_ADMIN_URL', EE_PLUGIN_DIR_URL . 'caffeinated/admin/');
139
-			define( 'EE_CORE_CAF_ADMIN_NEW', EE_CORE_CAF_ADMIN . 'new/');
140
-			define( 'EE_CORE_CAF_ADMIN_EXTEND', EE_CORE_CAF_ADMIN . 'extend/');
141
-			define( 'EE_CORE_CAF_ADMIN_EXTEND_URL', EE_CORE_CAF_ADMIN_URL . 'extend/');
142
-			define( 'EE_CORE_CAF_ADMIN_HOOKS', EE_CORE_CAF_ADMIN . 'hooks/');
136
+		if ( ! defined('EE_CORE_CAF_ADMIN')) {
137
+			define('EE_CORE_CAF_ADMIN', EE_PLUGIN_DIR_PATH.'caffeinated/admin/');
138
+			define('EE_CORE_CAF_ADMIN_URL', EE_PLUGIN_DIR_URL.'caffeinated/admin/');
139
+			define('EE_CORE_CAF_ADMIN_NEW', EE_CORE_CAF_ADMIN.'new/');
140
+			define('EE_CORE_CAF_ADMIN_EXTEND', EE_CORE_CAF_ADMIN.'extend/');
141
+			define('EE_CORE_CAF_ADMIN_EXTEND_URL', EE_CORE_CAF_ADMIN_URL.'extend/');
142
+			define('EE_CORE_CAF_ADMIN_HOOKS', EE_CORE_CAF_ADMIN.'hooks/');
143 143
 		}
144 144
 	}
145 145
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
 		//set array of EE_Admin_Page_Menu_Group objects
160 160
 		$groups = array(
161
-			'main' => new EE_Admin_Page_Menu_Group( array(
161
+			'main' => new EE_Admin_Page_Menu_Group(array(
162 162
 				'menu_label' => __('Main', 'event_espresso'),
163 163
 				'show_on_menu' => EE_Admin_Page_Menu_Map::NONE,
164 164
 				'menu_slug' => 'main',
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 				'menu_order' => 0,
167 167
 				'parent_slug' => 'espresso_events',
168 168
 				)),
169
-			'management' => new EE_Admin_Page_Menu_Group( array(
169
+			'management' => new EE_Admin_Page_Menu_Group(array(
170 170
 				'menu_label' => __('Management', 'event_espresso'),
171 171
 				'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
172 172
 				'menu_slug' => 'management',
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 				'menu_order' => 10,
175 175
 				'parent_slug' => 'espresso_events'
176 176
 				)),
177
-			'settings' => new EE_Admin_Page_Menu_Group( array(
177
+			'settings' => new EE_Admin_Page_Menu_Group(array(
178 178
 				'menu_label' => __('Settings', 'event_espresso'),
179 179
 				'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
180 180
 				'menu_slug' => 'settings',
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 				'menu_order' => 30,
183 183
 				'parent_slug' => 'espresso_events'
184 184
 				)),
185
-			'templates' => new EE_Admin_Page_Menu_Group( array(
185
+			'templates' => new EE_Admin_Page_Menu_Group(array(
186 186
 				'menu_label' => __('Templates', 'event_espresso'),
187 187
 				'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
188 188
 				'menu_slug' => 'templates',
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 				'menu_order' => 40,
191 191
 				'parent_slug' => 'espresso_events'
192 192
 				)),
193
-			'extras' => new EE_Admin_Page_Menu_Group( array(
193
+			'extras' => new EE_Admin_Page_Menu_Group(array(
194 194
 				'menu_label' => __('Extras', 'event_espresso'),
195 195
 				'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
196 196
 				'menu_slug' => 'extras',
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 				'parent_slug' => 'espresso_events',
200 200
 				'maintenance_mode_parent' => 'espresso_maintenance_settings'
201 201
 				)),
202
-			'tools' => new EE_Admin_Page_Menu_Group( array(
202
+			'tools' => new EE_Admin_Page_Menu_Group(array(
203 203
 				'menu_label' => __("Tools", "event_espresso"),
204 204
 				'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
205 205
 				'menu_slug' => 'tools',
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 				'menu_order' => 60,
208 208
 				'parent_slug' => 'espresso_events'
209 209
 				)),
210
-			'addons' => new EE_Admin_Page_Menu_Group( array(
210
+			'addons' => new EE_Admin_Page_Menu_Group(array(
211 211
 				'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
212 212
 				'menu_label' => __('Add-ons', 'event_espresso'),
213 213
 				'menu_slug' => 'addons',
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 				))
218 218
 			);
219 219
 
220
-		$this->_admin_menu_groups = apply_filters( 'FHEE__EE_Admin_Page_Loader___set_menu_groups__admin_menu_groups', $groups );
220
+		$this->_admin_menu_groups = apply_filters('FHEE__EE_Admin_Page_Loader___set_menu_groups__admin_menu_groups', $groups);
221 221
 	}
222 222
 
223 223
 
@@ -235,10 +235,10 @@  discard block
 block discarded – undo
235 235
 	private function _rearrange_menu_groups() {
236 236
 		$groups = array();
237 237
 		//first let's order the menu groups by their internal menu order (note usort type hinting to ensure the incoming array is EE_Admin_Page_Menu_Map objects )
238
-		usort( $this->_admin_menu_groups, array( $this, '_sort_menu_maps' ) );
239
-		foreach ( $this->_admin_menu_groups as $group ) {
240
-			if ( ! $group instanceof EE_Admin_Page_Menu_Group )
241
-				throw new EE_Error( sprintf( __('Unable to continue sorting the menu groups array because there is an invalid value for the menu groups.  All values in this array are required to be a EE_Admin_Page_Menu_Group object.  Instead there was: %s', 'event_espresso'), print_r($group, TRUE) ) );
238
+		usort($this->_admin_menu_groups, array($this, '_sort_menu_maps'));
239
+		foreach ($this->_admin_menu_groups as $group) {
240
+			if ( ! $group instanceof EE_Admin_Page_Menu_Group)
241
+				throw new EE_Error(sprintf(__('Unable to continue sorting the menu groups array because there is an invalid value for the menu groups.  All values in this array are required to be a EE_Admin_Page_Menu_Group object.  Instead there was: %s', 'event_espresso'), print_r($group, TRUE)));
242 242
 			$groups[$group->menu_slug] = $group;
243 243
 		}
244 244
 		return $groups;
@@ -256,48 +256,48 @@  discard block
 block discarded – undo
256 256
 	 */
257 257
 	private function _get_installed_pages() {
258 258
 		$installed_refs = array();
259
-		$exclude = array( 'assets', 'templates' );
259
+		$exclude = array('assets', 'templates');
260 260
 		// grab everything in the  admin core directory
261
-		$admin_screens = glob( EE_ADMIN_PAGES . '*', GLOB_ONLYDIR );
262
-		if ( $admin_screens ) {
263
-			foreach( $admin_screens as $admin_screen ) {
261
+		$admin_screens = glob(EE_ADMIN_PAGES.'*', GLOB_ONLYDIR);
262
+		if ($admin_screens) {
263
+			foreach ($admin_screens as $admin_screen) {
264 264
 				// files and anything in the exclude array need not apply
265
-				if ( is_dir( $admin_screen ) && ! in_array( basename( $admin_screen ), $exclude )) {
265
+				if (is_dir($admin_screen) && ! in_array(basename($admin_screen), $exclude)) {
266 266
 					// these folders represent the different EE admin pages
267
-					$installed_refs[ basename( $admin_screen ) ] = $admin_screen;
267
+					$installed_refs[basename($admin_screen)] = $admin_screen;
268 268
 				}
269 269
 			}
270 270
 		}
271 271
 
272
-		if ( empty( $installed_refs ) ) {
272
+		if (empty($installed_refs)) {
273 273
 			$error_msg[] = __('There are no EE_Admin pages detected, it looks like EE did not install properly', 'event_espresso');
274
-			$error_msg[] = $error_msg[0] . "\r\n" . sprintf( __('Check that the %s folder exists and is writable. Maybe try deactivating, then reactivating Event Espresso again.', 'event_espresso'), EE_ADMIN_PAGES );
275
-			throw new EE_Error( implode( '||', $error_msg ));
274
+			$error_msg[] = $error_msg[0]."\r\n".sprintf(__('Check that the %s folder exists and is writable. Maybe try deactivating, then reactivating Event Espresso again.', 'event_espresso'), EE_ADMIN_PAGES);
275
+			throw new EE_Error(implode('||', $error_msg));
276 276
 		}
277 277
 
278 278
 		//this just checks the caffeinated folder and takes care of setting up any caffeinated stuff.
279 279
 		$installed_refs = $this->_set_caffeinated($installed_refs);
280 280
 		//allow plugins to add in their own pages (note at this point they will need to have an autoloader defined for their class) OR hook into EEH_Autoloader::load_admin_page() to add their path.;
281
-		$installed_refs = apply_filters( 'FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', $installed_refs );
282
-		$this->_caffeinated_extends = apply_filters( 'FHEE__EE_Admin_Page_Loader___get_installed_pages__caffeinated_extends', $this->_caffeinated_extends );
281
+		$installed_refs = apply_filters('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', $installed_refs);
282
+		$this->_caffeinated_extends = apply_filters('FHEE__EE_Admin_Page_Loader___get_installed_pages__caffeinated_extends', $this->_caffeinated_extends);
283 283
 
284 284
 		//loop through admin pages and setup the $_installed_pages array.
285 285
 		$hooks_ref = array();
286
-		foreach ( $installed_refs as $page => $path ) {
286
+		foreach ($installed_refs as $page => $path) {
287 287
 			// set autoloaders for our admin page classes based on included path information
288
-			EEH_Autoloader::instance()->register_autoloaders_for_each_file_in_folder( $path );
288
+			EEH_Autoloader::instance()->register_autoloaders_for_each_file_in_folder($path);
289 289
 			// build list of installed pages
290
-			$this->_installed_pages[$page] = $this->_load_admin_page( $page, $path );
290
+			$this->_installed_pages[$page] = $this->_load_admin_page($page, $path);
291 291
 			// verify returned object
292
-			if ( $this->_installed_pages[$page] instanceof EE_Admin_Page_Init ) {
293
-				if ( ! $this->_installed_pages[$page]->get_menu_map() instanceof EE_Admin_Page_Menu_Map ) {
292
+			if ($this->_installed_pages[$page] instanceof EE_Admin_Page_Init) {
293
+				if ( ! $this->_installed_pages[$page]->get_menu_map() instanceof EE_Admin_Page_Menu_Map) {
294 294
 					continue;
295 295
 				}
296 296
 
297 297
 				//skip if in full maintenance mode and maintenance_mode_parent is set
298 298
 				$maintenance_mode_parent = $this->_installed_pages[$page]->get_menu_map()->maintenance_mode_parent;
299
-				if ( empty( $maintenance_mode_parent ) && EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ) {
300
-					unset( $installed_refs[$page] );
299
+				if (empty($maintenance_mode_parent) && EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) {
300
+					unset($installed_refs[$page]);
301 301
 					continue;
302 302
 				}
303 303
 
@@ -305,45 +305,45 @@  discard block
 block discarded – undo
305 305
 				//flag for register hooks on extended pages b/c extended pages use the default INIT.
306 306
 				$extend = FALSE;
307 307
 				//now that we've got the admin_init objects... lets see if there are any caffeinated pages extending the originals.  If there are then let's hook into the init admin filter and load our extend instead.
308
-				if ( isset( $this->_caffeinated_extends[$page] ) ) {
308
+				if (isset($this->_caffeinated_extends[$page])) {
309 309
 					$this->_current_caf_extend_slug = $page;
310
-					$path_hook = 'FHEE__EE_Admin_Page_Init___initialize_admin_page__path_to_file__' . $this->_installed_pages[$page]->get_menu_map()->menu_slug . '_' . $this->_installed_pages[$page]->get_admin_page_name();
311
-					$path_runtime = 'return "' . $this->_caffeinated_extends[$this->_current_caf_extend_slug]["path"] . '";';
312
-					$page_hook = 'FHEE__EE_Admin_Page_Init___initialize_admin_page__admin_page__' . $this->_installed_pages[$page]->get_menu_map()->menu_slug . '_' . $this->_installed_pages[$page]->get_admin_page_name();
313
-					$page_runtime = 'return "' . $this->_caffeinated_extends[$this->_current_caf_extend_slug]["admin_page"] . '";';
310
+					$path_hook = 'FHEE__EE_Admin_Page_Init___initialize_admin_page__path_to_file__'.$this->_installed_pages[$page]->get_menu_map()->menu_slug.'_'.$this->_installed_pages[$page]->get_admin_page_name();
311
+					$path_runtime = 'return "'.$this->_caffeinated_extends[$this->_current_caf_extend_slug]["path"].'";';
312
+					$page_hook = 'FHEE__EE_Admin_Page_Init___initialize_admin_page__admin_page__'.$this->_installed_pages[$page]->get_menu_map()->menu_slug.'_'.$this->_installed_pages[$page]->get_admin_page_name();
313
+					$page_runtime = 'return "'.$this->_caffeinated_extends[$this->_current_caf_extend_slug]["admin_page"].'";';
314 314
 
315
-					$hook_function_path = create_function( '$path_to_file', $path_runtime);
316
-					$hook_function_page = create_function( '$admin_page', $page_runtime );
315
+					$hook_function_path = create_function('$path_to_file', $path_runtime);
316
+					$hook_function_page = create_function('$admin_page', $page_runtime);
317 317
 
318
-					add_filter( $path_hook, $hook_function_path );
319
-					add_filter( $page_hook, $hook_function_page );
318
+					add_filter($path_hook, $hook_function_path);
319
+					add_filter($page_hook, $hook_function_page);
320 320
 					$extend = TRUE;
321 321
 				}
322 322
 				//let's do the registered hooks
323
-				$extended_hooks = $this->_installed_pages[$page]->register_hooks( $extend );
323
+				$extended_hooks = $this->_installed_pages[$page]->register_hooks($extend);
324 324
 				$hooks_ref = array_merge($hooks_ref, $extended_hooks);
325 325
 			}
326 326
 		}
327 327
 
328 328
 		//the hooks_ref is all the pages where we have $extended _Hooks files that will extend a class in a different folder.  So we want to make sure we load the file for the parent.
329 329
 		//first make sure we've got unique values
330
-		$hooks_ref = array_unique( $hooks_ref );
330
+		$hooks_ref = array_unique($hooks_ref);
331 331
 		//now let's loop and require!
332
-		foreach ( $hooks_ref as $path ) {
333
-			require_once( $path );
332
+		foreach ($hooks_ref as $path) {
333
+			require_once($path);
334 334
 		}
335 335
 		//make sure we have menu slugs global setup. Used in EE_Admin_Page->page_setup() to ensure we don't do a full class load for an admin page that isn't requested.
336 336
 		global $ee_menu_slugs;
337 337
 		$ee_menu_slugs = $this->_menu_slugs;
338 338
 
339 339
 		//we need to loop again to run any early code
340
-		foreach ( $installed_refs as $page => $path ) {
341
-			if ( $this->_installed_pages[$page] instanceof EE_Admin_Page_Init ) {
340
+		foreach ($installed_refs as $page => $path) {
341
+			if ($this->_installed_pages[$page] instanceof EE_Admin_Page_Init) {
342 342
 				$this->_installed_pages[$page]->do_initial_loads();
343 343
 			}
344 344
 		}
345 345
 
346
-		do_action( 'AHEE__EE_Admin_Page_Loader___get_installed_pages_loaded', $this->_installed_pages );
346
+		do_action('AHEE__EE_Admin_Page_Loader___get_installed_pages_loaded', $this->_installed_pages);
347 347
 
348 348
 	}
349 349
 
@@ -355,9 +355,9 @@  discard block
 block discarded – undo
355 355
 	 * @param string $page_slug
356 356
 	 * @return EE_Admin_Page
357 357
 	 */
358
-	public function get_admin_page_object( $page_slug = '' ) {
359
-		if ( isset( $this->_installed_pages[ $page_slug ] )) {
360
-			return $this->_installed_pages[ $page_slug ]->loaded_page_object();
358
+	public function get_admin_page_object($page_slug = '') {
359
+		if (isset($this->_installed_pages[$page_slug])) {
360
+			return $this->_installed_pages[$page_slug]->loaded_page_object();
361 361
 		}
362 362
 		return NULL;
363 363
 	}
@@ -370,9 +370,9 @@  discard block
 block discarded – undo
370 370
 	 * @param $dir_name
371 371
 	 * @return string
372 372
 	 */
373
-	private function _get_classname_for_admin_page( $dir_name = '' ) {
374
-		$class_name = str_replace( '_', ' ', strtolower( $dir_name ));
375
-		return str_replace( ' ', '_', ucwords( $class_name )) . '_Admin_Page';
373
+	private function _get_classname_for_admin_page($dir_name = '') {
374
+		$class_name = str_replace('_', ' ', strtolower($dir_name));
375
+		return str_replace(' ', '_', ucwords($class_name)).'_Admin_Page';
376 376
 	}
377 377
 
378 378
 
@@ -383,9 +383,9 @@  discard block
 block discarded – undo
383 383
 	 * @param $dir_name
384 384
 	 * @return string
385 385
 	 */
386
-	private function _get_classname_for_admin_init_page( $dir_name = '' ) {
387
-		$class_name = str_replace( '_', ' ', strtolower( $dir_name ));
388
-		return str_replace( ' ', '_', ucwords( $class_name )) . '_Admin_Page_Init';
386
+	private function _get_classname_for_admin_init_page($dir_name = '') {
387
+		$class_name = str_replace('_', ' ', strtolower($dir_name));
388
+		return str_replace(' ', '_', ucwords($class_name)).'_Admin_Page_Init';
389 389
 	}
390 390
 
391 391
 
@@ -398,26 +398,26 @@  discard block
 block discarded – undo
398 398
 	 * @throws EE_Error
399 399
 	 * @return object|bool  return page object if valid, bool false if not.
400 400
 	 */
401
-	private function _load_admin_page( $page = '', $path = '' ) {
402
-		$class_name = $this->_get_classname_for_admin_init_page( $page );
403
- 		EE_Registry::instance()->load_file( $path, $class_name, 'core' );
404
-		if ( ! class_exists( $class_name )) {
405
-            $inner_error_msg = '<br />' . sprintf(
401
+	private function _load_admin_page($page = '', $path = '') {
402
+		$class_name = $this->_get_classname_for_admin_init_page($page);
403
+ 		EE_Registry::instance()->load_file($path, $class_name, 'core');
404
+		if ( ! class_exists($class_name)) {
405
+            $inner_error_msg = '<br />'.sprintf(
406 406
                 esc_html__(
407 407
                     'Make sure you have %1$s defined. If this is a non-EE-core admin page then you also must have an autoloader in place for your class',
408 408
                     'event_espresso'
409 409
                 ),
410
-                '<strong>' . $class_name . '</strong>'
410
+                '<strong>'.$class_name.'</strong>'
411 411
             );
412
-			$error_msg[] = sprintf( __('Something went wrong with loading the %s admin page.', 'event_espresso' ), $page);
412
+			$error_msg[] = sprintf(__('Something went wrong with loading the %s admin page.', 'event_espresso'), $page);
413 413
 			$error_msg[] = $error_msg[0]
414 414
                            . "\r\n"
415 415
                            . sprintf(
416
-                               esc_html__( 'There is no Init class in place for the %s admin page.', 'event_espresso'),
416
+                               esc_html__('There is no Init class in place for the %s admin page.', 'event_espresso'),
417 417
                                $page
418 418
                            )
419 419
                            . $inner_error_msg;
420
-			throw new EE_Error( implode( '||', $error_msg ));
420
+			throw new EE_Error(implode('||', $error_msg));
421 421
 		}
422 422
 		$a = new ReflectionClass($class_name);
423 423
 		return  $a->newInstance();
@@ -436,9 +436,9 @@  discard block
 block discarded – undo
436 436
 	public function set_menus() {
437 437
 		//prep the menu pages (sort, group.)
438 438
 		$this->_prep_pages();
439
-		foreach( $this->_prepped_menu_maps as $menu_map ) {
440
-			if ( EE_Registry::instance()->CAP->current_user_can( $menu_map->capability, $menu_map->menu_slug ) ) {
441
-				$menu_map->add_menu_page( FALSE );
439
+		foreach ($this->_prepped_menu_maps as $menu_map) {
440
+			if (EE_Registry::instance()->CAP->current_user_can($menu_map->capability, $menu_map->menu_slug)) {
441
+				$menu_map->add_menu_page(FALSE);
442 442
 			}
443 443
 		}
444 444
 	}
@@ -451,11 +451,11 @@  discard block
 block discarded – undo
451 451
 	 *
452 452
 	 * @return void
453 453
 	 */
454
-	public function set_network_menus(){
454
+	public function set_network_menus() {
455 455
 		$this->_prep_pages();
456
-		foreach( $this->_prepped_menu_maps as $menu_map ) {
457
-			if ( EE_Registry::instance()->CAP->current_user_can( $menu_map->capability, $menu_map->menu_slug ) ) {
458
-				$menu_map->add_menu_page( TRUE );
456
+		foreach ($this->_prepped_menu_maps as $menu_map) {
457
+			if (EE_Registry::instance()->CAP->current_user_can($menu_map->capability, $menu_map->menu_slug)) {
458
+				$menu_map->add_menu_page(TRUE);
459 459
 			}
460 460
 		}
461 461
 	}
@@ -476,22 +476,22 @@  discard block
 block discarded – undo
476 476
 		//rearrange _admin_menu_groups to be indexed by group slug.
477 477
 		$menu_groups = $this->_rearrange_menu_groups();
478 478
 
479
-		foreach( $this->_installed_pages as $page ) {
480
-			if ( $page instanceof EE_Admin_page_Init ) {
479
+		foreach ($this->_installed_pages as $page) {
480
+			if ($page instanceof EE_Admin_page_Init) {
481 481
 				$page_map = $page->get_menu_map();
482 482
 				//if we've got an array then the menu map is in the old format so let's throw a persistent notice that the admin system isn't setup correctly for this item.
483
-				if ( is_array( $page_map ) || empty( $page_map ) ) {
484
-					EE_Error::add_persistent_admin_notice( 'menu_map_warning_' . str_replace(' ', '_', $page->label) . '_' . EVENT_ESPRESSO_VERSION, sprintf( __('The admin page for %s was not correctly setup because it is using an older method for integrating with Event Espresso Core.  This means that full functionality for this component is not available.  This error message usually appears with an Add-on that is out of date.  Make sure you update all your Event Espresso 4 add-ons to the latest version to ensure they have necessary compatibility updates in place.', 'event_espresso' ), $page->label ) );
483
+				if (is_array($page_map) || empty($page_map)) {
484
+					EE_Error::add_persistent_admin_notice('menu_map_warning_'.str_replace(' ', '_', $page->label).'_'.EVENT_ESPRESSO_VERSION, sprintf(__('The admin page for %s was not correctly setup because it is using an older method for integrating with Event Espresso Core.  This means that full functionality for this component is not available.  This error message usually appears with an Add-on that is out of date.  Make sure you update all your Event Espresso 4 add-ons to the latest version to ensure they have necessary compatibility updates in place.', 'event_espresso'), $page->label));
485 485
 					continue;
486 486
 				}
487 487
 
488 488
 				//if page map is NOT a EE_Admin_Page_Menu_Map object then throw error.
489
-				if ( ! $page_map instanceof EE_Admin_Page_Menu_Map ) {
490
-					throw new EE_Error( sprintf( __('The menu map for %s must be an EE_Admin_Page_Menu_Map object.  Instead it is %s.  Please double check that the menu map has been configured correctly.', 'event_espresso'), $page->label, $page_map ) );
489
+				if ( ! $page_map instanceof EE_Admin_Page_Menu_Map) {
490
+					throw new EE_Error(sprintf(__('The menu map for %s must be an EE_Admin_Page_Menu_Map object.  Instead it is %s.  Please double check that the menu map has been configured correctly.', 'event_espresso'), $page->label, $page_map));
491 491
 				}
492 492
 
493 493
 				//use the maintenance_mode_parent property and maintenance mode status to determine if this page even gets added to array.
494
-				if ( empty( $page_map->maintenance_mode_parent ) &&  EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ) {
494
+				if (empty($page_map->maintenance_mode_parent) && EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) {
495 495
 					continue;
496 496
 				}
497 497
 
@@ -500,21 +500,21 @@  discard block
 block discarded – undo
500 500
 			}
501 501
 		}
502 502
 
503
-		if ( empty( $pages_array )) {
504
-			throw new EE_Error(__('Something went wrong when prepping the admin pages', 'event_espresso') );
503
+		if (empty($pages_array)) {
504
+			throw new EE_Error(__('Something went wrong when prepping the admin pages', 'event_espresso'));
505 505
 		}
506 506
 
507 507
 		//let's sort the groups, make sure it's a valid group, add header (if to show).
508
-		foreach ( $pages_array as $group => $menu_maps ) {
508
+		foreach ($pages_array as $group => $menu_maps) {
509 509
 			//valid_group?
510
-			if ( ! array_key_exists( $group, $menu_groups ) )
510
+			if ( ! array_key_exists($group, $menu_groups))
511 511
 				continue;
512 512
 
513 513
 			//sort pages.
514
-			usort( $menu_maps, array( $this, '_sort_menu_maps' ) );
514
+			usort($menu_maps, array($this, '_sort_menu_maps'));
515 515
 
516 516
 			//prepend header
517
-			array_unshift( $menu_maps, $menu_groups[$group] );
517
+			array_unshift($menu_maps, $menu_groups[$group]);
518 518
 
519 519
 			//reset $pages_array with prepped data
520 520
 			$pages_array[$group] = $menu_maps;
@@ -522,9 +522,9 @@  discard block
 block discarded – undo
522 522
 
523 523
 
524 524
 		//now let's setup the _prepped_menu_maps property
525
-		foreach ( $menu_groups as $group => $group_objs ) {
526
-			if ( isset( $pages_array[$group] ) )
527
-				$this->_prepped_menu_maps = array_merge( $this->_prepped_menu_maps, $pages_array[$group] );
525
+		foreach ($menu_groups as $group => $group_objs) {
526
+			if (isset($pages_array[$group]))
527
+				$this->_prepped_menu_maps = array_merge($this->_prepped_menu_maps, $pages_array[$group]);
528 528
 		}/**/
529 529
 
530 530
 	}
@@ -544,10 +544,10 @@  discard block
 block discarded – undo
544 544
 	 * @param array $installed_refs the original installed_refs array that may contain our NEW EE_Admin_Pages to be loaded.
545 545
 	 * @return array
546 546
 	 */
547
-	private function _set_caffeinated( $installed_refs ) {
547
+	private function _set_caffeinated($installed_refs) {
548 548
 
549 549
 		//first let's check if there IS a caffeinated folder. If there is not then lets get out.
550
-		if ( ! is_dir( EE_PLUGIN_DIR_PATH . 'caffeinated' . DS . 'admin' ) || ( defined( 'EE_DECAF' ) && EE_DECAF )) {
550
+		if ( ! is_dir(EE_PLUGIN_DIR_PATH.'caffeinated'.DS.'admin') || (defined('EE_DECAF') && EE_DECAF)) {
551 551
 			return $installed_refs;
552 552
 		}
553 553
 
@@ -556,15 +556,15 @@  discard block
 block discarded – undo
556 556
 		$exclude = array('tickets');
557 557
 
558 558
 		//okay let's setup an "New" pages first (we'll return installed refs later)
559
-		$new_admin_screens = glob( EE_CORE_CAF_ADMIN . 'new/*', GLOB_ONLYDIR );
560
-		if ( $new_admin_screens ) {
561
-			foreach( $new_admin_screens as $admin_screen ) {
559
+		$new_admin_screens = glob(EE_CORE_CAF_ADMIN.'new/*', GLOB_ONLYDIR);
560
+		if ($new_admin_screens) {
561
+			foreach ($new_admin_screens as $admin_screen) {
562 562
 				// files and anything in the exclude array need not apply
563
-				if ( is_dir( $admin_screen ) && ! in_array( basename( $admin_screen ), $exclude )) {
563
+				if (is_dir($admin_screen) && ! in_array(basename($admin_screen), $exclude)) {
564 564
 					// these folders represent the different NEW EE admin pages
565
-					$installed_refs[ basename( $admin_screen ) ] = $admin_screen;
565
+					$installed_refs[basename($admin_screen)] = $admin_screen;
566 566
 					// set autoloaders for our admin page classes based on included path information
567
-					EEH_Autoloader::instance()->register_autoloaders_for_each_file_in_folder( $admin_screen );
567
+					EEH_Autoloader::instance()->register_autoloaders_for_each_file_in_folder($admin_screen);
568 568
 //					$this->_caf_autoloader[] = array(
569 569
 //						'dir' => 'new',
570 570
 //						'folder' => basename( $admin_screen )
@@ -574,18 +574,18 @@  discard block
 block discarded – undo
574 574
 		}
575 575
 
576 576
 		//let's see if there are any EXTENDS to setup in the $_caffeinated_extends array (that will be used later for hooking into the _initialize_admin_age in the related core_init admin page)
577
-		$extends = glob( EE_CORE_CAF_ADMIN . 'extend/*', GLOB_ONLYDIR );
578
-		if ( $extends ) {
579
-			foreach( $extends as $extend ) {
580
-				if ( is_dir( $extend ) ) {
581
-					$extend_ref = basename( $extend );
577
+		$extends = glob(EE_CORE_CAF_ADMIN.'extend/*', GLOB_ONLYDIR);
578
+		if ($extends) {
579
+			foreach ($extends as $extend) {
580
+				if (is_dir($extend)) {
581
+					$extend_ref = basename($extend);
582 582
 					//now let's make sure there is a file that matches the expected format
583
-					$filename = str_replace(' ', '_', ucwords( str_replace('_', ' ', $extend_ref ) ) );
584
-					$filename = 'Extend_' . $filename . '_Admin_Page';
585
-					$this->_caffeinated_extends[$extend_ref]['path'] = str_replace( array( '\\', '/' ), DS, EE_CORE_CAF_ADMIN . 'extend' . DS . $extend_ref . DS . $filename . '.core.php' );
583
+					$filename = str_replace(' ', '_', ucwords(str_replace('_', ' ', $extend_ref)));
584
+					$filename = 'Extend_'.$filename.'_Admin_Page';
585
+					$this->_caffeinated_extends[$extend_ref]['path'] = str_replace(array('\\', '/'), DS, EE_CORE_CAF_ADMIN.'extend'.DS.$extend_ref.DS.$filename.'.core.php');
586 586
 					$this->_caffeinated_extends[$extend_ref]['admin_page'] = $filename;
587 587
 					// set autoloaders for our admin page classes based on included path information
588
-					EEH_Autoloader::instance()->register_autoloaders_for_each_file_in_folder( $extend );
588
+					EEH_Autoloader::instance()->register_autoloaders_for_each_file_in_folder($extend);
589 589
 //					$this->_caf_autoloader[] = array(
590 590
 //						'dir' => 'extend',
591 591
 //						'folder' => $extend_ref
@@ -596,22 +596,22 @@  discard block
 block discarded – undo
596 596
 
597 597
 		//let's see if there are any HOOK files and instantiate them if there are (so that hooks are loaded early!).
598 598
 		$ee_admin_hooks = array();
599
-		$hooks = glob( EE_CORE_CAF_ADMIN . 'hooks/*.class.php' );
600
-		if ( $hooks ) {
601
-			foreach ( $hooks as $hook ) {
602
-				if ( is_readable( $hook ) ) {
599
+		$hooks = glob(EE_CORE_CAF_ADMIN.'hooks/*.class.php');
600
+		if ($hooks) {
601
+			foreach ($hooks as $hook) {
602
+				if (is_readable($hook)) {
603 603
 					require_once $hook;
604
-					$classname = str_replace( EE_CORE_CAF_ADMIN . 'hooks/', '', $hook );
604
+					$classname = str_replace(EE_CORE_CAF_ADMIN.'hooks/', '', $hook);
605 605
 					$classname = str_replace('.class.php', '', $classname);
606
-					if ( class_exists( $classname ) ) {
607
-						$a = new ReflectionClass( $classname );
606
+					if (class_exists($classname)) {
607
+						$a = new ReflectionClass($classname);
608 608
 						$ee_admin_hooks[] = $a->newInstance();
609 609
 					}
610 610
 				}
611 611
 			}
612 612
 		}/**/
613 613
 
614
-		$ee_admin_hooks = apply_filters( 'FHEE__EE_Admin_Page_Loader__set_caffeinated__ee_admin_hooks', $ee_admin_hooks );
614
+		$ee_admin_hooks = apply_filters('FHEE__EE_Admin_Page_Loader__set_caffeinated__ee_admin_hooks', $ee_admin_hooks);
615 615
 
616 616
 		return $installed_refs;
617 617
 
@@ -666,8 +666,8 @@  discard block
 block discarded – undo
666 666
 	 * @param  EE_Admin_Page_Menu_Map $b being compared to
667 667
 	 * @return int    sort order
668 668
 	 */
669
-	private function _sort_menu_maps( EE_Admin_Page_Menu_Map $a, EE_Admin_Page_Menu_Map $b ) {
670
-		if ( $a->menu_order == $b->menu_order )
669
+	private function _sort_menu_maps(EE_Admin_Page_Menu_Map $a, EE_Admin_Page_Menu_Map $b) {
670
+		if ($a->menu_order == $b->menu_order)
671 671
 			return 0;
672 672
 		return ($a->menu_order < $b->menu_order) ? -1 : 1;
673 673
 	}
Please login to merge, or discard this patch.
core/admin/EE_Help_Tour_final_stop.class.php 2 patches
Spacing   +2 added lines, -2 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
 /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 			'action' => 'admin_option_settings',
61 61
 			'page' => 'espresso_general_settings'
62 62
 			);
63
-		return '<p>' . sprintf( __('That\'s it for the tour!  At any time you can restart a tour by clicking on this help dropdown and then clicking one of the Tour buttons.  There are help tours available on all Event Espresso Admin pages.  If you want to turn off help tours for all pages, %sgo here%s. All the best with your events!', 'event_espresso'), '<a href="' . EE_Admin_Page::add_query_args_and_nonce($query_args, admin_url('admin.php') ) . '">', '</a>' ) . '</p>';
63
+		return '<p>'.sprintf(__('That\'s it for the tour!  At any time you can restart a tour by clicking on this help dropdown and then clicking one of the Tour buttons.  There are help tours available on all Event Espresso Admin pages.  If you want to turn off help tours for all pages, %sgo here%s. All the best with your events!', 'event_espresso'), '<a href="'.EE_Admin_Page::add_query_args_and_nonce($query_args, admin_url('admin.php')).'">', '</a>').'</p>';
64 64
 	}
65 65
 
66 66
 }
67 67
\ No newline at end of file
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.
core/admin/templates/about_admin_wrapper.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <div class="wrap espresso-admin about-wrap">
2 2
 
3 3
 	<h1><?php  echo $admin_page_title; ?></h1>
4
-	<div class="about-text"><?php echo !empty($admin_page_subtitle) ? $admin_page_subtitle : ''; ?></div>
5
-	<div class="ee-badge"><img class="" src=" <?php echo EE_GLOBAL_ASSETS_URL; ?>images/event-espresso-cup-90x90.png" width="90" height="90" alt="<?php printf( esc_attr__( '%s Logo', 'event_espresso' ), 'Event Espresso' ); ?>"/><br /><?php printf( __('Version %s', 'event_espresso' ),  EVENT_ESPRESSO_VERSION ); ?></div>
4
+	<div class="about-text"><?php echo ! empty($admin_page_subtitle) ? $admin_page_subtitle : ''; ?></div>
5
+	<div class="ee-badge"><img class="" src=" <?php echo EE_GLOBAL_ASSETS_URL; ?>images/event-espresso-cup-90x90.png" width="90" height="90" alt="<?php printf(esc_attr__('%s Logo', 'event_espresso'), 'Event Espresso'); ?>"/><br /><?php printf(__('Version %s', 'event_espresso'), EVENT_ESPRESSO_VERSION); ?></div>
6 6
 
7 7
 	<?php echo $nav_tabs; ?>
8 8
 
9 9
 
10 10
 <?php
11
-	do_action( 'AHEE__admin_wrapper__template__before_about_admin_page_content' );
11
+	do_action('AHEE__admin_wrapper__template__before_about_admin_page_content');
12 12
 	echo $about_admin_page_content;
13
-	do_action( 'AHEE__admin_wrapper__template__after_about_admin_page_content' );
13
+	do_action('AHEE__admin_wrapper__template__after_about_admin_page_content');
14 14
 ?>
15 15
 
16 16
 </div>
Please login to merge, or discard this patch.
core/admin/templates/admin_details_metabox_column_wrapper.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@
 block discarded – undo
10 10
 
11 11
 		<?php
12 12
 		//let's loop through the columns
13
-		 for ( $i = 1; $i <= $num_columns; $i++ ) {
14
-		 	$metaref = ( $i === 1 ) ? 'normal' : 'side';
15
-		 	$metaref = ( $i > 2 ) ? 'column'.$i : $metaref;
13
+		 for ($i = 1; $i <= $num_columns; $i++) {
14
+		 	$metaref = ($i === 1) ? 'normal' : 'side';
15
+		 	$metaref = ($i > 2) ? 'column'.$i : $metaref;
16 16
 		 ?>
17 17
 
18 18
 			<div id='postbox-container-<?php echo $i; ?>' class='postbox-container'>
19
-				<?php do_meta_boxes( $current_page, $metaref, NULL ); ?>
19
+				<?php do_meta_boxes($current_page, $metaref, NULL); ?>
20 20
 			</div>
21 21
 		<?php }// end column loop ?>
22 22
 	</div> <!-- post-body -->
Please login to merge, or discard this patch.
core/admin/templates/admin_details_publish_metabox.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( $publish_box_extra_content ) : ?>
1
+<?php if ($publish_box_extra_content) : ?>
2 2
 <div id="minor-publishing">
3 3
 <?php echo $publish_box_extra_content; ?>
4 4
 </div>
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	
14 14
 	<div id="espresso_major_buttons_wrapper">
15 15
 	
16
-		<?php if ( $publish_delete_link ) : ?>
16
+		<?php if ($publish_delete_link) : ?>
17 17
 		<div id="delete-action">
18 18
 			<?php echo $publish_delete_link; ?>
19 19
 		</div>
Please login to merge, or discard this patch.
admin/templates/admin_general_metabox_contents_espresso_links.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <div class="padding">
2 2
 	   	<ul class="infolinks">
3 3
 	   		<li>
4
-	   			<?php echo '<a href="http://eventespresso.com/wiki/installation/" target="_blank">'.__('Installation', 'event_espresso') . '</a>  &amp; <a href="http://eventespresso.com/wiki/setting-up-event-espresso/" target="_blank">' . __('Usage Guide').'</a>'; ?>
4
+	   			<?php echo '<a href="http://eventespresso.com/wiki/installation/" target="_blank">'.__('Installation', 'event_espresso').'</a>  &amp; <a href="http://eventespresso.com/wiki/setting-up-event-espresso/" target="_blank">'.__('Usage Guide').'</a>'; ?>
5 5
 	   		</li>
6 6
 	   		<li>
7 7
 		   		<a href="http://eventespresso.com/wiki/put-custom-templates/" target="_blank">
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	   			</a>
31 31
 	   		</li>
32 32
 	   		<li>
33
-	   			<?php echo '<a href="http://eventespresso.com/pricing/" target="_blank">'.__('Plugins', 'event_espresso'). '</a> &amp; <a href="http://eventespresso.com/add-ons/" target="_blank">' .__('Add-ons', 'event_espresso').'</a>'; ?><br />
33
+	   			<?php echo '<a href="http://eventespresso.com/pricing/" target="_blank">'.__('Plugins', 'event_espresso').'</a> &amp; <a href="http://eventespresso.com/add-ons/" target="_blank">'.__('Add-ons', 'event_espresso').'</a>'; ?><br />
34 34
 	   			<br />
35 35
 	   			<ol>
36 36
 	   				<li>
Please login to merge, or discard this patch.
core/admin/templates/admin_reports.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php //EEH_Debug_Tools::printr( $admin_reports, '$admin_reports' ); ?>
2 2
 
3
-<?php foreach ( $admin_reports as $report) : ?>
3
+<?php foreach ($admin_reports as $report) : ?>
4 4
 
5 5
 	<div id="<?php echo $report; ?>" class="admin-report-chart-dv" style="width:95%; min-height:420px; margin:20px 4% 40px 1%;"></div>
6 6
 
Please login to merge, or discard this patch.
core/admin/templates/status_dropdown.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 	<span id="localized_status_save"><?php echo $localized_status_save; ?></span>
4 4
 	<span id="cur_stat_id"><?php echo $cur_status; ?></span>
5 5
 	<select name='ee_post_status' id='ee_post_status'>
6
- 	<?php foreach ( $statuses as $status => $label ) : ?>
7
-		<option<?php selected( $cur_status, $status ); ?> value='<?php echo $status; ?>'><?php echo $label; ?></option>
6
+ 	<?php foreach ($statuses as $status => $label) : ?>
7
+		<option<?php selected($cur_status, $status); ?> value='<?php echo $status; ?>'><?php echo $label; ?></option>
8 8
 	<?php
9 9
 	endforeach;
10 10
 	?>
Please login to merge, or discard this patch.
4_1_0_stages/EE_DMS_4_1_0_category_details.dmsstage.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
  * Authorize.net AIM, Bank, Check, Invoice, Paypal Pro and Paypal Standard.
7 7
  * 
8 8
  */
9
-class EE_DMS_4_1_0_category_details extends EE_Data_Migration_Script_Stage{
9
+class EE_DMS_4_1_0_category_details extends EE_Data_Migration_Script_Stage {
10 10
 private $_old_table;
11 11
 private $_new_table;
12 12
 private $_new_term_table;
13
-function _migration_step($num_items=50){
13
+function _migration_step($num_items = 50) {
14 14
 	global $wpdb;
15 15
 	$start_at_record = $this->count_records_migrated();
16
-	$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM $this->_old_table LIMIT %d,%d",$start_at_record,$num_items),ARRAY_A);
16
+	$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM $this->_old_table LIMIT %d,%d", $start_at_record, $num_items), ARRAY_A);
17 17
 	$items_actually_migrated = 0;
18
-	foreach($rows as $category_detail_row){
18
+	foreach ($rows as $category_detail_row) {
19 19
 		$term_and_taxonomy_ids = wp_insert_term(
20 20
 				stripslashes($category_detail_row['category_name']),
21 21
 				'espresso_event_categories',
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 					'description'=>  stripslashes($category_detail_row['category_desc']),
24 24
 					'slug'=>$category_detail_row['category_identifier']
25 25
 				));
26
-		if($term_and_taxonomy_ids instanceof WP_Error){
27
-			$this->add_error(sprintf(__("Could not create WP Term_Taxonomy from old category: %s. The Error was: %s", "event_espresso"),  $this->_json_encode($category_detail_row),$term_and_taxonomy_ids->get_error_message()));
26
+		if ($term_and_taxonomy_ids instanceof WP_Error) {
27
+			$this->add_error(sprintf(__("Could not create WP Term_Taxonomy from old category: %s. The Error was: %s", "event_espresso"), $this->_json_encode($category_detail_row), $term_and_taxonomy_ids->get_error_message()));
28 28
 			$items_actually_migrated++;
29 29
 			continue;
30 30
 		}
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		$this->get_migration_script()->set_mapping($this->_old_table, $category_detail_row['id'], $this->_new_table, $term_taxonomy_id);
35 35
 		$items_actually_migrated++;
36 36
 	}
37
-	if($this->count_records_migrated() + $items_actually_migrated >= $this->count_records_to_migrate()){
37
+	if ($this->count_records_migrated() + $items_actually_migrated >= $this->count_records_to_migrate()) {
38 38
 		$this->set_completed();
39 39
 	}
40 40
 	return $items_actually_migrated;
Please login to merge, or discard this patch.