Completed
Branch BUG-9647-cpt-queries (303307)
by
unknown
201:19 queued 184:10
created
core/helpers/EEH_Formatter.helper.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -74,6 +74,7 @@
 block discarded – undo
74 74
 	 * [ee_tep_not_null description]
75 75
 	 *
76 76
 	 * @param  string | array $value [description]
77
+	 * @param string $value
77 78
 	 * @return bool       [description]
78 79
 	 */
79 80
 	static public function ee_tep_not_null( $value ) {
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'NO direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('NO direct script access allowed');
4 4
 }
5 5
 
6 6
 
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	 * @param  string $content content to format
27 27
 	 * @return string          formatted content
28 28
 	 */
29
-	static public function admin_format_content( $content = '' ) {
30
-		return wpautop( stripslashes_deep( html_entity_decode( $content, ENT_QUOTES, "UTF-8" ) ) );
29
+	static public function admin_format_content($content = '') {
30
+		return wpautop(stripslashes_deep(html_entity_decode($content, ENT_QUOTES, "UTF-8")));
31 31
 	}
32 32
 
33 33
 
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 	 * @param  boolean $protected true then we run htmlspecialchars and return
44 44
 	 * @return string
45 45
 	 */
46
-	static public function ee_tep_output_string( $string, $translate = false, $protected = false ) {
47
-		if ( $protected === true ) {
48
-			return htmlspecialchars( $string );
46
+	static public function ee_tep_output_string($string, $translate = false, $protected = false) {
47
+		if ($protected === true) {
48
+			return htmlspecialchars($string);
49 49
 		} else {
50
-			if ( $translate === false ) {
51
-				return self::ee_tep_parse_input_field_data( $string, array( '"' => '&quot;' ) );
50
+			if ($translate === false) {
51
+				return self::ee_tep_parse_input_field_data($string, array('"' => '&quot;'));
52 52
 			} else {
53
-				return self::ee_tep_parse_input_field_data( $string, $translate );
53
+				return self::ee_tep_parse_input_field_data($string, $translate);
54 54
 			}
55 55
 		}
56 56
 	}
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 * @param         array ] $parse array in the form array( 'from' => 'to', ... )
65 65
 	 * @return string
66 66
 	 */
67
-	static public function ee_tep_parse_input_field_data( $data, $parse ) {
68
-		return strtr( trim( $data ), $parse );
67
+	static public function ee_tep_parse_input_field_data($data, $parse) {
68
+		return strtr(trim($data), $parse);
69 69
 	}
70 70
 
71 71
 
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
 	 * @param  string | array $value [description]
77 77
 	 * @return bool       [description]
78 78
 	 */
79
-	static public function ee_tep_not_null( $value ) {
80
-		if ( is_array( $value ) ) {
81
-			if ( count( $value ) > 0 ) {
79
+	static public function ee_tep_not_null($value) {
80
+		if (is_array($value)) {
81
+			if (count($value) > 0) {
82 82
 				return true;
83 83
 			} else {
84 84
 				return false;
85 85
 			}
86 86
 		} else {
87
-			if ( ( $value !== '' ) && ( strtolower( $value ) !== 'null' ) && ( strlen( trim( $value ) ) > 0 ) ) {
87
+			if (($value !== '') && (strtolower($value) !== 'null') && (strlen(trim($value)) > 0)) {
88 88
 				return true;
89 89
 			} else {
90 90
 				return false;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 * @return string
105 105
 	 * @deprecated v4.6.21
106 106
 	 */
107
-	static public function event_date_display( $date, $format = '' ) {
107
+	static public function event_date_display($date, $format = '') {
108 108
 		EE_Error::doing_it_wrong(
109 109
 			__METHOD__,
110 110
 			__(
Please login to merge, or discard this patch.
espresso.php 1 patch
Spacing   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'ABSPATH' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('ABSPATH')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /*
5 5
   Plugin Name:		Event Espresso
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
  *
42 42
  */
43 43
 
44
-if ( function_exists( 'espresso_version' ) ) {
44
+if (function_exists('espresso_version')) {
45 45
 
46 46
 	/**
47 47
 	 *    espresso_duplicate_plugin_error
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 	function espresso_duplicate_plugin_error() {
51 51
 		?>
52 52
 		<div class="error">
53
-			<p><?php _e( 'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.', 'event_espresso' ); ?></p>
53
+			<p><?php _e('Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.', 'event_espresso'); ?></p>
54 54
 		</div>
55 55
 		<?php
56
-		espresso_deactivate_plugin( plugin_basename( __FILE__ ) );
56
+		espresso_deactivate_plugin(plugin_basename(__FILE__));
57 57
 	}
58
-	add_action( 'admin_notices', 'espresso_duplicate_plugin_error', 1 );
58
+	add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
59 59
 
60 60
 } else {
61 61
 
@@ -70,99 +70,99 @@  discard block
 block discarded – undo
70 70
 	}
71 71
 
72 72
 	// define versions
73
-	define( 'EVENT_ESPRESSO_VERSION', espresso_version() );
74
-	define( 'EE_MIN_WP_VER_REQUIRED', '4.1' );
75
-	define( 'EE_MIN_WP_VER_RECOMMENDED', '4.4.2' );
76
-	define( 'EE_MIN_PHP_VER_REQUIRED', '5.3.0' );
77
-	define( 'EE_MIN_PHP_VER_RECOMMENDED', '5.4.44' );
78
-	define( 'EVENT_ESPRESSO_POWERED_BY', 'Event Espresso - ' . EVENT_ESPRESSO_VERSION );
79
-	define( 'EVENT_ESPRESSO_MAIN_FILE', __FILE__ );
73
+	define('EVENT_ESPRESSO_VERSION', espresso_version());
74
+	define('EE_MIN_WP_VER_REQUIRED', '4.1');
75
+	define('EE_MIN_WP_VER_RECOMMENDED', '4.4.2');
76
+	define('EE_MIN_PHP_VER_REQUIRED', '5.3.0');
77
+	define('EE_MIN_PHP_VER_RECOMMENDED', '5.4.44');
78
+	define('EVENT_ESPRESSO_POWERED_BY', 'Event Espresso - '.EVENT_ESPRESSO_VERSION);
79
+	define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
80 80
 	//used to be DIRECTORY_SEPARATOR, but that caused issues on windows
81
-	if ( ! defined( 'DS' ) ) {
82
-		define( 'DS', '/' );
81
+	if ( ! defined('DS')) {
82
+		define('DS', '/');
83 83
 	}
84
-	if ( ! defined( 'PS' ) ) {
85
-		define( 'PS', PATH_SEPARATOR );
84
+	if ( ! defined('PS')) {
85
+		define('PS', PATH_SEPARATOR);
86 86
 	}
87
-	if ( ! defined( 'SP' ) ) {
88
-		define( 'SP', ' ' );
87
+	if ( ! defined('SP')) {
88
+		define('SP', ' ');
89 89
 	}
90
-	if ( ! defined( 'EENL' ) ) {
91
-		define( 'EENL', "\n" );
90
+	if ( ! defined('EENL')) {
91
+		define('EENL', "\n");
92 92
 	}
93
-	define( 'EE_SUPPORT_EMAIL', '[email protected]' );
93
+	define('EE_SUPPORT_EMAIL', '[email protected]');
94 94
 	// define the plugin directory and URL
95
-	define( 'EE_PLUGIN_BASENAME', plugin_basename( EVENT_ESPRESSO_MAIN_FILE ) );
96
-	define( 'EE_PLUGIN_DIR_PATH', plugin_dir_path( EVENT_ESPRESSO_MAIN_FILE ) );
97
-	define( 'EE_PLUGIN_DIR_URL', plugin_dir_url( EVENT_ESPRESSO_MAIN_FILE ) );
95
+	define('EE_PLUGIN_BASENAME', plugin_basename(EVENT_ESPRESSO_MAIN_FILE));
96
+	define('EE_PLUGIN_DIR_PATH', plugin_dir_path(EVENT_ESPRESSO_MAIN_FILE));
97
+	define('EE_PLUGIN_DIR_URL', plugin_dir_url(EVENT_ESPRESSO_MAIN_FILE));
98 98
 	// main root folder paths
99
-	define( 'EE_ADMIN_PAGES', EE_PLUGIN_DIR_PATH . 'admin_pages' . DS );
100
-	define( 'EE_CORE', EE_PLUGIN_DIR_PATH . 'core' . DS );
101
-	define( 'EE_MODULES', EE_PLUGIN_DIR_PATH . 'modules' . DS );
102
-	define( 'EE_PUBLIC', EE_PLUGIN_DIR_PATH . 'public' . DS );
103
-	define( 'EE_SHORTCODES', EE_PLUGIN_DIR_PATH . 'shortcodes' . DS );
104
-	define( 'EE_WIDGETS', EE_PLUGIN_DIR_PATH . 'widgets' . DS );
105
-	define( 'EE_PAYMENT_METHODS', EE_PLUGIN_DIR_PATH . 'payment_methods' . DS );
106
-	define( 'EE_CAFF_PATH', EE_PLUGIN_DIR_PATH . 'caffeinated' . DS );
99
+	define('EE_ADMIN_PAGES', EE_PLUGIN_DIR_PATH.'admin_pages'.DS);
100
+	define('EE_CORE', EE_PLUGIN_DIR_PATH.'core'.DS);
101
+	define('EE_MODULES', EE_PLUGIN_DIR_PATH.'modules'.DS);
102
+	define('EE_PUBLIC', EE_PLUGIN_DIR_PATH.'public'.DS);
103
+	define('EE_SHORTCODES', EE_PLUGIN_DIR_PATH.'shortcodes'.DS);
104
+	define('EE_WIDGETS', EE_PLUGIN_DIR_PATH.'widgets'.DS);
105
+	define('EE_PAYMENT_METHODS', EE_PLUGIN_DIR_PATH.'payment_methods'.DS);
106
+	define('EE_CAFF_PATH', EE_PLUGIN_DIR_PATH.'caffeinated'.DS);
107 107
 	// core system paths
108
-	define( 'EE_ADMIN', EE_CORE . 'admin' . DS );
109
-	define( 'EE_CPTS', EE_CORE . 'CPTs' . DS );
110
-	define( 'EE_CLASSES', EE_CORE . 'db_classes' . DS );
111
-	define( 'EE_INTERFACES', EE_CORE . 'interfaces' . DS );
112
-	define( 'EE_BUSINESS', EE_CORE . 'business' . DS );
113
-	define( 'EE_MODELS', EE_CORE . 'db_models' . DS );
114
-	define( 'EE_HELPERS', EE_CORE . 'helpers' . DS );
115
-	define( 'EE_LIBRARIES', EE_CORE . 'libraries' . DS );
116
-	define( 'EE_TEMPLATES', EE_CORE . 'templates' . DS );
117
-	define( 'EE_THIRD_PARTY', EE_CORE . 'third_party_libs' . DS );
118
-	define( 'EE_GLOBAL_ASSETS', EE_TEMPLATES . 'global_assets' . DS );
119
-	define( 'EE_FORM_SECTIONS', EE_LIBRARIES . 'form_sections' . DS );
108
+	define('EE_ADMIN', EE_CORE.'admin'.DS);
109
+	define('EE_CPTS', EE_CORE.'CPTs'.DS);
110
+	define('EE_CLASSES', EE_CORE.'db_classes'.DS);
111
+	define('EE_INTERFACES', EE_CORE.'interfaces'.DS);
112
+	define('EE_BUSINESS', EE_CORE.'business'.DS);
113
+	define('EE_MODELS', EE_CORE.'db_models'.DS);
114
+	define('EE_HELPERS', EE_CORE.'helpers'.DS);
115
+	define('EE_LIBRARIES', EE_CORE.'libraries'.DS);
116
+	define('EE_TEMPLATES', EE_CORE.'templates'.DS);
117
+	define('EE_THIRD_PARTY', EE_CORE.'third_party_libs'.DS);
118
+	define('EE_GLOBAL_ASSETS', EE_TEMPLATES.'global_assets'.DS);
119
+	define('EE_FORM_SECTIONS', EE_LIBRARIES.'form_sections'.DS);
120 120
 	// gateways
121
-	define( 'EE_GATEWAYS', EE_MODULES . 'gateways' . DS );
122
-	define( 'EE_GATEWAYS_URL', EE_PLUGIN_DIR_URL . 'modules' . DS . 'gateways' . DS );
121
+	define('EE_GATEWAYS', EE_MODULES.'gateways'.DS);
122
+	define('EE_GATEWAYS_URL', EE_PLUGIN_DIR_URL.'modules'.DS.'gateways'.DS);
123 123
 	// asset URL paths
124
-	define( 'EE_TEMPLATES_URL', EE_PLUGIN_DIR_URL . 'core' . DS . 'templates' . DS );
125
-	define( 'EE_GLOBAL_ASSETS_URL', EE_TEMPLATES_URL . 'global_assets' . DS );
126
-	define( 'EE_IMAGES_URL', EE_GLOBAL_ASSETS_URL . 'images' . DS );
127
-	define( 'EE_THIRD_PARTY_URL', EE_PLUGIN_DIR_URL . 'core' . DS . 'third_party_libs' . DS );
128
-	define( 'EE_HELPERS_ASSETS', EE_PLUGIN_DIR_URL . 'core/helpers/assets/' );
129
-	define( 'EE_LIBRARIES_URL', EE_PLUGIN_DIR_URL . 'core/libraries/' );
124
+	define('EE_TEMPLATES_URL', EE_PLUGIN_DIR_URL.'core'.DS.'templates'.DS);
125
+	define('EE_GLOBAL_ASSETS_URL', EE_TEMPLATES_URL.'global_assets'.DS);
126
+	define('EE_IMAGES_URL', EE_GLOBAL_ASSETS_URL.'images'.DS);
127
+	define('EE_THIRD_PARTY_URL', EE_PLUGIN_DIR_URL.'core'.DS.'third_party_libs'.DS);
128
+	define('EE_HELPERS_ASSETS', EE_PLUGIN_DIR_URL.'core/helpers/assets/');
129
+	define('EE_LIBRARIES_URL', EE_PLUGIN_DIR_URL.'core/libraries/');
130 130
 	// define upload paths
131 131
 	$uploads = wp_upload_dir();
132 132
 	// define the uploads directory and URL
133
-	define( 'EVENT_ESPRESSO_UPLOAD_DIR', $uploads[ 'basedir' ] . DS . 'espresso' . DS );
134
-	define( 'EVENT_ESPRESSO_UPLOAD_URL', $uploads[ 'baseurl' ] . DS . 'espresso' . DS );
133
+	define('EVENT_ESPRESSO_UPLOAD_DIR', $uploads['basedir'].DS.'espresso'.DS);
134
+	define('EVENT_ESPRESSO_UPLOAD_URL', $uploads['baseurl'].DS.'espresso'.DS);
135 135
 	// define the templates directory and URL
136
-	define( 'EVENT_ESPRESSO_TEMPLATE_DIR', $uploads[ 'basedir' ] . DS . 'espresso' . DS . 'templates' . DS );
137
-	define( 'EVENT_ESPRESSO_TEMPLATE_URL', $uploads[ 'baseurl' ] . DS . 'espresso' . DS . 'templates' . DS );
136
+	define('EVENT_ESPRESSO_TEMPLATE_DIR', $uploads['basedir'].DS.'espresso'.DS.'templates'.DS);
137
+	define('EVENT_ESPRESSO_TEMPLATE_URL', $uploads['baseurl'].DS.'espresso'.DS.'templates'.DS);
138 138
 	// define the gateway directory and URL
139
-	define( 'EVENT_ESPRESSO_GATEWAY_DIR', $uploads[ 'basedir' ] . DS . 'espresso' . DS . 'gateways' . DS );
140
-	define( 'EVENT_ESPRESSO_GATEWAY_URL', $uploads[ 'baseurl' ] . DS . 'espresso' . DS . 'gateways' . DS );
139
+	define('EVENT_ESPRESSO_GATEWAY_DIR', $uploads['basedir'].DS.'espresso'.DS.'gateways'.DS);
140
+	define('EVENT_ESPRESSO_GATEWAY_URL', $uploads['baseurl'].DS.'espresso'.DS.'gateways'.DS);
141 141
 	// languages folder/path
142
-	define( 'EE_LANGUAGES_SAFE_LOC', '..' . DS . 'uploads' . DS . 'espresso' . DS . 'languages' . DS );
143
-	define( 'EE_LANGUAGES_SAFE_DIR', EVENT_ESPRESSO_UPLOAD_DIR . 'languages' . DS );
142
+	define('EE_LANGUAGES_SAFE_LOC', '..'.DS.'uploads'.DS.'espresso'.DS.'languages'.DS);
143
+	define('EE_LANGUAGES_SAFE_DIR', EVENT_ESPRESSO_UPLOAD_DIR.'languages'.DS);
144 144
 	//check for dompdf fonts in uploads
145
-	if ( file_exists( EVENT_ESPRESSO_UPLOAD_DIR . 'fonts' . DS ) ) {
146
-		define( 'DOMPDF_FONT_DIR', EVENT_ESPRESSO_UPLOAD_DIR . 'fonts' . DS );
145
+	if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR.'fonts'.DS)) {
146
+		define('DOMPDF_FONT_DIR', EVENT_ESPRESSO_UPLOAD_DIR.'fonts'.DS);
147 147
 	}
148 148
 	//ajax constants
149
-	define( 'EE_FRONT_AJAX', isset( $_REQUEST[ 'ee_front_ajax' ] ) || isset( $_REQUEST[ 'data' ][ 'ee_front_ajax' ] ) ? true : false );
150
-	define( 'EE_ADMIN_AJAX', isset( $_REQUEST[ 'ee_admin_ajax' ] ) || isset( $_REQUEST[ 'data' ][ 'ee_admin_ajax' ] ) ? true : false );
149
+	define('EE_FRONT_AJAX', isset($_REQUEST['ee_front_ajax']) || isset($_REQUEST['data']['ee_front_ajax']) ? true : false);
150
+	define('EE_ADMIN_AJAX', isset($_REQUEST['ee_admin_ajax']) || isset($_REQUEST['data']['ee_admin_ajax']) ? true : false);
151 151
 	//just a handy constant occasionally needed for finding values representing infinity in the DB
152 152
 	//you're better to use this than its straight value (currently -1) in case you ever
153 153
 	//want to change its default value! or find when -1 means infinity
154
-	define( 'EE_INF_IN_DB', -1 );
155
-	define( 'EE_INF', INF > (float)PHP_INT_MAX ? INF : PHP_INT_MAX );
156
-	define( 'EE_DEBUG', false );
154
+	define('EE_INF_IN_DB', -1);
155
+	define('EE_INF', INF > (float) PHP_INT_MAX ? INF : PHP_INT_MAX);
156
+	define('EE_DEBUG', false);
157 157
 
158 158
 	/**
159 159
 	 *    espresso_plugin_activation
160 160
 	 *    adds a wp-option to indicate that EE has been activated via the WP admin plugins page
161 161
 	 */
162 162
 	function espresso_plugin_activation() {
163
-		update_option( 'ee_espresso_activation', true );
163
+		update_option('ee_espresso_activation', true);
164 164
 	}
165
-	register_activation_hook( EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation' );
165
+	register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
166 166
 
167 167
 
168 168
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		//	}
177 177
 		//
178 178
 	}
179
-	register_deactivation_hook( EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_deactivation' );
179
+	register_deactivation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_deactivation');
180 180
 
181 181
 
182 182
 
@@ -186,15 +186,15 @@  discard block
 block discarded – undo
186 186
 	 */
187 187
 	function espresso_load_error_handling() {
188 188
 		// load debugging tools
189
-		if ( WP_DEBUG === true && is_readable( EE_HELPERS . 'EEH_Debug_Tools.helper.php' ) ) {
190
-			require_once( EE_HELPERS . 'EEH_Debug_Tools.helper.php' );
189
+		if (WP_DEBUG === true && is_readable(EE_HELPERS.'EEH_Debug_Tools.helper.php')) {
190
+			require_once(EE_HELPERS.'EEH_Debug_Tools.helper.php');
191 191
 			EEH_Debug_Tools::instance();
192 192
 		}
193 193
 		// load error handling
194
-		if ( is_readable( EE_CORE . 'EE_Error.core.php' ) ) {
195
-			require_once( EE_CORE . 'EE_Error.core.php' );
194
+		if (is_readable(EE_CORE.'EE_Error.core.php')) {
195
+			require_once(EE_CORE.'EE_Error.core.php');
196 196
 		} else {
197
-			wp_die( __( 'The EE_Error core class could not be loaded.', 'event_espresso' ) );
197
+			wp_die(__('The EE_Error core class could not be loaded.', 'event_espresso'));
198 198
 		}
199 199
 	}
200 200
 
@@ -208,25 +208,25 @@  discard block
 block discarded – undo
208 208
 	 * @param    string $full_path_to_file
209 209
 	 * @throws    EE_Error
210 210
 	 */
211
-	function espresso_load_required( $classname, $full_path_to_file ) {
211
+	function espresso_load_required($classname, $full_path_to_file) {
212 212
 		static $error_handling_loaded = false;
213
-		if ( ! $error_handling_loaded ) {
213
+		if ( ! $error_handling_loaded) {
214 214
 			espresso_load_error_handling();
215 215
 			$error_handling_loaded = true;
216 216
 		}
217
-		if ( is_readable( $full_path_to_file ) ) {
218
-			require_once( $full_path_to_file );
217
+		if (is_readable($full_path_to_file)) {
218
+			require_once($full_path_to_file);
219 219
 		} else {
220
-			throw new EE_Error ( sprintf(
221
-				__( 'The %s class file could not be located or is not readable due to file permissions.', 'event_espresso' ),
220
+			throw new EE_Error(sprintf(
221
+				__('The %s class file could not be located or is not readable due to file permissions.', 'event_espresso'),
222 222
 				$classname
223
-			) );
223
+			));
224 224
 		}
225 225
 	}
226 226
 
227
-	espresso_load_required( 'EEH_Base', EE_CORE . 'helpers' . DS . 'EEH_Base.helper.php' );
228
-	espresso_load_required( 'EEH_File', EE_CORE . 'helpers' . DS . 'EEH_File.helper.php' );
229
-	espresso_load_required( 'EE_Bootstrap', EE_CORE . 'EE_Bootstrap.core.php' );
227
+	espresso_load_required('EEH_Base', EE_CORE.'helpers'.DS.'EEH_Base.helper.php');
228
+	espresso_load_required('EEH_File', EE_CORE.'helpers'.DS.'EEH_File.helper.php');
229
+	espresso_load_required('EE_Bootstrap', EE_CORE.'EE_Bootstrap.core.php');
230 230
 	new EE_Bootstrap();
231 231
 
232 232
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
 
237 237
 
238
-if ( ! function_exists( 'espresso_deactivate_plugin' ) ) {
238
+if ( ! function_exists('espresso_deactivate_plugin')) {
239 239
 	/**
240 240
 	*    deactivate_plugin
241 241
 	* usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
@@ -244,12 +244,12 @@  discard block
 block discarded – undo
244 244
 	* @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
245 245
 	* @return    void
246 246
 	*/
247
-	function espresso_deactivate_plugin( $plugin_basename = '' ) {
248
-		if ( ! function_exists( 'deactivate_plugins' ) ) {
249
-			require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
247
+	function espresso_deactivate_plugin($plugin_basename = '') {
248
+		if ( ! function_exists('deactivate_plugins')) {
249
+			require_once(ABSPATH.'wp-admin/includes/plugin.php');
250 250
 		}
251
-		unset( $_GET[ 'activate' ] );
252
-		unset( $_REQUEST[ 'activate' ] );
253
-		deactivate_plugins( $plugin_basename );
251
+		unset($_GET['activate']);
252
+		unset($_REQUEST['activate']);
253
+		deactivate_plugins($plugin_basename);
254 254
 	}
255 255
 }
Please login to merge, or discard this patch.
admin/extend/transactions/Extend_Transactions_Admin_Page.core.php 1 patch
Spacing   +43 added lines, -43 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
 /**
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 	 * @param bool $routing
43 43
 	 * @return \Extend_Transactions_Admin_Page
44 44
 	 */
45
-	public function __construct( $routing = TRUE ) {
46
-		parent::__construct( $routing );
47
-		define( 'TXN_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'transactions/templates/');
48
-		define( 'TXN_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND . 'transactions/assets/');
49
-		define( 'TXN_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'transactions/assets/');
45
+	public function __construct($routing = TRUE) {
46
+		parent::__construct($routing);
47
+		define('TXN_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'transactions/templates/');
48
+		define('TXN_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND.'transactions/assets/');
49
+		define('TXN_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'transactions/assets/');
50 50
 	}
51 51
 
52 52
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 * @return void
59 59
 	 */
60 60
 	protected function _extend_page_config() {
61
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'transactions';
61
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'transactions';
62 62
 
63 63
 		$new_page_routes = array(
64 64
 			'reports' => array(
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 			)
68 68
 		);
69 69
 
70
-		$this->_page_routes = array_merge( $this->_page_routes, $new_page_routes );
70
+		$this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
71 71
 
72 72
 		$new_page_config = array(
73 73
 			'reports' => array(
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 				'require_nonce' => FALSE
86 86
 			)
87 87
 		);
88
-		$this->_page_config = array_merge( $this->_page_config, $new_page_config );
88
+		$this->_page_config = array_merge($this->_page_config, $new_page_config);
89 89
 	}
90 90
 
91 91
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 	 * @return void
98 98
 	 */
99 99
 	public function load_scripts_styles_reports() {
100
-		wp_register_script( 'ee-txn-reports-js', TXN_CAF_ASSETS_URL . 'ee-transaction-admin-reports.js', array( 'google-charts' ), EVENT_ESPRESSO_VERSION, true );
101
-		wp_enqueue_script( 'ee-txn-reports-js' );
100
+		wp_register_script('ee-txn-reports-js', TXN_CAF_ASSETS_URL.'ee-transaction-admin-reports.js', array('google-charts'), EVENT_ESPRESSO_VERSION, true);
101
+		wp_enqueue_script('ee-txn-reports-js');
102 102
 		$this->_transaction_reports_js_setup();
103 103
 		EE_Registry::$i18n_js_strings['currency_format'] = EEH_Money::get_format_for_google_charts();
104 104
 	}
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
 	* @return void
126 126
 	*/
127 127
 	protected function _transaction_reports() {
128
-		$template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php';
128
+		$template_path = EE_ADMIN_TEMPLATE.'admin_reports.template.php';
129 129
 		$this->_admin_page_title = __('Transactions', 'event_espresso');
130
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_reports_template_data, TRUE );
130
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, $this->_reports_template_data, TRUE);
131 131
 
132 132
 		// the final template wrapper
133 133
 		$this->display_admin_page_with_no_sidebar();
@@ -142,42 +142,42 @@  discard block
 block discarded – undo
142 142
 	 * @param string $period The period (acceptable by PHP Datetime constructor) for which the report is generated.
143 143
 	 * @return string
144 144
 	 */
145
-	private function _revenue_per_day_report( $period = '-1 month' ) {
145
+	private function _revenue_per_day_report($period = '-1 month') {
146 146
 
147 147
 		$report_ID = 'txn-admin-revenue-per-day-report-dv';
148 148
 
149 149
 		$TXN = EEM_Transaction::instance();
150 150
 
151
-		$results = $TXN->get_revenue_per_day_report( $period );
151
+		$results = $TXN->get_revenue_per_day_report($period);
152 152
 		$results = (array) $results;
153 153
 		$revenue = array();
154 154
 		$subtitle = '';
155 155
 
156
-		if ( $results ) {
157
-			$revenue[] = array( __( 'Date (only shows dates that have a revenue greater than 1)', 'event_espresso' ), __( 'Total Revenue', 'event_espresso' ) );
158
-			foreach ( $results as $result ) {
159
-				if ( $result->revenue > 1 ) {
160
-					$revenue[] = array( $result->txnDate, (float) $result->revenue );
156
+		if ($results) {
157
+			$revenue[] = array(__('Date (only shows dates that have a revenue greater than 1)', 'event_espresso'), __('Total Revenue', 'event_espresso'));
158
+			foreach ($results as $result) {
159
+				if ($result->revenue > 1) {
160
+					$revenue[] = array($result->txnDate, (float) $result->revenue);
161 161
 				}
162 162
 			}
163 163
 
164 164
 			//setup the date range.
165
-			$beginning_date = new DateTime( 'now' . $period, new DateTimeZone( EEH_DTT_Helper::get_timezone() ) );
166
-			$ending_date = new DateTime( 'now', new DateTimeZone( EEH_DTT_Helper::get_timezone() ) );
167
-			$subtitle = sprintf( _x( 'For the period: %s to %s', 'Used to give date range', 'event_espresso' ), $beginning_date->format( 'Y-m-d' ), $ending_date->format( 'Y-m-d' ) );
165
+			$beginning_date = new DateTime('now'.$period, new DateTimeZone(EEH_DTT_Helper::get_timezone()));
166
+			$ending_date = new DateTime('now', new DateTimeZone(EEH_DTT_Helper::get_timezone()));
167
+			$subtitle = sprintf(_x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), $beginning_date->format('Y-m-d'), $ending_date->format('Y-m-d'));
168 168
 		}
169 169
 
170
-		$report_title = __( 'Total Revenue per Day' );
170
+		$report_title = __('Total Revenue per Day');
171 171
 
172 172
 		$report_params = array(
173 173
 			'title' 		=> $report_title,
174 174
 			'subtitle' => $subtitle,
175 175
 			'id' 			=> $report_ID,
176 176
 			'revenue' => $revenue,
177
-			'noResults' => empty( $revenue ),
178
-			'noTxnMsg'	=> sprintf( __( '%sThere are currently no transaction records in the last month for this report.%s', 'event_espresso' ), '<h2>' . $report_title . '</h2><p>', '</p>' )
177
+			'noResults' => empty($revenue),
178
+			'noTxnMsg'	=> sprintf(__('%sThere are currently no transaction records in the last month for this report.%s', 'event_espresso'), '<h2>'.$report_title.'</h2><p>', '</p>')
179 179
 		);
180
-		wp_localize_script( 'ee-txn-reports-js', 'txnRevPerDay', $report_params );
180
+		wp_localize_script('ee-txn-reports-js', 'txnRevPerDay', $report_params);
181 181
 
182 182
 		return $report_ID;
183 183
 	}
@@ -191,43 +191,43 @@  discard block
 block discarded – undo
191 191
 	 * @param string $period  The period (acceptable by PHP Datetime constructor) for which the report is generated.
192 192
 	 * @return int
193 193
 	 */
194
-	private function _revenue_per_event_report( $period = '-1 month' ) {
194
+	private function _revenue_per_event_report($period = '-1 month') {
195 195
 
196 196
 		$report_ID = 'txn-admin-revenue-per-event-report-dv';
197 197
 
198 198
 		$TXN = EEM_Transaction::instance();
199
-		$results = $TXN->get_revenue_per_event_report( $period );
199
+		$results = $TXN->get_revenue_per_event_report($period);
200 200
 		$results = (array) $results;
201 201
 		$revenue = array();
202 202
 		$subtitle = '';
203 203
 
204
-		if ( $results ) {
205
-			$revenue[] = array( __( 'Event (only events that have a revenue greater than 1 are shown)', 'event_espresso' ), __( 'Total Revenue', 'event_espresso' ) );
206
-			foreach ( $results as $result ) {
207
-				if ( $result->revenue > 1 ) {
208
-					$event_name = stripslashes( html_entity_decode( $result->event_name, ENT_QUOTES, 'UTF-8' ) );
209
-					$event_name = wp_trim_words( $event_name, 5, '...' );
210
-					$revenue[]  = array( $event_name, (float) $result->revenue );
204
+		if ($results) {
205
+			$revenue[] = array(__('Event (only events that have a revenue greater than 1 are shown)', 'event_espresso'), __('Total Revenue', 'event_espresso'));
206
+			foreach ($results as $result) {
207
+				if ($result->revenue > 1) {
208
+					$event_name = stripslashes(html_entity_decode($result->event_name, ENT_QUOTES, 'UTF-8'));
209
+					$event_name = wp_trim_words($event_name, 5, '...');
210
+					$revenue[]  = array($event_name, (float) $result->revenue);
211 211
 				}
212 212
 			}
213 213
 
214 214
 			//setup the date range.
215
-			$beginning_date = new DateTime( 'now' . $period, new DateTimeZone( EEH_DTT_Helper::get_timezone() ) );
216
-			$ending_date = new DateTime( 'now', new DateTimeZone( EEH_DTT_Helper::get_timezone() ) );
217
-			$subtitle = sprintf( _x( 'For the period: %s to %s', 'Used to give date range', 'event_espresso' ), $beginning_date->format( 'Y-m-d' ), $ending_date->format( 'Y-m-d' ) );
215
+			$beginning_date = new DateTime('now'.$period, new DateTimeZone(EEH_DTT_Helper::get_timezone()));
216
+			$ending_date = new DateTime('now', new DateTimeZone(EEH_DTT_Helper::get_timezone()));
217
+			$subtitle = sprintf(_x('For the period: %s to %s', 'Used to give date range', 'event_espresso'), $beginning_date->format('Y-m-d'), $ending_date->format('Y-m-d'));
218 218
 		}
219 219
 
220
-		$report_title = __( 'Total Revenue per Event' );
220
+		$report_title = __('Total Revenue per Event');
221 221
 
222 222
 		$report_params = array(
223 223
 			'title' 		=> $report_title,
224 224
 			'subtitle' => $subtitle,
225 225
 			'id' 			=> $report_ID,
226 226
 			'revenue' => $revenue,
227
-			'noResults' => empty( $revenue ),
228
-			'noTxnMsg'	=> sprintf( __( '%sThere are currently no transaction records in the last month for this report.%s', 'event_espresso' ), '<h2>' . $report_title . '</h2><p>', '</p>' )
227
+			'noResults' => empty($revenue),
228
+			'noTxnMsg'	=> sprintf(__('%sThere are currently no transaction records in the last month for this report.%s', 'event_espresso'), '<h2>'.$report_title.'</h2><p>', '</p>')
229 229
 		);
230
-		wp_localize_script( 'ee-txn-reports-js', 'txnRevPerEvent', $report_params );
230
+		wp_localize_script('ee-txn-reports-js', 'txnRevPerEvent', $report_params);
231 231
 
232 232
 		return $report_ID;
233 233
 	}
Please login to merge, or discard this patch.
admin/extend/registrations/Extend_Registrations_Admin_Page.core.php 1 patch
Spacing   +234 added lines, -234 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
 /**
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 	protected $_reports_template_data = array();
38 38
 
39 39
 
40
-	public function __construct( $routing = TRUE ) {
41
-		parent::__construct( $routing );
42
-		define( 'REG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'registrations/templates/');
43
-		define( 'REG_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND . 'registrations/assets/');
44
-		define( 'REG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'registrations/assets/');
40
+	public function __construct($routing = TRUE) {
41
+		parent::__construct($routing);
42
+		define('REG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'registrations/templates/');
43
+		define('REG_CAF_ASSETS', EE_CORE_CAF_ADMIN_EXTEND.'registrations/assets/');
44
+		define('REG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'registrations/assets/');
45 45
 	}
46 46
 
47 47
 
48 48
 	protected function _extend_page_config() {
49
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'registrations';
49
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'registrations';
50 50
 
51
-		$reg_id = ! empty( $this->_req_data['_REG_ID'] ) && ! is_array( $this->_req_data['_REG_ID'] ) ? $this->_req_data['_REG_ID'] : 0;
52
-		$att_id = ! empty( $this->_req_data[ 'ATT_ID' ] ) ? ! is_array( $this->_req_data['ATT_ID'] ) : 0;
53
-		$att_id = ! empty( $this->_req_data['post'] ) && ! is_array( $this->_req_data['post'] ) ? $this->_req_data['post'] : $att_id;
51
+		$reg_id = ! empty($this->_req_data['_REG_ID']) && ! is_array($this->_req_data['_REG_ID']) ? $this->_req_data['_REG_ID'] : 0;
52
+		$att_id = ! empty($this->_req_data['ATT_ID']) ? ! is_array($this->_req_data['ATT_ID']) : 0;
53
+		$att_id = ! empty($this->_req_data['post']) && ! is_array($this->_req_data['post']) ? $this->_req_data['post'] : $att_id;
54 54
 
55 55
 		$new_page_routes = array(
56 56
 			'reports' => array(
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 				)
90 90
 			);
91 91
 
92
-		$this->_page_routes = array_merge( $this->_page_routes, $new_page_routes );
92
+		$this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
93 93
 
94 94
 		$new_page_config = array(
95 95
 			'reports' => array(
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 						'filename' => 'registrations_event_checkin_other'
135 135
 					)
136 136
 				),
137
-				'help_tour' => array( 'Event_Checkin_Help_Tour' ),
138
-				'qtips' => array('Registration_List_Table_Tips' ),
137
+				'help_tour' => array('Event_Checkin_Help_Tour'),
138
+				'qtips' => array('Registration_List_Table_Tips'),
139 139
 				'list_table' => 'EE_Event_Registrations_List_Table',
140 140
 				'metaboxes' => array(),
141 141
 				'require_nonce' => FALSE
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 				),
154 154
 			);
155 155
 
156
-		$this->_page_config = array_merge( $this->_page_config, $new_page_config );
156
+		$this->_page_config = array_merge($this->_page_config, $new_page_config);
157 157
 		$this->_page_config['contact_list']['list_table'] = 'Extend_EE_Attendee_Contact_List_Table';
158 158
 		$this->_page_config['default']['list_table'] = 'Extend_EE_Registrations_List_Table';
159 159
 	}
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
 	protected function _ajax_hooks() {
164 164
 		parent::_ajax_hooks();
165
-		add_action( 'wp_ajax_get_newsletter_form_content', array( $this, 'get_newsletter_form_content' ) );
165
+		add_action('wp_ajax_get_newsletter_form_content', array($this, 'get_newsletter_form_content'));
166 166
 	}
167 167
 
168 168
 
@@ -171,20 +171,20 @@  discard block
 block discarded – undo
171 171
 		parent::load_scripts_styles();
172 172
 
173 173
 		//if newsletter message type is active then let's add filter and load js for it.
174
-		if ( EEH_MSG_Template::is_mt_active('newsletter') ) {
174
+		if (EEH_MSG_Template::is_mt_active('newsletter')) {
175 175
 			//enqueue newsletter js
176
-			wp_enqueue_script( 'ee-newsletter-trigger', REG_CAF_ASSETS_URL . 'ee-newsletter-trigger.js', array( 'ee-dialog' ), EVENT_ESPRESSO_VERSION, TRUE );
177
-			wp_enqueue_style( 'ee-newsletter-trigger-css', REG_CAF_ASSETS_URL . 'ee-newsletter-trigger.css', array(), EVENT_ESPRESSO_VERSION );
176
+			wp_enqueue_script('ee-newsletter-trigger', REG_CAF_ASSETS_URL.'ee-newsletter-trigger.js', array('ee-dialog'), EVENT_ESPRESSO_VERSION, TRUE);
177
+			wp_enqueue_style('ee-newsletter-trigger-css', REG_CAF_ASSETS_URL.'ee-newsletter-trigger.css', array(), EVENT_ESPRESSO_VERSION);
178 178
 			//hook in buttons for newsletter message type trigger.
179
-			add_action('AHEE__EE_Admin_List_Table__extra_tablenav__after_bottom_buttons', array( $this, 'add_newsletter_action_buttons'), 10 );
179
+			add_action('AHEE__EE_Admin_List_Table__extra_tablenav__after_bottom_buttons', array($this, 'add_newsletter_action_buttons'), 10);
180 180
 		}
181 181
 	}
182 182
 
183 183
 
184 184
 
185 185
 	public function load_scripts_styles_reports() {
186
-		wp_register_script( 'ee-reg-reports-js', REG_CAF_ASSETS_URL . 'ee-registration-admin-reports.js', array( 'google-charts' ), EVENT_ESPRESSO_VERSION, true );
187
-		wp_enqueue_script( 'ee-reg-reports-js' );
186
+		wp_register_script('ee-reg-reports-js', REG_CAF_ASSETS_URL.'ee-registration-admin-reports.js', array('google-charts'), EVENT_ESPRESSO_VERSION, true);
187
+		wp_enqueue_script('ee-reg-reports-js');
188 188
 		$this->_registration_reports_js_setup();
189 189
 	}
190 190
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 				'slug' => 'all',
217 217
 				'label' => __('All', 'event_espresso'),
218 218
 				'count' => 0,
219
-				'bulk_action' => !isset( $this->_req_data['event_id'] ) ? array() : array(
219
+				'bulk_action' => ! isset($this->_req_data['event_id']) ? array() : array(
220 220
 					'toggle_checkin_status' => __('Toggle Check-In', 'event_espresso'),
221 221
 					//'trash_registrations' => __('Trash Registrations', 'event_espresso')
222 222
 					)
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 				'slug' => 'all',
235 235
 				'label' => __('All', 'event_espresso'),
236 236
 				'count' => 0,
237
-				'bulk_action' => array( 'delete_checkin_rows' => __('Delete Check-In Rows', 'event_espresso') )
237
+				'bulk_action' => array('delete_checkin_rows' => __('Delete Check-In Rows', 'event_espresso'))
238 238
 				),
239 239
 			);
240 240
 	}
@@ -250,20 +250,20 @@  discard block
 block discarded – undo
250 250
 	 */
251 251
 	public function get_newsletter_form_content() {
252 252
 		//do a nonce check cause we're not coming in from an normal route here.
253
-		$nonce = isset( $this->_req_data['get_newsletter_form_content_nonce'] ) ? sanitize_text_field( $this->_req_data['get_newsletter_form_content_nonce'] ) : '';
253
+		$nonce = isset($this->_req_data['get_newsletter_form_content_nonce']) ? sanitize_text_field($this->_req_data['get_newsletter_form_content_nonce']) : '';
254 254
 		$nonce_ref = 'get_newsletter_form_content_nonce';
255 255
 
256
-		$this->_verify_nonce( $nonce, $nonce_ref );
256
+		$this->_verify_nonce($nonce, $nonce_ref);
257 257
 		//let's get the mtp for the incoming MTP_ ID
258
-		if ( !isset( $this->_req_data['GRP_ID'] ) ) {
259
-			EE_Error::add_error( __('There must be something broken with the js or html structure because the required data for getting a message template group is not present (need an GRP_ID).', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
258
+		if ( ! isset($this->_req_data['GRP_ID'])) {
259
+			EE_Error::add_error(__('There must be something broken with the js or html structure because the required data for getting a message template group is not present (need an GRP_ID).', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
260 260
 			$this->_template_args['success'] = FALSE;
261 261
 			$this->_template_args['error'] = TRUE;
262 262
 			$this->_return_json();
263 263
 		}
264
-		$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID( $this->_req_data['GRP_ID'] );
265
-		if ( ! $MTPG instanceof EE_Message_Template_Group ) {
266
-			EE_Error::add_error( sprintf( __('The GRP_ID given (%d) does not appear to have a corresponding row in the database.', 'event_espresso'), $this->_req_data['GRP_ID'] ), __FILE__, __FUNCTION__, __LINE__  );
264
+		$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID($this->_req_data['GRP_ID']);
265
+		if ( ! $MTPG instanceof EE_Message_Template_Group) {
266
+			EE_Error::add_error(sprintf(__('The GRP_ID given (%d) does not appear to have a corresponding row in the database.', 'event_espresso'), $this->_req_data['GRP_ID']), __FILE__, __FUNCTION__, __LINE__);
267 267
 			$this->_template_args['success'] = FALSE;
268 268
 			$this->_template_args['error'] = TRUE;
269 269
 			$this->_return_json();
@@ -272,11 +272,11 @@  discard block
 block discarded – undo
272 272
 		$MTPs = $MTPG->context_templates();
273 273
 		$MTPs = $MTPs['attendee'];
274 274
 		$template_fields = array();
275
-		foreach ( $MTPs as $MTP ) {
275
+		foreach ($MTPs as $MTP) {
276 276
 			$field = $MTP->get('MTP_template_field');
277
-			if ( $field == 'content'  ) {
277
+			if ($field == 'content') {
278 278
 				$content = $MTP->get('MTP_content');
279
-				if ( !empty( $content['newsletter_content'] ) ) {
279
+				if ( ! empty($content['newsletter_content'])) {
280 280
 					$template_fields['newsletter_content'] = $content['newsletter_content'];
281 281
 					}
282 282
 				continue;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		$this->_template_args['data'] = array(
290 290
 			'batch_message_from' => isset($template_fields['from']) ? $template_fields['from'] : '',
291 291
 			'batch_message_subject' => isset($template_fields['subject']) ? $template_fields['subject'] : '',
292
-			'batch_message_content' => isset( $template_fields['newsletter_content'] ) ? $template_fields['newsletter_content'] : ''
292
+			'batch_message_content' => isset($template_fields['newsletter_content']) ? $template_fields['newsletter_content'] : ''
293 293
 			);
294 294
 		$this->_return_json();
295 295
 	}
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
 	 * @param EE_Admin_List_Table $list_table
306 306
 	 * @return string html string for extra buttons
307 307
 	 */
308
-	public function add_newsletter_action_buttons( EE_Admin_List_Table $list_table ) {
309
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_newsletter_selected_send' ) ) {
308
+	public function add_newsletter_action_buttons(EE_Admin_List_Table $list_table) {
309
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_newsletter_selected_send')) {
310 310
 			return '';
311 311
 		}
312 312
 
@@ -315,13 +315,13 @@  discard block
 block discarded – undo
315 315
 			'event_registrations',
316 316
 			'default'
317 317
 			);
318
-		if ( $this->_current_page == 'espresso_registrations' && in_array( $this->_req_action, $routes_to_add_to )  ) {
319
-			if ( ( $this->_req_action == 'event_registrations' && empty( $this->_req_data['event_id'] ) ) || ( isset( $this->_req_data['status'] ) && $this->_req_data['status'] == 'trash' ) ) {
318
+		if ($this->_current_page == 'espresso_registrations' && in_array($this->_req_action, $routes_to_add_to)) {
319
+			if (($this->_req_action == 'event_registrations' && empty($this->_req_data['event_id'])) || (isset($this->_req_data['status']) && $this->_req_data['status'] == 'trash')) {
320 320
 				echo '';
321 321
 			} else {
322
-				$button_text = sprintf( __('Send Batch Message (%s selected)', 'event_espresso'), '<span class="send-selected-newsletter-count">0</span>' );
323
-				echo '<button id="selected-batch-send-trigger" class="button secondary-button"><span class="dashicons dashicons-email "></span>' . $button_text . '</button>';
324
-				add_action('admin_footer', array( $this, 'newsletter_send_form_skeleton') );
322
+				$button_text = sprintf(__('Send Batch Message (%s selected)', 'event_espresso'), '<span class="send-selected-newsletter-count">0</span>');
323
+				echo '<button id="selected-batch-send-trigger" class="button secondary-button"><span class="dashicons dashicons-email "></span>'.$button_text.'</button>';
324
+				add_action('admin_footer', array($this, 'newsletter_send_form_skeleton'));
325 325
 			}
326 326
 		}
327 327
 	}
@@ -333,37 +333,37 @@  discard block
 block discarded – undo
333 333
 		$list_table = $this->_list_table_object;
334 334
 		$codes = array();
335 335
 		//need to templates for the newsletter message type for the template selector.
336
-		$values[] = array( 'text' => __('Select Template to Use', 'event_espresso'), 'id' => 0 );
337
-		$mtps = EEM_Message_Template_Group::instance()->get_all( array( array( 'MTP_message_type' => 'newsletter', 'MTP_messenger' => 'email' ) ) );
338
-		foreach ( $mtps as $mtp ) {
336
+		$values[] = array('text' => __('Select Template to Use', 'event_espresso'), 'id' => 0);
337
+		$mtps = EEM_Message_Template_Group::instance()->get_all(array(array('MTP_message_type' => 'newsletter', 'MTP_messenger' => 'email')));
338
+		foreach ($mtps as $mtp) {
339 339
 			$name = $mtp->name();
340 340
 			$values[] = array(
341
-				'text' => empty( $name ) ? __('Global', 'event_espresso') : $name,
341
+				'text' => empty($name) ? __('Global', 'event_espresso') : $name,
342 342
 				'id' => $mtp->ID()
343 343
 				);
344 344
 		}
345 345
 
346 346
 		//need to get a list of shortcodes that are available for the newsletter message type.
347
-		$shortcodes = EEH_MSG_Template::get_shortcodes( 'newsletter', 'email', array(), 'attendee', FALSE );
348
-		foreach ( $shortcodes as $field => $shortcode_array ) {
349
-			$codes[$field] = implode(', ', array_keys($shortcode_array ) );
347
+		$shortcodes = EEH_MSG_Template::get_shortcodes('newsletter', 'email', array(), 'attendee', FALSE);
348
+		foreach ($shortcodes as $field => $shortcode_array) {
349
+			$codes[$field] = implode(', ', array_keys($shortcode_array));
350 350
 		}
351 351
 
352 352
 		$shortcodes = $codes;
353 353
 
354
-		$form_template = REG_CAF_TEMPLATE_PATH . 'newsletter-send-form.template.php';
354
+		$form_template = REG_CAF_TEMPLATE_PATH.'newsletter-send-form.template.php';
355 355
 		$form_template_args = array(
356 356
 			'form_action' => admin_url('admin.php?page=espresso_registrations'),
357 357
 			'form_route' => 'newsletter_selected_send',
358 358
 			'form_nonce_name' => 'newsletter_selected_send_nonce',
359
-			'form_nonce' => wp_create_nonce( 'newsletter_selected_send_nonce' ),
359
+			'form_nonce' => wp_create_nonce('newsletter_selected_send_nonce'),
360 360
 			'redirect_back_to' => $this->_req_action,
361
-			'ajax_nonce' => wp_create_nonce( 'get_newsletter_form_content_nonce'),
362
-			'template_selector' => EEH_Form_Fields::select_input('newsletter_mtp_selected', $values ),
361
+			'ajax_nonce' => wp_create_nonce('get_newsletter_form_content_nonce'),
362
+			'template_selector' => EEH_Form_Fields::select_input('newsletter_mtp_selected', $values),
363 363
 			'shortcodes' => $shortcodes,
364 364
 			'id_type' => $list_table instanceof EE_Attendee_Contact_List_Table ? 'contact' : 'registration'
365 365
 			);
366
-		EEH_Template::display_template( $form_template, $form_template_args );
366
+		EEH_Template::display_template($form_template, $form_template_args);
367 367
 	}
368 368
 
369 369
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 	protected function _newsletter_selected_send() {
379 379
 		$success = TRUE;
380 380
 		//first we need to make sure we have a GRP_ID so we know what template we're sending and updating!
381
-		if ( empty( $this->_req_data['newsletter_mtp_selected'] ) ) {
381
+		if (empty($this->_req_data['newsletter_mtp_selected'])) {
382 382
 			EE_Error::add_error(
383 383
 				__(
384 384
 					'In order to send a message, a Message Template GRP_ID is needed. It was not provided so messages were not sent.',
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 			$success = FALSE;
390 390
 		}
391 391
 
392
-		if ( $success ) {
392
+		if ($success) {
393 393
 			//update Message template in case there are any changes
394 394
 			$Message_Template_Group = EEM_Message_Template_Group::instance()->get_one_by_ID(
395 395
 				$this->_req_data['newsletter_mtp_selected']
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 			$Message_Templates = $Message_Template_Group instanceof EE_Message_Template_Group
398 398
 				? $Message_Template_Group->context_templates()
399 399
 				: array();
400
-			if ( empty( $Message_Templates ) ) {
400
+			if (empty($Message_Templates)) {
401 401
 				EE_Error::add_error(
402 402
 					__(
403 403
 						'Unable to retrieve message template fields from the db. Messages not sent.',
@@ -408,25 +408,25 @@  discard block
 block discarded – undo
408 408
 			}
409 409
 
410 410
 			//let's just update the specific fields
411
-			foreach ( $Message_Templates['attendee'] as $Message_Template ) {
412
-				if ( $Message_Template instanceof EE_Message_Template ) {
413
-					$field = $Message_Template->get( 'MTP_template_field' );
414
-					$content = $Message_Template->get( 'MTP_content' );
411
+			foreach ($Message_Templates['attendee'] as $Message_Template) {
412
+				if ($Message_Template instanceof EE_Message_Template) {
413
+					$field = $Message_Template->get('MTP_template_field');
414
+					$content = $Message_Template->get('MTP_content');
415 415
 					$new_content = $content;
416
-					switch ( $field ) {
416
+					switch ($field) {
417 417
 						case 'from' :
418
-							$new_content = ! empty( $this->_req_data['batch_message']['from'] )
418
+							$new_content = ! empty($this->_req_data['batch_message']['from'])
419 419
 								? $this->_req_data['batch_message']['from']
420 420
 								: $content;
421 421
 							break;
422 422
 						case 'subject' :
423
-							$new_content = ! empty( $this->_req_data['batch_message']['subject'] )
423
+							$new_content = ! empty($this->_req_data['batch_message']['subject'])
424 424
 								? $this->_req_data['batch_message']['subject']
425 425
 								: $content;
426 426
 							break;
427 427
 						case 'content' :
428 428
 							$new_content = $content;
429
-							$new_content['newsletter_content'] = ! empty( $this->_req_data['batch_message']['content'] )
429
+							$new_content['newsletter_content'] = ! empty($this->_req_data['batch_message']['content'])
430 430
 								? $this->_req_data['batch_message']['content']
431 431
 								: $content['newsletter_content'];
432 432
 							break;
@@ -434,35 +434,35 @@  discard block
 block discarded – undo
434 434
 							continue;
435 435
 							break;
436 436
 					}
437
-					$Message_Template->set( 'MTP_content', $new_content );
437
+					$Message_Template->set('MTP_content', $new_content);
438 438
 					$Message_Template->save();
439 439
 				}
440 440
 			}
441 441
 
442 442
 			//great fields are updated!  now let's make sure we just have contact objects (EE_Attendee).
443
-			$id_type = ! empty( $this->_req_data['batch_message']['id_type'] )
443
+			$id_type = ! empty($this->_req_data['batch_message']['id_type'])
444 444
 				? $this->_req_data['batch_message']['id_type']
445 445
 				: 'registration';
446 446
 
447 447
 			//id_type will affect how we assemble the ids.
448
-			$ids = ! empty( $this->_req_data['batch_message']['ids'] )
449
-				? json_decode( stripslashes($this->_req_data['batch_message']['ids']) )
448
+			$ids = ! empty($this->_req_data['batch_message']['ids'])
449
+				? json_decode(stripslashes($this->_req_data['batch_message']['ids']))
450 450
 				: array();
451 451
 
452 452
 			$registrations_used_for_contact_data = array();
453 453
 			//using switch because eventually we'll have other contexts that will be used for generating messages.
454
-			switch ( $id_type ) {
454
+			switch ($id_type) {
455 455
 				case 'registration' :
456 456
 					$registrations_used_for_contact_data = EEM_Registration::instance()->get_all(
457 457
 						array(
458 458
 							array(
459
-								'REG_ID' => array( 'IN', $ids )
459
+								'REG_ID' => array('IN', $ids)
460 460
 							)
461 461
 						)
462 462
 					);
463 463
 					break;
464 464
 				case 'contact' :
465
-					$registrations_used_for_contact_data = EEM_Registration::instance()->get_latest_registration_for_each_of_given_contacts( $ids );
465
+					$registrations_used_for_contact_data = EEM_Registration::instance()->get_latest_registration_for_each_of_given_contacts($ids);
466 466
 					break;
467 467
 			}
468 468
 			do_action(
@@ -473,8 +473,8 @@  discard block
 block discarded – undo
473 473
 			//kept for backward compat, internally we no longer use this action.
474 474
 			//@deprecated 4.8.36.rc.002
475 475
 			$contacts = $id_type == 'registration'
476
-				? EEM_Attendee::instance()->get_array_of_contacts_from_reg_ids( $ids )
477
-				: EEM_Attendee::instance()->get_all( array( array( 'ATT_ID' => array('in', $ids ) ) ) );
476
+				? EEM_Attendee::instance()->get_array_of_contacts_from_reg_ids($ids)
477
+				: EEM_Attendee::instance()->get_all(array(array('ATT_ID' => array('in', $ids))));
478 478
 			do_action(
479 479
 				'AHEE__Extend_Registrations_Admin_Page___newsletter_selected_send',
480 480
 				$contacts,
@@ -482,11 +482,11 @@  discard block
 block discarded – undo
482 482
 			);
483 483
 		}
484 484
 		$query_args = array(
485
-			'action' => !empty( $this->_req_data['redirect_back_to'] )
485
+			'action' => ! empty($this->_req_data['redirect_back_to'])
486 486
 				? $this->_req_data['redirect_back_to']
487 487
 				: 'default'
488 488
 			);
489
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
489
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
490 490
 	}
491 491
 
492 492
 
@@ -508,8 +508,8 @@  discard block
 block discarded – undo
508 508
 	*		@return void
509 509
 	*/
510 510
 	protected function _registration_reports() {
511
-		$template_path = EE_ADMIN_TEMPLATE . 'admin_reports.template.php';
512
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, $this->_reports_template_data, true );
511
+		$template_path = EE_ADMIN_TEMPLATE.'admin_reports.template.php';
512
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, $this->_reports_template_data, true);
513 513
 		// the final template wrapper
514 514
 		$this->display_admin_page_with_no_sidebar();
515 515
 
@@ -522,28 +522,28 @@  discard block
 block discarded – undo
522 522
 	 *
523 523
 	 * @return string
524 524
 	 */
525
-	private function _registrations_per_day_report( $period = '-1 month' ) {
525
+	private function _registrations_per_day_report($period = '-1 month') {
526 526
 		$report_ID = 'reg-admin-registrations-per-day-report-dv';
527 527
 
528
-		$results = EEM_Registration::instance()->get_registrations_per_day_and_per_status_report( $period );
528
+		$results = EEM_Registration::instance()->get_registrations_per_day_and_per_status_report($period);
529 529
 
530 530
 		$results = (array) $results;
531 531
 		$regs = array();
532 532
 		$subtitle = '';
533 533
 
534
-		if( $results ) {
534
+		if ($results) {
535 535
 			$column_titles = array();
536 536
 			$tracker = 0;
537
-			foreach ( $results as $result ) {
537
+			foreach ($results as $result) {
538 538
 				$report_column_values = array();
539
-				foreach( $result as $property_name => $property_value ) {
539
+				foreach ($result as $property_name => $property_value) {
540 540
 					$property_value = $property_name == 'Registration_REG_date' ? $property_value : (int) $property_value;
541 541
 					$report_column_values[] = $property_value;
542
-					if ( $tracker === 0 ) {
543
-						if ( $property_name == 'Registration_REG_date' ) {
544
-							$column_titles[] = __( 'Date (only days with registrations are shown)', 'event_espresso' );
542
+					if ($tracker === 0) {
543
+						if ($property_name == 'Registration_REG_date') {
544
+							$column_titles[] = __('Date (only days with registrations are shown)', 'event_espresso');
545 545
 						} else {
546
-							$column_titles[] = EEH_Template::pretty_status( $property_name, false, 'sentence' );
546
+							$column_titles[] = EEH_Template::pretty_status($property_name, false, 'sentence');
547 547
 						}
548 548
 					}
549 549
 				}
@@ -552,36 +552,36 @@  discard block
 block discarded – undo
552 552
 			}
553 553
 
554 554
 			//make sure the column_titles is pushed to the beginning of the array
555
-			array_unshift( $regs, $column_titles );
555
+			array_unshift($regs, $column_titles);
556 556
 			//setup the date range.
557
-			$DateTimeZone = new DateTimeZone( EEH_DTT_Helper::get_timezone() );
558
-			$beginning_date = new DateTime( "now " . $period, $DateTimeZone );
559
-			$ending_date = new DateTime( "now", $DateTimeZone );
557
+			$DateTimeZone = new DateTimeZone(EEH_DTT_Helper::get_timezone());
558
+			$beginning_date = new DateTime("now ".$period, $DateTimeZone);
559
+			$ending_date = new DateTime("now", $DateTimeZone);
560 560
 			$subtitle = sprintf(
561
-				_x( 'For the period: %1$s to %2$s', 'Used to give date range', 'event_espresso' ),
562
-				$beginning_date->format( 'Y-m-d' ),
563
-				$ending_date->format( 'Y-m-d' )
561
+				_x('For the period: %1$s to %2$s', 'Used to give date range', 'event_espresso'),
562
+				$beginning_date->format('Y-m-d'),
563
+				$ending_date->format('Y-m-d')
564 564
 			);
565 565
 		}
566 566
 
567
-		$report_title = __( 'Total Registrations per Day', 'event_espresso' );
567
+		$report_title = __('Total Registrations per Day', 'event_espresso');
568 568
 
569 569
 		$report_params = array(
570 570
 			'title' 	=> $report_title,
571 571
 			'subtitle' => $subtitle,
572 572
 			'id' 		=> $report_ID,
573 573
 			'regs' 	=> $regs,
574
-			'noResults' => empty( $regs ),
574
+			'noResults' => empty($regs),
575 575
 			'noRegsMsg' => sprintf(
576 576
 				__(
577 577
 					'%sThere are currently no registration records in the last month for this report.%s',
578 578
 					'event_espresso'
579 579
 				),
580
-				'<h2>' . $report_title . '</h2><p>',
580
+				'<h2>'.$report_title.'</h2><p>',
581 581
 				'</p>'
582 582
 			),
583 583
 		);
584
-		wp_localize_script( 'ee-reg-reports-js', 'regPerDay', $report_params );
584
+		wp_localize_script('ee-reg-reports-js', 'regPerDay', $report_params);
585 585
 
586 586
 		return $report_ID;
587 587
 	}
@@ -593,29 +593,29 @@  discard block
 block discarded – undo
593 593
 	 *
594 594
 	 * @return string
595 595
 	 */
596
-	private function _registrations_per_event_report( $period = '-1 month' ) {
596
+	private function _registrations_per_event_report($period = '-1 month') {
597 597
 
598 598
 		$report_ID = 'reg-admin-registrations-per-event-report-dv';
599 599
 
600
-		$results = EEM_Registration::instance()->get_registrations_per_event_and_per_status_report( $period );
600
+		$results = EEM_Registration::instance()->get_registrations_per_event_and_per_status_report($period);
601 601
 
602 602
 		$results = (array) $results;
603 603
 		$regs = array();
604 604
 		$subtitle = '';
605 605
 
606
-		if ( $results ) {
606
+		if ($results) {
607 607
 			$column_titles = array();
608 608
 			$tracker = 0;
609
-			foreach ( $results as $result ) {
609
+			foreach ($results as $result) {
610 610
 				$report_column_values = array();
611
-				foreach( $result as $property_name => $property_value ) {
612
-					$property_value = $property_name == 'Registration_Event' ? wp_trim_words( $property_value, 4, '...' ) : (int) $property_value;
611
+				foreach ($result as $property_name => $property_value) {
612
+					$property_value = $property_name == 'Registration_Event' ? wp_trim_words($property_value, 4, '...') : (int) $property_value;
613 613
 					$report_column_values[] = $property_value;
614
-					if ( $tracker === 0 ) {
615
-						if ( $property_name == 'Registration_Event' ) {
616
-							$column_titles[] = __( 'Event', 'event_espresso' );
614
+					if ($tracker === 0) {
615
+						if ($property_name == 'Registration_Event') {
616
+							$column_titles[] = __('Event', 'event_espresso');
617 617
 						} else {
618
-							$column_titles[] = EEH_Template::pretty_status( $property_name, false, 'sentence' );
618
+							$column_titles[] = EEH_Template::pretty_status($property_name, false, 'sentence');
619 619
 						}
620 620
 					}
621 621
 				}
@@ -624,37 +624,37 @@  discard block
 block discarded – undo
624 624
 			}
625 625
 
626 626
 			//make sure the column_titles is pushed to the beginning of the array
627
-			array_unshift( $regs, $column_titles );
627
+			array_unshift($regs, $column_titles);
628 628
 
629 629
 			//setup the date range.
630
-			$DateTimeZone = new DateTimeZone( EEH_DTT_Helper::get_timezone() );
631
-			$beginning_date = new DateTime( "now " . $period, $DateTimeZone );
632
-			$ending_date = new DateTime( "now", $DateTimeZone );
630
+			$DateTimeZone = new DateTimeZone(EEH_DTT_Helper::get_timezone());
631
+			$beginning_date = new DateTime("now ".$period, $DateTimeZone);
632
+			$ending_date = new DateTime("now", $DateTimeZone);
633 633
 			$subtitle = sprintf(
634
-				_x( 'For the period: %1$s to %2$s', 'Used to give date range', 'event_espresso' ),
635
-				$beginning_date->format( 'Y-m-d' ),
636
-				$ending_date->format( 'Y-m-d' )
634
+				_x('For the period: %1$s to %2$s', 'Used to give date range', 'event_espresso'),
635
+				$beginning_date->format('Y-m-d'),
636
+				$ending_date->format('Y-m-d')
637 637
 			);
638 638
 		}
639 639
 
640
-		$report_title = __( 'Total Registrations per Event', 'event_espresso' );
640
+		$report_title = __('Total Registrations per Event', 'event_espresso');
641 641
 
642 642
 		$report_params = array(
643 643
 			'title' 	=> $report_title,
644 644
 			'subtitle' => $subtitle,
645 645
 			'id' 		=> $report_ID,
646 646
 			'regs' 	=> $regs,
647
-			'noResults' => empty( $regs ),
647
+			'noResults' => empty($regs),
648 648
 			'noRegsMsg' => sprintf(
649 649
 				__(
650 650
 					'%sThere are currently no registration records in the last month for this report.%s',
651 651
 					'event_espresso'
652 652
 				),
653
-				'<h2>' . $report_title . '</h2><p>',
653
+				'<h2>'.$report_title.'</h2><p>',
654 654
 				'</p>'
655 655
 			),
656 656
 		);
657
-		wp_localize_script( 'ee-reg-reports-js', 'regPerEvent', $report_params );
657
+		wp_localize_script('ee-reg-reports-js', 'regPerEvent', $report_params);
658 658
 
659 659
 		return $report_ID;
660 660
 	}
@@ -668,8 +668,8 @@  discard block
 block discarded – undo
668 668
 	 * @return void
669 669
 	 */
670 670
 	protected function _registration_checkin_list_table() {
671
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
672
-		$reg_id = isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : null;
671
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
672
+		$reg_id = isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : null;
673 673
 		$reg = EEM_Registration::instance()->get_one_by_ID($reg_id);
674 674
 		$this->_admin_page_title .= $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $reg->event_ID()), 'add-new-h2');
675 675
 
@@ -683,15 +683,15 @@  discard block
 block discarded – undo
683 683
 				'desc' => __('This indicates the attendee has been checked out', 'event_espresso')
684 684
 				)
685 685
 			);
686
-		$this->_template_args['after_list_table'] = $this->_display_legend( $legend_items );
686
+		$this->_template_args['after_list_table'] = $this->_display_legend($legend_items);
687 687
 
688 688
 
689
-		$dtt_id = isset(  $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
690
-		$go_back_url = !empty( $reg_id )  ? EE_Admin_Page::add_query_args_and_nonce(array('action' => 'event_registrations', 'event_id' => EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Event')->ID(), 'DTT_ID' => $dtt_id ), $this->_admin_base_url ) : '';
689
+		$dtt_id = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
690
+		$go_back_url = ! empty($reg_id) ? EE_Admin_Page::add_query_args_and_nonce(array('action' => 'event_registrations', 'event_id' => EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Event')->ID(), 'DTT_ID' => $dtt_id), $this->_admin_base_url) : '';
691 691
 
692
-		$this->_template_args['before_list_table'] = !empty( $reg_id ) && !empty( $dtt_id ) ? '<h2>' . sprintf(__("%s's check in records for %s at the event, %s", 'event_espresso'), '<span id="checkin-attendee-name">' . EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Attendee')->full_name() . '</span>', '<span id="checkin-dtt"><a href="' . $go_back_url . '">' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->start_date_and_time() . ' - ' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->end_date_and_time() . '</a></span>', '<span id="checkin-event-name">' . EEM_Datetime::instance()->get_one_by_ID($dtt_id)->get_first_related('Event')->get('EVT_name') . '</span>' ) . '</h2>' : '';
693
-		$this->_template_args['list_table_hidden_fields'] = !empty( $reg_id ) ? '<input type="hidden" name="_REGID" value="' . $reg_id . '">' : '';
694
-		$this->_template_args['list_table_hidden_fields'] .= !empty( $dtt_id ) ? '<input type="hidden" name="DTT_ID" value="' . $dtt_id . '">' : '';
692
+		$this->_template_args['before_list_table'] = ! empty($reg_id) && ! empty($dtt_id) ? '<h2>'.sprintf(__("%s's check in records for %s at the event, %s", 'event_espresso'), '<span id="checkin-attendee-name">'.EEM_Registration::instance()->get_one_by_ID($reg_id)->get_first_related('Attendee')->full_name().'</span>', '<span id="checkin-dtt"><a href="'.$go_back_url.'">'.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->start_date_and_time().' - '.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->end_date_and_time().'</a></span>', '<span id="checkin-event-name">'.EEM_Datetime::instance()->get_one_by_ID($dtt_id)->get_first_related('Event')->get('EVT_name').'</span>').'</h2>' : '';
693
+		$this->_template_args['list_table_hidden_fields'] = ! empty($reg_id) ? '<input type="hidden" name="_REGID" value="'.$reg_id.'">' : '';
694
+		$this->_template_args['list_table_hidden_fields'] .= ! empty($dtt_id) ? '<input type="hidden" name="DTT_ID" value="'.$dtt_id.'">' : '';
695 695
 
696 696
 		$this->display_admin_list_table_page_with_no_sidebar();
697 697
 	}
@@ -704,24 +704,24 @@  discard block
 block discarded – undo
704 704
 	 */
705 705
 	public function toggle_checkin_status() {
706 706
 		//first make sure we have the necessary data
707
-		if ( !isset( $this->_req_data['_regid'] ) ) {
708
-			EE_Error::add_error( __('There must be something broken with the html structure because the required data for toggling the Check-in status is not being sent via ajax', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
707
+		if ( ! isset($this->_req_data['_regid'])) {
708
+			EE_Error::add_error(__('There must be something broken with the html structure because the required data for toggling the Check-in status is not being sent via ajax', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
709 709
 			$this->_template_args['success'] = FALSE;
710 710
 			$this->_template_args['error'] = TRUE;
711 711
 			$this->_return_json();
712 712
 		};
713 713
 
714 714
 		//do a nonce check cause we're not coming in from an normal route here.
715
-		$nonce = isset( $this->_req_data['checkinnonce'] ) ? sanitize_text_field( $this->_req_data['checkinnonce'] ) : '';
715
+		$nonce = isset($this->_req_data['checkinnonce']) ? sanitize_text_field($this->_req_data['checkinnonce']) : '';
716 716
 		$nonce_ref = 'checkin_nonce';
717 717
 
718
-		$this->_verify_nonce( $nonce, $nonce_ref );
718
+		$this->_verify_nonce($nonce, $nonce_ref);
719 719
 
720 720
 		//beautiful! Made it this far so let's get the status.
721 721
 		$new_status = $this->_toggle_checkin_status();
722 722
 
723 723
 		//setup new class to return via ajax
724
-		$this->_template_args['admin_page_content'] = 'clickable trigger-checkin checkin-icons checkedin-status-' . $new_status;
724
+		$this->_template_args['admin_page_content'] = 'clickable trigger-checkin checkin-icons checkedin-status-'.$new_status;
725 725
 		$this->_template_args['success'] = TRUE;
726 726
 		$this->_return_json();
727 727
 	}
@@ -741,32 +741,32 @@  discard block
 block discarded – undo
741 741
 		//first let's get the query args out of the way for the redirect
742 742
 		$query_args = array(
743 743
 			'action' => 'event_registrations',
744
-			'event_id' => isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : NULL,
745
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL
744
+			'event_id' => isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : NULL,
745
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL
746 746
 			);
747 747
 		$new_status = FALSE;
748 748
 
749 749
 		// bulk action check in toggle
750
-		if ( ! empty( $this->_req_data['checkbox'] ) && is_array( $this->_req_data['checkbox'] )) {
750
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
751 751
 			// cycle thru checkboxes
752
-			while ( list( $REG_ID, $value ) = each($this->_req_data['checkbox'])) {
753
-				$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
752
+			while (list($REG_ID, $value) = each($this->_req_data['checkbox'])) {
753
+				$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
754 754
 				$new_status = $this->_toggle_checkin($REG_ID, $DTT_ID);
755 755
 			}
756 756
 
757
-		} elseif ( isset( $this->_req_data['_regid'] ) ) {
757
+		} elseif (isset($this->_req_data['_regid'])) {
758 758
 			//coming from ajax request
759
-			$DTT_ID = isset( $this->_req_data['dttid'] ) ? $this->_req_data['dttid'] : NULL;
759
+			$DTT_ID = isset($this->_req_data['dttid']) ? $this->_req_data['dttid'] : NULL;
760 760
 			$query_args['DTT_ID'] = $DTT_ID;
761 761
 			$new_status = $this->_toggle_checkin($this->_req_data['_regid'], $DTT_ID);
762 762
 		} else {
763
-			EE_Error::add_error(__('Missing some required data to toggle the Check-in', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__  );
763
+			EE_Error::add_error(__('Missing some required data to toggle the Check-in', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
764 764
 		}
765 765
 
766
-		if ( defined('DOING_AJAX' ) )
766
+		if (defined('DOING_AJAX'))
767 767
 			return $new_status;
768 768
 
769
-		$this->_redirect_after_action( FALSE,'', '', $query_args, TRUE );
769
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
770 770
 
771 771
 	}
772 772
 
@@ -782,11 +782,11 @@  discard block
 block discarded – undo
782 782
 	 */
783 783
 	private function _toggle_checkin($REG_ID, $DTT_ID) {
784 784
 		$REG = EEM_Registration::instance()->get_one_by_ID($REG_ID);
785
-		$new_status = $REG->toggle_checkin_status( $DTT_ID );
786
-		if ( $new_status !== FALSE ) {
787
-			EE_Error::add_success($REG->get_checkin_msg($DTT_ID) );
785
+		$new_status = $REG->toggle_checkin_status($DTT_ID);
786
+		if ($new_status !== FALSE) {
787
+			EE_Error::add_success($REG->get_checkin_msg($DTT_ID));
788 788
 		} else {
789
-			EE_Error::add_error($REG->get_checkin_msg($DTT_ID, TRUE), __FILE__, __FUNCTION__, __LINE__ );
789
+			EE_Error::add_error($REG->get_checkin_msg($DTT_ID, TRUE), __FILE__, __FUNCTION__, __LINE__);
790 790
 			$new_status = FALSE;
791 791
 		}
792 792
 		return $new_status;
@@ -802,28 +802,28 @@  discard block
 block discarded – undo
802 802
 	protected function _delete_checkin_rows() {
803 803
 		$query_args = array(
804 804
 			'action' => 'registration_checkins',
805
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0,
806
-			'_REGID' => isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : 0
805
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0,
806
+			'_REGID' => isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : 0
807 807
 			);
808
-		if ( !empty( $this->_req_data['checkbox'] ) && is_array( $this->_req_data['checkbox'] ) ) {
809
-			while ( list( $CHK_ID, $value ) = each( $this->_req_data['checkbox'] ) ) {
808
+		if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
809
+			while (list($CHK_ID, $value) = each($this->_req_data['checkbox'])) {
810 810
 				$errors = 0;
811
-				if ( ! EEM_Checkin::instance()->delete_by_ID($CHK_ID ) ) {
811
+				if ( ! EEM_Checkin::instance()->delete_by_ID($CHK_ID)) {
812 812
 					$errors++;
813 813
 				}
814 814
 			}
815 815
 		} else {
816
-			EE_Error::add_error(__('So, something went wrong with the bulk delete because there was no data received for instructions on WHAT to delete!', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
817
-			$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
816
+			EE_Error::add_error(__('So, something went wrong with the bulk delete because there was no data received for instructions on WHAT to delete!', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
817
+			$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
818 818
 		}
819 819
 
820
-		if ( $errors > 0 ) {
821
-			EE_Error::add_error( sprintf( __('There were %d records that did not delete successfully', 'event_espresso'), $errors ), __FILE__, __FUNCTION__, __LINE__ );
820
+		if ($errors > 0) {
821
+			EE_Error::add_error(sprintf(__('There were %d records that did not delete successfully', 'event_espresso'), $errors), __FILE__, __FUNCTION__, __LINE__);
822 822
 		} else {
823
-			EE_Error::add_success( __('Records were successfully deleted', 'event_espresso') );
823
+			EE_Error::add_success(__('Records were successfully deleted', 'event_espresso'));
824 824
 		}
825 825
 
826
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
826
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
827 827
 	}
828 828
 
829 829
 
@@ -835,20 +835,20 @@  discard block
 block discarded – undo
835 835
 	protected function _delete_checkin_row() {
836 836
 		$query_args = array(
837 837
 			'action' => 'registration_checkins',
838
-			'DTT_ID' => isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0,
839
-			'_REGID' => isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : 0
838
+			'DTT_ID' => isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0,
839
+			'_REGID' => isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : 0
840 840
 			);
841 841
 
842
-		if ( !empty( $this->_req_data['CHK_ID'] ) ) {
843
-			if ( ! EEM_Checkin::instance()->delete_by_ID($this->_req_data['CHK_ID'] ) ) {
844
-				EE_Error::add_error(__('Something went wrong and this check-in record was not deleted', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
842
+		if ( ! empty($this->_req_data['CHK_ID'])) {
843
+			if ( ! EEM_Checkin::instance()->delete_by_ID($this->_req_data['CHK_ID'])) {
844
+				EE_Error::add_error(__('Something went wrong and this check-in record was not deleted', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
845 845
 			} else {
846
-				EE_Error::add_success( __('Check-In record successfully deleted', 'event_espresso') );
846
+				EE_Error::add_success(__('Check-In record successfully deleted', 'event_espresso'));
847 847
 			}
848 848
 		} else {
849
-			EE_Error::add_error(__('In order to delete a Check-in record, there must be a Check-In ID available. There is not. It is not your fault, there is just a gremlin living in the code', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
849
+			EE_Error::add_error(__('In order to delete a Check-in record, there must be a Check-In ID available. There is not. It is not your fault, there is just a gremlin living in the code', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
850 850
 		}
851
-		$this->_redirect_after_action( FALSE, '', '', $query_args, TRUE );
851
+		$this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
852 852
 	}
853 853
 
854 854
 
@@ -861,8 +861,8 @@  discard block
 block discarded – undo
861 861
 	*		@return void
862 862
 	*/
863 863
 	protected function _event_registrations_list_table() {
864
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
865
-		$this->_admin_page_title .= isset( $this->_req_data['event_id'] ) ? $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $this->_req_data['event_id']), 'add-new-h2') : '';
864
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
865
+		$this->_admin_page_title .= isset($this->_req_data['event_id']) ? $this->get_action_link_or_button('new_registration', 'add-registrant', array('event_id' => $this->_req_data['event_id']), 'add-new-h2') : '';
866 866
 
867 867
 		$legend_items = array(
868 868
 			'star-icon' => array(
@@ -886,31 +886,31 @@  discard block
 block discarded – undo
886 886
 				'desc' => __('View All Check-in Records for this Registrant', 'event_espresso')
887 887
 				),
888 888
 			'approved_status' => array(
889
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_approved,
890
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_approved, FALSE, 'sentence' )
889
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_approved,
890
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_approved, FALSE, 'sentence')
891 891
 				),
892 892
             'cancelled_status' => array(
893
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_cancelled,
894
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_cancelled, FALSE, 'sentence' )
893
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_cancelled,
894
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_cancelled, FALSE, 'sentence')
895 895
 				),
896 896
             'declined_status' => array(
897
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_declined,
898
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_declined, FALSE, 'sentence' )
897
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_declined,
898
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_declined, FALSE, 'sentence')
899 899
 				),
900 900
 			'not_approved' => array(
901
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_not_approved,
902
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_not_approved, FALSE, 'sentence' )
901
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_not_approved,
902
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_not_approved, FALSE, 'sentence')
903 903
 				),
904 904
 			'pending_status' => array(
905
-				'class' => 'ee-status-legend ee-status-legend-' . EEM_Registration::status_id_pending_payment,
906
-				'desc' => EEH_Template::pretty_status( EEM_Registration::status_id_pending_payment, FALSE, 'sentence' )
905
+				'class' => 'ee-status-legend ee-status-legend-'.EEM_Registration::status_id_pending_payment,
906
+				'desc' => EEH_Template::pretty_status(EEM_Registration::status_id_pending_payment, FALSE, 'sentence')
907 907
 				)/**/
908 908
 			);
909
-		$this->_template_args['after_list_table'] = $this->_display_legend( $legend_items );
909
+		$this->_template_args['after_list_table'] = $this->_display_legend($legend_items);
910 910
 
911
-		$event_id = isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : null;
912
-		$this->_template_args['before_list_table'] = !empty( $event_id ) ? '<h2>' . sprintf(__('Viewing Registrations for Event: %s', 'event_espresso'), EEM_Event::instance()->get_one_by_ID($event_id)->get('EVT_name') ) . '</h2>' : '';
913
-		$this->_template_args['list_table_hidden_fields'] = !empty( $event_id ) ? '<input type="hidden" name="event_id" value="' . $event_id . '">' : '';
911
+		$event_id = isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : null;
912
+		$this->_template_args['before_list_table'] = ! empty($event_id) ? '<h2>'.sprintf(__('Viewing Registrations for Event: %s', 'event_espresso'), EEM_Event::instance()->get_one_by_ID($event_id)->get('EVT_name')).'</h2>' : '';
913
+		$this->_template_args['list_table_hidden_fields'] = ! empty($event_id) ? '<input type="hidden" name="event_id" value="'.$event_id.'">' : '';
914 914
 
915 915
 		$this->display_admin_list_table_page_with_no_sidebar();
916 916
 	}
@@ -924,15 +924,15 @@  discard block
 block discarded – undo
924 924
 	*		@access public
925 925
 	*		@return array
926 926
 	*/
927
-	public function get_event_attendees( $per_page = 10, $count = FALSE, $trash = FALSE, $orderby = '' ) {
927
+	public function get_event_attendees($per_page = 10, $count = FALSE, $trash = FALSE, $orderby = '') {
928 928
 
929
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
930
-		require_once(EE_MODELS . 'EEM_Attendee.model.php');
929
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
930
+		require_once(EE_MODELS.'EEM_Attendee.model.php');
931 931
 		//$ATT_MDL = EEM_Attendee::instance();
932 932
 
933
-		$EVT_ID = isset($this->_req_data['event_id']) ? absint( $this->_req_data['event_id'] ) : FALSE;
934
-		$CAT_ID = isset($this->_req_data['category_id']) ? absint( $this->_req_data['category_id'] ) : FALSE;
935
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
933
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE;
934
+		$CAT_ID = isset($this->_req_data['category_id']) ? absint($this->_req_data['category_id']) : FALSE;
935
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
936 936
 
937 937
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : $orderby;
938 938
 
@@ -945,94 +945,94 @@  discard block
 block discarded – undo
945 945
 //				$orderby = 'reg.REG_final_price';
946 946
 		}
947 947
 
948
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC';
948
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC';
949 949
 
950
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
951
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
950
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
951
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
952 952
 
953 953
 
954
-		$offset = ($current_page-1)*$per_page;
955
-		$limit = $count ? NULL : array( $offset, $per_page );
956
-		$query_params = array(array('Event.status'=>array('IN',  array_keys(EEM_Event::instance()->get_status_array()))));
957
-		if ($EVT_ID){
958
-			$query_params[0]['EVT_ID']=$EVT_ID;
954
+		$offset = ($current_page - 1) * $per_page;
955
+		$limit = $count ? NULL : array($offset, $per_page);
956
+		$query_params = array(array('Event.status'=>array('IN', array_keys(EEM_Event::instance()->get_status_array()))));
957
+		if ($EVT_ID) {
958
+			$query_params[0]['EVT_ID'] = $EVT_ID;
959 959
 		}
960
-		if($CAT_ID){
960
+		if ($CAT_ID) {
961 961
 			throw new EE_Error("You specified a Category Id for this query. Thats odd because we are now using terms and taxonomies. So did you mean the term taxonomy id o rthe term id?");
962 962
 		}
963 963
 
964 964
 		//if DTT is included we do multiple datetimes.
965
-		if ( $DTT_ID ) {
965
+		if ($DTT_ID) {
966 966
 			$query_params[0]['Ticket.Datetime.DTT_ID'] = $DTT_ID;
967 967
 		}
968 968
 
969 969
 		//make sure we only have default where on the current regs
970 970
 		$query_params['default_where_conditions'] = 'this_model_only';
971 971
 
972
-		$status_ids_array = apply_filters( 'FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array', array( EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved ) );
972
+		$status_ids_array = apply_filters('FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array', array(EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved));
973 973
 
974
-		$query_params[0]['STS_ID']= array('IN', $status_ids_array );
974
+		$query_params[0]['STS_ID'] = array('IN', $status_ids_array);
975 975
 
976
-		if($trash){
977
-			$query_params[0]['Attendee.status']=  EEM_CPT_Base::post_status_trashed;
976
+		if ($trash) {
977
+			$query_params[0]['Attendee.status'] = EEM_CPT_Base::post_status_trashed;
978 978
 		}
979 979
 
980
-		if ( isset( $this->_req_data['s'] ) ) {
981
-			$sstr = '%' . $this->_req_data['s'] . '%';
980
+		if (isset($this->_req_data['s'])) {
981
+			$sstr = '%'.$this->_req_data['s'].'%';
982 982
 			$query_params[0]['OR'] = array(
983
-				'Event.EVT_name' => array( 'LIKE', $sstr),
984
-				'Event.EVT_desc' => array( 'LIKE', $sstr ),
985
-				'Event.EVT_short_desc' => array( 'LIKE' , $sstr ),
986
-				'Attendee.ATT_fname' => array( 'LIKE', $sstr ),
987
-				'Attendee.ATT_lname' => array( 'LIKE', $sstr ),
988
-				'Attendee.ATT_short_bio' => array( 'LIKE', $sstr ),
989
-				'Attendee.ATT_email' => array('LIKE', $sstr ),
990
-				'Attendee.ATT_address' => array( 'LIKE', $sstr ),
991
-				'Attendee.ATT_address2' => array( 'LIKE', $sstr ),
992
-				'Attendee.ATT_city' => array( 'LIKE', $sstr ),
993
-				'REG_final_price' => array( 'LIKE', $sstr ),
994
-				'REG_code' => array( 'LIKE', $sstr ),
995
-				'REG_count' => array( 'LIKE' , $sstr ),
996
-				'REG_group_size' => array( 'LIKE' , $sstr ),
997
-				'Ticket.TKT_name' => array( 'LIKE', $sstr ),
998
-				'Ticket.TKT_description' => array( 'LIKE', $sstr )
983
+				'Event.EVT_name' => array('LIKE', $sstr),
984
+				'Event.EVT_desc' => array('LIKE', $sstr),
985
+				'Event.EVT_short_desc' => array('LIKE', $sstr),
986
+				'Attendee.ATT_fname' => array('LIKE', $sstr),
987
+				'Attendee.ATT_lname' => array('LIKE', $sstr),
988
+				'Attendee.ATT_short_bio' => array('LIKE', $sstr),
989
+				'Attendee.ATT_email' => array('LIKE', $sstr),
990
+				'Attendee.ATT_address' => array('LIKE', $sstr),
991
+				'Attendee.ATT_address2' => array('LIKE', $sstr),
992
+				'Attendee.ATT_city' => array('LIKE', $sstr),
993
+				'REG_final_price' => array('LIKE', $sstr),
994
+				'REG_code' => array('LIKE', $sstr),
995
+				'REG_count' => array('LIKE', $sstr),
996
+				'REG_group_size' => array('LIKE', $sstr),
997
+				'Ticket.TKT_name' => array('LIKE', $sstr),
998
+				'Ticket.TKT_description' => array('LIKE', $sstr)
999 999
 				);
1000 1000
 		}
1001 1001
 
1002 1002
 		$query_params['order_by'][$orderby] = $sort;
1003 1003
 		$query_params['limit'] = $limit;
1004
-		$query_params['force_join'] = array('Attendee');//force join to attendee model so that it gets cached, because we're going to need the attendee for each registration
1005
-		if($count){
1006
-			$registrations = EEM_Registration::instance()->count(array($query_params[0], 'default_where_conditions' => 'this_model_only' ));
1007
-		}else{
1004
+		$query_params['force_join'] = array('Attendee'); //force join to attendee model so that it gets cached, because we're going to need the attendee for each registration
1005
+		if ($count) {
1006
+			$registrations = EEM_Registration::instance()->count(array($query_params[0], 'default_where_conditions' => 'this_model_only'));
1007
+		} else {
1008 1008
 			$registrations = EEM_Registration::instance()->get_all($query_params);
1009 1009
 
1010 1010
 
1011 1011
 	//		$registrations = EEM_Registration::instance();
1012 1012
 	//		$all_attendees = EEM_Attendee::instance()->get_event_attendees( $EVT_ID, $CAT_ID, $reg_status, $trash, $orderby, $sort, $limit, $output );
1013
-			if ( isset( $registrations[0] ) && $registrations[0] instanceof EE_Registration ) {
1013
+			if (isset($registrations[0]) && $registrations[0] instanceof EE_Registration) {
1014 1014
 				//EEH_Debug_Tools::printr( $all_attendees[0], '$all_attendees[0]  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
1015 1015
 				// name
1016 1016
 				$first_registration = $registrations[0];
1017 1017
 				$event_obj = $first_registration->event_obj();
1018
-				if($event_obj){
1018
+				if ($event_obj) {
1019 1019
 					$event_name = $first_registration->event_obj()->name();
1020
-					$event_date = 'TODO: we need to get date from earliest price date or should this be the actual event date?';//$first_registration->date_obj()->reg_start_date_and_time('l F j, Y,', ' g:i:s a');// isset( $registrations[0]->DTT_EVT_start ) ? date( 'l F j, Y,    g:i:s a', $registrations[0]->DTT_EVT_start ) : '';
1020
+					$event_date = 'TODO: we need to get date from earliest price date or should this be the actual event date?'; //$first_registration->date_obj()->reg_start_date_and_time('l F j, Y,', ' g:i:s a');// isset( $registrations[0]->DTT_EVT_start ) ? date( 'l F j, Y,    g:i:s a', $registrations[0]->DTT_EVT_start ) : '';
1021 1021
 					// edit event link
1022
-					if ( $event_name != '' ) {
1023
-						$edit_event_url = self::add_query_args_and_nonce( array( 'action'=>'edit_event', 'EVT_ID'=>$EVT_ID ), EVENTS_ADMIN_URL );
1024
-						$edit_event_lnk = '<a href="'.$edit_event_url.'" title="' . esc_attr__( 'Edit ', 'event_espresso' ) . $event_name . '">' . __( 'Edit Event', 'event_espresso' ) . '</a>';
1025
-						$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">' . $edit_event_lnk . '</span>' ;
1022
+					if ($event_name != '') {
1023
+						$edit_event_url = self::add_query_args_and_nonce(array('action'=>'edit_event', 'EVT_ID'=>$EVT_ID), EVENTS_ADMIN_URL);
1024
+						$edit_event_lnk = '<a href="'.$edit_event_url.'" title="'.esc_attr__('Edit ', 'event_espresso').$event_name.'">'.__('Edit Event', 'event_espresso').'</a>';
1025
+						$event_name .= ' <span class="admin-page-header-edit-lnk not-bold">'.$edit_event_lnk.'</span>';
1026 1026
 					}
1027 1027
 
1028
-					$back_2_reg_url = self::add_query_args_and_nonce( array( 'action'=>'default' ), REG_ADMIN_URL );
1029
-					$back_2_reg_lnk = '<a href="'.$back_2_reg_url.'" title="' . esc_attr__( 'click to return to viewing all registrations ', 'event_espresso' ) . '">&laquo; ' . __( 'Back to All Registrations', 'event_espresso' ) . '</a>';
1028
+					$back_2_reg_url = self::add_query_args_and_nonce(array('action'=>'default'), REG_ADMIN_URL);
1029
+					$back_2_reg_lnk = '<a href="'.$back_2_reg_url.'" title="'.esc_attr__('click to return to viewing all registrations ', 'event_espresso').'">&laquo; '.__('Back to All Registrations', 'event_espresso').'</a>';
1030 1030
 
1031 1031
 					$this->_template_args['before_admin_page_content'] = '
1032 1032
 				<div id="admin-page-header">
1033
-					<h1><span class="small-text not-bold">'.__( 'Event: ', 'event_espresso' ).'</span>'. $event_name .'</h1>
1034
-					<h3><span class="small-text not-bold">'.__( 'Date: ', 'event_espresso' ). '</span>'. $event_date .'</h3>
1035
-					<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk . '</span>
1033
+					<h1><span class="small-text not-bold">'.__('Event: ', 'event_espresso').'</span>'.$event_name.'</h1>
1034
+					<h3><span class="small-text not-bold">'.__('Date: ', 'event_espresso').'</span>'.$event_date.'</h3>
1035
+					<span class="admin-page-header-go-back-lnk not-bold">' . $back_2_reg_lnk.'</span>
1036 1036
 				</div>
1037 1037
 				';
1038 1038
 				}
Please login to merge, or discard this patch.
admin/extend/registrations/EE_Event_Registrations_List_Table.class.php 1 patch
Spacing   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 
18 18
 
19
-	public function __construct( $admin_page ) {
19
+	public function __construct($admin_page) {
20 20
 		parent::__construct($admin_page);
21 21
 		$this->_status = $this->_admin_page->get_registration_status_array();
22 22
 	}
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
 
26 26
 
27 27
 	protected function _setup_data() {
28
-		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_event_attendees( $this->_per_page ) : $this->_admin_page->get_event_attendees( $this->_per_page, FALSE, TRUE );
29
-		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_event_attendees(  $this->_per_page, TRUE ) : $this->_admin_page->get_event_attendees(  $this->_per_page, TRUE, TRUE);
28
+		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_event_attendees($this->_per_page) : $this->_admin_page->get_event_attendees($this->_per_page, FALSE, TRUE);
29
+		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_event_attendees($this->_per_page, TRUE) : $this->_admin_page->get_event_attendees($this->_per_page, TRUE, TRUE);
30 30
 	}
31 31
 
32 32
 
33 33
 
34 34
 
35 35
 	protected function _set_properties() {
36
-		$evt_id = isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : NULL;
36
+		$evt_id = isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : NULL;
37 37
 
38 38
 		$this->_wp_list_args = array(
39 39
 			'singular' => __('registrant', 'event_espresso'),
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 		$columns = array();
46 46
 		//$columns['_Reg_Status'] = '';
47
-		if ( !empty( $evt_id ) ) {
47
+		if ( ! empty($evt_id)) {
48 48
 			$columns['cb'] = '<input type="checkbox" />'; //Render a checkbox instead of text
49 49
 			$this->_has_checkbox_column = true;
50 50
 		}
@@ -60,43 +60,43 @@  discard block
 block discarded – undo
60 60
 				'TXN_total' => __('Total', 'event_espresso')
61 61
 			);
62 62
 
63
-		$this->_columns = array_merge( $columns, $this->_columns);
63
+		$this->_columns = array_merge($columns, $this->_columns);
64 64
 
65 65
 		$this->_primary_column = '_REG_att_checked_in';
66 66
 
67
-		if ( !empty( $evt_id ) && EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'espresso_registrations_registrations_reports', $evt_id )  ) {
67
+		if ( ! empty($evt_id) && EE_Registry::instance()->CAP->current_user_can('ee_read_registrations', 'espresso_registrations_registrations_reports', $evt_id)) {
68 68
 			$this->_bottom_buttons = array(
69 69
 				'report'=> array(
70 70
 					'route' => 'registrations_report',
71 71
 					'extra_request' => 
72 72
 						array( 
73 73
 							'EVT_ID'=> $evt_id, 
74
-							'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") )
74
+							'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") )
75 75
 				)
76 76
 			);
77 77
 		}
78 78
 
79 79
 		$this->_sortable_columns = array(
80 80
 			 //true means its already sorted
81
-			'ATT_name' => array( 'ATT_name' => TRUE ),
82
-			'Event' => array( 'Event.EVT.Name' => FALSE )
81
+			'ATT_name' => array('ATT_name' => TRUE),
82
+			'Event' => array('Event.EVT.Name' => FALSE)
83 83
 		);
84 84
 
85 85
 		$this->_hidden_columns = array();
86 86
 
87 87
 		$this->_evt = EEM_Event::instance()->get_one_by_ID($evt_id);
88
-		$this->_dtts_for_event = !empty($evt_id) ? $this->_evt->datetimes_ordered() : array();
88
+		$this->_dtts_for_event = ! empty($evt_id) ? $this->_evt->datetimes_ordered() : array();
89 89
 
90 90
 	}
91 91
 
92 92
 
93 93
 
94 94
 
95
-	protected function _get_row_class( $item ) {
96
-		$class = parent::_get_row_class( $item );
95
+	protected function _get_row_class($item) {
96
+		$class = parent::_get_row_class($item);
97 97
 		//add status class
98
-		$class .= ' ee-status-strip reg-status-' . $item->status_ID();
99
-		if ( $this->_has_checkbox_column ) {
98
+		$class .= ' ee-status-strip reg-status-'.$item->status_ID();
99
+		if ($this->_has_checkbox_column) {
100 100
 			$class .= ' has-checkbox-column';
101 101
 		}
102 102
 		return $class;
@@ -108,42 +108,42 @@  discard block
 block discarded – undo
108 108
 		$filters = $where = array();
109 109
 
110 110
 
111
-		if ( empty( $this->_dtts_for_event ) ) {
111
+		if (empty($this->_dtts_for_event)) {
112 112
 			//this means we don't have an event so let's setup a filter dropdown for all the events to select
113 113
 			//note possible capability restrictions
114
-			if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_events', 'get_events') ) {
115
-				$where['status**'] =  array( '!=', 'private' );
114
+			if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_private_events', 'get_events')) {
115
+				$where['status**'] = array('!=', 'private');
116 116
 			}
117 117
 
118
-			if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_events', 'get_events' ) ) {
119
-				$where['EVT_wp_user'] =  get_current_user_id();
118
+			if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_events', 'get_events')) {
119
+				$where['EVT_wp_user'] = get_current_user_id();
120 120
 			}
121 121
 
122
-			$events = EEM_Event::instance()->get_all(array( $where, 'order_by' => array( 'Datetime.DTT_EVT_start' => 'DESC' ) ) );
123
-			$evts[] = array('id' => 0, 'text' => __('To toggle Check-in status, select an event', 'event_espresso') );
124
-			foreach ( $events as $evt ) {
122
+			$events = EEM_Event::instance()->get_all(array($where, 'order_by' => array('Datetime.DTT_EVT_start' => 'DESC')));
123
+			$evts[] = array('id' => 0, 'text' => __('To toggle Check-in status, select an event', 'event_espresso'));
124
+			foreach ($events as $evt) {
125 125
 				//any registrations for this event?
126
-				if ( ! $evt->get_count_of_all_registrations() )
126
+				if ( ! $evt->get_count_of_all_registrations())
127 127
 					continue;
128 128
 				$evts[] = array(
129 129
 					'id' => $evt->ID(),
130
-					'text' => $evt->get( 'EVT_name' ),
130
+					'text' => $evt->get('EVT_name'),
131 131
 					'class' => $evt->is_expired() ? 'ee-expired-event' : ''
132 132
 				);
133 133
 			}
134 134
 			$event_filter = '<div class="ee-event-filter">';
135
-			$event_filter .= EEH_Form_Fields::select_input( 'event_id', $evts );
136
-			$event_filter .= '<br><span class="ee-event-filter-toggle"><input type="checkbox" id="js-ee-hide-expired-events" checked>' . ' ' . __( 'Hide Expired Events', 'event_espresso' ) . '</span>';
135
+			$event_filter .= EEH_Form_Fields::select_input('event_id', $evts);
136
+			$event_filter .= '<br><span class="ee-event-filter-toggle"><input type="checkbox" id="js-ee-hide-expired-events" checked>'.' '.__('Hide Expired Events', 'event_espresso').'</span>';
137 137
 			$event_filter .= '</div>';
138 138
 			$filters[] = $event_filter;
139 139
 
140 140
 		} else {
141 141
 			//DTT datetimes filter
142
-			$cur_dtt = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : $this->_evt->primary_datetime()->ID();
142
+			$cur_dtt = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : $this->_evt->primary_datetime()->ID();
143 143
 			$dtts = array();
144
-			foreach ( $this->_dtts_for_event as $dtt ) {
145
-				$datetime_string = $dtt->start_date_and_time() . ' - ' . $dtt->end_date_and_time();
146
-				$dtts[] = array('id' => $dtt->ID(), 'text' => $datetime_string );
144
+			foreach ($this->_dtts_for_event as $dtt) {
145
+				$datetime_string = $dtt->start_date_and_time().' - '.$dtt->end_date_and_time();
146
+				$dtts[] = array('id' => $dtt->ID(), 'text' => $datetime_string);
147 147
 			}
148 148
 			$filters[] = EEH_Form_Fields::select_input('DTT_ID', $dtts, $cur_dtt);
149 149
 		}
@@ -164,19 +164,19 @@  discard block
 block discarded – undo
164 164
 
165 165
 
166 166
 	protected function _get_total_event_attendees() {
167
-		$EVT_ID = isset($this->_req_data['event_id']) ? absint( $this->_req_data['event_id'] ) : FALSE;
168
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
167
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE;
168
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
169 169
 		$query_params = array();
170
-		if ($EVT_ID){
171
-			$query_params[0]['EVT_ID']=$EVT_ID;
170
+		if ($EVT_ID) {
171
+			$query_params[0]['EVT_ID'] = $EVT_ID;
172 172
 		}
173 173
 		//if DTT is included we do multiple datetimes.  Otherwise we just do primary datetime
174
-		if ( $DTT_ID ) {
174
+		if ($DTT_ID) {
175 175
 			$query_params[0]['Ticket.Datetime.DTT_ID'] = $DTT_ID;
176 176
 		}
177
-		$status_ids_array = apply_filters( 'FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array', array( EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved ) );
177
+		$status_ids_array = apply_filters('FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array', array(EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved));
178 178
 
179
-		$query_params[0]['STS_ID']= array('IN', $status_ids_array );
179
+		$query_params[0]['STS_ID'] = array('IN', $status_ids_array);
180 180
 
181 181
 		return EEM_Registration::instance()->count($query_params);
182 182
 	}
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
 
188 188
 
189 189
 
190
-	function column__Reg_Status( EE_Registration $item ) {
191
-		return '<span class="ee-status-strip ee-status-strip-td reg-status-' . $item->status_ID() . '"></span>';
190
+	function column__Reg_Status(EE_Registration $item) {
191
+		return '<span class="ee-status-strip ee-status-strip-td reg-status-'.$item->status_ID().'"></span>';
192 192
 	}
193 193
 
194 194
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
 
198 198
 	function column_cb($item) {
199
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', $item->ID() );
199
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', $item->ID());
200 200
 	}
201 201
 
202 202
 
@@ -209,18 +209,18 @@  discard block
 block discarded – undo
209 209
 	/**
210 210
 	 * 		column_REG_att_checked_in
211 211
 	*/
212
-	function column__REG_att_checked_in(EE_Registration $item){
212
+	function column__REG_att_checked_in(EE_Registration $item) {
213 213
 		$attendee = $item->attendee();
214 214
 		$attendee_name = $attendee instanceof EE_Attendee ? $attendee->full_name() : '';
215
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0;
215
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0;
216 216
 		$checkinstatus = $item->check_in_status_for_datetime($DTT_ID);
217 217
 		$nonce = wp_create_nonce('checkin_nonce');
218
-		$evt_id = isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : NULL;
219
-		$toggle_active = !empty ( $evt_id ) && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_checkin', 'espresso_registrations_toggle_checkin_status', $item->ID() ) ? ' clickable trigger-checkin' : '';
218
+		$evt_id = isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : NULL;
219
+		$toggle_active = ! empty ($evt_id) && EE_Registry::instance()->CAP->current_user_can('ee_edit_checkin', 'espresso_registrations_toggle_checkin_status', $item->ID()) ? ' clickable trigger-checkin' : '';
220 220
 
221
-		$mobile_view_content = ' <span class="show-on-mobile-view-only">' . $attendee_name . '</span>';
221
+		$mobile_view_content = ' <span class="show-on-mobile-view-only">'.$attendee_name.'</span>';
222 222
 
223
-		 return '<span class="checkin-icons checkedin-status-' . $checkinstatus . $toggle_active . '" data-_regid="' . $item->ID() . '" data-dttid="' . $DTT_ID . '" data-nonce="' . $nonce . '"></span>' . $mobile_view_content;
223
+		 return '<span class="checkin-icons checkedin-status-'.$checkinstatus.$toggle_active.'" data-_regid="'.$item->ID().'" data-dttid="'.$DTT_ID.'" data-nonce="'.$nonce.'"></span>'.$mobile_view_content;
224 224
 	}
225 225
 
226 226
 
@@ -229,43 +229,43 @@  discard block
 block discarded – undo
229 229
 
230 230
 	function column_ATT_name(EE_Registration $item) {
231 231
 		$attendee = $item->attendee();
232
-		if ( ! $attendee instanceof EE_Attendee ) {
232
+		if ( ! $attendee instanceof EE_Attendee) {
233 233
 			return __('No contact record for this registration.', 'event_espresso');
234 234
 		}
235 235
 
236 236
 		// edit attendee link
237
-		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL );
238
-		$name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ?  '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . $item->attendee()->full_name() . '</a>' : $item->attendee()->full_name();
237
+		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$item->ID()), REG_ADMIN_URL);
238
+		$name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.$item->attendee()->full_name().'</a>' : $item->attendee()->full_name();
239 239
 		$name_link .= $item->count() == 1 ? '&nbsp;<sup><div class="dashicons dashicons-star-filled lt-blue-icon ee-icon-size-8"></div></sup>	' : '';
240 240
 
241 241
 		//add group details
242
-		$name_link .= '&nbsp;' . sprintf(__( '(%s of %s)', 'event_espresso' ),$item->count(), $item->group_size());
242
+		$name_link .= '&nbsp;'.sprintf(__('(%s of %s)', 'event_espresso'), $item->count(), $item->group_size());
243 243
 
244 244
 		//add regcode
245
-		$link = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'view_registration', '_REG_ID' => $item->ID() ), REG_ADMIN_URL );
245
+		$link = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'view_registration', '_REG_ID' => $item->ID()), REG_ADMIN_URL);
246 246
 		$name_link .= '<br>';
247
-		$name_link .= EE_Registry::instance()->instance()->CAP->current_user_can('ee_read_registration', 'view_registration', $item->ID() )
248
-			? '<a href="' . $link . '" title="' . esc_attr__('View Registration Details', 'event_espresso') .'">' . $item->reg_code() . '</a>'
247
+		$name_link .= EE_Registry::instance()->instance()->CAP->current_user_can('ee_read_registration', 'view_registration', $item->ID())
248
+			? '<a href="'.$link.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'.$item->reg_code().'</a>'
249 249
 			: $item->reg_code();
250 250
 
251 251
 		//status
252
-		$name_link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $item->status_ID(), false, 'sentence' ) . '</span>';
252
+		$name_link .= '<br><span class="ee-status-text-small">'.EEH_Template::pretty_status($item->status_ID(), false, 'sentence').'</span>';
253 253
 
254 254
 		$actions = array();
255
-		$DTT_ID = !empty( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : NULL;
256
-		$DTT_ID = empty( $DTT_ID ) && !empty( $this->_req_data['event_id'] ) ? EEM_Event::instance()->get_one_by_ID( $this->_req_data['event_id'] )->primary_datetime()->ID() : $DTT_ID;
255
+		$DTT_ID = ! empty($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : NULL;
256
+		$DTT_ID = empty($DTT_ID) && ! empty($this->_req_data['event_id']) ? EEM_Event::instance()->get_one_by_ID($this->_req_data['event_id'])->primary_datetime()->ID() : $DTT_ID;
257 257
 
258
-		if ( !empty($DTT_ID) && EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkins', 'espresso_registrations_registration_checkins' ) ) {
259
-			$checkin_list_url = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'registration_checkins', '_REGID' => $item->ID(), 'DTT_ID' => $DTT_ID));
260
-			$actions['checkin'] = '<a href="' . $checkin_list_url . '" title="' . esc_attr__('View all the check-ins/checkouts for this registrant', 'event_espresso' ) . '">' . __('View', 'event_espresso') . '</a>';
258
+		if ( ! empty($DTT_ID) && EE_Registry::instance()->CAP->current_user_can('ee_read_checkins', 'espresso_registrations_registration_checkins')) {
259
+			$checkin_list_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'registration_checkins', '_REGID' => $item->ID(), 'DTT_ID' => $DTT_ID));
260
+			$actions['checkin'] = '<a href="'.$checkin_list_url.'" title="'.esc_attr__('View all the check-ins/checkouts for this registrant', 'event_espresso').'">'.__('View', 'event_espresso').'</a>';
261 261
 		}
262 262
 
263
-		return !empty( $DTT_ID ) ? sprintf( '%1$s %2$s', $name_link, $this->row_actions($actions) ) : $name_link;
263
+		return ! empty($DTT_ID) ? sprintf('%1$s %2$s', $name_link, $this->row_actions($actions)) : $name_link;
264 264
 	}
265 265
 
266 266
 
267 267
 
268
-	function column_ATT_email( EE_Registration $item ) {
268
+	function column_ATT_email(EE_Registration $item) {
269 269
 		$attendee = $item->attendee();
270 270
 		return $attendee instanceof EE_Attendee ? $attendee->email() : '';
271 271
 		return $item->get_first_related('Attendee')->email();
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
 
278 278
 	function column_Event(EE_Registration $item) {
279 279
 		$event = $this->_evt instanceof EE_Event ? $this->_evt : $item->event();
280
-		$chkin_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'event_registrations', 'event_id'=>$event->ID() ), REG_ADMIN_URL );
281
-		$event_label = EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkins', 'espresso_registrations_registration_checkins' ) ?  '<a href="'.$chkin_lnk_url.'" title="' . esc_attr__( 'View Checkins for this Event', 'event_espresso' ) . '">' . $event->name() . '</a>' : $event->name();
280
+		$chkin_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'event_registrations', 'event_id'=>$event->ID()), REG_ADMIN_URL);
281
+		$event_label = EE_Registry::instance()->CAP->current_user_can('ee_read_checkins', 'espresso_registrations_registration_checkins') ? '<a href="'.$chkin_lnk_url.'" title="'.esc_attr__('View Checkins for this Event', 'event_espresso').'">'.$event->name().'</a>' : $event->name();
282 282
 		return $event_label;
283 283
 	}
284 284
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
 
288 288
 
289
-	function column_PRC_name(EE_Registration $item){
289
+	function column_PRC_name(EE_Registration $item) {
290 290
 		return $item->ticket() instanceof EE_Ticket ? $item->ticket()->name() : __("Unknown", "event_espresso");
291 291
 	}
292 292
 
@@ -298,8 +298,8 @@  discard block
 block discarded – undo
298 298
 	/**
299 299
 	 * 		column_REG_final_price
300 300
 	*/
301
-	function column__REG_final_price(EE_Registration $item){
302
-		return '<span class="reg-pad-rght">' .  ' ' . $item->pretty_final_price() . '</span>';
301
+	function column__REG_final_price(EE_Registration $item) {
302
+		return '<span class="reg-pad-rght">'.' '.$item->pretty_final_price().'</span>';
303 303
 	}
304 304
 
305 305
 
@@ -309,20 +309,20 @@  discard block
 block discarded – undo
309 309
 	/**
310 310
 	 * 		column_TXN_paid
311 311
 	*/
312
-	function column_TXN_paid(EE_Registration $item){
312
+	function column_TXN_paid(EE_Registration $item) {
313 313
 
314
-		if ( $item->count() == 1 ) {
314
+		if ($item->count() == 1) {
315 315
 
316
-			if ( $item->transaction()->paid() >= $item->transaction()->total() ) {
316
+			if ($item->transaction()->paid() >= $item->transaction()->total()) {
317 317
 				return '<span class="reg-pad-rght"><div class="dashicons dashicons-yes green-icon"></div></span>';
318 318
 			} else {
319
-				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID() ), TXN_ADMIN_URL );
320
-				return EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ?  '
319
+				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID()), TXN_ADMIN_URL);
320
+				return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '
321 321
 				<span class="reg-pad-rght">
322
-					<a class="status-'. $item->transaction()->status_ID() .'" href="'.$view_txn_lnk_url.'"  title="' . esc_attr__( 'View Transaction', 'event_espresso' ) . '">
323
-						' . $item->transaction()->pretty_paid(). '
322
+					<a class="status-'. $item->transaction()->status_ID().'" href="'.$view_txn_lnk_url.'"  title="'.esc_attr__('View Transaction', 'event_espresso').'">
323
+						' . $item->transaction()->pretty_paid().'
324 324
 					</a>
325
-				<span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_paid() . '</span>';
325
+				<span>' : '<span class="reg-pad-rght">'.$item->transaction()->pretty_paid().'</span>';
326 326
 			}
327 327
 		} else {
328 328
 			return '<span class="reg-pad-rght"></span>';
@@ -336,13 +336,13 @@  discard block
 block discarded – undo
336 336
 	/**
337 337
 	 * 		column_TXN_total
338 338
 	*/
339
-	function column_TXN_total(EE_Registration $item){
339
+	function column_TXN_total(EE_Registration $item) {
340 340
 		$txn = $item->transaction();
341
-		$view_txn_url = add_query_arg( array('action' => 'view_transaction', 'TXN_ID' => $txn->ID() ), TXN_ADMIN_URL );
342
-		if ( $item->get('REG_count') == 1 ) {
341
+		$view_txn_url = add_query_arg(array('action' => 'view_transaction', 'TXN_ID' => $txn->ID()), TXN_ADMIN_URL);
342
+		if ($item->get('REG_count') == 1) {
343 343
 			$line_total_obj = $txn->total_line_item();
344 344
 			$txn_total = $line_total_obj instanceof EE_Line_Item ? $line_total_obj->get_pretty('LIN_total') : __('View Transaction', 'event_espresso');
345
-			return EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ?  '<a href="' . $view_txn_url . '" title="' . esc_attr__('View Transaction', 'event_espresso') . '"><span class="reg-pad-rght">'. $txn_total  .'</span></a>' : '<span class="reg-pad-rght">' . $txn_total . '</span>';
345
+			return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a href="'.$view_txn_url.'" title="'.esc_attr__('View Transaction', 'event_espresso').'"><span class="reg-pad-rght">'.$txn_total.'</span></a>' : '<span class="reg-pad-rght">'.$txn_total.'</span>';
346 346
 		} else {
347 347
 			return '<span class="reg-pad-rght"></span>';
348 348
 		}
Please login to merge, or discard this patch.
event_single_caff/templates/admin-event-single-settings.template.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-add_filter( 'FHEE__EEH_Form_Fields__label_html', '__return_empty_string' );
2
+add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
3 3
 $values = EEH_Form_Fields::prep_answer_options(
4 4
 	array(
5
-		array( 'id' => 1, 'text' => __( 'Yes', 'event_espresso' ) ),
6
-		array( 'id' => 0, 'text' => __( 'No', 'event_espresso' ) )
5
+		array('id' => 1, 'text' => __('Yes', 'event_espresso')),
6
+		array('id' => 0, 'text' => __('No', 'event_espresso'))
7 7
 	)
8 8
 );
9 9
 ?>
@@ -22,27 +22,27 @@  discard block
 block discarded – undo
22 22
 					</label>
23 23
 				</th>
24 24
 				<td>
25
-					<?php echo EEH_Form_Fields::select( 'display_status_banner_single', $display_status_banner_single, $values, 'display_status_banner_single', 'display_status_banner_single' ); ?>
26
-					<p class="description"><?php _e( 'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso' ); ?></p>
25
+					<?php echo EEH_Form_Fields::select('display_status_banner_single', $display_status_banner_single, $values, 'display_status_banner_single', 'display_status_banner_single'); ?>
26
+					<p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso'); ?></p>
27 27
 				</td>
28 28
 			</tr>
29 29
 
30 30
 			<tr>
31 31
 				<th>
32 32
 					<label for="display_venue">
33
-						<?php _e( 'Display Venue Details', 'event_espresso' ); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');?>
33
+						<?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?>
34 34
 					</label>
35 35
 				</th>
36 36
 				<td>
37
-					<?php echo EEH_Form_Fields::select( 'display_venue', $display_venue, $values, 'display_venue', 'display_venue' ); ?>
38
-					<p class="description"><?php _e( 'Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso' ); ?></p>
37
+					<?php echo EEH_Form_Fields::select('display_venue', $display_venue, $values, 'display_venue', 'display_venue'); ?>
38
+					<p class="description"><?php _e('Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso'); ?></p>
39 39
 				</td>
40 40
 			</tr>
41 41
 
42 42
 			<tr>
43 43
 				<th>
44 44
 					<label for="EED_Events_Single_use_sortable_display_order">
45
-						<?php _e( 'Use Custom Display Order?', 'event_espresso' ); ?>
45
+						<?php _e('Use Custom Display Order?', 'event_espresso'); ?>
46 46
 					</label>
47 47
 				</th>
48 48
 				<td>
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 					<p class="description ">
59 59
 						<?php
60 60
 						echo sprintf(
61
-							__( '%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Single page display, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso' ),
61
+							__('%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Single page display, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso'),
62 62
 							'<span class="important-notice">',
63 63
 							'</span>',
64 64
 							'<br />'
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 
71 71
 			<tr>
72 72
 				<th>
73
-					<?php _e('Display Order', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');?>
73
+					<?php _e('Display Order', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?>
74 74
 				</th>
75 75
 				<td>
76 76
 
77
-					<?php wp_nonce_field( 'espresso_update_event_single_order', 'espresso_update_event_single_order_nonce', false ); ?>
77
+					<?php wp_nonce_field('espresso_update_event_single_order', 'espresso_update_event_single_order_nonce', false); ?>
78 78
 					<?php echo $event_single_display_order; ?>
79 79
 
80 80
 					<p class="description"><?php _e('Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the single event page.', 'event_espresso'); ?></p>
Please login to merge, or discard this patch.
events_archive_caff/templates/admin-event-list-settings.template.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2
-add_filter( 'FHEE__EEH_Form_Fields__label_html', '__return_empty_string' );
2
+add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
3 3
 
4
-$values = EEH_Form_Fields::prep_answer_options( array(
5
-	array( 'id' => 1, 'text' => __('Yes', 'event_espresso')),
6
-	array( 'id' => 0, 'text' => __('No', 'event_espresso'))
4
+$values = EEH_Form_Fields::prep_answer_options(array(
5
+	array('id' => 1, 'text' => __('Yes', 'event_espresso')),
6
+	array('id' => 0, 'text' => __('No', 'event_espresso'))
7 7
 ));
8 8
 
9
-$description = EEH_Form_Fields::prep_answer_options( array(
10
-	array( 'id' => 0, 'text' => __('none', 'event_espresso')),
11
-	array( 'id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
12
-	array( 'id' => 2, 'text' => __('full description', 'event_espresso'))
9
+$description = EEH_Form_Fields::prep_answer_options(array(
10
+	array('id' => 0, 'text' => __('none', 'event_espresso')),
11
+	array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
12
+	array('id' => 2, 'text' => __('full description', 'event_espresso'))
13 13
 ));
14 14
 
15 15
 ?>
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 			<tr>
28 28
 				<th>
29 29
 					<label for="event_listings_url">
30
-						<?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info');?>
30
+						<?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info'); ?>
31 31
 					</label>
32 32
 				</th>
33 33
 				<td>
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 					</label>
43 43
 				</th>
44 44
 				<td>
45
-					<p><?php echo site_url() . '/ ' . EEH_Form_Fields::text( 'not_used', EE_Registry::instance()->CFG->core->event_cpt_slug, 'event_cpt_slug', 'event_cpt_slug', 'regular' ); ?></p>
45
+					<p><?php echo site_url().'/ '.EEH_Form_Fields::text('not_used', EE_Registry::instance()->CFG->core->event_cpt_slug, 'event_cpt_slug', 'event_cpt_slug', 'regular'); ?></p>
46 46
 					<p class="description"><?php _e('This allows you to configure what slug is used for the url of all event pages.', 'event_espresso'); ?></p>
47
-					<?php if ( has_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite' ) ) : ?>
47
+					<?php if (has_filter('FHEE__EE_Register_CPTs__register_CPT__rewrite')) : ?>
48 48
 						<p class="important-notice">
49 49
 							<?php
50 50
 							sprintf(
51
-								__( 'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.', 'event_espresso' ),
51
+								__('Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.', 'event_espresso'),
52 52
 								'<code>',
53 53
 								'</code>'
54 54
 							);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 					</label>
66 66
 				</th>
67 67
 				<td>
68
-				<?php echo EEH_Form_Fields::select( 'display_status_banner', $display_status_banner, $values, 'EED_Events_Archive_display_status_banner', 'EED_Events_Archive_display_status_banner' );?>
68
+				<?php echo EEH_Form_Fields::select('display_status_banner', $display_status_banner, $values, 'EED_Events_Archive_display_status_banner', 'EED_Events_Archive_display_status_banner'); ?>
69 69
 					<p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.', 'event_espresso'); ?></p>
70 70
 				</td>
71 71
 			</tr>
@@ -73,55 +73,55 @@  discard block
 block discarded – undo
73 73
 			<tr>
74 74
 				<th>
75 75
 					<label for="EED_Events_Archive_display_description">
76
-						<?php _e('Display Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_description_info');?>
76
+						<?php _e('Display Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_description_info'); ?>
77 77
 					</label>
78 78
 				</th>
79 79
 				<td>
80
-					<?php echo EEH_Form_Fields::select( 'description', $display_description, $description, 'EED_Events_Archive_display_description', 'EED_Events_Archive_display_description' );?>
80
+					<?php echo EEH_Form_Fields::select('description', $display_description, $description, 'EED_Events_Archive_display_description', 'EED_Events_Archive_display_description'); ?>
81 81
 				</td>
82 82
 			</tr>
83 83
 
84 84
 			<tr>
85 85
 				<th>
86 86
 					<label for="EED_Events_Archive_display_ticket_selector">
87
-						<?php _e('Display Ticket Selector', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_ticket_selector_info');?>
87
+						<?php _e('Display Ticket Selector', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_ticket_selector_info'); ?>
88 88
 					</label>
89 89
 				</th>
90 90
 				<td>
91
-					<?php echo EEH_Form_Fields::select( 'ticket_selector', $display_ticket_selector, $values, 'EED_Events_Archive_display_ticket_selector', 'EED_Events_Archive_display_ticket_selector' );?>
91
+					<?php echo EEH_Form_Fields::select('ticket_selector', $display_ticket_selector, $values, 'EED_Events_Archive_display_ticket_selector', 'EED_Events_Archive_display_ticket_selector'); ?>
92 92
 				</td>
93 93
 			</tr>
94 94
 
95 95
 			<tr>
96 96
 				<th>
97 97
 					<label for="EED_Events_Archive_display_datetimes">
98
-						<?php _e('Display Datetimes', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_datetimes_info');?>
98
+						<?php _e('Display Datetimes', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_datetimes_info'); ?>
99 99
 					</label>
100 100
 				</th>
101 101
 				<td>
102
-					<?php echo EEH_Form_Fields::select( 'venue_details', $display_datetimes, $values, 'EED_Events_Archive_display_datetimes', 'EED_Events_Archive_display_datetimes' );?>
102
+					<?php echo EEH_Form_Fields::select('venue_details', $display_datetimes, $values, 'EED_Events_Archive_display_datetimes', 'EED_Events_Archive_display_datetimes'); ?>
103 103
 				</td>
104 104
 			</tr>
105 105
 
106 106
 			<tr>
107 107
 				<th>
108 108
 					<label for="EED_Events_Archive_display_venue">
109
-						<?php _e('Display Venue Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_venue_details_info');?>
109
+						<?php _e('Display Venue Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_venue_details_info'); ?>
110 110
 					</label>
111 111
 				</th>
112 112
 				<td>
113
-					<?php echo EEH_Form_Fields::select( 'display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue' );?>
113
+					<?php echo EEH_Form_Fields::select('display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue'); ?>
114 114
 				</td>
115 115
 			</tr>
116 116
 
117 117
 			<tr>
118 118
 				<th>
119 119
 					<label for="EED_Events_Archive_display_expired_events">
120
-						<?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info');?>
120
+						<?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info'); ?>
121 121
 					</label>
122 122
 				</th>
123 123
 				<td>
124
-					<?php echo EEH_Form_Fields::select( 'expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events' );?>
124
+					<?php echo EEH_Form_Fields::select('expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events'); ?>
125 125
 				</td>
126 126
 			</tr>
127 127
 
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
 					</label>
133 133
 				</th>
134 134
 				<td>
135
-					<?php echo EEH_Form_Fields::select( 'use_sortable_display_order', $use_sortable_display_order, $values, 'EED_Events_Archive_use_sortable_display_order', 'EED_Events_Archive_use_sortable_display_order' );?>
135
+					<?php echo EEH_Form_Fields::select('use_sortable_display_order', $use_sortable_display_order, $values, 'EED_Events_Archive_use_sortable_display_order', 'EED_Events_Archive_use_sortable_display_order'); ?>
136 136
 					<p class="description ">
137 137
 						<?php
138 138
 						echo sprintf(
139
-							__( '%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Archive listings, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso' ),
139
+							__('%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Archive listings, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso'),
140 140
 							'<span class="important-notice">',
141 141
 							'</span>',
142 142
 							'<br />'
@@ -148,14 +148,14 @@  discard block
 block discarded – undo
148 148
 
149 149
 			<tr>
150 150
 				<th>
151
-					<?php _e( 'Display Order', 'event_espresso' ); ?><?php //echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
151
+					<?php _e('Display Order', 'event_espresso'); ?><?php //echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
152 152
 				</th>
153 153
 				<td>
154 154
 
155
-					<?php wp_nonce_field( 'espresso_update_event_archive_order', 'espresso_update_event_archive_order_nonce', false ); ?>
155
+					<?php wp_nonce_field('espresso_update_event_archive_order', 'espresso_update_event_archive_order_nonce', false); ?>
156 156
 					<?php echo $event_archive_display_order; ?>
157 157
 
158
-					<p class="description"><?php _e( 'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.', 'event_espresso' ); ?></p>
158
+					<p class="description"><?php _e('Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.', 'event_espresso'); ?></p>
159 159
 
160 160
 				</td>
161 161
 			</tr>
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 			<tr>
164 164
 				<th>
165 165
 					<label for="EED_Events_Archive_reset_event_list_settings">
166
-						<?php _e( 'Reset Event List Settings', 'event_espresso' ); ?>
166
+						<?php _e('Reset Event List Settings', 'event_espresso'); ?>
167 167
 					</label>
168 168
 				</th>
169 169
 				<td>
170
-					<?php echo EEH_Form_Fields::select( 'reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings' ); ?>
170
+					<?php echo EEH_Form_Fields::select('reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings'); ?>
171 171
 				</td>
172 172
 			</tr>
173 173
 
Please login to merge, or discard this patch.
espresso_event_attendees/EES_Espresso_Event_Attendees.shortcode.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	 * @param       WP $WP
20 20
 	 * @return    void
21 21
 	 */
22
-	public function run( WP $WP ) {}
22
+	public function run(WP $WP) {}
23 23
 
24 24
 
25 25
 	/**
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 	 *  @param 	    array 	$attributes
70 70
 	 *  @return 	string
71 71
 	 */
72
-	public function process_shortcode( $attributes = array() ) {
72
+	public function process_shortcode($attributes = array()) {
73 73
 
74 74
 		// merge in any attributes passed via fallback shortcode processor
75
-		$attributes = array_merge( (array) $attributes, (array) $this->_attributes );
75
+		$attributes = array_merge((array) $attributes, (array) $this->_attributes);
76 76
 
77 77
 		//set default attributes
78 78
 		$default_shortcode_attributes = array(
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
 		);
85 85
 
86 86
 		// allow the defaults to be filtered
87
-		$default_shortcode_attributes = apply_filters( 'EES_Espresso_Event_Attendees__process_shortcode__default_shortcode_atts', $default_shortcode_attributes );
87
+		$default_shortcode_attributes = apply_filters('EES_Espresso_Event_Attendees__process_shortcode__default_shortcode_atts', $default_shortcode_attributes);
88 88
 		// grab attributes and merge with defaults, then extract
89
-		$attributes = array_merge( $default_shortcode_attributes, $attributes );
89
+		$attributes = array_merge($default_shortcode_attributes, $attributes);
90 90
 
91 91
 		$template_args = array(
92 92
 			'contacts'      => array(),
@@ -102,31 +102,31 @@  discard block
 block discarded – undo
102 102
 		$error = false;
103 103
 
104 104
 		//what event?
105
-		if ( empty( $attributes['event_id'] ) && empty( $attributes['datetime_id'] ) && empty( $attributes['ticket_id'] ) ) {
105
+		if (empty($attributes['event_id']) && empty($attributes['datetime_id']) && empty($attributes['ticket_id'])) {
106 106
 			//seems like is_espresso_event_single() isn't working as expected. So using alternate method.
107
-			if ( is_single() && is_espresso_event() ) {
107
+			if (is_single() && is_espresso_event()) {
108 108
 				$event = EEH_Event_View::get_event();
109
-				if ( $event instanceof EE_Event ) {
109
+				if ($event instanceof EE_Event) {
110 110
 					$template_args['event']          = $event;
111 111
 					$query[0]['Registration.EVT_ID'] = $event->ID();
112 112
 				}
113 113
 			} else {
114 114
 				//try getting the earliest active event if none then get the
115
-				$events = EEM_Event::instance()->get_active_events( array( 'limit'    => 1,
116
-				                                                          'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )
117
-				) );
118
-				$events = empty( $events ) ? EEM_Event::instance()->get_upcoming_events( array( 'limit'    => 1,
119
-				                                                                              'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )
120
-				) ) : $events;
121
-				$event = reset( $events );
122
-				if ( $event instanceof EE_Event ) {
115
+				$events = EEM_Event::instance()->get_active_events(array('limit'    => 1,
116
+				                                                          'order_by' => array('Datetime.DTT_EVT_start' => 'ASC')
117
+				));
118
+				$events = empty($events) ? EEM_Event::instance()->get_upcoming_events(array('limit'    => 1,
119
+				                                                                              'order_by' => array('Datetime.DTT_EVT_start' => 'ASC')
120
+				)) : $events;
121
+				$event = reset($events);
122
+				if ($event instanceof EE_Event) {
123 123
 					$query[0]['Registration.EVT_ID'] = $event->ID();
124 124
 					$template_args['event']          = $event;
125 125
 				}
126 126
 			}
127
-		} elseif ( ! empty( $attributes['event_id'] ) ) {
128
-			$event = EEM_Event::instance()->get_one_by_ID( $attributes['event_id'] );
129
-			if ( $event instanceof EE_Event ) {
127
+		} elseif ( ! empty($attributes['event_id'])) {
128
+			$event = EEM_Event::instance()->get_one_by_ID($attributes['event_id']);
129
+			if ($event instanceof EE_Event) {
130 130
 				$query[0]['Registration.EVT_ID'] = $attributes['event_id'];
131 131
 				$template_args['event']          = $event;
132 132
 			} else {
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
 		}
136 136
 
137 137
 		//datetime?
138
-		if ( ! empty( $attributes['datetime_id'] ) && empty( $attributes['event_id'] ) ) {
139
-			$datetime = EEM_Datetime::instance()->get_one_by_ID( $attributes['datetime_id'] );
140
-			if ( $datetime instanceof EE_Datetime ) {
138
+		if ( ! empty($attributes['datetime_id']) && empty($attributes['event_id'])) {
139
+			$datetime = EEM_Datetime::instance()->get_one_by_ID($attributes['datetime_id']);
140
+			if ($datetime instanceof EE_Datetime) {
141 141
 				$query[0]['Registration.Ticket.Datetime.DTT_ID'] = $attributes['datetime_id'];
142 142
 				$query['default_where_conditions'] = 'this_model_only';
143 143
 				$template_args['datetime']                      = $datetime;
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
 		}
149 149
 
150 150
 		//ticket?just
151
-		if ( ! empty( $attributes['ticket_id'] ) && empty( $attributes['event_id'] ) && empty( $attributes['datetime_id'] ) ) {
152
-			$ticket = EEM_Ticket::instance()->get_one_by_ID( $attributes['ticket_id'] );
153
-			if ( $ticket instanceof EE_Ticket ) {
151
+		if ( ! empty($attributes['ticket_id']) && empty($attributes['event_id']) && empty($attributes['datetime_id'])) {
152
+			$ticket = EEM_Ticket::instance()->get_one_by_ID($attributes['ticket_id']);
153
+			if ($ticket instanceof EE_Ticket) {
154 154
 				$query[0]['Registration.TKT_ID'] = $attributes['ticket_id'];
155 155
 				$template_args['ticket']         = $ticket;
156 156
 				$template_args['event']          = $ticket->first_datetime() instanceof EE_Datetime ? $ticket->first_datetime()->event() : null;
@@ -161,17 +161,17 @@  discard block
 block discarded – undo
161 161
 
162 162
 		//status
163 163
 		$reg_status_array = EEM_Registration::reg_status_array();
164
-		if ( $attributes['status'] != 'all' && isset( $reg_status_array[$attributes['status']] ) ) {
164
+		if ($attributes['status'] != 'all' && isset($reg_status_array[$attributes['status']])) {
165 165
 			$query[0]['Registration.STS_ID'] = $attributes['status'];
166 166
 		}
167
-		$query['group_by'] = array( 'ATT_ID' );
168
-		$query['order_by'] = apply_filters( 'FHEE__EES_Espresso_Event_Attendees__process_shortcode__order_by', array( 'ATT_lname' => 'ASC', 'ATT_fname' => 'ASC' ) );
167
+		$query['group_by'] = array('ATT_ID');
168
+		$query['order_by'] = apply_filters('FHEE__EES_Espresso_Event_Attendees__process_shortcode__order_by', array('ATT_lname' => 'ASC', 'ATT_fname' => 'ASC'));
169 169
 
170 170
 		//if we have NO query where conditions, then there was an invalid parameter or the shortcode was used incorrectly
171 171
 		//so when WP_DEBUG is set and true, we'll show a message, otherwise we'll just return an empty string.
172
-		if ( ( ! isset( $query[0] ) || ! is_array( $query[0] ) ) || $error ) {
173
-			if ( WP_DEBUG ) {
174
-				return '<div class="important-notice ee-attention">' . __( 'The [ESPRESSO_EVENT_ATTENDEES] shortcode has been used incorrectly.  Please double check the arguments you used for any typos.  In the case of ID type arguments, its possible the given ID does not correspond to existing data in the database.', 'event_espresso' ) . '</div>';
172
+		if (( ! isset($query[0]) || ! is_array($query[0])) || $error) {
173
+			if (WP_DEBUG) {
174
+				return '<div class="important-notice ee-attention">'.__('The [ESPRESSO_EVENT_ATTENDEES] shortcode has been used incorrectly.  Please double check the arguments you used for any typos.  In the case of ID type arguments, its possible the given ID does not correspond to existing data in the database.', 'event_espresso').'</div>';
175 175
 			} else {
176 176
 				return '';
177 177
 			}
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
 
180 180
 
181 181
 		//get contacts!
182
-		$template_args['contacts'] = EEM_Attendee::instance()->get_all( $query );
182
+		$template_args['contacts'] = EEM_Attendee::instance()->get_all($query);
183 183
 
184 184
 
185 185
 		//all set let's load up the template and return.
186
-		return EEH_Template::locate_template( 'loop-espresso_event_attendees.php', $template_args, true, true );
186
+		return EEH_Template::locate_template('loop-espresso_event_attendees.php', $template_args, true, true);
187 187
 
188 188
 	}
189 189
 
Please login to merge, or discard this patch.
shortcodes/espresso_events/EES_Espresso_Events.shortcode.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
 	 * @param WP $WP
51 51
 	 * @return    void
52 52
 	 */
53
-	public function run( WP $WP ) {
54
-		if ( did_action( 'pre_get_posts' ) && did_action( 'send_headers' ) ) {
53
+	public function run(WP $WP) {
54
+		if (did_action('pre_get_posts') && did_action('send_headers')) {
55 55
 			EED_Events_Archive::instance()->event_list();
56 56
 		} else {
57 57
 			// this will trigger the EED_Events_Archive module's event_list() method during the pre_get_posts hook point,
58 58
 			// this allows us to initialize things, enqueue assets, etc,
59 59
 			// as well, this saves an instantiation of the module in an array using 'espresso_events' as the key, so that we can retrieve it
60
-			add_action( 'pre_get_posts', array( EED_Events_Archive::instance(), 'event_list' ) );
60
+			add_action('pre_get_posts', array(EED_Events_Archive::instance(), 'event_list'));
61 61
 		}
62 62
 	}
63 63
 
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
 	 *  @param 	array 	$attributes
80 80
 	 *  @return 	string
81 81
 	 */
82
-	public function process_shortcode( $attributes = array() ) {
82
+	public function process_shortcode($attributes = array()) {
83 83
 		// make sure EED_Events_Archive is setup properly
84
-		if ( apply_filters( 'FHEE__fallback_shortcode_processor__EES_Espresso_Events', FALSE )) {
84
+		if (apply_filters('FHEE__fallback_shortcode_processor__EES_Espresso_Events', FALSE)) {
85 85
 			EED_Events_Archive::instance()->event_list();
86 86
 		}
87 87
 		// merge in any attributes passed via fallback shortcode processor
88
-		$attributes = array_merge( (array)$attributes, (array)$this->_attributes );
88
+		$attributes = array_merge((array) $attributes, (array) $this->_attributes);
89 89
 		//set default attributes
90 90
 		$default_espresso_events_shortcode_atts = array(
91 91
 			'title' => NULL,
@@ -99,26 +99,26 @@  discard block
 block discarded – undo
99 99
 			'fallback_shortcode_processor' => FALSE
100 100
 		);
101 101
 		// allow the defaults to be filtered
102
-		$default_espresso_events_shortcode_atts = apply_filters( 'EES_Espresso_Events__process_shortcode__default_espresso_events_shortcode_atts', $default_espresso_events_shortcode_atts );
102
+		$default_espresso_events_shortcode_atts = apply_filters('EES_Espresso_Events__process_shortcode__default_espresso_events_shortcode_atts', $default_espresso_events_shortcode_atts);
103 103
 		// grab attributes and merge with defaults, then extract
104
-		$attributes = array_merge( $default_espresso_events_shortcode_atts, $attributes );
104
+		$attributes = array_merge($default_espresso_events_shortcode_atts, $attributes);
105 105
 		// make sure we use the_excerpt()
106
-		add_filter( 'FHEE__EES_Espresso_Events__process_shortcode__true', '__return_true' );
106
+		add_filter('FHEE__EES_Espresso_Events__process_shortcode__true', '__return_true');
107 107
 		// apply query filters
108
-		add_filter( 'FHEE__EEH_Event_Query__apply_query_filters', '__return_true' );
108
+		add_filter('FHEE__EEH_Event_Query__apply_query_filters', '__return_true');
109 109
 		// run the query
110 110
 		global $wp_query;
111
-		$wp_query = new EE_Event_List_Query( $attributes );
111
+		$wp_query = new EE_Event_List_Query($attributes);
112 112
 		// check what template is loaded and load filters accordingly
113
-		EED_Events_Archive::instance()->template_include( 'loop-espresso_events.php' );
113
+		EED_Events_Archive::instance()->template_include('loop-espresso_events.php');
114 114
 		// load our template
115
-		$event_list = EEH_Template::locate_template( 'loop-espresso_events.php', array(), TRUE, TRUE );
115
+		$event_list = EEH_Template::locate_template('loop-espresso_events.php', array(), TRUE, TRUE);
116 116
 		// now reset the query and postdata
117 117
 		wp_reset_query();
118 118
 		wp_reset_postdata();
119 119
 		EED_Events_Archive::remove_all_events_archive_filters();
120 120
 		// remove query filters
121
-		remove_filter( 'FHEE__EEH_Event_Query__apply_query_filters', '__return_true' );
121
+		remove_filter('FHEE__EEH_Event_Query__apply_query_filters', '__return_true');
122 122
 		// pull our content from the output buffer and return it
123 123
 		return $event_list;
124 124
 	}
@@ -163,44 +163,44 @@  discard block
 block discarded – undo
163 163
 	 * @param array $args
164 164
 	 * @return \EE_Event_List_Query
165 165
 	 */
166
-	function __construct( $args = array() ) {
166
+	function __construct($args = array()) {
167 167
 //		EEH_Debug_Tools::printr( $args, '$args  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
168 168
 		// incoming args could be a mix of WP query args + EE shortcode args
169
-		foreach ( $args as $key =>$value ) {
170
-			$property = '_' . $key;
169
+		foreach ($args as $key =>$value) {
170
+			$property = '_'.$key;
171 171
 			// if the arg is a property of this class, then it's an EE shortcode arg
172
-			if ( property_exists( $this, $property )) {
172
+			if (property_exists($this, $property)) {
173 173
 				// set the property value
174 174
 				$this->{$property} = $value;
175 175
 				// then remove it from the array of args that will later be passed to WP_Query()
176
-				unset( $args[ $key ] );
176
+				unset($args[$key]);
177 177
 			}
178 178
 		}
179 179
 		//add query filters
180 180
 		EEH_Event_Query::add_query_filters();
181 181
 		// set params that will get used by the filters
182
-		EEH_Event_Query::set_query_params( $this->_month, $this->_category_slug, $this->_show_expired, $this->_order_by, $this->_sort );
182
+		EEH_Event_Query::set_query_params($this->_month, $this->_category_slug, $this->_show_expired, $this->_order_by, $this->_sort);
183 183
 		// first off, let's remove any filters from previous queries
184
-		remove_filter( 'FHEE__archive_espresso_events_template__upcoming_events_h1', array( $this, 'event_list_title' ));
185
-		remove_all_filters( 'FHEE__content_espresso_events__event_class' );
184
+		remove_filter('FHEE__archive_espresso_events_template__upcoming_events_h1', array($this, 'event_list_title'));
185
+		remove_all_filters('FHEE__content_espresso_events__event_class');
186 186
 		// Event List Title ?
187
-		add_filter( 'FHEE__archive_espresso_events_template__upcoming_events_h1', array( $this, 'event_list_title' ), 10, 1 );
187
+		add_filter('FHEE__archive_espresso_events_template__upcoming_events_h1', array($this, 'event_list_title'), 10, 1);
188 188
 		// add the css class
189
-		add_filter( 'FHEE__content_espresso_events__event_class', array( $this, 'event_list_css' ), 10, 1 );
189
+		add_filter('FHEE__content_espresso_events__event_class', array($this, 'event_list_css'), 10, 1);
190 190
 		// the current "page" we are viewing
191
-		$paged = max( 1, get_query_var( 'paged' ));
191
+		$paged = max(1, get_query_var('paged'));
192 192
 		// Force these args
193
-		$args = array_merge( $args, array(
193
+		$args = array_merge($args, array(
194 194
 			'post_type' => 'espresso_events',
195 195
 			'posts_per_page' => $this->_limit,
196 196
 			'update_post_term_cache' => FALSE,
197 197
 			'update_post_meta_cache' => FALSE,
198 198
 			'paged' => $paged,
199
-			'offset' => ( $paged - 1 ) * $this->_limit
199
+			'offset' => ($paged - 1) * $this->_limit
200 200
 		));
201 201
 
202 202
 		// run the query
203
-		parent::__construct( $args );
203
+		parent::__construct($args);
204 204
 	}
205 205
 
206 206
 
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
 	 * @param string $event_list_title
214 214
 	 * @return    string
215 215
 	 */
216
-	public function event_list_title( $event_list_title = '' ) {
217
-		if ( ! empty( $this->_title )) {
216
+	public function event_list_title($event_list_title = '') {
217
+		if ( ! empty($this->_title)) {
218 218
 			return $this->_title;
219 219
 		}
220 220
 		return $event_list_title;
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
 	 * @param string $event_list_css
230 230
 	 * @return    array
231 231
 	 */
232
-	public function event_list_css( $event_list_css = '' ) {
233
-		$event_list_css .=  ! empty( $event_list_css ) ? ' ' : '';
234
-		$event_list_css .=  ! empty( $this->_css_class ) ? $this->_css_class : '';
235
-		$event_list_css .=  ! empty( $event_list_css ) ? ' ' : '';
236
-		$event_list_css .=  ! empty( $this->_category_slug ) ? $this->_category_slug : '';
232
+	public function event_list_css($event_list_css = '') {
233
+		$event_list_css .= ! empty($event_list_css) ? ' ' : '';
234
+		$event_list_css .= ! empty($this->_css_class) ? $this->_css_class : '';
235
+		$event_list_css .= ! empty($event_list_css) ? ' ' : '';
236
+		$event_list_css .= ! empty($this->_category_slug) ? $this->_category_slug : '';
237 237
 		return $event_list_css;
238 238
 	}
239 239
 
Please login to merge, or discard this patch.