Completed
Branch BETA-4.9-messages-queue-fixed (941081)
by
unknown
548:45 queued 526:33
created
core/request_stack/EE_Response.core.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 * @return \EE_Response
41 41
 	 */
42 42
 	public function __construct() {
43
-		$this->terminate_request( false );
43
+		$this->terminate_request(false);
44 44
 	}
45 45
 
46 46
 
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 	 * @param $value
54 54
 	 * @return    void
55 55
 	 */
56
-	public function set_notice( $key, $value ) {
57
-		$this->_notice[ $key ] = $value;
56
+	public function set_notice($key, $value) {
57
+		$this->_notice[$key] = $value;
58 58
 	}
59 59
 
60 60
 
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 	 * @param $key
67 67
 	 * @return    mixed
68 68
 	 */
69
-	public function get_notice( $key ) {
70
-		return isset( $this->_notice[ $key ] ) ? $this->_notice[ $key ] : NULL;
69
+	public function get_notice($key) {
70
+		return isset($this->_notice[$key]) ? $this->_notice[$key] : NULL;
71 71
 	}
72 72
 
73 73
 
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	 * @param $string
92 92
 	 * @param bool $append
93 93
 	 */
94
-	public function add_output( $string, $append = true ) {
95
-		$this->_output = $append ? $this->_output . $string : $string . $this->_output;
94
+	public function add_output($string, $append = true) {
95
+		$this->_output = $append ? $this->_output.$string : $string.$this->_output;
96 96
 	}
97 97
 
98 98
 
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 	/**
122 122
 	 * @param boolean $request_terminated
123 123
 	 */
124
-	public function terminate_request( $request_terminated = true ) {
125
-		$this->request_terminated = filter_var( $request_terminated, FILTER_VALIDATE_BOOLEAN );
124
+	public function terminate_request($request_terminated = true) {
125
+		$this->request_terminated = filter_var($request_terminated, FILTER_VALIDATE_BOOLEAN);
126 126
 	}
127 127
 
128 128
 
Please login to merge, or discard this patch.
core/EE_System.core.php 2 patches
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -203,14 +203,14 @@  discard block
 block discarded – undo
203 203
 
204 204
 
205 205
 	/**
206
-	* detect_if_activation_or_upgrade
207
-	*
208
-	* Takes care of detecting whether this is a brand new install or code upgrade,
209
-	* and either setting up the DB or setting up maintenance mode etc.
210
-	*
211
-	* @access public
212
-	* @return void
213
-	*/
206
+	 * detect_if_activation_or_upgrade
207
+	 *
208
+	 * Takes care of detecting whether this is a brand new install or code upgrade,
209
+	 * and either setting up the DB or setting up maintenance mode etc.
210
+	 *
211
+	 * @access public
212
+	 * @return void
213
+	 */
214 214
 	public function detect_if_activation_or_upgrade() {
215 215
 		do_action('AHEE__EE_System___detect_if_activation_or_upgrade__begin');
216 216
 
@@ -514,11 +514,11 @@  discard block
 block discarded – undo
514 514
 			$query_params =  array( 'page' => 'espresso_about' );
515 515
 
516 516
 			if ( EE_System::instance()->detect_req_type() == EE_System::req_type_new_activation ) {
517
-			    $query_params['new_activation'] = TRUE;
517
+				$query_params['new_activation'] = TRUE;
518 518
 			}
519 519
 
520 520
 			if ( EE_System::instance()->detect_req_type() == EE_System::req_type_reactivation ) {
521
-			    $query_params['reactivation'] = TRUE;
521
+				$query_params['reactivation'] = TRUE;
522 522
 			}
523 523
 			$url = add_query_arg( $query_params, admin_url( 'admin.php' ) );
524 524
 			wp_safe_redirect( $url );
@@ -621,11 +621,11 @@  discard block
 block discarded – undo
621 621
 
622 622
 
623 623
 	/**
624
-	* _incompatible_addon_error
625
-	*
626
-	* @access public
627
-	* @return void
628
-	*/
624
+	 * _incompatible_addon_error
625
+	 *
626
+	 * @access public
627
+	 * @return void
628
+	 */
629 629
 	private function _incompatible_addon_error() {
630 630
 		// get array of classes hooking into here
631 631
 		$class_names = EEH_Class_Tools::get_class_names_for_all_callbacks_on_hook( 'AHEE__EE_System__register_shortcodes_modules_and_addons' );
@@ -747,14 +747,14 @@  discard block
 block discarded – undo
747 747
 
748 748
 
749 749
 	/**
750
-	* load_controllers
751
-	*
752
-	* this is the best place to load any additional controllers that needs access to EE core.
753
-	* it is expected that all basic core EE systems, that are not dependant on the current request are loaded at this time
754
-	*
755
-	* @access public
756
-	* @return void
757
-	*/
750
+	 * load_controllers
751
+	 *
752
+	 * this is the best place to load any additional controllers that needs access to EE core.
753
+	 * it is expected that all basic core EE systems, that are not dependant on the current request are loaded at this time
754
+	 *
755
+	 * @access public
756
+	 * @return void
757
+	 */
758 758
 	public function load_controllers() {
759 759
 		do_action( 'AHEE__EE_System__load_controllers__start' );
760 760
 		// let's get it started
@@ -771,13 +771,13 @@  discard block
 block discarded – undo
771 771
 
772 772
 
773 773
 	/**
774
-	* core_loaded_and_ready
775
-	*
776
-	* all of the basic EE core should be loaded at this point and available regardless of M-Mode
777
-	*
778
-	* @access public
779
-	* @return void
780
-	*/
774
+	 * core_loaded_and_ready
775
+	 *
776
+	 * all of the basic EE core should be loaded at this point and available regardless of M-Mode
777
+	 *
778
+	 * @access public
779
+	 * @return void
780
+	 */
781 781
 	public function core_loaded_and_ready() {
782 782
 		do_action( 'AHEE__EE_System__core_loaded_and_ready' );
783 783
 		do_action( 'AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons' );
@@ -788,13 +788,13 @@  discard block
 block discarded – undo
788 788
 
789 789
 
790 790
 	/**
791
-	* initialize
792
-	*
793
-	* this is the best place to begin initializing client code
794
-	*
795
-	* @access public
796
-	* @return void
797
-	*/
791
+	 * initialize
792
+	 *
793
+	 * this is the best place to begin initializing client code
794
+	 *
795
+	 * @access public
796
+	 * @return void
797
+	 */
798 798
 	public function initialize() {
799 799
 		do_action( 'AHEE__EE_System__initialize' );
800 800
 	}
@@ -802,13 +802,13 @@  discard block
 block discarded – undo
802 802
 
803 803
 
804 804
 	/**
805
-	* initialize_last
806
-	*
807
-	* this is run really late during the WP init hookpoint, and ensures that mostly everything else that needs to initialize has done so
808
-	*
809
-	* @access public
810
-	* @return void
811
-	*/
805
+	 * initialize_last
806
+	 *
807
+	 * this is run really late during the WP init hookpoint, and ensures that mostly everything else that needs to initialize has done so
808
+	 *
809
+	 * @access public
810
+	 * @return void
811
+	 */
812 812
 	public function initialize_last() {
813 813
 		do_action( 'AHEE__EE_System__initialize_last' );
814 814
 	}
@@ -817,14 +817,14 @@  discard block
 block discarded – undo
817 817
 
818 818
 
819 819
 	/**
820
-	* set_hooks_for_shortcodes_modules_and_addons
821
-	*
822
-	* this is the best place for other systems to set callbacks for hooking into other parts of EE
823
-	* this happens at the very beginning of the wp_loaded hookpoint
824
-	*
825
-	* @access public
826
-	* @return void
827
-	*/
820
+	 * set_hooks_for_shortcodes_modules_and_addons
821
+	 *
822
+	 * this is the best place for other systems to set callbacks for hooking into other parts of EE
823
+	 * this happens at the very beginning of the wp_loaded hookpoint
824
+	 *
825
+	 * @access public
826
+	 * @return void
827
+	 */
828 828
 	public function set_hooks_for_shortcodes_modules_and_addons() {
829 829
 //		do_action( 'AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons' );
830 830
 	}
@@ -833,13 +833,13 @@  discard block
 block discarded – undo
833 833
 
834 834
 
835 835
 	/**
836
-	* do_not_cache
837
-	*
838
-	* sets no cache headers and defines no cache constants for WP plugins
839
-	*
840
-	* @access public
841
-	* @return void
842
-	*/
836
+	 * do_not_cache
837
+	 *
838
+	 * sets no cache headers and defines no cache constants for WP plugins
839
+	 *
840
+	 * @access public
841
+	 * @return void
842
+	 */
843 843
 	public static function do_not_cache() {
844 844
 		// set no cache constants
845 845
 		if ( ! defined( 'DONOTCACHEPAGE' ) ) {
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
 			//Current post
958 958
 			global $post;		
959 959
     	
960
-	    	if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_event', 'ee_admin_bar_menu_espresso-toolbar-events-edit', $post->ID ) ) {
960
+			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_event', 'ee_admin_bar_menu_espresso-toolbar-events-edit', $post->ID ) ) {
961 961
 				//Events Edit Current Event
962 962
 				$admin_bar->add_menu(array(
963 963
 						'id' => 'espresso-toolbar-events-edit',
Please login to merge, or discard this patch.
Spacing   +255 added lines, -255 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public static function instance() {
104 104
 		// check if class object is instantiated
105
-		if ( ! self::$_instance instanceof EE_System ) {
105
+		if ( ! self::$_instance instanceof EE_System) {
106 106
 			self::$_instance = new self();
107 107
 		}
108 108
 		return self::$_instance;
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
 	 * resets the instance and returns it
114 114
 	 * @return EE_System
115 115
 	 */
116
-	public static function reset(){
116
+	public static function reset() {
117 117
 		self::$_instance->_req_type = NULL;
118 118
 		//we need to reset the migration manager in order for it to detect DMSs properly
119 119
 		EE_Data_Migration_Manager::reset();
120 120
 		//make sure none of the old hooks are left hanging around
121
-		remove_all_actions( 'AHEE__EE_System__perform_activations_upgrades_and_migrations');
121
+		remove_all_actions('AHEE__EE_System__perform_activations_upgrades_and_migrations');
122 122
 		self::instance()->detect_activations_or_upgrades();
123 123
 		self::instance()->perform_activations_upgrades_and_migrations();
124 124
 		return self::instance();
@@ -134,26 +134,26 @@  discard block
 block discarded – undo
134 134
 	 * @access    private
135 135
 	 */
136 136
 	private function __construct() {
137
-		do_action( 'AHEE__EE_System__construct__begin', $this );
137
+		do_action('AHEE__EE_System__construct__begin', $this);
138 138
 		// allow addons to load first so that they can register autoloaders, set hooks for running DMS's, etc
139
-		add_action( 'AHEE__EE_Bootstrap__load_espresso_addons', array( $this, 'load_espresso_addons' ) );
139
+		add_action('AHEE__EE_Bootstrap__load_espresso_addons', array($this, 'load_espresso_addons'));
140 140
 		// when an ee addon is activated, we want to call the core hook(s) again
141 141
 		// because the newly-activated addon didn't get a chance to run at all
142
-		add_action( 'activate_plugin', array( $this, 'load_espresso_addons' ), 1 );
142
+		add_action('activate_plugin', array($this, 'load_espresso_addons'), 1);
143 143
 		// detect whether install or upgrade
144
-		add_action( 'AHEE__EE_Bootstrap__detect_activations_or_upgrades', array( $this, 'detect_activations_or_upgrades' ), 3 );
144
+		add_action('AHEE__EE_Bootstrap__detect_activations_or_upgrades', array($this, 'detect_activations_or_upgrades'), 3);
145 145
 		// load EE_Config, EE_Textdomain, etc
146
-		add_action( 'AHEE__EE_Bootstrap__load_core_configuration', array( $this, 'load_core_configuration' ), 5 );
146
+		add_action('AHEE__EE_Bootstrap__load_core_configuration', array($this, 'load_core_configuration'), 5);
147 147
 		// load EE_Config, EE_Textdomain, etc
148
-		add_action( 'AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets', array( $this, 'register_shortcodes_modules_and_widgets' ), 7 );
148
+		add_action('AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets', array($this, 'register_shortcodes_modules_and_widgets'), 7);
149 149
 		// you wanna get going? I wanna get going... let's get going!
150
-		add_action( 'AHEE__EE_Bootstrap__brew_espresso', array( $this, 'brew_espresso' ), 9 );
150
+		add_action('AHEE__EE_Bootstrap__brew_espresso', array($this, 'brew_espresso'), 9);
151 151
 		//other housekeeping
152 152
 		//exclude EE critical pages from wp_list_pages
153
-		add_filter( 'wp_list_pages_excludes', array( $this, 'remove_pages_from_wp_list_pages' ), 10 );
153
+		add_filter('wp_list_pages_excludes', array($this, 'remove_pages_from_wp_list_pages'), 10);
154 154
 		// ALL EE Addons should use the following hook point to attach their initial setup too
155 155
 		// it's extremely important for EE Addons to register any class autoloaders so that they can be available when the EE_Config loads
156
-		do_action( 'AHEE__EE_System__construct__complete', $this );
156
+		do_action('AHEE__EE_System__construct__complete', $this);
157 157
 	}
158 158
 
159 159
 
@@ -173,13 +173,13 @@  discard block
 block discarded – undo
173 173
 	public function load_espresso_addons() {
174 174
 		// set autoloaders for all of the classes implementing EEI_Plugin_API
175 175
 		// which provide helpers for EE plugin authors to more easily register certain components with EE.
176
-		EEH_Autoloader::instance()->register_autoloaders_for_each_file_in_folder( EE_LIBRARIES . 'plugin_api' );
176
+		EEH_Autoloader::instance()->register_autoloaders_for_each_file_in_folder(EE_LIBRARIES.'plugin_api');
177 177
 		//load and setup EE_Capabilities
178
-		EE_Registry::instance()->load_core( 'Capabilities' );
178
+		EE_Registry::instance()->load_core('Capabilities');
179 179
 		//caps need to be initialized on every request so that capability maps are set.
180 180
 		//@see https://events.codebasehq.com/projects/event-espresso/tickets/8674
181 181
 		EE_Registry::instance()->CAP->init_caps();
182
-		do_action( 'AHEE__EE_System__load_espresso_addons' );
182
+		do_action('AHEE__EE_System__load_espresso_addons');
183 183
 	}
184 184
 
185 185
 
@@ -194,10 +194,10 @@  discard block
 block discarded – undo
194 194
 	 * @access public
195 195
 	 * @return void
196 196
 	 */
197
-	public function detect_activations_or_upgrades(){
197
+	public function detect_activations_or_upgrades() {
198 198
 		//first off: let's make sure to handle core
199 199
 		$this->detect_if_activation_or_upgrade();
200
-		foreach(EE_Registry::instance()->addons as $addon){
200
+		foreach (EE_Registry::instance()->addons as $addon) {
201 201
 			//detect teh request type for that addon
202 202
 			$addon->detect_activation_or_upgrade();
203 203
 		}
@@ -218,44 +218,44 @@  discard block
 block discarded – undo
218 218
 		do_action('AHEE__EE_System___detect_if_activation_or_upgrade__begin');
219 219
 
220 220
 		// load M-Mode class
221
-		EE_Registry::instance()->load_core( 'Maintenance_Mode' );
221
+		EE_Registry::instance()->load_core('Maintenance_Mode');
222 222
 		// check if db has been updated, or if its a brand-new installation
223 223
 
224 224
 		$espresso_db_update = $this->fix_espresso_db_upgrade_option();
225
-		$request_type =  $this->detect_req_type($espresso_db_update);
225
+		$request_type = $this->detect_req_type($espresso_db_update);
226 226
 		//EEH_Debug_Tools::printr( $request_type, '$request_type', __FILE__, __LINE__ );
227
-		if( $request_type != EE_System::req_type_normal){
227
+		if ($request_type != EE_System::req_type_normal) {
228 228
 			EE_Registry::instance()->load_helper('Activation');
229 229
 		}
230 230
 
231
-		switch($request_type){
231
+		switch ($request_type) {
232 232
 			case EE_System::req_type_new_activation:
233
-				do_action( 'AHEE__EE_System__detect_if_activation_or_upgrade__new_activation' );
234
-				$this->_handle_core_version_change( $espresso_db_update );
233
+				do_action('AHEE__EE_System__detect_if_activation_or_upgrade__new_activation');
234
+				$this->_handle_core_version_change($espresso_db_update);
235 235
 				break;
236 236
 			case EE_System::req_type_reactivation:
237
-				do_action( 'AHEE__EE_System__detect_if_activation_or_upgrade__reactivation' );
238
-				$this->_handle_core_version_change( $espresso_db_update );
237
+				do_action('AHEE__EE_System__detect_if_activation_or_upgrade__reactivation');
238
+				$this->_handle_core_version_change($espresso_db_update);
239 239
 				break;
240 240
 			case EE_System::req_type_upgrade:
241
-				do_action( 'AHEE__EE_System__detect_if_activation_or_upgrade__upgrade' );
241
+				do_action('AHEE__EE_System__detect_if_activation_or_upgrade__upgrade');
242 242
 				//migrations may be required now that we've upgraded
243 243
 				EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
244
-				$this->_handle_core_version_change( $espresso_db_update );
244
+				$this->_handle_core_version_change($espresso_db_update);
245 245
 //				echo "done upgrade";die;
246 246
 				break;
247 247
 			case EE_System::req_type_downgrade:
248
-				do_action( 'AHEE__EE_System__detect_if_activation_or_upgrade__downgrade' );
248
+				do_action('AHEE__EE_System__detect_if_activation_or_upgrade__downgrade');
249 249
 				//its possible migrations are no longer required
250 250
 				EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
251
-				$this->_handle_core_version_change( $espresso_db_update );
251
+				$this->_handle_core_version_change($espresso_db_update);
252 252
 				break;
253 253
 			case EE_System::req_type_normal:
254 254
 			default:
255 255
 //				$this->_maybe_redirect_to_ee_about();
256 256
 				break;
257 257
 		}
258
-		do_action( 'AHEE__EE_System__detect_if_activation_or_upgrade__complete' );
258
+		do_action('AHEE__EE_System__detect_if_activation_or_upgrade__complete');
259 259
 	}
260 260
 
261 261
 	/**
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
 	 * initializing the database later during the request
264 264
 	 * @param array $espresso_db_update
265 265
 	 */
266
-	protected function _handle_core_version_change( $espresso_db_update ){
267
-		$this->update_list_of_installed_versions( $espresso_db_update );
266
+	protected function _handle_core_version_change($espresso_db_update) {
267
+		$this->update_list_of_installed_versions($espresso_db_update);
268 268
 		//get ready to verify the DB is ok (provided we aren't in maintenance mode, of course)
269
-		add_action( 'AHEE__EE_System__perform_activations_upgrades_and_migrations', array( $this, 'initialize_db_if_no_migrations_required' ));
269
+		add_action('AHEE__EE_System__perform_activations_upgrades_and_migrations', array($this, 'initialize_db_if_no_migrations_required'));
270 270
 	}
271 271
 
272 272
 
@@ -281,44 +281,44 @@  discard block
 block discarded – undo
281 281
 	 * @internal param array $espresso_db_update_value the value of the WordPress option. If not supplied, fetches it from the options table
282 282
 	 * @return array the correct value of 'espresso_db_upgrade', after saving it, if it needed correction
283 283
 	 */
284
-	private function fix_espresso_db_upgrade_option($espresso_db_update = null){
285
-		do_action( 'FHEE__EE_System__manage_fix_espresso_db_upgrade_option__begin', $espresso_db_update );
286
-		if( ! $espresso_db_update){
287
-			$espresso_db_update = get_option( 'espresso_db_update' );
284
+	private function fix_espresso_db_upgrade_option($espresso_db_update = null) {
285
+		do_action('FHEE__EE_System__manage_fix_espresso_db_upgrade_option__begin', $espresso_db_update);
286
+		if ( ! $espresso_db_update) {
287
+			$espresso_db_update = get_option('espresso_db_update');
288 288
 		}
289 289
 		// check that option is an array
290
-		if( ! is_array( $espresso_db_update )) {
290
+		if ( ! is_array($espresso_db_update)) {
291 291
 			// if option is FALSE, then it never existed
292
-			if ( $espresso_db_update === FALSE ) {
292
+			if ($espresso_db_update === FALSE) {
293 293
 				// make $espresso_db_update an array and save option with autoload OFF
294
-				$espresso_db_update =  array();
295
-				add_option( 'espresso_db_update', $espresso_db_update, '', 'no' );
294
+				$espresso_db_update = array();
295
+				add_option('espresso_db_update', $espresso_db_update, '', 'no');
296 296
 			} else {
297 297
 				// option is NOT FALSE but also is NOT an array, so make it an array and save it
298
-				$espresso_db_update =  array( $espresso_db_update=>array() );
299
-				update_option( 'espresso_db_update', $espresso_db_update );
298
+				$espresso_db_update = array($espresso_db_update=>array());
299
+				update_option('espresso_db_update', $espresso_db_update);
300 300
 			}
301
-		}else{
301
+		} else {
302 302
 			$corrected_db_update = array();
303 303
 			//if IS an array, but is it an array where KEYS are version numbers, and values are arrays?
304
-			foreach($espresso_db_update as $should_be_version_string => $should_be_array){
305
-				if(is_int($should_be_version_string) && ! is_array($should_be_array)){
304
+			foreach ($espresso_db_update as $should_be_version_string => $should_be_array) {
305
+				if (is_int($should_be_version_string) && ! is_array($should_be_array)) {
306 306
 					//the key is an int, and the value IS NOT an array
307 307
 					//so it must be numerically-indexed, where values are versions installed...
308 308
 					//fix it!
309 309
 					$version_string = $should_be_array;
310 310
 					$corrected_db_update[$version_string] = array('unknown-date');
311
-				}else{
311
+				} else {
312 312
 					//ok it checks out
313 313
 					$corrected_db_update[$should_be_version_string] = $should_be_array;
314 314
 				}
315 315
 			}
316 316
 			$espresso_db_update = $corrected_db_update;
317
-			update_option( 'espresso_db_update', $espresso_db_update );
317
+			update_option('espresso_db_update', $espresso_db_update);
318 318
 
319 319
 		}
320 320
 
321
-		do_action( 'FHEE__EE_System__manage_fix_espresso_db_upgrade_option__complete', $espresso_db_update );
321
+		do_action('FHEE__EE_System__manage_fix_espresso_db_upgrade_option__complete', $espresso_db_update);
322 322
 		return $espresso_db_update;
323 323
 	}
324 324
 
@@ -337,33 +337,33 @@  discard block
 block discarded – undo
337 337
 	 * so we prefer to only do it when necessary
338 338
 	 * @return void
339 339
 	 */
340
-	public function initialize_db_if_no_migrations_required( $initialize_addons_too = FALSE, $verify_schema = true ){
340
+	public function initialize_db_if_no_migrations_required($initialize_addons_too = FALSE, $verify_schema = true) {
341 341
 		$request_type = $this->detect_req_type();
342 342
 		//only initialize system if we're not in maintenance mode.
343
-		if( EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance ){
344
-			update_option( 'ee_flush_rewrite_rules', TRUE );
343
+		if (EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance) {
344
+			update_option('ee_flush_rewrite_rules', TRUE);
345 345
 			EEH_Activation::system_initialization();
346
-			if( $verify_schema ) {
346
+			if ($verify_schema) {
347 347
 				EEH_Activation::initialize_db_and_folders();
348 348
 			}
349 349
 			EEH_Activation::initialize_db_content();
350
-			if( $initialize_addons_too ) {
350
+			if ($initialize_addons_too) {
351 351
 				$this->initialize_addons();
352 352
 			}
353
-		}else{
354
-			EE_Data_Migration_Manager::instance()->enqueue_db_initialization_for( 'Core' );
353
+		} else {
354
+			EE_Data_Migration_Manager::instance()->enqueue_db_initialization_for('Core');
355 355
 		}
356
-		if ( $request_type == EE_System::req_type_new_activation || $request_type == EE_System::req_type_reactivation || $request_type == EE_System::req_type_upgrade ) {
357
-			add_action( 'AHEE__EE_System__load_CPTs_and_session__start', array( $this, 'redirect_to_about_ee' ), 9 );
356
+		if ($request_type == EE_System::req_type_new_activation || $request_type == EE_System::req_type_reactivation || $request_type == EE_System::req_type_upgrade) {
357
+			add_action('AHEE__EE_System__load_CPTs_and_session__start', array($this, 'redirect_to_about_ee'), 9);
358 358
 		}
359 359
 	}
360 360
 
361 361
 	/**
362 362
 	 * Initializes the db for all registered addons
363 363
 	 */
364
-	public function initialize_addons(){
364
+	public function initialize_addons() {
365 365
 		//foreach registered addon, make sure its db is up-to-date too
366
-		foreach(EE_Registry::instance()->addons as $addon){
366
+		foreach (EE_Registry::instance()->addons as $addon) {
367 367
 			$addon->initialize_db_if_no_migrations_required();
368 368
 		}
369 369
 	}
@@ -375,16 +375,16 @@  discard block
 block discarded – undo
375 375
 	 * @param 	string 	$current_version_to_add 	version to be added to the version history
376 376
 	 * @return 	boolean success as to whether or not this option was changed
377 377
 	 */
378
-	public function update_list_of_installed_versions($version_history = NULL,$current_version_to_add = NULL) {
379
-		if( ! $version_history ) {
378
+	public function update_list_of_installed_versions($version_history = NULL, $current_version_to_add = NULL) {
379
+		if ( ! $version_history) {
380 380
 			$version_history = $this->fix_espresso_db_upgrade_option($version_history);
381 381
 		}
382
-		if( $current_version_to_add == NULL){
382
+		if ($current_version_to_add == NULL) {
383 383
 			$current_version_to_add = espresso_version();
384 384
 		}
385
-		$version_history[ $current_version_to_add ][] = date( 'Y-m-d H:i:s',time() );
385
+		$version_history[$current_version_to_add][] = date('Y-m-d H:i:s', time());
386 386
 		// re-save
387
-		return update_option( 'espresso_db_update', $version_history );
387
+		return update_option('espresso_db_update', $version_history);
388 388
 	}
389 389
 
390 390
 
@@ -401,10 +401,10 @@  discard block
 block discarded – undo
401 401
 	 *                            but still know if this is a new install or not
402 402
 	 * @return int one of the constants on EE_System::req_type_
403 403
 	 */
404
-	public function detect_req_type( $espresso_db_update = NULL ){
405
-		if ( $this->_req_type === NULL ){
406
-			$espresso_db_update = ! empty( $espresso_db_update ) ? $espresso_db_update : $this->fix_espresso_db_upgrade_option();
407
-			$this->_req_type = $this->detect_req_type_given_activation_history( $espresso_db_update, 'ee_espresso_activation', espresso_version() );
404
+	public function detect_req_type($espresso_db_update = NULL) {
405
+		if ($this->_req_type === NULL) {
406
+			$espresso_db_update = ! empty($espresso_db_update) ? $espresso_db_update : $this->fix_espresso_db_upgrade_option();
407
+			$this->_req_type = $this->detect_req_type_given_activation_history($espresso_db_update, 'ee_espresso_activation', espresso_version());
408 408
 		}
409 409
 		return $this->_req_type;
410 410
 	}
@@ -420,39 +420,39 @@  discard block
 block discarded – undo
420 420
 	 * @param string $version_to_upgrade_to the version that was just upgraded to (for core that will be espresso_version())
421 421
 	 * @return int one of the constants on EE_System::req_type_*
422 422
 	 */
423
-	public static function detect_req_type_given_activation_history( $activation_history_for_addon, $activation_indicator_option_name, $version_to_upgrade_to ){
424
-		$version_is_higher = self::_new_version_is_higher( $activation_history_for_addon, $version_to_upgrade_to );
425
-		if( $activation_history_for_addon ){
423
+	public static function detect_req_type_given_activation_history($activation_history_for_addon, $activation_indicator_option_name, $version_to_upgrade_to) {
424
+		$version_is_higher = self::_new_version_is_higher($activation_history_for_addon, $version_to_upgrade_to);
425
+		if ($activation_history_for_addon) {
426 426
 			//it exists, so this isn't a completely new install
427 427
 			//check if this version already in that list of previously installed versions
428
-			if ( ! isset( $activation_history_for_addon[ $version_to_upgrade_to ] )) {
428
+			if ( ! isset($activation_history_for_addon[$version_to_upgrade_to])) {
429 429
 				//it a version we haven't seen before
430
-				if( $version_is_higher === 1 ){
430
+				if ($version_is_higher === 1) {
431 431
 					$req_type = EE_System::req_type_upgrade;
432
-				}else{
432
+				} else {
433 433
 					$req_type = EE_System::req_type_downgrade;
434 434
 				}
435
-				delete_option( $activation_indicator_option_name );
435
+				delete_option($activation_indicator_option_name);
436 436
 			} else {
437 437
 				// its not an update. maybe a reactivation?
438
-				if( get_option( $activation_indicator_option_name, FALSE ) ){
439
-					if ( $version_is_higher === -1 ){
438
+				if (get_option($activation_indicator_option_name, FALSE)) {
439
+					if ($version_is_higher === -1) {
440 440
 						$req_type = EE_System::req_type_downgrade;
441
-					}elseif( $version_is_higher === 0 ){
441
+					}elseif ($version_is_higher === 0) {
442 442
 						//we've seen this version before, but it's an activation. must be a reactivation
443 443
 						$req_type = EE_System::req_type_reactivation;
444
-					}else{//$version_is_higher === 1
444
+					} else {//$version_is_higher === 1
445 445
 						$req_type = EE_System::req_type_upgrade;
446 446
 					}
447
-					delete_option( $activation_indicator_option_name );
447
+					delete_option($activation_indicator_option_name);
448 448
 				} else {
449 449
 					//we've seen this version before and the activation indicate doesn't show it was just activated
450
-					if ( $version_is_higher === -1 ){
450
+					if ($version_is_higher === -1) {
451 451
 						$req_type = EE_System::req_type_downgrade;
452
-					}elseif( $version_is_higher === 0 ){
452
+					}elseif ($version_is_higher === 0) {
453 453
 						//we've seen this version before and it's not an activation. its normal request
454 454
 						$req_type = EE_System::req_type_normal;
455
-					}else{//$version_is_higher === 1
455
+					} else {//$version_is_higher === 1
456 456
 						$req_type = EE_System::req_type_upgrade;
457 457
 					}
458 458
 				}
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 		} else {
461 461
 			//brand new install
462 462
 			$req_type = EE_System::req_type_new_activation;
463
-			delete_option( $activation_indicator_option_name );
463
+			delete_option($activation_indicator_option_name);
464 464
 		}
465 465
 		return $req_type;
466 466
 	}
@@ -478,30 +478,30 @@  discard block
 block discarded – undo
478 478
 	 *		0 if $version_to_upgrade_to MATCHES (reactivation or normal request);
479 479
 	 *		1 if $version_to_upgrade_to is HIGHER (upgrade) ;
480 480
 	 */
481
-	protected static function _new_version_is_higher( $activation_history_for_addon, $version_to_upgrade_to ){
481
+	protected static function _new_version_is_higher($activation_history_for_addon, $version_to_upgrade_to) {
482 482
 		//find the most recently-activated version
483 483
 		$most_recently_active_version_activation = '1970-01-01 00:00:00';
484 484
 		$most_recently_active_version = '0.0.0.dev.000';
485
-		if( is_array( $activation_history_for_addon ) ){
486
-			foreach( $activation_history_for_addon as $version => $times_activated ){
485
+		if (is_array($activation_history_for_addon)) {
486
+			foreach ($activation_history_for_addon as $version => $times_activated) {
487 487
 				//check there is a record of when this version was activated. Otherwise,
488 488
 				//mark it as unknown
489
-				if( ! $times_activated ){
490
-					$times_activated = array( 'unknown-date');
489
+				if ( ! $times_activated) {
490
+					$times_activated = array('unknown-date');
491 491
 				}
492
-				if( is_string( $times_activated ) ){
493
-					$times_activated = array( $times_activated );
492
+				if (is_string($times_activated)) {
493
+					$times_activated = array($times_activated);
494 494
 				}
495
-				foreach( $times_activated as $an_activation ){
496
-					if( $an_activation != 'unknown-date' &&
497
-							$an_activation > $most_recently_active_version_activation  ){
495
+				foreach ($times_activated as $an_activation) {
496
+					if ($an_activation != 'unknown-date' &&
497
+							$an_activation > $most_recently_active_version_activation) {
498 498
 						$most_recently_active_version = $version;
499 499
 						$most_recently_active_version_activation = $an_activation == 'unknown-date' ? '1970-01-01 00:00:00' : $an_activation;
500 500
 					}
501 501
 				}
502 502
 			}
503 503
 		}
504
-		return version_compare( $version_to_upgrade_to, $most_recently_active_version );
504
+		return version_compare($version_to_upgrade_to, $most_recently_active_version);
505 505
 	}
506 506
 
507 507
 
@@ -511,20 +511,20 @@  discard block
 block discarded – undo
511 511
 	 * @return void
512 512
 	 */
513 513
 	public function redirect_to_about_ee() {
514
-		$notices = EE_Error::get_notices( FALSE );
514
+		$notices = EE_Error::get_notices(FALSE);
515 515
 		//if current user is an admin and it's not an ajax request
516
-		if(EE_Registry::instance()->CAP->current_user_can( 'manage_options', 'espresso_about_default' ) && ! ( defined('DOING_AJAX') && DOING_AJAX  ) && ! isset( $notices[ 'errors' ] ) ){
517
-			$query_params =  array( 'page' => 'espresso_about' );
516
+		if (EE_Registry::instance()->CAP->current_user_can('manage_options', 'espresso_about_default') && ! (defined('DOING_AJAX') && DOING_AJAX) && ! isset($notices['errors'])) {
517
+			$query_params = array('page' => 'espresso_about');
518 518
 
519
-			if ( EE_System::instance()->detect_req_type() == EE_System::req_type_new_activation ) {
519
+			if (EE_System::instance()->detect_req_type() == EE_System::req_type_new_activation) {
520 520
 			    $query_params['new_activation'] = TRUE;
521 521
 			}
522 522
 
523
-			if ( EE_System::instance()->detect_req_type() == EE_System::req_type_reactivation ) {
523
+			if (EE_System::instance()->detect_req_type() == EE_System::req_type_reactivation) {
524 524
 			    $query_params['reactivation'] = TRUE;
525 525
 			}
526
-			$url = add_query_arg( $query_params, admin_url( 'admin.php' ) );
527
-			wp_safe_redirect( $url );
526
+			$url = add_query_arg($query_params, admin_url('admin.php'));
527
+			wp_safe_redirect($url);
528 528
 			exit();
529 529
 		}
530 530
 	}
@@ -538,31 +538,31 @@  discard block
 block discarded – undo
538 538
 	 *
539 539
 	 * @return void
540 540
 	 */
541
-	public function load_core_configuration(){
542
-		do_action( 'AHEE__EE_System__load_core_configuration__begin', $this );
543
-		EE_Registry::instance()->load_core( 'EE_Load_Textdomain' );
541
+	public function load_core_configuration() {
542
+		do_action('AHEE__EE_System__load_core_configuration__begin', $this);
543
+		EE_Registry::instance()->load_core('EE_Load_Textdomain');
544 544
 		//load textdomain
545 545
 		EE_Load_Textdomain::load_textdomain();
546 546
 		// load and setup EE_Config and EE_Network_Config
547
-		EE_Registry::instance()->load_core( 'Config' );
548
-		EE_Registry::instance()->load_core( 'Network_Config' );
547
+		EE_Registry::instance()->load_core('Config');
548
+		EE_Registry::instance()->load_core('Network_Config');
549 549
 		// setup autoloaders
550 550
 		// enable logging?
551
-		if ( EE_Registry::instance()->CFG->admin->use_full_logging ) {
552
-			EE_Registry::instance()->load_core( 'Log' );
551
+		if (EE_Registry::instance()->CFG->admin->use_full_logging) {
552
+			EE_Registry::instance()->load_core('Log');
553 553
 		}
554 554
 		// check for activation errors
555
-		$activation_errors = get_option( 'ee_plugin_activation_errors', FALSE );
556
-		if ( $activation_errors ) {
557
-			EE_Error::add_error( $activation_errors, __FILE__, __FUNCTION__, __LINE__ );
558
-			update_option( 'ee_plugin_activation_errors', FALSE );
555
+		$activation_errors = get_option('ee_plugin_activation_errors', FALSE);
556
+		if ($activation_errors) {
557
+			EE_Error::add_error($activation_errors, __FILE__, __FUNCTION__, __LINE__);
558
+			update_option('ee_plugin_activation_errors', FALSE);
559 559
 		}
560 560
 		// get model names
561 561
 		$this->_parse_model_names();
562 562
 
563 563
 		//load caf stuff a chance to play during the activation process too.
564 564
 		$this->_maybe_brew_regular();
565
-		do_action( 'AHEE__EE_System__load_core_configuration__complete', $this );
565
+		do_action('AHEE__EE_System__load_core_configuration__complete', $this);
566 566
 	}
567 567
 
568 568
 
@@ -571,23 +571,23 @@  discard block
 block discarded – undo
571 571
 	 *
572 572
 	 * @return void
573 573
 	 */
574
-	private function _parse_model_names(){
574
+	private function _parse_model_names() {
575 575
 		//get all the files in the EE_MODELS folder that end in .model.php
576
-		$models = glob( EE_MODELS.'*.model.php');
576
+		$models = glob(EE_MODELS.'*.model.php');
577 577
 		$model_names = array();
578 578
 		$non_abstract_db_models = array();
579
-		foreach( $models as $model ){
579
+		foreach ($models as $model) {
580 580
 			// get model classname
581
-			$classname = EEH_File::get_classname_from_filepath_with_standard_filename( $model );
582
-			$shortname = str_replace( 'EEM_', '', $classname );
581
+			$classname = EEH_File::get_classname_from_filepath_with_standard_filename($model);
582
+			$shortname = str_replace('EEM_', '', $classname);
583 583
 			$reflectionClass = new ReflectionClass($classname);
584
-			if( $reflectionClass->isSubclassOf('EEM_Base') && ! $reflectionClass->isAbstract()){
584
+			if ($reflectionClass->isSubclassOf('EEM_Base') && ! $reflectionClass->isAbstract()) {
585 585
 				$non_abstract_db_models[$shortname] = $classname;
586 586
 			}
587
-			$model_names[ $shortname ] = $classname;
587
+			$model_names[$shortname] = $classname;
588 588
 		}
589
-		EE_Registry::instance()->models = apply_filters( 'FHEE__EE_System__parse_model_names', $model_names );
590
-		EE_Registry::instance()->non_abstract_db_models = apply_filters( 'FHEE__EE_System__parse_implemented_model_names', $non_abstract_db_models );
589
+		EE_Registry::instance()->models = apply_filters('FHEE__EE_System__parse_model_names', $model_names);
590
+		EE_Registry::instance()->non_abstract_db_models = apply_filters('FHEE__EE_System__parse_implemented_model_names', $non_abstract_db_models);
591 591
 	}
592 592
 
593 593
 
@@ -597,8 +597,8 @@  discard block
 block discarded – undo
597 597
 	 * @return void
598 598
 	 */
599 599
 	private function _maybe_brew_regular() {
600
-		if (( ! defined( 'EE_DECAF' ) ||  EE_DECAF !== TRUE ) && is_readable( EE_CAFF_PATH . 'brewing_regular.php' )) {
601
-			require_once EE_CAFF_PATH . 'brewing_regular.php';
600
+		if (( ! defined('EE_DECAF') || EE_DECAF !== TRUE) && is_readable(EE_CAFF_PATH.'brewing_regular.php')) {
601
+			require_once EE_CAFF_PATH.'brewing_regular.php';
602 602
 		}
603 603
 	}
604 604
 
@@ -615,9 +615,9 @@  discard block
 block discarded – undo
615 615
 	 * @return void
616 616
 	 */
617 617
 	public function register_shortcodes_modules_and_widgets() {
618
-		do_action( 'AHEE__EE_System__register_shortcodes_modules_and_widgets' );
618
+		do_action('AHEE__EE_System__register_shortcodes_modules_and_widgets');
619 619
 		// check for addons using old hookpoint
620
-		if ( has_action( 'AHEE__EE_System__register_shortcodes_modules_and_addons' )) {
620
+		if (has_action('AHEE__EE_System__register_shortcodes_modules_and_addons')) {
621 621
 			$this->_incompatible_addon_error();
622 622
 		}
623 623
 	}
@@ -631,19 +631,19 @@  discard block
 block discarded – undo
631 631
 	*/
632 632
 	private function _incompatible_addon_error() {
633 633
 		// get array of classes hooking into here
634
-		$class_names = EEH_Class_Tools::get_class_names_for_all_callbacks_on_hook( 'AHEE__EE_System__register_shortcodes_modules_and_addons' );
635
-		if ( ! empty( $class_names )) {
636
-			$msg = __( 'The following plugins, addons, or modules appear to be incompatible with this version of Event Espresso and were automatically deactivated to avoid fatal errors:', 'event_espresso' );
634
+		$class_names = EEH_Class_Tools::get_class_names_for_all_callbacks_on_hook('AHEE__EE_System__register_shortcodes_modules_and_addons');
635
+		if ( ! empty($class_names)) {
636
+			$msg = __('The following plugins, addons, or modules appear to be incompatible with this version of Event Espresso and were automatically deactivated to avoid fatal errors:', 'event_espresso');
637 637
 			$msg .= '<ul>';
638
-			foreach ( $class_names as $class_name ) {
639
-				$msg .= '<li><b>Event Espresso - ' . str_replace( array( 'EE_', 'EEM_', 'EED_', 'EES_', 'EEW_' ), '', $class_name ) . '</b></li>';
638
+			foreach ($class_names as $class_name) {
639
+				$msg .= '<li><b>Event Espresso - '.str_replace(array('EE_', 'EEM_', 'EED_', 'EES_', 'EEW_'), '', $class_name).'</b></li>';
640 640
 			}
641 641
 			$msg .= '</ul>';
642
-			$msg .= __( 'Compatibility issues can be avoided and/or resolved by keeping addons and plugins updated to the latest version.', 'event_espresso' );
642
+			$msg .= __('Compatibility issues can be avoided and/or resolved by keeping addons and plugins updated to the latest version.', 'event_espresso');
643 643
 			// save list of incompatible addons to wp-options for later use
644
-			add_option( 'ee_incompatible_addons', $class_names, '', 'no' );
645
-			if ( is_admin() ) {
646
-				EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ );
644
+			add_option('ee_incompatible_addons', $class_names, '', 'no');
645
+			if (is_admin()) {
646
+				EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
647 647
 			}
648 648
 		}
649 649
 	}
@@ -660,25 +660,25 @@  discard block
 block discarded – undo
660 660
 	 *
661 661
 	 * @return void
662 662
 	 */
663
-	public function brew_espresso(){
664
-		do_action( 'AHEE__EE_System__brew_espresso__begin', $this );
663
+	public function brew_espresso() {
664
+		do_action('AHEE__EE_System__brew_espresso__begin', $this);
665 665
 		// load some final core systems
666
-		add_action( 'init', array( $this, 'set_hooks_for_core' ), 1 );
667
-		add_action( 'init', array( $this, 'perform_activations_upgrades_and_migrations' ), 3 );
668
-		add_action( 'init', array( $this, 'load_CPTs_and_session' ), 5 );
669
-		add_action( 'init', array( $this, 'load_controllers' ), 7 );
670
-		add_action( 'init', array( $this, 'core_loaded_and_ready' ), 9 );
671
-		add_action( 'init', array( $this, 'initialize' ), 10 );
672
-		add_action( 'init', array( $this, 'initialize_last' ), 100 );
673
-		add_action('wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 25 );
674
-		add_action( 'admin_bar_menu', array( $this, 'espresso_toolbar_items' ), 100 );
675
-
676
-		if ( is_admin() && apply_filters( 'FHEE__EE_System__brew_espresso__load_pue', TRUE )  ) {
666
+		add_action('init', array($this, 'set_hooks_for_core'), 1);
667
+		add_action('init', array($this, 'perform_activations_upgrades_and_migrations'), 3);
668
+		add_action('init', array($this, 'load_CPTs_and_session'), 5);
669
+		add_action('init', array($this, 'load_controllers'), 7);
670
+		add_action('init', array($this, 'core_loaded_and_ready'), 9);
671
+		add_action('init', array($this, 'initialize'), 10);
672
+		add_action('init', array($this, 'initialize_last'), 100);
673
+		add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'), 25);
674
+		add_action('admin_bar_menu', array($this, 'espresso_toolbar_items'), 100);
675
+
676
+		if (is_admin() && apply_filters('FHEE__EE_System__brew_espresso__load_pue', TRUE)) {
677 677
 			// pew pew pew
678
-			EE_Registry::instance()->load_core( 'PUE' );
679
-			do_action( 'AHEE__EE_System__brew_espresso__after_pue_init' );
678
+			EE_Registry::instance()->load_core('PUE');
679
+			do_action('AHEE__EE_System__brew_espresso__after_pue_init');
680 680
 		}
681
-		do_action( 'AHEE__EE_System__brew_espresso__complete', $this );
681
+		do_action('AHEE__EE_System__brew_espresso__complete', $this);
682 682
 	}
683 683
 
684 684
 
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 	 */
693 693
 	public function set_hooks_for_core() {
694 694
 		$this->_deactivate_incompatible_addons();
695
-		do_action( 'AHEE__EE_System__set_hooks_for_core' );
695
+		do_action('AHEE__EE_System__set_hooks_for_core');
696 696
 	}
697 697
 
698 698
 
@@ -701,15 +701,15 @@  discard block
 block discarded – undo
701 701
 	 * Using the information gathered in EE_System::_incompatible_addon_error,
702 702
 	 * deactivates any addons considered incompatible with the current version of EE
703 703
 	 */
704
-	private function _deactivate_incompatible_addons(){
705
-		$incompatible_addons = get_option( 'ee_incompatible_addons', array() );
706
-		if ( ! empty( $incompatible_addons )) {
707
-			$active_plugins = get_option( 'active_plugins', array() );
708
-			foreach ( $active_plugins as $active_plugin ) {
709
-				foreach ( $incompatible_addons as $incompatible_addon ) {
710
-					if ( strpos( $active_plugin,  $incompatible_addon ) !== FALSE ) {
711
-						unset( $_GET['activate'] );
712
-						espresso_deactivate_plugin( $active_plugin );
704
+	private function _deactivate_incompatible_addons() {
705
+		$incompatible_addons = get_option('ee_incompatible_addons', array());
706
+		if ( ! empty($incompatible_addons)) {
707
+			$active_plugins = get_option('active_plugins', array());
708
+			foreach ($active_plugins as $active_plugin) {
709
+				foreach ($incompatible_addons as $incompatible_addon) {
710
+					if (strpos($active_plugin, $incompatible_addon) !== FALSE) {
711
+						unset($_GET['activate']);
712
+						espresso_deactivate_plugin($active_plugin);
713 713
 					}
714 714
 				}
715 715
 			}
@@ -726,10 +726,10 @@  discard block
 block discarded – undo
726 726
 	 */
727 727
 	public function perform_activations_upgrades_and_migrations() {
728 728
 		//first check if we had previously attempted to setup EE's directories but failed
729
-		if( EEH_Activation::upload_directories_incomplete() ) {
729
+		if (EEH_Activation::upload_directories_incomplete()) {
730 730
 			EEH_Activation::create_upload_directories();
731 731
 		}
732
-		do_action( 'AHEE__EE_System__perform_activations_upgrades_and_migrations' );
732
+		do_action('AHEE__EE_System__perform_activations_upgrades_and_migrations');
733 733
 	}
734 734
 
735 735
 
@@ -741,10 +741,10 @@  discard block
 block discarded – undo
741 741
 	 *  	@return 	void
742 742
 	 */
743 743
 	public function load_CPTs_and_session() {
744
-		do_action( 'AHEE__EE_System__load_CPTs_and_session__start' );
744
+		do_action('AHEE__EE_System__load_CPTs_and_session__start');
745 745
 		// register Custom Post Types
746
-		EE_Registry::instance()->load_core( 'Register_CPTs' );
747
-		do_action( 'AHEE__EE_System__load_CPTs_and_session__complete' );
746
+		EE_Registry::instance()->load_core('Register_CPTs');
747
+		do_action('AHEE__EE_System__load_CPTs_and_session__complete');
748 748
 	}
749 749
 
750 750
 
@@ -759,16 +759,16 @@  discard block
 block discarded – undo
759 759
 	* @return void
760 760
 	*/
761 761
 	public function load_controllers() {
762
-		do_action( 'AHEE__EE_System__load_controllers__start' );
762
+		do_action('AHEE__EE_System__load_controllers__start');
763 763
 		// let's get it started
764
-		if ( ! is_admin() && !  EE_Maintenance_Mode::instance()->level() ) {
765
-			do_action( 'AHEE__EE_System__load_controllers__load_front_controllers' );
766
-			EE_Registry::instance()->load_core( 'Front_Controller' );
767
-		} else if ( ! EE_FRONT_AJAX ) {
768
-			do_action( 'AHEE__EE_System__load_controllers__load_admin_controllers' );
769
-			EE_Registry::instance()->load_core( 'Admin' );
764
+		if ( ! is_admin() && ! EE_Maintenance_Mode::instance()->level()) {
765
+			do_action('AHEE__EE_System__load_controllers__load_front_controllers');
766
+			EE_Registry::instance()->load_core('Front_Controller');
767
+		} else if ( ! EE_FRONT_AJAX) {
768
+			do_action('AHEE__EE_System__load_controllers__load_admin_controllers');
769
+			EE_Registry::instance()->load_core('Admin');
770 770
 		}
771
-		do_action( 'AHEE__EE_System__load_controllers__complete' );
771
+		do_action('AHEE__EE_System__load_controllers__complete');
772 772
 	}
773 773
 
774 774
 
@@ -782,10 +782,10 @@  discard block
 block discarded – undo
782 782
 	* @return void
783 783
 	*/
784 784
 	public function core_loaded_and_ready() {
785
-		do_action( 'AHEE__EE_System__core_loaded_and_ready' );
786
-		do_action( 'AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons' );
785
+		do_action('AHEE__EE_System__core_loaded_and_ready');
786
+		do_action('AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons');
787 787
 //		add_action( 'wp_loaded', array( $this, 'set_hooks_for_shortcodes_modules_and_addons' ), 1 );
788
-		EE_Registry::instance()->load_core( 'Session' );
788
+		EE_Registry::instance()->load_core('Session');
789 789
 	}
790 790
 
791 791
 
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
 	* @return void
800 800
 	*/
801 801
 	public function initialize() {
802
-		do_action( 'AHEE__EE_System__initialize' );
802
+		do_action('AHEE__EE_System__initialize');
803 803
 	}
804 804
 
805 805
 
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
 	* @return void
814 814
 	*/
815 815
 	public function initialize_last() {
816
-		do_action( 'AHEE__EE_System__initialize_last' );
816
+		do_action('AHEE__EE_System__initialize_last');
817 817
 	}
818 818
 
819 819
 
@@ -845,21 +845,21 @@  discard block
 block discarded – undo
845 845
 	*/
846 846
 	public static function do_not_cache() {
847 847
 		// set no cache constants
848
-		if ( ! defined( 'DONOTCACHEPAGE' ) ) {
849
-			define( 'DONOTCACHEPAGE', true );
848
+		if ( ! defined('DONOTCACHEPAGE')) {
849
+			define('DONOTCACHEPAGE', true);
850 850
 		}
851
-		if ( ! defined( 'DONOTCACHCEOBJECT' ) ) {
852
-			define( 'DONOTCACHCEOBJECT', true );
851
+		if ( ! defined('DONOTCACHCEOBJECT')) {
852
+			define('DONOTCACHCEOBJECT', true);
853 853
 		}
854
-		if ( ! defined( 'DONOTCACHEDB' ) ) {
855
-			define( 'DONOTCACHEDB', true );
854
+		if ( ! defined('DONOTCACHEDB')) {
855
+			define('DONOTCACHEDB', true);
856 856
 		}
857 857
 		// add no cache headers
858
-		add_action( 'send_headers' , array( 'EE_System', 'nocache_headers' ), 10 );
858
+		add_action('send_headers', array('EE_System', 'nocache_headers'), 10);
859 859
 		// plus a little extra for nginx
860
-		add_filter( 'nocache_headers', array( 'EE_System', 'nocache_headers_nginx' ), 10, 1 );
860
+		add_filter('nocache_headers', array('EE_System', 'nocache_headers_nginx'), 10, 1);
861 861
 		// prevent browsers from prefetching of the rel='next' link, because it may contain content that interferes with the registration process
862
-		remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
862
+		remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
863 863
 	}
864 864
 
865 865
 
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
 	 * @param $headers
872 872
 	 * @return    array
873 873
 	 */
874
-	public static function nocache_headers_nginx ( $headers ) {
874
+	public static function nocache_headers_nginx($headers) {
875 875
 		$headers['X-Accel-Expires'] = 0;
876 876
 		return $headers;
877 877
 	}
@@ -897,15 +897,15 @@  discard block
 block discarded – undo
897 897
 	 * @param $admin_bar
898 898
 	 * @return    void
899 899
 	 */
900
-	public function espresso_toolbar_items( $admin_bar ) {
900
+	public function espresso_toolbar_items($admin_bar) {
901 901
 
902 902
 		// if in full M-Mode, or its an AJAX request, or user is NOT an admin
903
-		if ( EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance || defined( 'DOING_AJAX' ) || ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_ee', 'ee_admin_bar_menu_top_level' )) {
903
+		if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance || defined('DOING_AJAX') || ! EE_Registry::instance()->CAP->current_user_can('ee_read_ee', 'ee_admin_bar_menu_top_level')) {
904 904
 			return;
905 905
 		}
906 906
 
907
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
908
-		EE_Registry::instance()->load_helper( 'URL' );
907
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
908
+		EE_Registry::instance()->load_helper('URL');
909 909
 		$menu_class = 'espresso_menu_item_class';
910 910
 		//we don't use the constants EVENTS_ADMIN_URL or REG_ADMIN_URL
911 911
 		//because they're only defined in each of their respective constructors
@@ -917,20 +917,20 @@  discard block
 block discarded – undo
917 917
 		//Top Level
918 918
 		$admin_bar->add_menu(array(
919 919
 				'id' => 'espresso-toolbar',
920
-				'title' => '<span class="ee-icon ee-icon-ee-cup-thick ee-icon-size-20"></span><span class="ab-label">' . _x('Event Espresso', 'admin bar menu group label', 'event_espresso') . '</span>',
920
+				'title' => '<span class="ee-icon ee-icon-ee-cup-thick ee-icon-size-20"></span><span class="ab-label">'._x('Event Espresso', 'admin bar menu group label', 'event_espresso').'</span>',
921 921
 				'href' => $events_admin_url,
922 922
 				'meta' => array(
923 923
 						'title' => __('Event Espresso', 'event_espresso'),
924
-						'class' => $menu_class . 'first'
924
+						'class' => $menu_class.'first'
925 925
 				),
926 926
 		));
927 927
 
928 928
 		//Events
929
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events' ) ) {
929
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events')) {
930 930
 			$admin_bar->add_menu(array(
931 931
 					'id' => 'espresso-toolbar-events',
932 932
 					'parent' => 'espresso-toolbar',
933
-					'title' => __( 'Events', 'event_espresso' ),
933
+					'title' => __('Events', 'event_espresso'),
934 934
 					'href' => $events_admin_url,
935 935
 					'meta' => array(
936 936
 							'title' => __('Events', 'event_espresso'),
@@ -941,13 +941,13 @@  discard block
 block discarded – undo
941 941
 		}
942 942
 
943 943
 
944
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new' ) ) {
944
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new')) {
945 945
 			//Events Add New
946 946
 			$admin_bar->add_menu(array(
947 947
 					'id' => 'espresso-toolbar-events-new',
948 948
 					'parent' => 'espresso-toolbar-events',
949 949
 					'title' => __('Add New', 'event_espresso'),
950
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'create_new' ), $events_admin_url ),
950
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'create_new'), $events_admin_url),
951 951
 					'meta' => array(
952 952
 							'title' => __('Add New', 'event_espresso'),
953 953
 							'target' => '',
@@ -956,18 +956,18 @@  discard block
 block discarded – undo
956 956
 			));
957 957
 		}
958 958
 
959
-		if ( is_single() && ( get_post_type() == 'espresso_events' ) ) {
959
+		if (is_single() && (get_post_type() == 'espresso_events')) {
960 960
 
961 961
 			//Current post
962 962
 			global $post;		
963 963
     	
964
-	    	if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_event', 'ee_admin_bar_menu_espresso-toolbar-events-edit', $post->ID ) ) {
964
+	    	if (EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'ee_admin_bar_menu_espresso-toolbar-events-edit', $post->ID)) {
965 965
 				//Events Edit Current Event
966 966
 				$admin_bar->add_menu(array(
967 967
 						'id' => 'espresso-toolbar-events-edit',
968 968
 						'parent' => 'espresso-toolbar-events',
969 969
 						'title' => __('Edit Event', 'event_espresso'),
970
-						'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'edit', 'post'=>$post->ID ), $events_admin_url ),
970
+						'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'edit', 'post'=>$post->ID), $events_admin_url),
971 971
 						'meta' => array(
972 972
 								'title' => __('Edit Event', 'event_espresso'),
973 973
 								'target' => '',
@@ -979,11 +979,11 @@  discard block
 block discarded – undo
979 979
 		}
980 980
 
981 981
 		//Events View
982
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-view' ) ) {
982
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-view')) {
983 983
 			$admin_bar->add_menu(array(
984 984
 					'id' => 'espresso-toolbar-events-view',
985 985
 					'parent' => 'espresso-toolbar-events',
986
-					'title' => __( 'View', 'event_espresso' ),
986
+					'title' => __('View', 'event_espresso'),
987 987
 					'href' => $events_admin_url,
988 988
 					'meta' => array(
989 989
 							'title' => __('View', 'event_espresso'),
@@ -993,12 +993,12 @@  discard block
 block discarded – undo
993 993
 			));
994 994
 		}
995 995
 
996
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all' ) ) {
996
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all')) {
997 997
 			//Events View All
998 998
 			$admin_bar->add_menu(array(
999 999
 					'id' => 'espresso-toolbar-events-all',
1000 1000
 					'parent' => 'espresso-toolbar-events-view',
1001
-					'title' => __( 'All', 'event_espresso' ),
1001
+					'title' => __('All', 'event_espresso'),
1002 1002
 					'href' => $events_admin_url,
1003 1003
 					'meta' => array(
1004 1004
 							'title' => __('All', 'event_espresso'),
@@ -1009,13 +1009,13 @@  discard block
 block discarded – undo
1009 1009
 		}
1010 1010
 
1011 1011
 
1012
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-today' ) ) {
1012
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-today')) {
1013 1013
 			//Events View Today
1014 1014
 			$admin_bar->add_menu(array(
1015 1015
 					'id' => 'espresso-toolbar-events-today',
1016 1016
 					'parent' => 'espresso-toolbar-events-view',
1017 1017
 					'title' => __('Today', 'event_espresso'),
1018
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today' ), $events_admin_url ),
1018
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'today'), $events_admin_url),
1019 1019
 					'meta' => array(
1020 1020
 							'title' => __('Today', 'event_espresso'),
1021 1021
 							'target' => '',
@@ -1025,13 +1025,13 @@  discard block
 block discarded – undo
1025 1025
 		}
1026 1026
 
1027 1027
 
1028
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-month' ) ) {
1028
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-month')) {
1029 1029
 			//Events View This Month
1030 1030
 			$admin_bar->add_menu(array(
1031 1031
 					'id' => 'espresso-toolbar-events-month',
1032 1032
 					'parent' => 'espresso-toolbar-events-view',
1033
-					'title' => __( 'This Month', 'event_espresso'),
1034
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month' ), $events_admin_url ),
1033
+					'title' => __('This Month', 'event_espresso'),
1034
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'month'), $events_admin_url),
1035 1035
 					'meta' => array(
1036 1036
 							'title' => __('This Month', 'event_espresso'),
1037 1037
 							'target' => '',
@@ -1041,11 +1041,11 @@  discard block
 block discarded – undo
1041 1041
 		}
1042 1042
 
1043 1043
 		//Registration Overview
1044
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations' ) ) {
1044
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations')) {
1045 1045
 			$admin_bar->add_menu(array(
1046 1046
 					'id' => 'espresso-toolbar-registrations',
1047 1047
 					'parent' => 'espresso-toolbar',
1048
-					'title' => __( 'Registrations', 'event_espresso' ),
1048
+					'title' => __('Registrations', 'event_espresso'),
1049 1049
 					'href' => $reg_admin_url,
1050 1050
 					'meta' => array(
1051 1051
 							'title' => __('Registrations', 'event_espresso'),
@@ -1056,12 +1056,12 @@  discard block
 block discarded – undo
1056 1056
 		}
1057 1057
 
1058 1058
 		//Registration Overview Today
1059
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today' ) ) {
1059
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today')) {
1060 1060
 			$admin_bar->add_menu(array(
1061 1061
 					'id' => 'espresso-toolbar-registrations-today',
1062 1062
 					'parent' => 'espresso-toolbar-registrations',
1063
-					'title' => __( 'Today', 'event_espresso'),
1064
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today' ), $reg_admin_url ),
1063
+					'title' => __('Today', 'event_espresso'),
1064
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'today'), $reg_admin_url),
1065 1065
 					'meta' => array(
1066 1066
 							'title' => __('Today', 'event_espresso'),
1067 1067
 							'target' => '',
@@ -1071,14 +1071,14 @@  discard block
 block discarded – undo
1071 1071
 		}
1072 1072
 
1073 1073
 		//Registration Overview Today Completed
1074
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-approved' ) ) {
1074
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-approved')) {
1075 1075
 			$admin_bar->add_menu(array(
1076 1076
 					'id' => 'espresso-toolbar-registrations-today-approved',
1077 1077
 					'parent' => 'espresso-toolbar-registrations-today',
1078
-					'title' => __( 'Approved', 'event_espresso' ),
1079
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_approved ), $reg_admin_url ),
1078
+					'title' => __('Approved', 'event_espresso'),
1079
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_approved), $reg_admin_url),
1080 1080
 					'meta' => array(
1081
-							'title' => __('Approved', 'event_espresso' ),
1081
+							'title' => __('Approved', 'event_espresso'),
1082 1082
 							'target' => '',
1083 1083
 							'class' => $menu_class
1084 1084
 					),
@@ -1086,14 +1086,14 @@  discard block
 block discarded – undo
1086 1086
 		}
1087 1087
 
1088 1088
 		//Registration Overview Today Pending\
1089
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-pending' ) ) {
1089
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-pending')) {
1090 1090
 			$admin_bar->add_menu(array(
1091 1091
 					'id' => 'espresso-toolbar-registrations-today-pending',
1092 1092
 					'parent' => 'espresso-toolbar-registrations-today',
1093
-					'title' => __( 'Pending', 'event_espresso' ),
1094
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today', 'reg_status'=>EEM_Registration::status_id_pending_payment ), $reg_admin_url ),
1093
+					'title' => __('Pending', 'event_espresso'),
1094
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'today', 'reg_status'=>EEM_Registration::status_id_pending_payment), $reg_admin_url),
1095 1095
 					'meta' => array(
1096
-							'title' => __('Pending Payment', 'event_espresso' ),
1096
+							'title' => __('Pending Payment', 'event_espresso'),
1097 1097
 							'target' => '',
1098 1098
 							'class' => $menu_class
1099 1099
 					),
@@ -1101,14 +1101,14 @@  discard block
 block discarded – undo
1101 1101
 		}
1102 1102
 
1103 1103
 		//Registration Overview Today Incomplete
1104
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-not-approved' ) ) {
1104
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-not-approved')) {
1105 1105
 			$admin_bar->add_menu(array(
1106 1106
 					'id' => 'espresso-toolbar-registrations-today-not-approved',
1107 1107
 					'parent' => 'espresso-toolbar-registrations-today',
1108
-					'title' => __( 'Not Approved', 'event_espresso' ),
1109
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_not_approved ), $reg_admin_url ),
1108
+					'title' => __('Not Approved', 'event_espresso'),
1109
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_not_approved), $reg_admin_url),
1110 1110
 					'meta' => array(
1111
-							'title' => __('Not Approved', 'event_espresso' ),
1111
+							'title' => __('Not Approved', 'event_espresso'),
1112 1112
 							'target' => '',
1113 1113
 							'class' => $menu_class
1114 1114
 					),
@@ -1116,12 +1116,12 @@  discard block
 block discarded – undo
1116 1116
 		}
1117 1117
 
1118 1118
 		//Registration Overview Today Incomplete
1119
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-cancelled' ) ) {
1119
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-cancelled')) {
1120 1120
 			$admin_bar->add_menu(array(
1121 1121
 					'id' => 'espresso-toolbar-registrations-today-cancelled',
1122 1122
 					'parent' => 'espresso-toolbar-registrations-today',
1123
-					'title' => __( 'Cancelled', 'event_espresso'),
1124
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_cancelled ), $reg_admin_url ),
1123
+					'title' => __('Cancelled', 'event_espresso'),
1124
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_cancelled), $reg_admin_url),
1125 1125
 					'meta' => array(
1126 1126
 							'title' => __('Cancelled', 'event_espresso'),
1127 1127
 							'target' => '',
@@ -1131,12 +1131,12 @@  discard block
 block discarded – undo
1131 1131
 		}
1132 1132
 
1133 1133
 		//Registration Overview This Month
1134
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month' ) ) {
1134
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month')) {
1135 1135
 			$admin_bar->add_menu(array(
1136 1136
 					'id' => 'espresso-toolbar-registrations-month',
1137 1137
 					'parent' => 'espresso-toolbar-registrations',
1138
-					'title' => __( 'This Month', 'event_espresso' ),
1139
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month' ), $reg_admin_url ),
1138
+					'title' => __('This Month', 'event_espresso'),
1139
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'month'), $reg_admin_url),
1140 1140
 					'meta' => array(
1141 1141
 							'title' => __('This Month', 'event_espresso'),
1142 1142
 							'target' => '',
@@ -1146,12 +1146,12 @@  discard block
 block discarded – undo
1146 1146
 		}
1147 1147
 
1148 1148
 		//Registration Overview This Month Approved
1149
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-approved' ) ) {
1149
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-approved')) {
1150 1150
 			$admin_bar->add_menu(array(
1151 1151
 					'id' => 'espresso-toolbar-registrations-month-approved',
1152 1152
 					'parent' => 'espresso-toolbar-registrations-month',
1153
-					'title' => __( 'Approved', 'event_espresso' ),
1154
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_approved ), $reg_admin_url ),
1153
+					'title' => __('Approved', 'event_espresso'),
1154
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_approved), $reg_admin_url),
1155 1155
 					'meta' => array(
1156 1156
 							'title' => __('Approved', 'event_espresso'),
1157 1157
 							'target' => '',
@@ -1161,12 +1161,12 @@  discard block
 block discarded – undo
1161 1161
 		}
1162 1162
 
1163 1163
 		//Registration Overview This Month Pending
1164
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-pending' ) ) {
1164
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-pending')) {
1165 1165
 			$admin_bar->add_menu(array(
1166 1166
 					'id' => 'espresso-toolbar-registrations-month-pending',
1167 1167
 					'parent' => 'espresso-toolbar-registrations-month',
1168
-					'title' => __( 'Pending', 'event_espresso'),
1169
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_pending_payment ), $reg_admin_url ),
1168
+					'title' => __('Pending', 'event_espresso'),
1169
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_pending_payment), $reg_admin_url),
1170 1170
 					'meta' => array(
1171 1171
 							'title' => __('Pending', 'event_espresso'),
1172 1172
 							'target' => '',
@@ -1176,14 +1176,14 @@  discard block
 block discarded – undo
1176 1176
 		}
1177 1177
 
1178 1178
 		//Registration Overview This Month Not Approved
1179
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-not-approved' ) ) {
1179
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-not-approved')) {
1180 1180
 			$admin_bar->add_menu(array(
1181 1181
 					'id' => 'espresso-toolbar-registrations-month-not-approved',
1182 1182
 					'parent' => 'espresso-toolbar-registrations-month',
1183
-					'title' => __( 'Not Approved', 'event_espresso'),
1184
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_not_approved ), $reg_admin_url ),
1183
+					'title' => __('Not Approved', 'event_espresso'),
1184
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_not_approved), $reg_admin_url),
1185 1185
 					'meta' => array(
1186
-							'title' => __('Not Approved', 'event_espresso' ),
1186
+							'title' => __('Not Approved', 'event_espresso'),
1187 1187
 							'target' => '',
1188 1188
 							'class' => $menu_class
1189 1189
 					),
@@ -1192,12 +1192,12 @@  discard block
 block discarded – undo
1192 1192
 
1193 1193
 
1194 1194
 		//Registration Overview This Month Cancelled
1195
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-cancelled' ) ) {
1195
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-cancelled')) {
1196 1196
 			$admin_bar->add_menu(array(
1197 1197
 					'id' => 'espresso-toolbar-registrations-month-cancelled',
1198 1198
 					'parent' => 'espresso-toolbar-registrations-month',
1199 1199
 					'title' => __('Cancelled', 'event_espresso'),
1200
-					'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_cancelled ), $reg_admin_url ),
1200
+					'href' => EEH_URL::add_query_args_and_nonce(array('action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_cancelled), $reg_admin_url),
1201 1201
 					'meta' => array(
1202 1202
 							'title' => __('Cancelled', 'event_espresso'),
1203 1203
 							'target' => '',
@@ -1207,11 +1207,11 @@  discard block
 block discarded – undo
1207 1207
 		}
1208 1208
 
1209 1209
 		//Extensions & Services
1210
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_ee', 'ee_admin_bar_menu_espresso-toolbar-extensions-and-services' ) ) {
1210
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_ee', 'ee_admin_bar_menu_espresso-toolbar-extensions-and-services')) {
1211 1211
 			$admin_bar->add_menu(array(
1212 1212
 					'id' => 'espresso-toolbar-extensions-and-services',
1213 1213
 					'parent' => 'espresso-toolbar',
1214
-					'title' => __( 'Extensions & Services', 'event_espresso' ),
1214
+					'title' => __('Extensions & Services', 'event_espresso'),
1215 1215
 					'href' => $extensions_admin_url,
1216 1216
 					'meta' => array(
1217 1217
 							'title' => __('Extensions & Services', 'event_espresso'),
@@ -1233,8 +1233,8 @@  discard block
 block discarded – undo
1233 1233
 	 * @param  array  $exclude_array any existing pages being excluded are in this array.
1234 1234
 	 * @return array
1235 1235
 	 */
1236
-	public function remove_pages_from_wp_list_pages( $exclude_array ) {
1237
-		return  array_merge( $exclude_array, EE_Registry::instance()->CFG->core->get_critical_pages_array() );
1236
+	public function remove_pages_from_wp_list_pages($exclude_array) {
1237
+		return  array_merge($exclude_array, EE_Registry::instance()->CFG->core->get_critical_pages_array());
1238 1238
 	}
1239 1239
 
1240 1240
 
@@ -1254,11 +1254,11 @@  discard block
 block discarded – undo
1254 1254
 	 */
1255 1255
 	public function wp_enqueue_scripts() {
1256 1256
 		// unlike other systems, EE_System_scripts loading is turned ON by default, but prior to the init hook, can be turned off via: add_filter( 'FHEE_load_EE_System_scripts', '__return_false' );
1257
-		if ( apply_filters( 'FHEE_load_EE_System_scripts', TRUE ) ) {
1257
+		if (apply_filters('FHEE_load_EE_System_scripts', TRUE)) {
1258 1258
 			// jquery_validate loading is turned OFF by default, but prior to the wp_enqueue_scripts hook, can be turned back on again via:  add_filter( 'FHEE_load_jquery_validate', '__return_true' );
1259
-			if ( apply_filters( 'FHEE_load_jquery_validate', FALSE ) ) {
1259
+			if (apply_filters('FHEE_load_jquery_validate', FALSE)) {
1260 1260
 				// register jQuery Validate
1261
-				wp_register_script( 'jquery-validate', EE_GLOBAL_ASSETS_URL . 'scripts/jquery.validate.min.js', array('jquery'), '1.11.1', TRUE );
1261
+				wp_register_script('jquery-validate', EE_GLOBAL_ASSETS_URL.'scripts/jquery.validate.min.js', array('jquery'), '1.11.1', TRUE);
1262 1262
 			}
1263 1263
 		}
1264 1264
 	}
Please login to merge, or discard this patch.
modules/ticket_selector/templates/ticket_selector_chart_iframe.template.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Template for the ticket selector when displayed in an iframe.
4
- *
5
- * Following template arguments are available:
6
- *
7
- * @type string $notices	HTML for notices and ajax gif
8
- * @type string $ticket_selector	This is the html for the ticket selector.
9
- * @type array $css 		An array of css urls.
10
- * @type string $eei18n 	localized JSON vars
11
- * @type array $js 			An array of js urls.
12
- *
13
- * @since 4.6.7
14
- * @package Event Espresso
15
- * @subpackage module
16
- */
3
+	 * Template for the ticket selector when displayed in an iframe.
4
+	 *
5
+	 * Following template arguments are available:
6
+	 *
7
+	 * @type string $notices	HTML for notices and ajax gif
8
+	 * @type string $ticket_selector	This is the html for the ticket selector.
9
+	 * @type array $css 		An array of css urls.
10
+	 * @type string $eei18n 	localized JSON vars
11
+	 * @type array $js 			An array of js urls.
12
+	 *
13
+	 * @since 4.6.7
14
+	 * @package Event Espresso
15
+	 * @subpackage module
16
+	 */
17 17
 ?>
18 18
 <!DOCTYPE html>
19 19
 <html>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
 <html>
20 20
 <head>
21 21
 	<title><?php _e('Ticket Selector', 'event_espresso'); ?></title>
22
-	<?php foreach ( $css as $url ) : ?>
23
-		<link rel="stylesheet" type="text/css" href="<?php echo $url;?>">
22
+	<?php foreach ($css as $url) : ?>
23
+		<link rel="stylesheet" type="text/css" href="<?php echo $url; ?>">
24 24
 	<?php endforeach; ?>
25 25
 	<script type="text/javascript">
26 26
 		<?php echo  $eei18n; ?>
27 27
 	</script>
28
-	<?php foreach ( $js as $jsurl ) : ?>
28
+	<?php foreach ($js as $jsurl) : ?>
29 29
 		<script type="text/javascript" src="<?php echo $jsurl; ?>"></script>
30 30
 	<?php endforeach; ?>
31 31
 </head>
Please login to merge, or discard this patch.
payment_methods/Bank/EE_PMT_Bank.pm.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EE_PMT_Bank extends EE_PMT_Base{
28
+class EE_PMT_Bank extends EE_PMT_Base {
29 29
 
30 30
 
31 31
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 		$this->_pretty_name = __("Bank", 'event_espresso');
39 39
 		parent::__construct($pm_instance);
40 40
 		$this->_default_button_url = $this->file_url().'lib'.DS.'bank-logo.png';
41
-		$this->_default_description = __( 'Make payment using an electronic funds transfer from your bank.', 'event_espresso' );
41
+		$this->_default_description = __('Make payment using an electronic funds transfer from your bank.', 'event_espresso');
42 42
 	}
43 43
 
44 44
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param \EE_Transaction $transaction
49 49
 	 * @return NULL
50 50
 	 */
51
-	public function generate_new_billing_form( EE_Transaction $transaction = NULL ) {
51
+	public function generate_new_billing_form(EE_Transaction $transaction = NULL) {
52 52
 		return NULL;
53 53
 	}
54 54
 
@@ -62,17 +62,17 @@  discard block
 block discarded – undo
62 62
 		return new EE_Payment_Method_Form(array(
63 63
 			'extra_meta_inputs'=>array(
64 64
 				'page_title'=>new EE_Text_Input(array(
65
-					'html_label_text'=>  sprintf(__("Title %s", "event_espresso"),  $this->get_help_tab_link()),
65
+					'html_label_text'=>  sprintf(__("Title %s", "event_espresso"), $this->get_help_tab_link()),
66 66
 					'default'=>  __("Electronic Funds Transfers", 'event_espresso')
67 67
 				)),
68
-				'payment_instructions'=>new EE_Text_Area_Input( array(
69
-					'html_label_text'=>  sprintf(__("Payment Instructions %s", "event_espresso"),  $this->get_help_tab_link()),
70
-					'html_help_text' => __( 'Provide instructions on how registrants can send the bank draft payment. Eg, mention your account name, bank account number, bank name, bank routing code, and bank address, etc.', 'event_espresso' ),
68
+				'payment_instructions'=>new EE_Text_Area_Input(array(
69
+					'html_label_text'=>  sprintf(__("Payment Instructions %s", "event_espresso"), $this->get_help_tab_link()),
70
+					'html_help_text' => __('Provide instructions on how registrants can send the bank draft payment. Eg, mention your account name, bank account number, bank name, bank routing code, and bank address, etc.', 'event_espresso'),
71 71
 					'default'=> sprintf(
72 72
 						__('Please initiate an electronic payment using the following bank information: %1$sAccount Owner: Luke Skywalker%1$sBank Account # 1234567890%1$sBank Name: Rebellion Bank%1$sRouting Number: 12345%1$sBank Address: 12345 Wookie Rd., Planet Corellian.%1$sPayment must be received within 48 hours of event date.', 'event_espresso'),
73 73
 						"\n"
74 74
 					),
75
-					'validation_strategies' => array( new EE_Full_HTML_Validation_Strategy() ),
75
+					'validation_strategies' => array(new EE_Full_HTML_Validation_Strategy()),
76 76
 				)),
77 77
 			),
78 78
 			'exclude'=>array('PMD_debug_mode')
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 * @see EE_PMT_Base::help_tabs_config()
87 87
 	 * @return array
88 88
 	 */
89
-	public function help_tabs_config(){
89
+	public function help_tabs_config() {
90 90
 		return array(
91 91
 			$this->get_help_tab_name() => array(
92 92
 						'title' => __('Bank Draft Settings', 'event_espresso'),
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 * Other gateways may want to override this, such as offline gateways.
104 104
 	 * @return string
105 105
 	 */
106
-	public function payment_overview_content(EE_Payment $payment){
106
+	public function payment_overview_content(EE_Payment $payment) {
107 107
 		EE_Registry::instance()->load_helper('Template');
108 108
 		$extra_meta_for_payment_method = $this->_pm_instance->all_extra_meta_array();
109 109
 		$template_vars = array_merge(
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 							),
116 116
 						$extra_meta_for_payment_method);
117 117
 		return EEH_Template::locate_template(
118
-				'payment_methods' . DS . 'Bank'. DS . 'templates' . DS . 'bank_payment_details_content.template.php',
118
+				'payment_methods'.DS.'Bank'.DS.'templates'.DS.'bank_payment_details_content.template.php',
119 119
 				$template_vars);
120 120
 	}
121 121
 
Please login to merge, or discard this patch.
payment_methods/Check/EE_PMT_Check.pm.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EE_PMT_Check extends EE_PMT_Base{
28
+class EE_PMT_Check extends EE_PMT_Base {
29 29
 
30 30
 
31 31
 	/**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	public function __construct($pm_instance = NULL) {
36 36
 		$this->_pretty_name = __("Check", 'event_espresso');
37
-		$this->_default_description = __( 'After clicking "Finalize Registration", you will be given instructions on how to complete your payment.', 'event_espresso' );
37
+		$this->_default_description = __('After clicking "Finalize Registration", you will be given instructions on how to complete your payment.', 'event_espresso');
38 38
 		parent::__construct($pm_instance);
39 39
 		$this->_default_button_url = $this->file_url().'lib'.DS.'check-logo.png';
40 40
 	}
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 * @param \EE_Transaction $transaction
47 47
 	 * @return NULL
48 48
 	 */
49
-	public function generate_new_billing_form( EE_Transaction $transaction = NULL ) {
49
+	public function generate_new_billing_form(EE_Transaction $transaction = NULL) {
50 50
 		return NULL;
51 51
 	}
52 52
 
@@ -57,41 +57,41 @@  discard block
 block discarded – undo
57 57
 	 * @return EE_Form_Section_Proper
58 58
 	 */
59 59
 	public function generate_new_settings_form() {
60
-			if ( EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance){
60
+			if (EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance) {
61 61
 				$organization = EE_Registry::instance()->CFG->organization;
62
-				$organization_name = $organization->get_pretty( 'name' );
63
-				$default_address = $organization->address_1 != '' ? $organization->get_pretty( 'address_1' ) . '<br />' : '';
64
-				$default_address .= $organization->address_2 != '' ? $organization->get_pretty( 'address_2' ) . '<br />' : '';
65
-				$default_address .= $organization->city != '' ? $organization->get_pretty( 'city' ) : '';
66
-				$default_address .= ( $organization->city != '' && $organization->STA_ID != '') ? ', ' : '<br />';
67
-				$state = EE_Registry::instance()->load_model( 'State' )->get_one_by_ID( $organization->STA_ID );
68
-				$country = EE_Registry::instance()->load_model( 'Country' )->get_one_by_ID( $organization->CNT_ISO ) ;
69
-				$default_address .=  $state ? $state->name() . '<br />' : '';
70
-				$default_address .= $country ? $country->name(). '<br />' : '';
71
-				$default_address .= $organization->zip != '' ? $organization->get_pretty( 'zip' ) : '';
72
-			}else{
62
+				$organization_name = $organization->get_pretty('name');
63
+				$default_address = $organization->address_1 != '' ? $organization->get_pretty('address_1').'<br />' : '';
64
+				$default_address .= $organization->address_2 != '' ? $organization->get_pretty('address_2').'<br />' : '';
65
+				$default_address .= $organization->city != '' ? $organization->get_pretty('city') : '';
66
+				$default_address .= ($organization->city != '' && $organization->STA_ID != '') ? ', ' : '<br />';
67
+				$state = EE_Registry::instance()->load_model('State')->get_one_by_ID($organization->STA_ID);
68
+				$country = EE_Registry::instance()->load_model('Country')->get_one_by_ID($organization->CNT_ISO);
69
+				$default_address .= $state ? $state->name().'<br />' : '';
70
+				$default_address .= $country ? $country->name().'<br />' : '';
71
+				$default_address .= $organization->zip != '' ? $organization->get_pretty('zip') : '';
72
+			} else {
73 73
 				$default_address = 'unknown';
74 74
 				$organization_name = 'unknown';
75 75
 			}
76 76
 			return new EE_Payment_Method_Form(array(
77 77
 			'extra_meta_inputs'=>array(
78 78
 				'check_title'=> new EE_Text_Input(array(
79
-					'html_label_text'=>  sprintf(__("Title %s", "event_espresso"),  $this->get_help_tab_link()),
79
+					'html_label_text'=>  sprintf(__("Title %s", "event_espresso"), $this->get_help_tab_link()),
80 80
 					'default'=>  __("Check/Money Order Payments", 'event_espresso'),
81 81
 				)),
82 82
 				'payment_instructions'=>new EE_Text_Area_Input(array(
83
-					'html_label_text'=>  sprintf(__("Instructions %s", "event_espresso"),  $this->get_help_tab_link()),
83
+					'html_label_text'=>  sprintf(__("Instructions %s", "event_espresso"), $this->get_help_tab_link()),
84 84
 					'default'=> __("Please send Check/Money Order to the address below. Payment must be received within 48 hours of event date.", 'event_espresso'),
85
-					'validation_strategies' => array( new EE_Full_HTML_Validation_Strategy() ),
85
+					'validation_strategies' => array(new EE_Full_HTML_Validation_Strategy()),
86 86
 				)),
87 87
 				'payable_to'=>new EE_Text_Input(array(
88
-					'html_label_text'=>  sprintf(__("Payable To %s", "event_espresso"),  $this->get_help_tab_link()),
88
+					'html_label_text'=>  sprintf(__("Payable To %s", "event_espresso"), $this->get_help_tab_link()),
89 89
 					'default'=>$organization_name
90 90
 				)),
91 91
 				'address_to_send_payment'=>new EE_Text_Area_Input(array(
92
-					'html_label_text'=>  sprintf(__("Address Payable %s", "event_espresso"),  $this->get_help_tab_link()),
92
+					'html_label_text'=>  sprintf(__("Address Payable %s", "event_espresso"), $this->get_help_tab_link()),
93 93
 					'default'=>$default_address,
94
-					'validation_strategies' => array( new EE_Full_HTML_Validation_Strategy() ),
94
+					'validation_strategies' => array(new EE_Full_HTML_Validation_Strategy()),
95 95
 				)),
96 96
 			),
97 97
 			'exclude'=>array('PMD_debug_mode')
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 * @see EE_PMT_Base::help_tabs_config()
106 106
 	 * @return array
107 107
 	 */
108
-	public function help_tabs_config(){
108
+	public function help_tabs_config() {
109 109
 		return array(
110 110
 			$this->get_help_tab_name() => array(
111 111
 						'title' => __('Check Settings', 'event_espresso'),
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 * Other gateways may want to override this, such as offline gateways.
123 123
 	 * @return string
124 124
 	 */
125
-	public function payment_overview_content(EE_Payment $payment){
125
+	public function payment_overview_content(EE_Payment $payment) {
126 126
 		EE_Registry::instance()->load_helper('Template');
127 127
 		$extra_meta_for_payment_method = $this->_pm_instance->all_extra_meta_array();
128 128
 		$template_vars = array_merge(
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 							),
137 137
 						$extra_meta_for_payment_method);
138 138
 		return EEH_Template::locate_template(
139
-				'payment_methods' . DS . 'Check'. DS . 'templates'.DS.'check_payment_details_content.template.php',
139
+				'payment_methods'.DS.'Check'.DS.'templates'.DS.'check_payment_details_content.template.php',
140 140
 				$template_vars
141 141
 				);
142 142
 	}
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/content-espresso_events-details.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,30 +3,30 @@
 block discarded – undo
3 3
 global $post;
4 4
 ?>
5 5
 <div class="event-content">
6
-<?php if ( apply_filters( 'FHEE__content_espresso_events_details_template__display_entry_meta', TRUE )): ?>
6
+<?php if (apply_filters('FHEE__content_espresso_events_details_template__display_entry_meta', TRUE)): ?>
7 7
 	<div class="entry-meta">
8
-		<span class="tags-links"><?php espresso_event_categories( $post->ID, TRUE, TRUE ); ?></span>
8
+		<span class="tags-links"><?php espresso_event_categories($post->ID, TRUE, TRUE); ?></span>
9 9
 	<?php
10
-		if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
10
+		if ( ! post_password_required() && (comments_open() || get_comments_number())) :
11 11
 	?>
12
-	<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'event_espresso' ), __( '1 Comment', 'event_espresso' ), __( '% Comments', 'event_espresso' ) ); ?></span>
12
+	<span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'event_espresso'), __('1 Comment', 'event_espresso'), __('% Comments', 'event_espresso')); ?></span>
13 13
 	<?php
14 14
 		endif;
15
-		edit_post_link( __( 'Edit', 'event_espresso' ), '<span class="edit-link">', '</span>' );
15
+		edit_post_link(__('Edit', 'event_espresso'), '<span class="edit-link">', '</span>');
16 16
 	?>
17 17
 	</div>
18 18
 <?php endif;
19
-	$event_phone = espresso_event_phone( $post->ID, FALSE );
20
-	if ( $event_phone != '' ) : ?>
19
+	$event_phone = espresso_event_phone($post->ID, FALSE);
20
+	if ($event_phone != '') : ?>
21 21
 	<p>
22
-		<span class="small-text"><strong><?php _e( 'Event Phone:', 'event_espresso' ); ?> </strong></span> <?php echo $event_phone; ?>
22
+		<span class="small-text"><strong><?php _e('Event Phone:', 'event_espresso'); ?> </strong></span> <?php echo $event_phone; ?>
23 23
 	</p>
24
-<?php endif;  ?>
24
+<?php endif; ?>
25 25
 <?php
26
-	if ( apply_filters( 'FHEE__content_espresso_events_details_template__display_the_content', true ) ) {
27
-		do_action( 'AHEE_event_details_before_the_content', $post );
28
-		apply_filters( 'FHEE__content_espresso_events_details_template__the_content', espresso_event_content_or_excerpt() );
29
-		do_action( 'AHEE_event_details_after_the_content', $post );
26
+	if (apply_filters('FHEE__content_espresso_events_details_template__display_the_content', true)) {
27
+		do_action('AHEE_event_details_before_the_content', $post);
28
+		apply_filters('FHEE__content_espresso_events_details_template__the_content', espresso_event_content_or_excerpt());
29
+		do_action('AHEE_event_details_after_the_content', $post);
30 30
 	}
31 31
  ?>
32 32
 </div>
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/content-espresso_events-shortcode.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -21,22 +21,22 @@  discard block
 block discarded – undo
21 21
  * and/or use any of the template tags functions found in:
22 22
  * \wp-content\plugins\event-espresso-core\public\template_tags.php
23 23
  ************************** IMPORTANT **************************/
24
-add_filter( 'FHEE__content_espresso_events__template_loaded', '__return_false' );
24
+add_filter('FHEE__content_espresso_events__template_loaded', '__return_false');
25 25
 
26 26
 //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' &nbsp; <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>';
27 27
 
28 28
 global $post;
29
-$event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : '';
30
-$event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class );
29
+$event_class = has_excerpt($post->ID) ? ' has-excerpt' : '';
30
+$event_class = apply_filters('FHEE__content_espresso_events__event_class', $event_class);
31 31
 ?>
32
-<?php do_action( 'AHEE_event_details_before_post', $post ); ?>
33
-<article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>>
32
+<?php do_action('AHEE_event_details_before_post', $post); ?>
33
+<article id="post-<?php the_ID(); ?>" <?php post_class($event_class); ?>>
34 34
 
35
-<?php if ( is_single() ) : ?>
35
+<?php if (is_single()) : ?>
36 36
 
37
-	<div id="espresso-event-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
38
-		<?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
39
-		<?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
37
+	<div id="espresso-event-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv">
38
+		<?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?>
39
+		<?php espresso_get_template_part('content', 'espresso_events-header'); ?>
40 40
 	</div>
41 41
 
42 42
 	<div class="espresso-event-wrapper-dv">
@@ -46,16 +46,16 @@  discard block
 block discarded – undo
46 46
 		<?php //espresso_get_template_part( 'content', 'espresso_events-details' ); ?>
47 47
 		<?php //espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
48 48
 		<footer class="event-meta">
49
-			<?php do_action( 'AHEE_event_details_footer_top', $post ); ?>
50
-			<?php do_action( 'AHEE_event_details_footer_bottom', $post ); ?>
49
+			<?php do_action('AHEE_event_details_footer_top', $post); ?>
50
+			<?php do_action('AHEE_event_details_footer_bottom', $post); ?>
51 51
 		</footer>
52 52
 	</div>
53 53
 
54
-<?php elseif ( is_archive() ) : ?>
54
+<?php elseif (is_archive()) : ?>
55 55
 
56
-	<div id="espresso-event-list-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
57
-		<?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
58
-		<?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
56
+	<div id="espresso-event-list-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv">
57
+		<?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?>
58
+		<?php espresso_get_template_part('content', 'espresso_events-header'); ?>
59 59
 	</div>
60 60
 
61 61
 	<div class="espresso-event-list-wrapper-dv">
@@ -70,5 +70,5 @@  discard block
 block discarded – undo
70 70
 
71 71
 </article>
72 72
 <!-- #post -->
73
-<?php do_action( 'AHEE_event_details_after_post', $post );
73
+<?php do_action('AHEE_event_details_after_post', $post);
74 74
 
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/content-espresso_events-venues.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,54 +1,54 @@
 block discarded – undo
1 1
 <?php
2 2
 //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' &nbsp; <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>';
3
-if (( is_single() && espresso_display_venue_in_event_details() ) || ( is_archive() && espresso_display_venue_in_event_list() ) ) :
3
+if ((is_single() && espresso_display_venue_in_event_details()) || (is_archive() && espresso_display_venue_in_event_list())) :
4 4
 	global $post;
5
-	do_action( 'AHEE_event_details_before_venue_details', $post );
6
-	$venue_name = espresso_venue_name( 0, 'details', FALSE );
7
-	if ( empty( $venue_name ) && espresso_is_venue_private() ) {
8
-		do_action( 'AHEE_event_details_after_venue_details', $post );
5
+	do_action('AHEE_event_details_before_venue_details', $post);
6
+	$venue_name = espresso_venue_name(0, 'details', FALSE);
7
+	if (empty($venue_name) && espresso_is_venue_private()) {
8
+		do_action('AHEE_event_details_after_venue_details', $post);
9 9
 		return '';
10 10
 	}
11 11
 ?>
12 12
 
13 13
 <div class="espresso-venue-dv<?php echo espresso_is_venue_private() ? ' espresso-private-venue-dv' : ''; ?>">
14 14
 	<h3 class="event-venues-h3 ee-event-h3">
15
-		<?php _e( 'Location', 'event_espresso' ); ?>
15
+		<?php _e('Location', 'event_espresso'); ?>
16 16
 	</h3>
17
-	<h4><strong><?php _e( 'Venue:', 'event_espresso' ); ?></strong>&nbsp;&nbsp; <strong> <?php echo $venue_name; ?></strong></h4>
17
+	<h4><strong><?php _e('Venue:', 'event_espresso'); ?></strong>&nbsp;&nbsp; <strong> <?php echo $venue_name; ?></strong></h4>
18 18
 	<p><span class="smaller-text tags-links"><?php echo espresso_venue_categories(); ?></span></p>
19
-<?php  if ( $venue_phone = espresso_venue_phone( $post->ID, FALSE )) : ?>
19
+<?php  if ($venue_phone = espresso_venue_phone($post->ID, FALSE)) : ?>
20 20
 	<p>
21
-		<span class="small-text"><strong><?php _e( 'Venue Phone:', 'event_espresso' ); ?></strong></span> <?php echo $venue_phone; ?>
21
+		<span class="small-text"><strong><?php _e('Venue Phone:', 'event_espresso'); ?></strong></span> <?php echo $venue_phone; ?>
22 22
 	</p>
23
-<?php endif;  ?>
24
-<?php  if ( espresso_venue_has_address( $post->ID )) : ?>
25
-	<strong><span class="dashicons dashicons-location-alt"></span><?php _e( 'Address:', 'event_espresso' ); ?></strong>
26
-	<?php espresso_venue_address( 'inline' ); ?>
27
-	<?php espresso_venue_gmap( $post->ID ); ?>
23
+<?php endif; ?>
24
+<?php  if (espresso_venue_has_address($post->ID)) : ?>
25
+	<strong><span class="dashicons dashicons-location-alt"></span><?php _e('Address:', 'event_espresso'); ?></strong>
26
+	<?php espresso_venue_address('inline'); ?>
27
+	<?php espresso_venue_gmap($post->ID); ?>
28 28
 	<div class="clear"><br/></div>
29
-<?php endif;  ?>
29
+<?php endif; ?>
30 30
 
31
-	<?php $VNU_ID = espresso_venue_id( $post->ID ); ?>
32
-	<?php if ( is_single() ) : ?>
33
-		<?php $venue_description = espresso_venue_description( $VNU_ID, FALSE ); ?>
34
-		<?php if ( $venue_description ) : ?>
31
+	<?php $VNU_ID = espresso_venue_id($post->ID); ?>
32
+	<?php if (is_single()) : ?>
33
+		<?php $venue_description = espresso_venue_description($VNU_ID, FALSE); ?>
34
+		<?php if ($venue_description) : ?>
35 35
 	<p>
36
-		<strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/>
37
-		<?php echo do_shortcode( $venue_description ); ?>
36
+		<strong><?php _e('Description:', 'event_espresso'); ?></strong><br/>
37
+		<?php echo do_shortcode($venue_description); ?>
38 38
 	</p>
39
-		<?php endif;  ?>
39
+		<?php endif; ?>
40 40
 	<?php else : ?>
41
-		<?php $venue_excerpt = espresso_venue_excerpt( $VNU_ID, FALSE ); ?>
42
-		<?php if ( $venue_excerpt ) : ?>
41
+		<?php $venue_excerpt = espresso_venue_excerpt($VNU_ID, FALSE); ?>
42
+		<?php if ($venue_excerpt) : ?>
43 43
 	<p>
44
-		<strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/>
44
+		<strong><?php _e('Description:', 'event_espresso'); ?></strong><br/>
45 45
 		<?php echo $venue_excerpt; ?>
46 46
 	</p>
47
-			<?php endif;  ?>
48
-		<?php endif;  ?>
47
+			<?php endif; ?>
48
+		<?php endif; ?>
49 49
 </div>
50 50
 <!-- .espresso-venue-dv -->
51 51
 <?php
52
-do_action( 'AHEE_event_details_after_venue_details', $post );
52
+do_action('AHEE_event_details_after_venue_details', $post);
53 53
 endif;
54 54
 ?>
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/content-espresso_events.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,52 +18,52 @@
 block discarded – undo
18 18
  * and/or use any of the template tags functions found in:
19 19
  * \wp-content\plugins\event-espresso-core\public\template_tags.php
20 20
  ************************** IMPORTANT **************************/
21
-add_filter( 'FHEE__content_espresso_events__template_loaded', '__return_true' );
21
+add_filter('FHEE__content_espresso_events__template_loaded', '__return_true');
22 22
 
23 23
 //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' &nbsp; <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>';
24 24
 
25 25
 global $post;
26
-$event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : '';
27
-$event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class );
26
+$event_class = has_excerpt($post->ID) ? ' has-excerpt' : '';
27
+$event_class = apply_filters('FHEE__content_espresso_events__event_class', $event_class);
28 28
 ?>
29
-<?php do_action( 'AHEE_event_details_before_post', $post ); ?>
30
-<article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>>
29
+<?php do_action('AHEE_event_details_before_post', $post); ?>
30
+<article id="post-<?php the_ID(); ?>" <?php post_class($event_class); ?>>
31 31
 
32
-<?php if ( is_single() ) : ?>
32
+<?php if (is_single()) : ?>
33 33
 
34
-	<div id="espresso-event-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
35
-		<?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
36
-		<?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
34
+	<div id="espresso-event-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv">
35
+		<?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?>
36
+		<?php espresso_get_template_part('content', 'espresso_events-header'); ?>
37 37
 	</div>
38 38
 
39 39
 	<div class="espresso-event-wrapper-dv">
40
-		<?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?>
41
-		<?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>
42
-		<?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?>
43
-		<?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
40
+		<?php espresso_get_template_part('content', 'espresso_events-tickets'); ?>
41
+		<?php espresso_get_template_part('content', 'espresso_events-datetimes'); ?>
42
+		<?php espresso_get_template_part('content', 'espresso_events-details'); ?>
43
+		<?php espresso_get_template_part('content', 'espresso_events-venues'); ?>
44 44
 		<footer class="event-meta">
45
-			<?php do_action( 'AHEE_event_details_footer_top', $post ); ?>
46
-			<?php do_action( 'AHEE_event_details_footer_bottom', $post ); ?>
45
+			<?php do_action('AHEE_event_details_footer_top', $post); ?>
46
+			<?php do_action('AHEE_event_details_footer_bottom', $post); ?>
47 47
 		</footer>
48 48
 	</div>
49 49
 
50
-<?php elseif ( is_archive() ) : ?>
50
+<?php elseif (is_archive()) : ?>
51 51
 
52
-	<div id="espresso-event-list-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
53
-		<?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
54
-		<?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
52
+	<div id="espresso-event-list-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv">
53
+		<?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?>
54
+		<?php espresso_get_template_part('content', 'espresso_events-header'); ?>
55 55
 	</div>
56 56
 
57 57
 	<div class="espresso-event-list-wrapper-dv">
58
-		<?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?>
59
-		<?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>
60
-		<?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?>
61
-		<?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
58
+		<?php espresso_get_template_part('content', 'espresso_events-tickets'); ?>
59
+		<?php espresso_get_template_part('content', 'espresso_events-datetimes'); ?>
60
+		<?php espresso_get_template_part('content', 'espresso_events-details'); ?>
61
+		<?php espresso_get_template_part('content', 'espresso_events-venues'); ?>
62 62
 	</div>
63 63
 
64 64
 <?php endif; ?>
65 65
 
66 66
 </article>
67 67
 <!-- #post -->
68
-<?php do_action( 'AHEE_event_details_after_post', $post );
68
+<?php do_action('AHEE_event_details_after_post', $post);
69 69
 
Please login to merge, or discard this patch.