Completed
Branch DECAF-4.7 (a62460)
by
unknown
113:29 queued 104:52
created
general_settings/help_tours/Your_Organization_Help_Tour.class.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -99,32 +99,32 @@  discard block
 block discarded – undo
99 99
 
100 100
 
101 101
 	protected function _start() {
102
-		$content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
103
-		$content .= '<p>' . __('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
102
+		$content = '<h3>'.__('Organization Settings', 'event_espresso').'</h3>';
103
+		$content .= '<p>'.__('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
104 104
 		return $content;
105 105
 	}
106 106
 
107 107
 	protected function _site_license_key_stop() {
108
-		return '<p>' . __('Enter your support license key here to enable one-click updates.', 'event_espresso') . '</p>';
108
+		return '<p>'.__('Enter your support license key here to enable one-click updates.', 'event_espresso').'</p>';
109 109
 	}
110 110
 
111 111
 	protected function _contact_information_stop() {
112
-		return '<p>' . __('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.', 'event_espresso') . '</p>';
112
+		return '<p>'.__('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.', 'event_espresso').'</p>';
113 113
 	}
114 114
 
115 115
 	protected function _upload_image_stop() {
116
-		return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
116
+		return '<p>'.__('Add a logo. This can be used for invoices and tickets.', 'event_espresso').'</p>';
117 117
 	}
118 118
 
119 119
 	protected function _organization_facebook_stop() {
120
-		return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
120
+		return '<p>'.__('Add links to various social media networks.', 'event_espresso').'</p>';
121 121
 	}
122 122
 
123 123
 	protected function _ueip_option_stop() {
124
-		return '<p>' . __('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.', 'event_espresso') . '</p>';
124
+		return '<p>'.__('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.', 'event_espresso').'</p>';
125 125
 	}
126 126
 
127 127
 	protected function _end_tour_stop() {
128
-		return '<p>' . __('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.', 'event_espresso') . '</p>';
128
+		return '<p>'.__('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.', 'event_espresso').'</p>';
129 129
 	}
130 130
 }
131 131
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
admin_pages/general_settings/templates/admin_option_settings.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <div class="padding">
2 2
 
3
-	<?php do_action( 'AHEE__admin_option_settings__template__before', $template_args ); ?>
3
+	<?php do_action('AHEE__admin_option_settings__template__before', $template_args); ?>
4 4
 
5 5
 	<?php /* @todo put back once we have a dashboard widget to use
6 6
 	<h4 class="ee-admin-settings-hdr">
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	</table>
66 66
 <?php endif; */ ?>
67 67
 
68
-	<?php if ( EE_Registry::instance()->CAP->current_user_can( 'manage_options', 'display_admin_settings_options_promote_and_affiliate' ) ) : ?>
68
+	<?php if (EE_Registry::instance()->CAP->current_user_can('manage_options', 'display_admin_settings_options_promote_and_affiliate')) : ?>
69 69
 		<h4 class="ee-admin-settings-hdr">
70 70
 			<?php _e('Promote Event Espresso', 'event_espresso'); ?> <span id="affiliate_info"><?php echo EEH_Template::get_help_tab_link('affiliate_info'); ?></span>
71 71
 		</h4>
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 						</label>
81 81
 					</th>
82 82
 					<td>
83
-						<?php echo EEH_Form_Fields::select_input('show_reg_footer', $values, $show_reg_footer ); ?>
83
+						<?php echo EEH_Form_Fields::select_input('show_reg_footer', $values, $show_reg_footer); ?>
84 84
 					</td>
85 85
 				</tr>
86 86
 
87 87
 				<tr>
88 88
 					<th>
89
-						<?php printf( __('Event Espresso %sAffiliate%s ID', 'event_espresso'), '<a href="http://eventespresso.com/affiliates/" target="_blank">', '</a>' ); ?>
89
+						<?php printf(__('Event Espresso %sAffiliate%s ID', 'event_espresso'), '<a href="http://eventespresso.com/affiliates/" target="_blank">', '</a>'); ?>
90 90
 					</th>
91 91
 					<td>
92 92
 						<input name="affiliate_id" class="regular-text" type="text" value="<?php echo $affiliate_id; ?>" />
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 					</label>
116 116
 				</th>
117 117
 				<td>
118
-					<?php echo EEH_Form_Fields::select_input('help_tour_activation', $values, $help_tour_activation ); ?>
118
+					<?php echo EEH_Form_Fields::select_input('help_tour_activation', $values, $help_tour_activation); ?>
119 119
 				</td>
120 120
 			</tr>
121 121
 		</tbody>
Please login to merge, or discard this patch.
admin_pages/general_settings/templates/countries_settings.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 
2 2
 <div class="padding">
3 3
 
4
-	<h2 class="ee-admin-settings-hdr"><?php _e('Countries and States/Provinces', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('country_select_info');?></h2>
4
+	<h2 class="ee-admin-settings-hdr"><?php _e('Countries and States/Provinces', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('country_select_info'); ?></h2>
5 5
 	<table class="form-table">
6 6
 		<tbody>
7
-			<?php echo EEH_Form_Fields::generate_form_input( $countries ); ?>
7
+			<?php echo EEH_Form_Fields::generate_form_input($countries); ?>
8 8
 		</tbody>
9 9
 	</table>
10 10
 	<br/>
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
         <?php _e('The country that is selected above will populate the Country Details settings and the options for States/Provinces. This information will be used throughout Event Espresso including for registration purposes and how currency is displayed. If you make a change to the country on this page, it is important that you also update your Contact Information on the Your Organization tab.', 'event_espresso'); ?>
13 13
 	</p>
14 14
 	<div id="country-details-settings-dv">
15
-		<h2 class="ee-admin-settings-hdr"><?php _e('Country Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('country_details_info');?></h2>
15
+		<h2 class="ee-admin-settings-hdr"><?php _e('Country Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('country_details_info'); ?></h2>
16 16
 		<div id="country-details-dv"><?php  echo $country_details_settings; ?></div>
17 17
 	</div>
18 18
 	
19 19
 	<div id="country-states-settings-dv">
20
-		<h2 class="ee-admin-settings-hdr"><?php _e( 'States/Provinces', 'event_espresso' );?> <?php echo EEH_Template::get_help_tab_link('country_states_info');?></h2>
20
+		<h2 class="ee-admin-settings-hdr"><?php _e('States/Provinces', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('country_states_info'); ?></h2>
21 21
 		<div id="country-states-dv"><?php  echo $country_states_settings; ?></div>
22 22
 	</div>
23 23
 	
Please login to merge, or discard this patch.
general_settings/templates/country_details_settings.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 	<table id="general-setting-country-details-tbl" class="form-table">
2 2
 		<tbody>
3 3
 		<?php 
4
-		foreach ( $inputs as $ID => $input ) { 
5
-			echo EEH_Form_Fields::generate_form_input( $input ); 
4
+		foreach ($inputs as $ID => $input) { 
5
+			echo EEH_Form_Fields::generate_form_input($input); 
6 6
 		 }
7 7
 		?>
8 8
 			<tr>
Please login to merge, or discard this patch.
admin_pages/general_settings/templates/espresso_page_settings.template.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 						</strong>
25 25
 						<?php echo EEH_Template::get_help_tab_link('registration_page_info'); ?>
26 26
 						<br />
27
-						<?php echo General_Settings_Admin_Page::edit_view_links( $reg_page_id );?>
27
+						<?php echo General_Settings_Admin_Page::edit_view_links($reg_page_id); ?>
28 28
 					</label>
29 29
 				</th>
30 30
 				<td>
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 						<option value="0">
33 33
 							<?php _e('Main Page', 'event_espresso'); ?>
34 34
 						</option>
35
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $reg_page_id ); ?>
35
+						<?php General_Settings_Admin_Page::page_settings_dropdown($reg_page_id); ?>
36 36
 					</select>
37 37
 					<span>
38
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $reg_page_obj, '[ESPRESSO_CHECKOUT]' ); ?>
38
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($reg_page_obj, '[ESPRESSO_CHECKOUT]'); ?>
39 39
 					</span>
40 40
 					<br />
41 41
 					<p class="description">
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 						<?php echo EEH_Template::get_help_tab_link('notify_url_info'); ?>
60 60
 						<br />
61 61
 						<span class="lt-grey-text"><?php _e('Notify URL (processes payments)', 'event_espresso'); ?></span><br/>
62
-						<?php echo General_Settings_Admin_Page::edit_view_links( $txn_page_id );?>
62
+						<?php echo General_Settings_Admin_Page::edit_view_links($txn_page_id); ?>
63 63
 					</label>
64 64
 				</th>
65 65
 				<td>
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
 						<option value="0">
68 68
 							<?php _e('Main Page', 'event_espresso'); ?>
69 69
 						</option>
70
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $txn_page_id ); ?>
70
+						<?php General_Settings_Admin_Page::page_settings_dropdown($txn_page_id); ?>
71 71
 					</select>
72 72
 					<span>
73
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $txn_page_obj, '[ESPRESSO_TXN_PAGE]' ); ?>
73
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($txn_page_obj, '[ESPRESSO_TXN_PAGE]'); ?>
74 74
 					</span>
75 75
 					<br />
76 76
 					<p class="description">
77 77
 						<?php
78 78
 						echo sprintf(
79
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso' ),
79
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso'),
80 80
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_TXN_PAGE]</span>'
81 81
 						);
82 82
 						?>
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 						</strong>
94 94
 						<?php echo EEH_Template::get_help_tab_link('return_url_info'); ?>
95 95
 						<br />
96
-						<?php echo General_Settings_Admin_Page::edit_view_links( $thank_you_page_id );?>
96
+						<?php echo General_Settings_Admin_Page::edit_view_links($thank_you_page_id); ?>
97 97
 					</label>
98 98
 				</th>
99 99
 				<td>
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 						<option value="0">
102 102
 							<?php _e('Main Page', 'event_espresso'); ?>
103 103
 						</option>
104
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $thank_you_page_id ); ?>
104
+						<?php General_Settings_Admin_Page::page_settings_dropdown($thank_you_page_id); ?>
105 105
 					</select>
106 106
 					<span>
107
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $thank_you_page_obj, '[ESPRESSO_THANK_YOU]' ); ?>
107
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($thank_you_page_obj, '[ESPRESSO_THANK_YOU]'); ?>
108 108
 					</span>
109 109
 					<br />
110 110
 					<p class="description">
111 111
 						<?php
112 112
 						echo sprintf(
113
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso' ),
113
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain the %s shortcode.', 'event_espresso'),
114 114
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_THANK_YOU]</span>'
115 115
 						);
116 116
 						?>
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 						</strong>
128 128
 						<?php echo EEH_Template::get_help_tab_link('cancel_return_info'); ?>
129 129
 						<br />
130
-						<?php echo General_Settings_Admin_Page::edit_view_links( $cancel_page_id );?>
130
+						<?php echo General_Settings_Admin_Page::edit_view_links($cancel_page_id); ?>
131 131
 					</label>
132 132
 				</th>
133 133
 				<td>
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
 						<option value="0">
136 136
 							<?php _e('Main Page', 'event_espresso'); ?>
137 137
 						</option>
138
-						<?php General_Settings_Admin_Page::page_settings_dropdown( $cancel_page_id ); ?>
138
+						<?php General_Settings_Admin_Page::page_settings_dropdown($cancel_page_id); ?>
139 139
 					</select>
140 140
 					<span>
141
-						<?php echo General_Settings_Admin_Page::page_and_shortcode_status( $cancel_page_obj, '[ESPRESSO_CANCELLED]' ); ?>
141
+						<?php echo General_Settings_Admin_Page::page_and_shortcode_status($cancel_page_obj, '[ESPRESSO_CANCELLED]'); ?>
142 142
 					</span>
143 143
 					<br />
144 144
 					<p class="description">
145 145
 						<?php
146 146
 						echo sprintf(
147
-							__( 'This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain a "cancelled transaction" message and the %s shortcode.', 'event_espresso' ),
147
+							__('This page should be hidden from your navigation, but still viewable to the public (not password protected), and should always contain a "cancelled transaction" message and the %s shortcode.', 'event_espresso'),
148 148
 							'<span class="highlight" style="padding:3px;margin:0;">[ESPRESSO_CANCELLED]</span>'
149 149
 						);
150 150
 						?>
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 						</strong>
162 162
 						<?php echo EEH_Template::get_help_tab_link('event_list_cpt_info'); ?>
163 163
 						<br />
164
-						<a href='<?php echo get_post_type_archive_link('espresso_events') ?>'><?php	_e("View", "event_espresso");?></a>
164
+						<a href='<?php echo get_post_type_archive_link('espresso_events') ?>'><?php	_e("View", "event_espresso"); ?></a>
165 165
 					</label>
166 166
 				</th>
167 167
 				<td>
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 						<?php echo __("Events are custom post types and use WordPress' normal archive pages for displaying events.", "event_espresso") ?>
170 170
 					</p>
171 171
 					<p class='description'>
172
-						<?php printf(__("If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s", "event_espresso"),'<a href="admin.php?page=espresso_support">','</a>') ?>
172
+						<?php printf(__("If you would still like your events on a page like in Event Espresso 3.1 or earlier, simply create a page and place a shortcode to display them on the page, as described %s here %s", "event_espresso"), '<a href="admin.php?page=espresso_support">', '</a>') ?>
173 173
 					</p>
174 174
 					<br/><br/>
175 175
 				</td>
Please login to merge, or discard this patch.
admin_pages/general_settings/templates/state_details_settings.template.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@  discard block
 block discarded – undo
1 1
 	<table id="general-setting-country-states-tbl" class="form-table">
2 2
 		<thead>
3 3
 			<tr>
4
-				<th><?php _e( 'Code', 'event_espresso' );?></th>
5
-				<th><?php _e( 'Name', 'event_espresso' );?></th>
6
-				<th colspan="2"><span class="small-text"><?php _e( 'State Appears in<br/>Dropdown Select Lists ', 'event_espresso' );?></span></th>
4
+				<th><?php _e('Code', 'event_espresso'); ?></th>
5
+				<th><?php _e('Name', 'event_espresso'); ?></th>
6
+				<th colspan="2"><span class="small-text"><?php _e('State Appears in<br/>Dropdown Select Lists ', 'event_espresso'); ?></span></th>
7 7
 			</tr>
8 8
 		</thead>
9 9
 		<tbody>
10 10
 		<?php
11 11
 		//EEH_Debug_Tools::printr( $states, '$states  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
12
-		if ( $states ) {
13
-			foreach ( $states as $STA_ID => $state ) {
12
+		if ($states) {
13
+			foreach ($states as $STA_ID => $state) {
14 14
 		?>
15 15
 			<tr id="state-<?php echo $STA_ID; ?>-tr" class="country-state-columns">
16 16
 			<?php
17
-				foreach ( $state['inputs'] as $ID => $input ) {
18
-					if ( $ID != 'STA_ID' && $ID != 'CNT_ISO' ) {
19
-						echo EEH_Form_Fields::generate_form_input( $input );
17
+				foreach ($state['inputs'] as $ID => $input) {
18
+					if ($ID != 'STA_ID' && $ID != 'CNT_ISO') {
19
+						echo EEH_Form_Fields::generate_form_input($input);
20 20
 					}
21 21
 				 }
22 22
 			 ?>
23 23
 				<td class="delete-state-td">
24
-					<a id="delete-state-<?php echo $STA_ID; ?>-lnk" class="dashicons dashicons-post-trash ee-icon-size-20 delete-state-lnk" rel="<?php echo $STA_ID; ?>" title="<?php esc_attr_e( 'Delete State #', 'event_espresso' ); ?><?php echo $STA_ID; ?>?" href="<?php echo $state['delete_state_url']; ?>"></a>
24
+					<a id="delete-state-<?php echo $STA_ID; ?>-lnk" class="dashicons dashicons-post-trash ee-icon-size-20 delete-state-lnk" rel="<?php echo $STA_ID; ?>" title="<?php esc_attr_e('Delete State #', 'event_espresso'); ?><?php echo $STA_ID; ?>?" href="<?php echo $state['delete_state_url']; ?>"></a>
25 25
 				</td>
26 26
 			</tr>
27 27
 		<?php
@@ -38,23 +38,23 @@  discard block
 block discarded – undo
38 38
 	<table class="form-table add-new-state-tbl">
39 39
 		<tbody>
40 40
 			<tr>
41
-				<td colspan="2"><h4><?php _e( 'Add New State/Province', 'event_espresso' );?></h4></td>
41
+				<td colspan="2"><h4><?php _e('Add New State/Province', 'event_espresso'); ?></h4></td>
42 42
 			</tr>
43 43
 
44 44
 			<tr>
45 45
 				<td class="general-settings-country-state-input-td">
46
-					<label for="STA_abbrev_XXX"><?php _e( 'Code', 'event_espresso' );?></label><br />
46
+					<label for="STA_abbrev_XXX"><?php _e('Code', 'event_espresso'); ?></label><br />
47 47
 					<input id="STA_abbrev-XXX" class="STA_abbrev mid-text " type="text" title="" value=""
48 48
 						   name="STA_abbrev_XXX">
49 49
 				</td>
50 50
 				<td class="general-settings-country-state-input-td">
51
-					<label for="STA_name_XXX"><?php _e( 'Name', 'event_espresso' );?></label><br/>
51
+					<label for="STA_name_XXX"><?php _e('Name', 'event_espresso'); ?></label><br/>
52 52
 					<input id="STA_name-XXX" class="STA_name regular-text " type="text" title="" value="" name="STA_name_XXX">
53 53
 				</td>
54 54
 			</tr>
55 55
 			<tr>
56 56
 				<td colspan="2">
57
-					<input  type="submit" id="add-new-state-btn" class="secondary-button button right" value="<?php _e( 'Add New State/Province', 'event_espresso' );?>" />
57
+					<input  type="submit" id="add-new-state-btn" class="secondary-button button right" value="<?php _e('Add New State/Province', 'event_espresso'); ?>" />
58 58
 
59 59
 				</td>
60 60
 			</tr>
Please login to merge, or discard this patch.
general_settings/templates/your_organization_settings.template.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <div class="padding">
2 2
 	<?php
3 3
 		//we'll only show site-license keys if this is main_site() (which works for both multi-site and single-site wp installations)
4
-		if ( is_main_site() ) { ?>
4
+		if (is_main_site()) { ?>
5 5
 		<h4 class="ee-admin-settings-hdr" style="width:300px;">
6 6
 			<?php _e('Your Event Espresso License Key', 'event_espresso'); ?>
7 7
 		</h4>
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 				<tr <?php echo isset($_REQUEST['license_key']) && $_REQUEST['license_key'] == true ? 'class="yellow_alert"' : '' ?>>
12 12
 					<th>
13 13
 						<label for="site_license_key">
14
-							<?php _e('Support License Key', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('site_license_key_info');?>
14
+							<?php _e('Support License Key', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('site_license_key_info'); ?>
15 15
 						</label>
16 16
 					</th>
17 17
 					<td>
18 18
 						<input name="site_license_key" id="site_license_key" size="10" class="regular-text" type="text" value="<?php echo $site_license_key; ?>" /><?php echo $site_license_key_verified; ?><br/>
19 19
 						<p class="description">
20
-							<?php printf( __('Adding a valid Support License Key will enable automatic update notifications and backend updates for Event Espresso Core and any installed add-ons. If this is a Development or Test site, %sDO NOT%s enter your Support License Key.', 'event_espresso'), '<strong>', '</strong>' ); ?>
20
+							<?php printf(__('Adding a valid Support License Key will enable automatic update notifications and backend updates for Event Espresso Core and any installed add-ons. If this is a Development or Test site, %sDO NOT%s enter your Support License Key.', 'event_espresso'), '<strong>', '</strong>'); ?>
21 21
 						</p>
22 22
 					</td>
23 23
 				</tr>
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 
32 32
 	<h4 id="contact_info_h4" class="ee-admin-settings-hdr">
33
-		<?php _e('Contact Information', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('contact_info_info');?>
33
+		<?php _e('Contact Information', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('contact_info_info'); ?>
34 34
 	</h4>
35 35
 
36 36
 	<table class="form-table">
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 					<input id="organization_city" class="regular-text" type="text" name="organization_city" value="<?php echo $organization_city; ?>" />
79 79
 				</td>
80 80
 			</tr>
81
-			<?php echo EEH_Form_Fields::generate_form_input( $states ); ?>
82
-			<?php echo EEH_Form_Fields::generate_form_input( $countries ); ?>
81
+			<?php echo EEH_Form_Fields::generate_form_input($states); ?>
82
+			<?php echo EEH_Form_Fields::generate_form_input($countries); ?>
83 83
 			<tr>
84 84
 				<th>
85 85
 					<label for="organization_zip">
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	</table>
134 134
 
135 135
 	<h4 class="ee-admin-settings-hdr">
136
-		<?php _e('Company Logo', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('organization_logo_info');?>
136
+		<?php _e('Company Logo', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('organization_logo_info'); ?>
137 137
 	</h4>
138 138
 
139 139
 	<table class="form-table">
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 				</th>
162 162
 				<td>
163 163
 					<?php
164
-					if ( $organization_logo_url ) {
164
+					if ($organization_logo_url) {
165 165
 						?>
166 166
 						<p id="default-logo-thumb">
167 167
 							<img id="current-image-thumb" src="<?php echo $organization_logo_url ?>" alt="" /><br />
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	<br/><br/>
180 180
 
181 181
 	<h4 class="ee-admin-settings-hdr">
182
-		<?php _e('Social Links', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('social_links_info');?>
182
+		<?php _e('Social Links', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('social_links_info'); ?>
183 183
 	</h4>
184 184
 	<p class="description"><?php _e('Enter any links to social accounts for your organization here', 'event_espresso'); ?></p>
185 185
 
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
 	<br/><br/>
257 257
 
258 258
 
259
-	<?php if ( is_main_site() ) : ?>
259
+	<?php if (is_main_site()) : ?>
260 260
 		<p>
261
-			<?php echo  EE_PUE::espresso_data_collection_optin_text( FALSE ); ?>
261
+			<?php echo  EE_PUE::espresso_data_collection_optin_text(FALSE); ?>
262 262
 		</p>
263 263
 
264 264
 		<table class="form-table">
@@ -272,11 +272,11 @@  discard block
 block discarded – undo
272 272
 					</th>
273 273
 					<td>
274 274
 						<?php
275
-							$values=array(
276
-								array('id'=>'yes','text'=> __('Yes! I want to help improve Event Espresso!','event_espresso')),
277
-								array('id'=>'no','text'=> __('Not at this time. Maybe later.','event_espresso'))
275
+							$values = array(
276
+								array('id'=>'yes', 'text'=> __('Yes! I want to help improve Event Espresso!', 'event_espresso')),
277
+								array('id'=>'no', 'text'=> __('Not at this time. Maybe later.', 'event_espresso'))
278 278
 							);
279
-							echo EEH_Form_Fields::select_input('ueip_optin', $values, !empty($ee_ueip_optin) ? $ee_ueip_optin : 'yes');
279
+							echo EEH_Form_Fields::select_input('ueip_optin', $values, ! empty($ee_ueip_optin) ? $ee_ueip_optin : 'yes');
280 280
 						?>
281 281
 					</td>
282 282
 				</tr>
Please login to merge, or discard this patch.
admin_pages/maintenance/Maintenance_Admin_Page.core.php 2 patches
Braces   +11 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
@@ -185,7 +186,7 @@  discard block
 block discarded – undo
185 186
 					$show_migration_progress = true;
186 187
 					if(isset($this->_req_data['continue_migration'])){
187 188
 						$show_backup_db_text = false;
188
-					}else{
189
+					} else{
189 190
 						$show_backup_db_text = true;
190 191
 					}
191 192
 					$scripts_needing_to_run = EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts();
@@ -205,7 +206,7 @@  discard block
 block discarded – undo
205 206
 			}
206 207
 			$most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true);
207 208
 			$exception_thrown = false;
208
-		}catch(EE_Error $e){
209
+		} catch(EE_Error $e){
209 210
 
210 211
 			EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage());
211 212
 			//now, just so we can display the page correctly, make a error migration script stage object
@@ -223,19 +224,19 @@  discard block
 block discarded – undo
223 224
 			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_migration_was_borked_page.template.php';
224 225
 			$this->_template_args[ 'support_url' ] = 'http://eventespresso.com/support/forums/';
225 226
 			$this->_template_args[ 'next_url' ] = EEH_URL::add_query_args_and_nonce(array( 'action' => 'confirm_migration_crash_report_sent', 'success' => '0' ), EE_MAINTENANCE_ADMIN_URL );
226
-		}elseif($addons_should_be_upgraded_first){
227
+		} elseif($addons_should_be_upgraded_first){
227 228
 			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_upgrade_addons_before_migrating.template.php';
228
-		}else{
229
+		} else{
229 230
 			if($most_recent_migration &&
230 231
 					$most_recent_migration instanceof EE_Data_Migration_Script_Base  &&
231 232
 					$most_recent_migration->can_continue()){
232 233
 				$show_backup_db_text = false;
233 234
 				$show_continue_current_migration_script = true;
234 235
 				$show_most_recent_migration = true;
235
-			}elseif(isset($this->_req_data['continue_migration'])){
236
+			} elseif(isset($this->_req_data['continue_migration'])){
236 237
 				$show_most_recent_migration = true;
237 238
 				$show_continue_current_migration_script = false;
238
-			}else{
239
+			} else{
239 240
 				$show_most_recent_migration = false;
240 241
 				$show_continue_current_migration_script = false;
241 242
 			}
@@ -313,7 +314,7 @@  discard block
 block discarded – undo
313 314
 		if( ! EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts()){
314 315
 			EE_Maintenance_Mode::instance()->set_maintenance_level($new_level);
315 316
 			$success = true;
316
-		}else{
317
+		} else{
317 318
 			EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
318 319
 			$success= false;
319 320
 		}
@@ -380,7 +381,7 @@  discard block
 block discarded – undo
380 381
 					"from:$from_name<$from>",
381 382
 //					'content-type:text/html charset=UTF-8'
382 383
 					));
383
-		}catch( Exception $e ){
384
+		} catch( Exception $e ){
384 385
 			$success = FALSE;
385 386
 		}
386 387
 		$this->_redirect_after_action($success, __("Migration Crash Report", "event_espresso"), __("sent", "event_espresso"),array('success'=>$success,'action'=>'confirm_migration_crash_report_sent'));
@@ -391,7 +392,7 @@  discard block
 block discarded – undo
391 392
 	public function _confirm_migration_crash_report_sent(){
392 393
 		try{
393 394
 			$most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true);
394
-		}catch(EE_Error $e){
395
+		} catch(EE_Error $e){
395 396
 
396 397
 			EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage());
397 398
 			//now, just so we can display the page correctly, make a error migration script stage object
Please login to merge, or discard this patch.
Spacing   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 class Maintenance_Admin_Page extends EE_Admin_Page {
31 31
 
32 32
 
33
-	public function __construct( $routing = TRUE ) {
34
-		parent::__construct( $routing );
33
+	public function __construct($routing = TRUE) {
34
+		parent::__construct($routing);
35 35
 	}
36 36
 
37 37
 
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 
47 47
 
48 48
 	protected function _ajax_hooks() {
49
-		add_action('wp_ajax_migration_step',array($this,'migration_step'));
50
-		add_action('wp_ajax_add_error_to_migrations_ran',array($this,'add_error_to_migrations_ran'));
49
+		add_action('wp_ajax_migration_step', array($this, 'migration_step'));
50
+		add_action('wp_ajax_add_error_to_migrations_ran', array($this, 'add_error_to_migrations_ran'));
51 51
 	}
52 52
 
53 53
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$this->_admin_page_title = EE_MAINTENANCE_LABEL;
57 57
 		$this->_labels = array(
58 58
 			'buttons' => array(
59
-				'reset_capabilities' => __( 'Reset Event Espresso Capabilities', 'event_espresso' )
59
+				'reset_capabilities' => __('Reset Event Espresso Capabilities', 'event_espresso')
60 60
 				)
61 61
 			);
62 62
 	}
@@ -155,23 +155,23 @@  discard block
 block discarded – undo
155 155
 	 * default maintenance page. If we're in maintenance mode level 2, then we need to show
156 156
 	 * the migration scripts and all that UI.
157 157
 	 */
158
-	public function _maintenance(){
158
+	public function _maintenance() {
159 159
 		//it all depends if we're in maintenance model level 1 (frontend-only) or
160 160
 		//level 2 (everything except maintenance page)
161
-		try{
161
+		try {
162 162
 			//get the current maintenance level and check if
163 163
 			//we are removed
164 164
 			$mm = EE_Maintenance_Mode::instance()->level();
165 165
 			$placed_in_mm = EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
166
-			if( $mm == EE_Maintenance_Mode::level_2_complete_maintenance && ! $placed_in_mm){
166
+			if ($mm == EE_Maintenance_Mode::level_2_complete_maintenance && ! $placed_in_mm) {
167 167
 				//we just took the site out of maintenance mode, so notify the user.
168 168
 				//unfortunately this message appears to be echoed on the NEXT page load...
169 169
 				//oh well, we should really be checking for this on addon deactivation anyways
170
-				EE_Error::add_attention( __( 'Site taken out of maintenance mode because no data migration scripts are required', 'event_espresso' ) );
171
-				$this->_process_notices( array( 'page' => 'espresso_maintenance_settings'), false );
170
+				EE_Error::add_attention(__('Site taken out of maintenance mode because no data migration scripts are required', 'event_espresso'));
171
+				$this->_process_notices(array('page' => 'espresso_maintenance_settings'), false);
172 172
 			}
173 173
 			//in case an exception is thrown while trying to handle migrations
174
-			switch(EE_Maintenance_Mode::instance()->level()){
174
+			switch (EE_Maintenance_Mode::instance()->level()) {
175 175
 				case EE_Maintenance_Mode::level_0_not_in_maintenance:
176 176
 				case EE_Maintenance_Mode::level_1_frontend_only_maintenance:
177 177
 					$show_maintenance_switch = true;
@@ -183,18 +183,18 @@  discard block
 block discarded – undo
183 183
 				case EE_Maintenance_Mode::level_2_complete_maintenance:
184 184
 					$show_maintenance_switch = false;
185 185
 					$show_migration_progress = true;
186
-					if(isset($this->_req_data['continue_migration'])){
186
+					if (isset($this->_req_data['continue_migration'])) {
187 187
 						$show_backup_db_text = false;
188
-					}else{
188
+					} else {
189 189
 						$show_backup_db_text = true;
190 190
 					}
191 191
 					$scripts_needing_to_run = EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts();
192 192
 					$addons_should_be_upgraded_first = EE_Data_Migration_Manager::instance()->addons_need_updating();
193 193
 					$script_names = array();
194 194
 					$current_script = NULL;
195
-					foreach($scripts_needing_to_run as $script){
196
-						if($script instanceof EE_Data_Migration_Script_Base){
197
-							if( ! $current_script){
195
+					foreach ($scripts_needing_to_run as $script) {
196
+						if ($script instanceof EE_Data_Migration_Script_Base) {
197
+							if ( ! $current_script) {
198 198
 								$current_script = $script;
199 199
 								$current_script->migration_page_hooks();
200 200
 							}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			}
206 206
 			$most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true);
207 207
 			$exception_thrown = false;
208
-		}catch(EE_Error $e){
208
+		} catch (EE_Error $e) {
209 209
 
210 210
 			EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage());
211 211
 			//now, just so we can display the page correctly, make a error migration script stage object
@@ -215,54 +215,54 @@  discard block
 block discarded – undo
215 215
 			$exception_thrown = true;
216 216
 		}
217 217
 		$current_db_state = EE_Data_Migration_Manager::instance()->ensure_current_database_state_is_set();
218
-		if($exception_thrown ||
219
-				(	$most_recent_migration &&
218
+		if ($exception_thrown ||
219
+				($most_recent_migration &&
220 220
 					$most_recent_migration instanceof EE_Data_Migration_Script_Base &&
221 221
 					$most_recent_migration->is_broken()
222
-				)){
223
-			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_migration_was_borked_page.template.php';
224
-			$this->_template_args[ 'support_url' ] = 'http://eventespresso.com/support/forums/';
225
-			$this->_template_args[ 'next_url' ] = EEH_URL::add_query_args_and_nonce(array( 'action' => 'confirm_migration_crash_report_sent', 'success' => '0' ), EE_MAINTENANCE_ADMIN_URL );
226
-		}elseif($addons_should_be_upgraded_first){
227
-			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_upgrade_addons_before_migrating.template.php';
228
-		}else{
229
-			if($most_recent_migration &&
230
-					$most_recent_migration instanceof EE_Data_Migration_Script_Base  &&
231
-					$most_recent_migration->can_continue()){
222
+				)) {
223
+			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_migration_was_borked_page.template.php';
224
+			$this->_template_args['support_url'] = 'http://eventespresso.com/support/forums/';
225
+			$this->_template_args['next_url'] = EEH_URL::add_query_args_and_nonce(array('action' => 'confirm_migration_crash_report_sent', 'success' => '0'), EE_MAINTENANCE_ADMIN_URL);
226
+		}elseif ($addons_should_be_upgraded_first) {
227
+			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_upgrade_addons_before_migrating.template.php';
228
+		} else {
229
+			if ($most_recent_migration &&
230
+					$most_recent_migration instanceof EE_Data_Migration_Script_Base &&
231
+					$most_recent_migration->can_continue()) {
232 232
 				$show_backup_db_text = false;
233 233
 				$show_continue_current_migration_script = true;
234 234
 				$show_most_recent_migration = true;
235
-			}elseif(isset($this->_req_data['continue_migration'])){
235
+			}elseif (isset($this->_req_data['continue_migration'])) {
236 236
 				$show_most_recent_migration = true;
237 237
 				$show_continue_current_migration_script = false;
238
-			}else{
238
+			} else {
239 239
 				$show_most_recent_migration = false;
240 240
 				$show_continue_current_migration_script = false;
241 241
 			}
242 242
 
243
-			if(isset($current_script)){
243
+			if (isset($current_script)) {
244 244
 				$migrates_to = $current_script->migrates_to_version();
245
-				$plugin_slug = $migrates_to[ 'slug' ];
246
-				$new_version = $migrates_to[ 'version' ];
247
-				$this->_template_args = array_merge($this->_template_args,array(
248
-					'current_db_state'=>  sprintf(__("EE%s (%s)", "event_espresso"), isset($current_db_state[$plugin_slug]) ? $current_db_state[$plugin_slug] : 3,$plugin_slug),
249
-					'next_db_state'=>isset($current_script) ? sprintf(__("EE%s (%s)", 'event_espresso'),$new_version,$plugin_slug) : NULL));
245
+				$plugin_slug = $migrates_to['slug'];
246
+				$new_version = $migrates_to['version'];
247
+				$this->_template_args = array_merge($this->_template_args, array(
248
+					'current_db_state'=>  sprintf(__("EE%s (%s)", "event_espresso"), isset($current_db_state[$plugin_slug]) ? $current_db_state[$plugin_slug] : 3, $plugin_slug),
249
+					'next_db_state'=>isset($current_script) ? sprintf(__("EE%s (%s)", 'event_espresso'), $new_version, $plugin_slug) : NULL));
250 250
 			}
251 251
 
252
-			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_migration_page.template.php';
253
-			$this->_template_args = array_merge($this->_template_args,array(
254
-			'show_most_recent_migration' => $show_most_recent_migration,//flag for showing the most recent migration's status and/or errors
255
-			'show_migration_progress' => $show_migration_progress,//flag for showing the option to run migrations and see their progress
256
-			'show_backup_db_text' => $show_backup_db_text,//flag for showing text telling the user to backup their DB
257
-			'show_maintenance_switch'=> $show_maintenance_switch,//flag for showing the option to change maintenance mode between levels 0 and 1
258
-			'script_names'=>$script_names,//array of names of scripts that have run
259
-			'show_continue_current_migration_script'=>$show_continue_current_migration_script,//flag to change wording to indicating that we're only CONTINUING a migration script (somehow it got interrupted0
252
+			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_migration_page.template.php';
253
+			$this->_template_args = array_merge($this->_template_args, array(
254
+			'show_most_recent_migration' => $show_most_recent_migration, //flag for showing the most recent migration's status and/or errors
255
+			'show_migration_progress' => $show_migration_progress, //flag for showing the option to run migrations and see their progress
256
+			'show_backup_db_text' => $show_backup_db_text, //flag for showing text telling the user to backup their DB
257
+			'show_maintenance_switch'=> $show_maintenance_switch, //flag for showing the option to change maintenance mode between levels 0 and 1
258
+			'script_names'=>$script_names, //array of names of scripts that have run
259
+			'show_continue_current_migration_script'=>$show_continue_current_migration_script, //flag to change wording to indicating that we're only CONTINUING a migration script (somehow it got interrupted0
260 260
 			'reset_db_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'reset_db'), EE_MAINTENANCE_ADMIN_URL),
261
-			'update_migration_script_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'change_maintenance_level'),EE_MAINTENANCE_ADMIN_URL),
262
-			'ultimate_db_state'=>  sprintf(__("EE%s", 'event_espresso'),espresso_version()),
261
+			'update_migration_script_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'change_maintenance_level'), EE_MAINTENANCE_ADMIN_URL),
262
+			'ultimate_db_state'=>  sprintf(__("EE%s", 'event_espresso'), espresso_version()),
263 263
 		));
264 264
 		//make sure we have the form fields helper available. It usually is, but sometimes it isn't
265
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
265
+		EE_Registry::instance()->load_helper('Form_Fields');
266 266
 		//localize script stuff
267 267
 		wp_localize_script('ee-maintenance', 'ee_maintenance', array(
268 268
 			'migrating'=>  __("Migrating...", "event_espresso"),
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 			'status_fatal_error'=>  EE_Data_Migration_Manager::status_fatal_error,
274 274
 			'status_completed'=>  EE_Data_Migration_Manager::status_completed));
275 275
 		}
276
-		$this->_template_args['most_recent_migration'] = $most_recent_migration;//the actual most recently ran migration
276
+		$this->_template_args['most_recent_migration'] = $most_recent_migration; //the actual most recently ran migration
277 277
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE);
278 278
 		$this->display_admin_page_with_sidebar();
279 279
 	}
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	/**
284 284
 	 * returns JSON and executes another step of the currently-executing data migration (called via ajax)
285 285
 	 */
286
-	public function migration_step(){
286
+	public function migration_step() {
287 287
 		$this->_template_args['data'] = EE_Data_Migration_Manager::instance()->response_to_migration_ajax_request();
288 288
 		$this->_return_json();
289 289
 	}
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 	 * Can be used by js when it notices a response with HTML in it in order
295 295
 	 * to log the malformed response
296 296
 	 */
297
-	public function add_error_to_migrations_ran(){
297
+	public function add_error_to_migrations_ran() {
298 298
 		EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($this->_req_data['message']);
299 299
 		$this->_template_args['data'] = array('ok'=>true);
300 300
 		$this->_return_json();
@@ -305,14 +305,14 @@  discard block
 block discarded – undo
305 305
 	/**
306 306
 	 * changes the maintenance level, provided there are still no migration scripts that shoudl run
307 307
 	 */
308
-	public function _change_maintenance_level(){
308
+	public function _change_maintenance_level() {
309 309
 		$new_level = intval($this->_req_data['maintenance_mode_level']);
310
-		if( ! EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts()){
310
+		if ( ! EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts()) {
311 311
 			EE_Maintenance_Mode::instance()->set_maintenance_level($new_level);
312 312
 			$success = true;
313
-		}else{
313
+		} else {
314 314
 			EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
315
-			$success= false;
315
+			$success = false;
316 316
 		}
317 317
 		$this->_redirect_after_action($success, 'Maintenance Mode', __("Updated", "event_espresso"));
318 318
 	}
@@ -322,9 +322,9 @@  discard block
 block discarded – undo
322 322
 	/**
323 323
 	 * a tab with options for reseting and/or deleting EE data
324 324
 	 */
325
-	public function _data_reset_and_delete(){
326
-		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_data_reset_and_delete.template.php';
327
-		$this->_template_args['reset_capabilities_button'] = $this->get_action_link_or_button( 'reset_capabilities', 'reset_capabilities', array(),  'button button-primary' );
325
+	public function _data_reset_and_delete() {
326
+		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_data_reset_and_delete.template.php';
327
+		$this->_template_args['reset_capabilities_button'] = $this->get_action_link_or_button('reset_capabilities', 'reset_capabilities', array(), 'button button-primary');
328 328
 		$this->_template_args['delete_db_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_db'), EE_MAINTENANCE_ADMIN_URL);
329 329
 		$this->_template_args['reset_db_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'reset_db'), EE_MAINTENANCE_ADMIN_URL);
330 330
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE);
@@ -334,9 +334,9 @@  discard block
 block discarded – undo
334 334
 
335 335
 
336 336
 	protected function _reset_capabilities() {
337
-		EE_Registry::instance()->CAP->init_caps( true );
338
-		EE_Error::add_success( __('Default Event Espresso capabilities have been restored for all current roles.', 'event_espresso' ) );
339
-		$this->_redirect_after_action( FALSE, '', '', array( 'action' => 'data_reset' ), TRUE );
337
+		EE_Registry::instance()->CAP->init_caps(true);
338
+		EE_Error::add_success(__('Default Event Espresso capabilities have been restored for all current roles.', 'event_espresso'));
339
+		$this->_redirect_after_action(FALSE, '', '', array('action' => 'data_reset'), TRUE);
340 340
 	}
341 341
 
342 342
 	/**
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 	 */
347 347
 	protected function _reattempt_migration() {
348 348
 		EE_Data_Migration_Manager::instance()->reattempt();
349
-		$this->_redirect_after_action( FALSE, '', '', array( 'action' => 'default' ), TRUE );
349
+		$this->_redirect_after_action(FALSE, '', '', array('action' => 'default'), TRUE);
350 350
 	}
351 351
 
352 352
 
@@ -355,8 +355,8 @@  discard block
 block discarded – undo
355 355
 	/**
356 356
 	 * shows the big ol' System Information page
357 357
 	 */
358
-	public function _system_status(){
359
-		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_system_stati_page.template.php';
358
+	public function _system_status() {
359
+		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_system_stati_page.template.php';
360 360
 		$this->_template_args['system_stati'] = EEM_System_Status::instance()->get_system_stati();
361 361
 		EE_Registry::instance()->load_helper('Array');
362 362
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE);
@@ -365,30 +365,30 @@  discard block
 block discarded – undo
365 365
 
366 366
 
367 367
 
368
-	public function _send_migration_crash_report(){
368
+	public function _send_migration_crash_report() {
369 369
 		$from = $this->_req_data['from'];
370 370
 		$from_name = $this->_req_data['from_name'];
371 371
 		$body = $this->_req_data['body'];
372
-		try{
372
+		try {
373 373
 		$success = wp_mail(EE_SUPPORT_EMAIL,
374 374
 				'Migration Crash Report',
375
-				$body."/r/n<br>".  print_r(EEM_System_Status::instance()->get_system_stati(),true),
375
+				$body."/r/n<br>".print_r(EEM_System_Status::instance()->get_system_stati(), true),
376 376
 				array(
377 377
 					"from:$from_name<$from>",
378 378
 //					'content-type:text/html charset=UTF-8'
379 379
 					));
380
-		}catch( Exception $e ){
380
+		} catch (Exception $e) {
381 381
 			$success = FALSE;
382 382
 		}
383
-		$this->_redirect_after_action($success, __("Migration Crash Report", "event_espresso"), __("sent", "event_espresso"),array('success'=>$success,'action'=>'confirm_migration_crash_report_sent'));
383
+		$this->_redirect_after_action($success, __("Migration Crash Report", "event_espresso"), __("sent", "event_espresso"), array('success'=>$success, 'action'=>'confirm_migration_crash_report_sent'));
384 384
 	}
385 385
 
386 386
 
387 387
 
388
-	public function _confirm_migration_crash_report_sent(){
389
-		try{
388
+	public function _confirm_migration_crash_report_sent() {
389
+		try {
390 390
 			$most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true);
391
-		}catch(EE_Error $e){
391
+		} catch (EE_Error $e) {
392 392
 
393 393
 			EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage());
394 394
 			//now, just so we can display the page correctly, make a error migration script stage object
@@ -396,14 +396,14 @@  discard block
 block discarded – undo
396 396
 			$most_recent_migration = new EE_DMS_Unknown_1_0_0();
397 397
 			$most_recent_migration->add_error($e->getMessage());
398 398
 		}
399
-		$success = $this->_req_data['success']=='1' ? true : false;
399
+		$success = $this->_req_data['success'] == '1' ? true : false;
400 400
 		$this->_template_args['success'] = $success;
401
-		$this->_template_args[ 'most_recent_migration' ] = $most_recent_migration;
401
+		$this->_template_args['most_recent_migration'] = $most_recent_migration;
402 402
 		$this->_template_args['reset_db_action_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'reset_db'), EE_MAINTENANCE_ADMIN_URL);
403
-		$this->_template_args[ 'reset_db_page_url' ] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'data_reset'), EE_MAINTENANCE_ADMIN_URL);
404
-		$this->_template_args[ 'reattempt_action_url' ] = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'reattempt_migration'), EE_MAINTENANCE_ADMIN_URL );
405
-		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_confirm_migration_crash_report_sent.template.php';
406
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path,$this->_template_args,TRUE);
403
+		$this->_template_args['reset_db_page_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'data_reset'), EE_MAINTENANCE_ADMIN_URL);
404
+		$this->_template_args['reattempt_action_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'reattempt_migration'), EE_MAINTENANCE_ADMIN_URL);
405
+		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_confirm_migration_crash_report_sent.template.php';
406
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE);
407 407
 		$this->display_admin_page_with_sidebar();
408 408
 	}
409 409
 
@@ -416,18 +416,18 @@  discard block
 block discarded – undo
416 416
 	 * @param boolean $nuke_old_ee4_data controls whether or not we
417 417
 	 * destroy the old ee4 data, or just try initializing ee4 default data
418 418
 	 */
419
-	public function _reset_db( $nuke_old_ee4_data = TRUE ){
419
+	public function _reset_db($nuke_old_ee4_data = TRUE) {
420 420
 		EE_Registry::instance()->load_helper('Activation');
421 421
 		EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance);
422 422
 
423
-		if( $nuke_old_ee4_data ){
423
+		if ($nuke_old_ee4_data) {
424 424
 			EEH_Activation::delete_all_espresso_cpt_data();
425
-			EEH_Activation::delete_all_espresso_tables_and_data( FALSE );
425
+			EEH_Activation::delete_all_espresso_tables_and_data(FALSE);
426 426
 		}
427 427
 		//make sure when we reset the registry's config that it
428 428
 		//switches to using the new singleton
429
-		EE_Registry::instance()->CFG = EE_Registry::instance()->CFG->reset( TRUE );
430
-		EE_System::instance()->initialize_db_if_no_migrations_required( TRUE );
429
+		EE_Registry::instance()->CFG = EE_Registry::instance()->CFG->reset(TRUE);
430
+		EE_System::instance()->initialize_db_if_no_migrations_required(TRUE);
431 431
 		EE_System::instance()->redirect_to_about_ee();
432 432
 	}
433 433
 
@@ -436,20 +436,20 @@  discard block
 block discarded – undo
436 436
 	/**
437 437
 	 * Deletes ALL EE tables, Records, and Options from the database.
438 438
 	 */
439
-	public function _delete_db(){
439
+	public function _delete_db() {
440 440
 		EE_Registry::instance()->load_helper('Activation');
441 441
 		EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance);
442 442
 		EEH_Activation::delete_all_espresso_cpt_data();
443 443
 		EEH_Activation::delete_all_espresso_tables_and_data();
444 444
 		EEH_Activation::deactivate_event_espresso();
445
-		wp_safe_redirect( admin_url( 'plugins.php' ));
445
+		wp_safe_redirect(admin_url('plugins.php'));
446 446
 		exit;
447 447
 	}
448 448
 
449 449
 	/**
450 450
 	 * sets up EE4 to rerun the migrations from ee3 to ee4
451 451
 	 */
452
-	public function _rerun_migration_from_ee3(){
452
+	public function _rerun_migration_from_ee3() {
453 453
 		EE_Registry::instance()->load_helper('Activation');
454 454
 		EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance);
455 455
 		EEH_Activation::delete_all_espresso_cpt_data();
@@ -477,9 +477,9 @@  discard block
 block discarded – undo
477 477
 		wp_enqueue_script('ee_admin_js');
478 478
 //		wp_enqueue_media();
479 479
 //		wp_enqueue_script('media-upload');
480
-		wp_enqueue_script('ee-maintenance',EE_MAINTENANCE_ASSETS_URL.'/ee-maintenance.js',array('jquery'),EVENT_ESPRESSO_VERSION,true);
480
+		wp_enqueue_script('ee-maintenance', EE_MAINTENANCE_ASSETS_URL.'/ee-maintenance.js', array('jquery'), EVENT_ESPRESSO_VERSION, true);
481 481
 
482
-		wp_register_style( 'espresso_maintenance', EE_MAINTENANCE_ASSETS_URL . 'ee-maintenance.css', array(), EVENT_ESPRESSO_VERSION );
482
+		wp_register_style('espresso_maintenance', EE_MAINTENANCE_ASSETS_URL.'ee-maintenance.css', array(), EVENT_ESPRESSO_VERSION);
483 483
 		wp_enqueue_style('espresso_maintenance');
484 484
 	}
485 485
 
Please login to merge, or discard this patch.
admin_pages/maintenance/Maintenance_Admin_Page_Init.core.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function __construct() {
36 36
 		//define some page related constants
37
-		define( 'EE_MAINTENANCE_LABEL', __('Maintenance', 'event_espresso'));
38
-		define( 'EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings' );
39
-		define( 'EE_MAINTENANCE_ADMIN_URL', admin_url( 'admin.php?page=' . EE_MAINTENANCE_PG_SLUG ));
40
-		define( 'EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES . 'maintenance' . DS );
41
-		define( 'EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN . 'templates' . DS );
42
-		define( 'EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL . 'maintenance/assets/' );
37
+		define('EE_MAINTENANCE_LABEL', __('Maintenance', 'event_espresso'));
38
+		define('EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings');
39
+		define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page='.EE_MAINTENANCE_PG_SLUG));
40
+		define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES.'maintenance'.DS);
41
+		define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN.'templates'.DS);
42
+		define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL.'maintenance/assets/');
43 43
 		//check that if we're in maintenance mode that we tell the admin that
44
-		add_action('admin_notices',array($this,'check_maintenance_mode'));
44
+		add_action('admin_notices', array($this, 'check_maintenance_mode'));
45 45
 		parent::__construct();
46 46
 	}
47 47
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	protected function _set_menu_map() {
53 53
 		$menu_map = $this->_menu_map();
54 54
 
55
-		$this->_menu_map = EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ? new EE_Admin_Page_Main_Menu( $menu_map) : new EE_Admin_Page_Sub_Menu( $menu_map );
55
+		$this->_menu_map = EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ? new EE_Admin_Page_Main_Menu($menu_map) : new EE_Admin_Page_Sub_Menu($menu_map);
56 56
 	}
57 57
 
58 58
 	protected function _menu_map() {
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 			'maintenance_mode_parent' => EE_MAINTENANCE_PG_SLUG,
68 68
 			'admin_init_page' => $this
69 69
 		);
70
-		if( EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ){
71
-			$map['menu_group']='main';
70
+		if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) {
71
+			$map['menu_group'] = 'main';
72 72
 			$map['subtitle'] = EE_MAINTENANCE_LABEL;
73
-			$map['menu_label'] = __( 'Event Espresso', 'event_espresso' );
73
+			$map['menu_label'] = __('Event Espresso', 'event_espresso');
74 74
 		}
75 75
 		return $map;
76 76
 	}
@@ -78,26 +78,26 @@  discard block
 block discarded – undo
78 78
 	/**
79 79
 	 * Checks if we're in maintenance mode, and if so we notify the admin adn tell them how to take the site OUT of maintenance mode
80 80
 	 */
81
-	public function check_maintenance_mode(){
81
+	public function check_maintenance_mode() {
82 82
 		$notice = '';
83 83
 		$maintenance_page_url = '';
84
-		if(EE_Maintenance_Mode::instance()->level()){
84
+		if (EE_Maintenance_Mode::instance()->level()) {
85 85
 			$maintenance_page_url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_MAINTENANCE_ADMIN_URL);
86
-			switch(EE_Maintenance_Mode::instance()->level()){
86
+			switch (EE_Maintenance_Mode::instance()->level()) {
87 87
 				case EE_Maintenance_Mode::level_1_frontend_only_maintenance:
88 88
 					$notice = '<div class="updated">
89
-						<p>'. sprintf(__("Event Espresso is in Frontend-Only MAINTENANCE MODE. This means the front-end (ie, non-wp-admin pages) is disabled for ALL users except site admins. Visit the %s Maintenance Page %s to disable maintenance mode.", "event_espresso"),"<a href='$maintenance_page_url'>","</a>").
89
+						<p>'. sprintf(__("Event Espresso is in Frontend-Only MAINTENANCE MODE. This means the front-end (ie, non-wp-admin pages) is disabled for ALL users except site admins. Visit the %s Maintenance Page %s to disable maintenance mode.", "event_espresso"), "<a href='$maintenance_page_url'>", "</a>").
90 90
 					'</div>';
91 91
 					break;
92 92
 				case EE_Maintenance_Mode::level_2_complete_maintenance:
93
-						$notice =  '<div class="error">
93
+						$notice = '<div class="error">
94 94
 						<p>'. sprintf(__("As part of the process for updating Event Espresso, your database also
95
-needs to be updated. Event Espresso is in COMPLETE MAINTENANCE MODE (both WordPress admin pages and front-end event registration pages are disabled) until you run the database update script. %s Visit the Maintenance Page to get started,%s it only takes a moment.", "event_espresso"),"<a href='$maintenance_page_url'>","</a>").
95
+needs to be updated. Event Espresso is in COMPLETE MAINTENANCE MODE (both WordPress admin pages and front-end event registration pages are disabled) until you run the database update script. %s Visit the Maintenance Page to get started,%s it only takes a moment.", "event_espresso"), "<a href='$maintenance_page_url'>", "</a>").
96 96
 					'</div>';
97 97
 					break;
98 98
 			}
99 99
 		}
100
-		echo  apply_filters( 'FHEE__Maintenance_Admin_Page_Init__check_maintenance_mode__notice', $notice, $maintenance_page_url );
100
+		echo  apply_filters('FHEE__Maintenance_Admin_Page_Init__check_maintenance_mode__notice', $notice, $maintenance_page_url);
101 101
 	}
102 102
 
103 103
 } //end class Payments_Admin_Page_Init
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.