Completed
Branch FET/asset-manager (433489)
by
unknown
32:42 queued 18:11
created
message_type/newsletter/EE_Messages_Contacts_incoming_data.class.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
 	 * @throws EE_Error
28 28
 	 * @access protected
29 29
 	 */
30
-	public function __construct( $data = array() ) {
30
+	public function __construct($data = array()) {
31 31
 
32 32
 		//validate that the first element in the array is an EE_Attendee object.  Note that the array may be indexed by REG_ID so we will just shift off the first element.
33
-		$ctc_chk = reset( $data );
34
-		if ( ! $ctc_chk instanceof EE_Attendee )
35
-			throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') );
33
+		$ctc_chk = reset($data);
34
+		if ( ! $ctc_chk instanceof EE_Attendee)
35
+			throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso'));
36 36
 
37
-		parent::__construct( $data );
37
+		parent::__construct($data);
38 38
 	}
39 39
 
40 40
 
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 	 * @param array $attendees
44 44
 	 * @return array
45 45
 	 */
46
-	public static function convert_data_for_persistent_storage( $attendees ) {
46
+	public static function convert_data_for_persistent_storage($attendees) {
47 47
 		$attendee_ids = array_filter(
48 48
 			array_map(
49
-				function( $attendee ) {
50
-					if ( $attendee instanceof EE_Attendee ) {
49
+				function($attendee) {
50
+					if ($attendee instanceof EE_Attendee) {
51 51
 						return $attendee->ID();
52 52
 					}
53 53
 					return false;
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
 	 * @param array $attendee_ids
67 67
 	 * @return EE_Attendee[]
68 68
 	 */
69
-	public static function convert_data_from_persistent_storage( $attendee_ids ) {
69
+	public static function convert_data_from_persistent_storage($attendee_ids) {
70 70
 		$attendee_ids = (array) $attendee_ids;
71 71
 		$attendees = EEM_Attendee::instance()->get_all(
72 72
 		  array(
73
-			  array( 'ATT_ID' => array( 'IN', $attendee_ids ) )
73
+			  array('ATT_ID' => array('IN', $attendee_ids))
74 74
 		  )
75 75
 		);
76 76
 		return $attendees;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$this->payment = NULL;
100 100
 		$this->billing = array();
101 101
 		$this->reg_objs = array();
102
-		$this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer =  $this->registrations = array();
102
+		$this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer = $this->registrations = array();
103 103
 		$this->total_ticket_count = 0;
104 104
 		$this->primary_attendee_data = array(
105 105
 			'registration_id' => 0,
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			'primary_reg_obj' => NULL
110 110
 			);
111 111
 
112
-		foreach ( $this->_data as $contact ) {
112
+		foreach ($this->_data as $contact) {
113 113
 			$id = $contact->ID();
114 114
 			$reg = $contact->get_first_related('Registration');
115 115
 			$this->attendees[$id]['att_obj'] = $contact;
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@  discard block
 block discarded – undo
5 5
  * @subpackage helpers
6 6
  * @since           4.3.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * This prepares data for message types that send messages for multiple contacts and handles
@@ -31,8 +33,9 @@  discard block
 block discarded – undo
31 33
 
32 34
 		//validate that the first element in the array is an EE_Attendee object.  Note that the array may be indexed by REG_ID so we will just shift off the first element.
33 35
 		$ctc_chk = reset( $data );
34
-		if ( ! $ctc_chk instanceof EE_Attendee )
35
-			throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') );
36
+		if ( ! $ctc_chk instanceof EE_Attendee ) {
37
+					throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') );
38
+		}
36 39
 
37 40
 		parent::__construct( $data );
38 41
 	}
Please login to merge, or discard this patch.
core/CPTs/EE_CPT_Event_Strategy.core.php 2 patches
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
 	 * @param WP_Query $wp_query
40 40
 	 * @param array $CPT
41 41
 	 */
42
-	public function __construct( $wp_query, $CPT = array() ) {
43
-		if ( $wp_query instanceof WP_Query ) {
42
+	public function __construct($wp_query, $CPT = array()) {
43
+		if ($wp_query instanceof WP_Query) {
44 44
 			$WP_Query = $wp_query;
45 45
 			$this->CPT = $CPT;
46 46
 		} else {
47
-			$WP_Query = isset( $wp_query[ 'WP_Query' ] ) ? $wp_query[ 'WP_Query' ] : null;
48
-			$this->CPT = isset( $wp_query[ 'CPT' ] ) ? $wp_query[ 'CPT' ] : null;
47
+			$WP_Query = isset($wp_query['WP_Query']) ? $wp_query['WP_Query'] : null;
48
+			$this->CPT = isset($wp_query['CPT']) ? $wp_query['CPT'] : null;
49 49
 		}
50 50
 		// !!!!!!!!!!  IMPORTANT !!!!!!!!!!!!
51 51
 		// here's the list of available filters in the WP_Query object
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 		// 'posts_fields'
60 60
 		// 'posts_join'
61 61
 		$this->_add_filters();
62
-		if ( $WP_Query instanceof WP_Query ) {
63
-			$WP_Query->is_espresso_event_single = is_singular() && isset( $WP_Query->query->post_type ) && $WP_Query->query->post_type == 'espresso_events' ? TRUE : FALSE;
62
+		if ($WP_Query instanceof WP_Query) {
63
+			$WP_Query->is_espresso_event_single = is_singular() && isset($WP_Query->query->post_type) && $WP_Query->query->post_type == 'espresso_events' ? TRUE : FALSE;
64 64
 			$WP_Query->is_espresso_event_archive = is_post_type_archive('espresso_events') ? TRUE : FALSE;
65
-			$WP_Query->is_espresso_event_taxonomy = is_tax( 'espresso_event_categories' ) ? TRUE : FALSE;
65
+			$WP_Query->is_espresso_event_taxonomy = is_tax('espresso_event_categories') ? TRUE : FALSE;
66 66
 		}
67 67
 
68 68
 	}
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
 	 * (which will get removed in case the next call to get_posts ISN'T
75 75
 	 * for event CPTs)
76 76
 	 */
77
-	protected function _add_filters(){
78
-		add_filter( 'posts_fields', array( $this, 'posts_fields' ), 1, 2 );
79
-		add_filter( 'posts_join', array( $this, 'posts_join' ), 1, 2 );
80
-		add_filter( 'posts_where', array( $this, 'posts_where' ), 10, 2 );
77
+	protected function _add_filters() {
78
+		add_filter('posts_fields', array($this, 'posts_fields'), 1, 2);
79
+		add_filter('posts_join', array($this, 'posts_join'), 1, 2);
80
+		add_filter('posts_where', array($this, 'posts_where'), 10, 2);
81 81
 		// add_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 );
82
-		add_filter( 'posts_orderby', array( $this, 'posts_orderby' ), 1, 2 );
83
-		add_filter( 'posts_groupby', array( $this, 'posts_groupby' ), 1, 2 );
82
+		add_filter('posts_orderby', array($this, 'posts_orderby'), 1, 2);
83
+		add_filter('posts_groupby', array($this, 'posts_groupby'), 1, 2);
84 84
 	}
85 85
 
86 86
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 	 * This is to avoid applying this CPT strategy for other posts or CPTs (eg,
91 91
 	 * we don't want to join to the datetime table when querying for venues, do we!?)
92 92
 	 */
93
-	protected function _remove_filters(){
94
-		remove_filter( 'posts_fields', array( $this, 'posts_fields' ), 1 );
95
-		remove_filter( 'posts_join', array( $this, 'posts_join' ), 1 );
96
-		remove_filter( 'posts_where', array( $this, 'posts_where' ), 10 );
93
+	protected function _remove_filters() {
94
+		remove_filter('posts_fields', array($this, 'posts_fields'), 1);
95
+		remove_filter('posts_join', array($this, 'posts_join'), 1);
96
+		remove_filter('posts_where', array($this, 'posts_where'), 10);
97 97
 		// remove_filter( 'the_posts', array( $this, 'the_posts' ), 1 );
98
-		remove_filter( 'posts_orderby', array( $this, 'posts_orderby' ), 1 );
99
-		remove_filter( 'posts_groupby', array( $this, 'posts_groupby' ), 1 );
98
+		remove_filter('posts_orderby', array($this, 'posts_orderby'), 1);
99
+		remove_filter('posts_groupby', array($this, 'posts_groupby'), 1);
100 100
 	}
101 101
 
102 102
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 * @param WP_Query $wp_query
110 110
 	 * @return    string
111 111
 	 */
112
-	public function posts_fields( $SQL, WP_Query $wp_query ) {
112
+	public function posts_fields($SQL, WP_Query $wp_query) {
113 113
 		if (
114 114
 			$wp_query instanceof WP_Query
115 115
 			&&
@@ -120,11 +120,11 @@  discard block
 block discarded – undo
120 120
 			)
121 121
 		) {
122 122
 			// adds something like ", wp_esp_datetime.* " to WP Query SELECT statement
123
-			$SQL .= ', ' . EEM_Datetime::instance()->table() . '.* ' ;
124
-			if ( $wp_query->is_espresso_event_archive || $wp_query->is_espresso_event_taxonomy ) {
123
+			$SQL .= ', '.EEM_Datetime::instance()->table().'.* ';
124
+			if ($wp_query->is_espresso_event_archive || $wp_query->is_espresso_event_taxonomy) {
125 125
 				// because we only want to retrieve the next upcoming datetime for each event:
126 126
 				// add something like ", MIN( wp_esp_datetime.DTT_EVT_start ) as event_start_date " to WP Query SELECT statement
127
-				$SQL .= ', MIN( ' . EEM_Datetime::instance()->table() . '.DTT_EVT_start ) as event_start_date ' ;
127
+				$SQL .= ', MIN( '.EEM_Datetime::instance()->table().'.DTT_EVT_start ) as event_start_date ';
128 128
 			}
129 129
 		}
130 130
 		return $SQL;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 * @internal  param \WP_Query $WP_Query
142 142
 	 * @return    string
143 143
 	 */
144
-	public function posts_join( $SQL, WP_Query $wp_query ) {
144
+	public function posts_join($SQL, WP_Query $wp_query) {
145 145
 		if (
146 146
 			$wp_query instanceof WP_Query
147 147
 			&&
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			)
153 153
 		) {
154 154
 			// adds something like " LEFT JOIN wp_esp_datetime ON ( wp_esp_datetime.EVT_ID = wp_posts.ID ) " to WP Query JOIN statement
155
-			$SQL .= ' INNER JOIN ' . EEM_Datetime::instance()->table() . ' ON ( ' . EEM_Event::instance()->table() . '.ID = ' . EEM_Datetime::instance()->table() . '.' . EEM_Event::instance()->primary_key_name() . ' ) ';
155
+			$SQL .= ' INNER JOIN '.EEM_Datetime::instance()->table().' ON ( '.EEM_Event::instance()->table().'.ID = '.EEM_Datetime::instance()->table().'.'.EEM_Event::instance()->primary_key_name().' ) ';
156 156
 		}
157 157
 		return $SQL;
158 158
 	}
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 * @param WP_Query $wp_query
168 168
 	 * @return    string
169 169
 	 */
170
-	public function posts_where( $SQL, WP_Query $wp_query ) {
170
+	public function posts_where($SQL, WP_Query $wp_query) {
171 171
 //		global $wpdb;
172 172
 		if (
173 173
 			$wp_query instanceof WP_Query
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
 				|| $wp_query->is_espresso_event_taxonomy
178 178
 			)
179 179
 		) {
180
-			if ( ! isset( EE_Registry::instance()->CFG->template_settings->EED_Events_Archive ) || ! isset( EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->display_expired_events ) || ! EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->display_expired_events ) {
181
-				$SQL .=  ' AND ' . EEM_Datetime::instance()->table() . ".DTT_EVT_end > '" . current_time( 'mysql', true ) . "' ";
180
+			if ( ! isset(EE_Registry::instance()->CFG->template_settings->EED_Events_Archive) || ! isset(EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->display_expired_events) || ! EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->display_expired_events) {
181
+				$SQL .= ' AND '.EEM_Datetime::instance()->table().".DTT_EVT_end > '".current_time('mysql', true)."' ";
182 182
 			}
183 183
 		}
184 184
 		return $SQL;
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	 * @param 	WP_Query $wp_query
195 195
 	 * @return 	string
196 196
 	 */
197
-	public function posts_orderby( $SQL, WP_Query $wp_query ) {
197
+	public function posts_orderby($SQL, WP_Query $wp_query) {
198 198
 		if (
199 199
 			$wp_query instanceof WP_Query
200 200
 			&&
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 * @param WP_Query $wp_query
219 219
 	 * @return    string
220 220
 	 */
221
-	public function posts_groupby( $SQL, WP_Query $wp_query ) {
221
+	public function posts_groupby($SQL, WP_Query $wp_query) {
222 222
 		if (
223 223
 			$wp_query instanceof WP_Query
224 224
 			&&
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 			// we're joining to the datetimes table, where there can be MANY datetimes for a single event, but we want to only show each event only once
232 232
 			// (whereas if we didn't group them by the post's ID, then we would end up with many repeats)
233 233
 			global $wpdb;
234
-			$SQL = $wpdb->posts . '.ID ';
234
+			$SQL = $wpdb->posts.'.ID ';
235 235
 		}
236 236
 		return $SQL;
237 237
 	}
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	 * @param WP_Query $wp_query
247 247
 	 * @return    array
248 248
 	 */
249
-	public function the_posts( $posts, WP_Query $wp_query ) {
249
+	public function the_posts($posts, WP_Query $wp_query) {
250 250
 		return $posts;
251 251
 	}
252 252
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param      $single
263 263
 	 * @return    string
264 264
 	 */
265
-	public function get_EE_post_type_metadata( $meta_value = NULL, $post_id, $meta_key, $single ) {
265
+	public function get_EE_post_type_metadata($meta_value = NULL, $post_id, $meta_key, $single) {
266 266
 		return $meta_value;
267 267
 	}
268 268
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
modules/invalid_checkout_access/EED_Invalid_Checkout_Access.module.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 use EventEspresso\modules\invalid_checkout_access\InvalidCheckoutAccess;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
 	public static function set_hooks_admin() {
37 37
 		add_action(
38 38
 			'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template',
39
-			array( 'EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form' ),
39
+			array('EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form'),
40 40
 			15
41 41
 		);
42 42
 		add_filter(
43 43
 			'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration',
44
-			array( 'EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form' )
44
+			array('EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form')
45 45
 		);
46 46
 	}
47 47
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 *
54 54
 	 * @var WP $WP
55 55
 	 */
56
-	public function run( $WP ) {
56
+	public function run($WP) {
57 57
 		// TODO: Implement run() method.
58 58
 	}
59 59
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @return InvalidCheckoutAccess
64 64
 	 */
65 65
 	public static function getInvalidCheckoutAccess() {
66
-		if ( ! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess ) {
66
+		if ( ! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) {
67 67
 			self::$invalid_checkout_access_form = new InvalidCheckoutAccess();
68 68
 		}
69 69
 		return self::$invalid_checkout_access_form;
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	 * @param \EE_Registration_Config $EE_Registration_Config
91 91
 	 * @return \EE_Registration_Config
92 92
 	 */
93
-	public static function process_invalid_checkout_access_form( \EE_Registration_Config $EE_Registration_Config ) {
93
+	public static function process_invalid_checkout_access_form(\EE_Registration_Config $EE_Registration_Config) {
94 94
 		$invalid_checkout_access_form = \EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
95
-		return $invalid_checkout_access_form->processForm( $EE_Registration_Config );
95
+		return $invalid_checkout_access_form->processForm($EE_Registration_Config);
96 96
 	}
97 97
 
98 98
 
Please login to merge, or discard this patch.
support/templates/support_admin_details_additional_information.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <div class="padding">
2
-	<p><?php printf( esc_html__( 'Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso' ), '<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank">','</a>' ); ?></p>
2
+	<p><?php printf(esc_html__('Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso'), '<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank">', '</a>'); ?></p>
3 3
 </div>
4 4
\ No newline at end of file
Please login to merge, or discard this patch.
admin/extend/support/templates/support_admin_details_faq.template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <div class="padding">
2
-	<h3><?php esc_html_e( 'Frequently Asked Questions about Event Espresso', 'event_espresso' ); ?></h3>
2
+	<h3><?php esc_html_e('Frequently Asked Questions about Event Espresso', 'event_espresso'); ?></h3>
3 3
 	
4
-	<h4><?php esc_html_e( 'New to Event Espresso?', 'event_espresso' ); ?></h4>
4
+	<h4><?php esc_html_e('New to Event Espresso?', 'event_espresso'); ?></h4>
5 5
 
6
-	<p><?php printf( esc_html__( 'Check out the %1$squick start guide for Event Espresso 4%2$s. It has recommendations, tips, and tutorials so you can get your project started %3$squicker%4$s.', 'event_espresso' ), '<a href="https://eventespresso.com/wiki/welcome-to-event-espresso/#event-espresso-4" target="_blank">','</a>','<em>','</em>' ); ?></p>
6
+	<p><?php printf(esc_html__('Check out the %1$squick start guide for Event Espresso 4%2$s. It has recommendations, tips, and tutorials so you can get your project started %3$squicker%4$s.', 'event_espresso'), '<a href="https://eventespresso.com/wiki/welcome-to-event-espresso/#event-espresso-4" target="_blank">', '</a>', '<em>', '</em>'); ?></p>
7 7
 </div>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/content-espresso_events-details.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,33 +3,33 @@
 block discarded – undo
3 3
 global $post;
4 4
 ?>
5 5
 <div class="event-content">
6
-<?php if ( apply_filters( 'FHEE__content_espresso_events_details_template__display_entry_meta', TRUE )): ?>
6
+<?php if (apply_filters('FHEE__content_espresso_events_details_template__display_entry_meta', TRUE)): ?>
7 7
 	<div class="entry-meta">
8
-		<span class="tags-links"><?php espresso_event_categories( $post->ID, TRUE, TRUE ); ?></span>
8
+		<span class="tags-links"><?php espresso_event_categories($post->ID, TRUE, TRUE); ?></span>
9 9
 	<?php
10
-		if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
10
+		if ( ! post_password_required() && (comments_open() || get_comments_number())) :
11 11
 	?>
12
-	<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'event_espresso' ), __( '1 Comment', 'event_espresso' ), __( '% Comments', 'event_espresso' ) ); ?></span>
12
+	<span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'event_espresso'), __('1 Comment', 'event_espresso'), __('% Comments', 'event_espresso')); ?></span>
13 13
 	<?php
14 14
 		endif;
15
-		edit_post_link( __( 'Edit', 'event_espresso' ), '<span class="edit-link">', '</span>' );
15
+		edit_post_link(__('Edit', 'event_espresso'), '<span class="edit-link">', '</span>');
16 16
 	?>
17 17
 	</div>
18 18
 <?php endif;
19
-	$event_phone = espresso_event_phone( $post->ID, FALSE );
20
-	if ( $event_phone != '' ) : ?>
19
+	$event_phone = espresso_event_phone($post->ID, FALSE);
20
+	if ($event_phone != '') : ?>
21 21
 	<p>
22
-		<span class="small-text"><strong><?php _e( 'Event Phone:', 'event_espresso' ); ?> </strong></span> <?php echo $event_phone; ?>
22
+		<span class="small-text"><strong><?php _e('Event Phone:', 'event_espresso'); ?> </strong></span> <?php echo $event_phone; ?>
23 23
 	</p>
24
-<?php endif;  ?>
24
+<?php endif; ?>
25 25
 <?php
26
-	if ( apply_filters( 'FHEE__content_espresso_events_details_template__display_the_content', true ) ) {
27
-		do_action( 'AHEE_event_details_before_the_content', $post );
26
+	if (apply_filters('FHEE__content_espresso_events_details_template__display_the_content', true)) {
27
+		do_action('AHEE_event_details_before_the_content', $post);
28 28
 		echo apply_filters(
29 29
 			'FHEE__content_espresso_events_details_template__the_content',
30
-			espresso_event_content_or_excerpt( 55, null, false ) 
30
+			espresso_event_content_or_excerpt(55, null, false) 
31 31
 		);
32
-		do_action( 'AHEE_event_details_after_the_content', $post );
32
+		do_action('AHEE_event_details_after_the_content', $post);
33 33
 	}
34 34
  ?>
35 35
 </div>
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Text_Input.input.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
  *
9 9
  * This input has a default validation strategy of plaintext (which can be removed after construction)
10 10
  */
11
-class EE_Text_Input extends EE_Form_Input_Base{
11
+class EE_Text_Input extends EE_Form_Input_Base {
12 12
 
13 13
 
14 14
 	/**
15 15
 	 * @param array $options
16 16
 	 */
17
-	public function __construct($options = array()){
17
+	public function __construct($options = array()) {
18 18
 		$this->_set_display_strategy(new EE_Text_Input_Display_Strategy());
19 19
 		$this->_set_normalization_strategy(new EE_Text_Normalization());
20 20
 		parent::__construct($options);
21 21
 		//if the input hasn't specifically mentioned a more lenient validation strategy,
22 22
 		//apply plaintext validation strategy
23
-		if( ! $this->has_validation_strategy(
23
+		if ( ! $this->has_validation_strategy(
24 24
 				array(
25 25
 					'EE_Full_HTML_Validation_Strategy',
26 26
 					'EE_Simple_HTML_Validation_Strategy'
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		) {
30 30
 			//by default we use the plaintext validation. If you want something else,
31 31
 			//just remove it after the input is constructed :P using EE_Form_Input_Base::remove_validation_strategy()
32
-			$this->_add_validation_strategy( new EE_Plaintext_Validation_Strategy() );
32
+			$this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy());
33 33
 		}
34 34
 	}
35 35
 
Please login to merge, or discard this patch.
templates/txn_admin_details_side_meta_box_billing_info.template.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
 		foreach( $form_section->subsections() as $subsection ) {
9 9
 			if( $subsection instanceof EE_Form_Input_Base ) {
10 10
 				if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_All_Sensitive_Data_Removal
11
-                    || $subsection->get_sensitive_data_removal_strategy() instanceof EE_CCV_Sensitive_Data_Removal
12
-                    || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy ){
11
+					|| $subsection->get_sensitive_data_removal_strategy() instanceof EE_CCV_Sensitive_Data_Removal
12
+					|| $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy ){
13 13
 					continue;
14 14
 				}
15 15
 				if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_Credit_Card_Sensitive_Data_Removal ) {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,38 +1,38 @@
 block discarded – undo
1 1
 	<div id="admin-side-mbox-billing-info-dv" class="admin-side-mbox-dv">
2
-<?php if ( empty($billing_form) ) : ?>
2
+<?php if (empty($billing_form)) : ?>
3 3
 		<div class="clearfix">
4
-			<?php _e( 'There is no billing info for this transaction.', 'event_espresso' );?><br/>
4
+			<?php _e('There is no billing info for this transaction.', 'event_espresso'); ?><br/>
5 5
 		</div>
6 6
 <?php else :
7
-	function ee_show_billing_info_cleaned( EE_Form_Section_Proper $form_section, $found_cc_data = false ) {
8
-		foreach( $form_section->subsections() as $subsection ) {
9
-			if( $subsection instanceof EE_Form_Input_Base ) {
10
-				if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_All_Sensitive_Data_Removal
7
+	function ee_show_billing_info_cleaned(EE_Form_Section_Proper $form_section, $found_cc_data = false) {
8
+		foreach ($form_section->subsections() as $subsection) {
9
+			if ($subsection instanceof EE_Form_Input_Base) {
10
+				if ($subsection->get_sensitive_data_removal_strategy() instanceof EE_All_Sensitive_Data_Removal
11 11
                     || $subsection->get_sensitive_data_removal_strategy() instanceof EE_CCV_Sensitive_Data_Removal
12
-                    || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy ){
12
+                    || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy) {
13 13
 					continue;
14 14
 				}
15
-				if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_Credit_Card_Sensitive_Data_Removal ) {
15
+				if ($subsection->get_sensitive_data_removal_strategy() instanceof EE_Credit_Card_Sensitive_Data_Removal) {
16 16
 					$found_cc_data = true;
17 17
 				}
18 18
 				?>
19 19
 					<div class="clearfix">
20
-						<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php echo $subsection->get_html_for_label();?></span><?php echo $subsection->pretty_value();?>
20
+						<span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php echo $subsection->get_html_for_label(); ?></span><?php echo $subsection->pretty_value(); ?>
21 21
 					</div><?php
22
-			} elseif( $subsection instanceof EE_Form_Section_Proper ) {
23
-				$found_cc_data = ee_show_billing_info_cleaned( $subsection, $found_cc_data);
22
+			} elseif ($subsection instanceof EE_Form_Section_Proper) {
23
+				$found_cc_data = ee_show_billing_info_cleaned($subsection, $found_cc_data);
24 24
 			}
25 25
 		}
26 26
 		return $found_cc_data;
27 27
 	}
28
-	$found_cc_data = ee_show_billing_info_cleaned( $billing_form );
29
-	if( apply_filters( 
28
+	$found_cc_data = ee_show_billing_info_cleaned($billing_form);
29
+	if (apply_filters( 
30 30
 			'FHEE__txn_admin_details_side_meta_box_billing_info__show_default_note', 
31 31
 			$found_cc_data,
32
-			$billing_form ) ) {?>
33
-		<p class="help"><?php _e( 'Note: Card expiry dates and CCV are not stored. Only the last 4 digits of card numbers are stored.', 'event_espresso' );?></p>
32
+			$billing_form )) {?>
33
+		<p class="help"><?php _e('Note: Card expiry dates and CCV are not stored. Only the last 4 digits of card numbers are stored.', 'event_espresso'); ?></p>
34 34
 	<?php }
35
-	do_action( 'AHEE__txn_admin_details_side_meta_box_billing_info__billing_form_footer', $billing_form );
35
+	do_action('AHEE__txn_admin_details_side_meta_box_billing_info__billing_form_footer', $billing_form);
36 36
 	endif; ?>
37 37
 
38 38
 	</div>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,8 @@  discard block
 block discarded – undo
3 3
 		<div class="clearfix">
4 4
 			<?php _e( 'There is no billing info for this transaction.', 'event_espresso' );?><br/>
5 5
 		</div>
6
-<?php else :
6
+<?php else {
7
+	:
7 8
 	function ee_show_billing_info_cleaned( EE_Form_Section_Proper $form_section, $found_cc_data = false ) {
8 9
 		foreach( $form_section->subsections() as $subsection ) {
9 10
 			if( $subsection instanceof EE_Form_Input_Base ) {
@@ -11,6 +12,7 @@  discard block
 block discarded – undo
11 12
                     || $subsection->get_sensitive_data_removal_strategy() instanceof EE_CCV_Sensitive_Data_Removal
12 13
                     || $subsection->get_display_strategy() instanceof EE_Hidden_Display_Strategy ){
13 14
 					continue;
15
+}
14 16
 				}
15 17
 				if( $subsection->get_sensitive_data_removal_strategy() instanceof EE_Credit_Card_Sensitive_Data_Removal ) {
16 18
 					$found_cc_data = true;
Please login to merge, or discard this patch.
core/helpers/EEH_HTML.helper.php 2 patches
Spacing   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	public static function instance() {
43 43
 		// check if class object is instantiated, and instantiated properly
44
-		if ( ! self::$_instance instanceof EEH_HTML ) {
44
+		if ( ! self::$_instance instanceof EEH_HTML) {
45 45
 			self::$_instance = new EEH_HTML();
46 46
 		}
47 47
 		return self::$_instance;
@@ -102,14 +102,14 @@  discard block
 block discarded – undo
102 102
 		$other_attributes = '',
103 103
 		$force_close = false
104 104
 	) {
105
-		$attributes = ! empty( $id ) ? ' id="' . EEH_HTML::sanitize_id( $id ) . '"' : '';
106
-		$attributes .= ! empty( $class ) ? ' class="' . $class . '"' : '';
107
-		$attributes .= ! empty( $style ) ? ' style="' . $style . '"' : '';
108
-		$attributes .= ! empty( $other_attributes ) ? ' ' . $other_attributes : '';
109
-		$html = EEH_HTML::nl( 0, $tag ) . '<' . $tag . $attributes . '>';
110
-		$html .= ! empty( $content ) ? EEH_HTML::nl( 1, $tag  ) . $content : '';
111
-		$indent = ! empty( $content ) || $force_close ? TRUE : FALSE;
112
-		$html .= ! empty( $content ) || $force_close ? EEH_HTML::_close_tag( $tag, $id, $class, $indent ) : '';
105
+		$attributes = ! empty($id) ? ' id="'.EEH_HTML::sanitize_id($id).'"' : '';
106
+		$attributes .= ! empty($class) ? ' class="'.$class.'"' : '';
107
+		$attributes .= ! empty($style) ? ' style="'.$style.'"' : '';
108
+		$attributes .= ! empty($other_attributes) ? ' '.$other_attributes : '';
109
+		$html = EEH_HTML::nl(0, $tag).'<'.$tag.$attributes.'>';
110
+		$html .= ! empty($content) ? EEH_HTML::nl(1, $tag).$content : '';
111
+		$indent = ! empty($content) || $force_close ? TRUE : FALSE;
112
+		$html .= ! empty($content) || $force_close ? EEH_HTML::_close_tag($tag, $id, $class, $indent) : '';
113 113
 		return $html;
114 114
 	}
115 115
 
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 	 * @param bool   $indent
127 127
 	 * @return string
128 128
 	 */
129
-	protected static function _close_tag( $tag = 'div', $id = '', $class = '', $indent = TRUE ) {
129
+	protected static function _close_tag($tag = 'div', $id = '', $class = '', $indent = TRUE) {
130 130
 		$comment = '';
131
-		if ( $id ) {
132
-			$comment = EEH_HTML::comment( 'close ' . $id ) . EEH_HTML::nl( 0, $tag );
133
-		} else if ( $class ) {
134
-			$comment = EEH_HTML::comment( 'close ' . $class ) . EEH_HTML::nl( 0, $tag );
131
+		if ($id) {
132
+			$comment = EEH_HTML::comment('close '.$id).EEH_HTML::nl(0, $tag);
133
+		} else if ($class) {
134
+			$comment = EEH_HTML::comment('close '.$class).EEH_HTML::nl(0, $tag);
135 135
 		}
136 136
 		$html = $indent ? EEH_HTML::nl( -1, $tag ) : '';
137
-		$html .= '</' . $tag . '>' . $comment;
137
+		$html .= '</'.$tag.'>'.$comment;
138 138
 		return $html;
139 139
 	}
140 140
 
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
154 154
 	 * @return string
155 155
 	 */
156
-	public static function div( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
157
-		return EEH_HTML::_open_tag( 'div', $content, $id, $class, $style, $other_attributes );
156
+	public static function div($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
157
+		return EEH_HTML::_open_tag('div', $content, $id, $class, $style, $other_attributes);
158 158
 	}
159 159
 
160 160
 
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 	 * @param string $class - html class attribute
168 168
 	 * @return string
169 169
 	 */
170
-	public static function divx( $id = '', $class = '' ) {
171
-		return EEH_HTML::_close_tag( 'div', $id, $class );
170
+	public static function divx($id = '', $class = '') {
171
+		return EEH_HTML::_close_tag('div', $id, $class);
172 172
 	}
173 173
 
174 174
 
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
185 185
 	 * @return string
186 186
 	 */
187
-	public static function h1( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
188
-		return EEH_HTML::_open_tag( 'h1', $content, $id, $class, $style, $other_attributes, TRUE );
187
+	public static function h1($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
188
+		return EEH_HTML::_open_tag('h1', $content, $id, $class, $style, $other_attributes, TRUE);
189 189
 	}
190 190
 
191 191
 
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
202 202
 	 * @return string
203 203
 	 */
204
-	public static function h2( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
205
-		return EEH_HTML::_open_tag( 'h2', $content, $id, $class, $style, $other_attributes, TRUE );
204
+	public static function h2($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
205
+		return EEH_HTML::_open_tag('h2', $content, $id, $class, $style, $other_attributes, TRUE);
206 206
 	}
207 207
 
208 208
 
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
219 219
 	 * @return string
220 220
 	 */
221
-	public static function h3( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
222
-		return EEH_HTML::_open_tag( 'h3', $content, $id, $class, $style, $other_attributes, TRUE );
221
+	public static function h3($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
222
+		return EEH_HTML::_open_tag('h3', $content, $id, $class, $style, $other_attributes, TRUE);
223 223
 	}
224 224
 
225 225
 
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
236 236
 	 * @return string
237 237
 	 */
238
-	public static function h4( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
239
-		return EEH_HTML::_open_tag( 'h4', $content, $id, $class, $style, $other_attributes, TRUE );
238
+	public static function h4($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
239
+		return EEH_HTML::_open_tag('h4', $content, $id, $class, $style, $other_attributes, TRUE);
240 240
 	}
241 241
 
242 242
 
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
253 253
 	 * @return string
254 254
 	 */
255
-	public static function h5( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
256
-		return EEH_HTML::_open_tag( 'h5', $content, $id, $class, $style, $other_attributes, TRUE );
255
+	public static function h5($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
256
+		return EEH_HTML::_open_tag('h5', $content, $id, $class, $style, $other_attributes, TRUE);
257 257
 	}
258 258
 
259 259
 
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
270 270
 	 * @return string
271 271
 	 */
272
-	public static function h6( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
273
-		return EEH_HTML::_open_tag( 'h6', $content, $id, $class, $style, $other_attributes, TRUE );
272
+	public static function h6($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
273
+		return EEH_HTML::_open_tag('h6', $content, $id, $class, $style, $other_attributes, TRUE);
274 274
 	}
275 275
 
276 276
 
@@ -286,8 +286,8 @@  discard block
 block discarded – undo
286 286
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
287 287
 	 * @return string
288 288
 	 */
289
-	public static function p( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
290
-		return EEH_HTML::_open_tag( 'p', $content, $id, $class, $style, $other_attributes, TRUE );
289
+	public static function p($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
290
+		return EEH_HTML::_open_tag('p', $content, $id, $class, $style, $other_attributes, TRUE);
291 291
 	}
292 292
 
293 293
 
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
303 303
 	 * @return string
304 304
 	 */
305
-	public static function ul( $id = '', $class = '', $style = '', $other_attributes = '' ) {
306
-		return EEH_HTML::_open_tag( 'ul', '', $id, $class, $style, $other_attributes );
305
+	public static function ul($id = '', $class = '', $style = '', $other_attributes = '') {
306
+		return EEH_HTML::_open_tag('ul', '', $id, $class, $style, $other_attributes);
307 307
 	}
308 308
 
309 309
 
@@ -316,8 +316,8 @@  discard block
 block discarded – undo
316 316
 	 * @param string $class - html class attribute
317 317
 	 * @return string
318 318
 	 */
319
-	public static function ulx( $id = '', $class = '' ) {
320
-		return EEH_HTML::_close_tag( 'ul', $id, $class );
319
+	public static function ulx($id = '', $class = '') {
320
+		return EEH_HTML::_close_tag('ul', $id, $class);
321 321
 	}
322 322
 
323 323
 
@@ -334,8 +334,8 @@  discard block
 block discarded – undo
334 334
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
335 335
 	 * @return string
336 336
 	 */
337
-	public static function li( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
338
-		return EEH_HTML::_open_tag( 'li', $content, $id, $class, $style, $other_attributes );
337
+	public static function li($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
338
+		return EEH_HTML::_open_tag('li', $content, $id, $class, $style, $other_attributes);
339 339
 	}
340 340
 
341 341
 
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
 	 * @param string $class - html class attribute
349 349
 	 * @return string
350 350
 	 */
351
-	public static function lix( $id = '', $class = '' ) {
352
-		return EEH_HTML::_close_tag( 'li', $id, $class );
351
+	public static function lix($id = '', $class = '') {
352
+		return EEH_HTML::_close_tag('li', $id, $class);
353 353
 	}
354 354
 
355 355
 
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
366 366
 	 * @return string
367 367
 	 */
368
-	public static function table( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
369
-		return EEH_HTML::_open_tag( 'table', $content, $id, $class, $style, $other_attributes );
368
+	public static function table($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
369
+		return EEH_HTML::_open_tag('table', $content, $id, $class, $style, $other_attributes);
370 370
 	}
371 371
 
372 372
 
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
 	 * @param string $class - html class attribute
379 379
 	 * @return string
380 380
 	 */
381
-	public static function tablex( $id = '', $class = '' ) {
382
-		return EEH_HTML::_close_tag( 'table', $id, $class );
381
+	public static function tablex($id = '', $class = '') {
382
+		return EEH_HTML::_close_tag('table', $id, $class);
383 383
 	}
384 384
 
385 385
 
@@ -395,8 +395,8 @@  discard block
 block discarded – undo
395 395
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
396 396
 	 * @return string
397 397
 	 */
398
-	public static function thead( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
399
-		return EEH_HTML::_open_tag( 'thead', $content, $id, $class, $style, $other_attributes );
398
+	public static function thead($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
399
+		return EEH_HTML::_open_tag('thead', $content, $id, $class, $style, $other_attributes);
400 400
 	}
401 401
 
402 402
 
@@ -408,8 +408,8 @@  discard block
 block discarded – undo
408 408
 	 * @param string $class - html class attribute
409 409
 	 * @return string
410 410
 	 */
411
-	public static function theadx( $id = '', $class = '' ) {
412
-		return EEH_HTML::_close_tag( 'thead', $id, $class );
411
+	public static function theadx($id = '', $class = '') {
412
+		return EEH_HTML::_close_tag('thead', $id, $class);
413 413
 	}
414 414
 
415 415
 
@@ -425,8 +425,8 @@  discard block
 block discarded – undo
425 425
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
426 426
 	 * @return string
427 427
 	 */
428
-	public static function tbody( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
429
-		return EEH_HTML::_open_tag( 'tbody', $content, $id, $class, $style, $other_attributes );
428
+	public static function tbody($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
429
+		return EEH_HTML::_open_tag('tbody', $content, $id, $class, $style, $other_attributes);
430 430
 	}
431 431
 
432 432
 
@@ -438,8 +438,8 @@  discard block
 block discarded – undo
438 438
 	 * @param string $class - html class attribute
439 439
 	 * @return string
440 440
 	 */
441
-	public static function tbodyx( $id = '', $class = '' ) {
442
-		return EEH_HTML::_close_tag( 'tbody', $id, $class );
441
+	public static function tbodyx($id = '', $class = '') {
442
+		return EEH_HTML::_close_tag('tbody', $id, $class);
443 443
 	}
444 444
 
445 445
 
@@ -455,8 +455,8 @@  discard block
 block discarded – undo
455 455
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
456 456
 	 * @return string
457 457
 	 */
458
-	public static function tr( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
459
-		return EEH_HTML::_open_tag( 'tr', $content, $id, $class, $style, $other_attributes );
458
+	public static function tr($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
459
+		return EEH_HTML::_open_tag('tr', $content, $id, $class, $style, $other_attributes);
460 460
 	}
461 461
 
462 462
 
@@ -468,8 +468,8 @@  discard block
 block discarded – undo
468 468
 	 * @param string $class - html class attribute
469 469
 	 * @return string
470 470
 	 */
471
-	public static function trx( $id = '', $class = '' ) {
472
-		return EEH_HTML::_close_tag( 'tr', $id, $class );
471
+	public static function trx($id = '', $class = '') {
472
+		return EEH_HTML::_close_tag('tr', $id, $class);
473 473
 	}
474 474
 
475 475
 
@@ -485,8 +485,8 @@  discard block
 block discarded – undo
485 485
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
486 486
 	 * @return string
487 487
 	 */
488
-	public static function th( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
489
-		return EEH_HTML::_open_tag( 'th', $content, $id, $class, $style, $other_attributes );
488
+	public static function th($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
489
+		return EEH_HTML::_open_tag('th', $content, $id, $class, $style, $other_attributes);
490 490
 	}
491 491
 
492 492
 
@@ -498,8 +498,8 @@  discard block
 block discarded – undo
498 498
 	 * @param string $class - html class attribute
499 499
 	 * @return string
500 500
 	 */
501
-	public static function thx( $id = '', $class = '' ) {
502
-		return EEH_HTML::_close_tag( 'th', $id, $class );
501
+	public static function thx($id = '', $class = '') {
502
+		return EEH_HTML::_close_tag('th', $id, $class);
503 503
 	}
504 504
 
505 505
 
@@ -515,8 +515,8 @@  discard block
 block discarded – undo
515 515
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
516 516
 	 * @return string
517 517
 	 */
518
-	public static function td( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
519
-		return EEH_HTML::_open_tag( 'td', $content, $id, $class, $style, $other_attributes );
518
+	public static function td($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
519
+		return EEH_HTML::_open_tag('td', $content, $id, $class, $style, $other_attributes);
520 520
 	}
521 521
 
522 522
 
@@ -528,8 +528,8 @@  discard block
 block discarded – undo
528 528
 	 * @param string $class - html class attribute
529 529
 	 * @return string
530 530
 	 */
531
-	public static function tdx( $id = '', $class = '' ) {
532
-		return EEH_HTML::_close_tag( 'td', $id, $class );
531
+	public static function tdx($id = '', $class = '') {
532
+		return EEH_HTML::_close_tag('td', $id, $class);
533 533
 	}
534 534
 
535 535
 
@@ -543,10 +543,10 @@  discard block
 block discarded – undo
543 543
 	 * @param int    $colspan
544 544
 	 * @return string
545 545
 	 */
546
-	public static function no_row( $content = '', $colspan = 2 ) {
546
+	public static function no_row($content = '', $colspan = 2) {
547 547
 		return EEH_HTML::tr(
548
-			EEH_HTML::td( $content, '', '',  'padding:0; border:none;', 'colspan="' . $colspan . '"' ),
549
-			'', '',  'padding:0; border:none;'
548
+			EEH_HTML::td($content, '', '', 'padding:0; border:none;', 'colspan="'.$colspan.'"'),
549
+			'', '', 'padding:0; border:none;'
550 550
 		);
551 551
 	}
552 552
 
@@ -566,14 +566,14 @@  discard block
 block discarded – undo
566 566
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
567 567
 	 * @return string
568 568
 	 */
569
-	public static function link( $href = '', $link_text = '', $title = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
570
-		$link_text = ! empty( $link_text ) ? $link_text : $href;
571
-		$attributes = ! empty($href ) ? ' href="' . $href . '"' : '';
572
-		$attributes .= ! empty( $id ) ? ' id="' . EEH_HTML::sanitize_id( $id ) . '"' : '';
573
-		$attributes .= ! empty( $class ) ? ' class="' . $class . '"' : '';
574
-		$attributes .= ! empty( $style ) ? ' style="' . $style . '"' : '';
575
-		$attributes .= ! empty( $title ) ? ' title="' . esc_attr( $title ) . '"' : '';
576
-		$attributes .= ! empty( $other_attributes ) ? ' ' . $other_attributes : '';
569
+	public static function link($href = '', $link_text = '', $title = '', $id = '', $class = '', $style = '', $other_attributes = '') {
570
+		$link_text = ! empty($link_text) ? $link_text : $href;
571
+		$attributes = ! empty($href) ? ' href="'.$href.'"' : '';
572
+		$attributes .= ! empty($id) ? ' id="'.EEH_HTML::sanitize_id($id).'"' : '';
573
+		$attributes .= ! empty($class) ? ' class="'.$class.'"' : '';
574
+		$attributes .= ! empty($style) ? ' style="'.$style.'"' : '';
575
+		$attributes .= ! empty($title) ? ' title="'.esc_attr($title).'"' : '';
576
+		$attributes .= ! empty($other_attributes) ? ' '.$other_attributes : '';
577 577
 		return "<a{$attributes}>{$link_text}</a>";
578 578
 	}
579 579
 
@@ -591,14 +591,14 @@  discard block
 block discarded – undo
591 591
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
592 592
 	 * @return string
593 593
 	 */
594
-	public static function img( $src = '', $alt = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
595
-		$attributes = ! empty( $src ) ? ' src="' . esc_url_raw( $src ) . '"' : '';
596
-		$attributes .= ! empty( $alt ) ? ' alt="' . esc_attr( $alt ) . '"' : '';
597
-		$attributes .= ! empty( $id ) ? ' id="' . EEH_HTML::sanitize_id( $id ) . '"' : '';
598
-		$attributes .= ! empty( $class ) ? ' class="' . $class . '"' : '';
599
-		$attributes .= ! empty( $style ) ? ' style="' . $style . '"' : '';
600
-		$attributes .= ! empty( $other_attributes ) ? ' ' . $other_attributes : '';
601
-		return '<img' . $attributes  . '/>';
594
+	public static function img($src = '', $alt = '', $id = '', $class = '', $style = '', $other_attributes = '') {
595
+		$attributes = ! empty($src) ? ' src="'.esc_url_raw($src).'"' : '';
596
+		$attributes .= ! empty($alt) ? ' alt="'.esc_attr($alt).'"' : '';
597
+		$attributes .= ! empty($id) ? ' id="'.EEH_HTML::sanitize_id($id).'"' : '';
598
+		$attributes .= ! empty($class) ? ' class="'.$class.'"' : '';
599
+		$attributes .= ! empty($style) ? ' style="'.$style.'"' : '';
600
+		$attributes .= ! empty($other_attributes) ? ' '.$other_attributes : '';
601
+		return '<img'.$attributes.'/>';
602 602
 	}
603 603
 
604 604
 
@@ -616,12 +616,12 @@  discard block
 block discarded – undo
616 616
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
617 617
 	 * @return string
618 618
 	 */
619
-	protected static function _inline_tag( $tag = 'span', $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
620
-		$attributes = ! empty( $id ) ? ' id="' . EEH_HTML::sanitize_id( $id ) . '"' : '';
621
-		$attributes .= ! empty( $class ) ? ' class="' . $class . '"' : '';
622
-		$attributes .= ! empty( $style ) ? ' style="' . $style . '"' : '';
623
-		$attributes .= ! empty( $other_attributes ) ? ' ' . $other_attributes : '';
624
-		return '<' . $tag . ' ' . $attributes . '>'  . $content  . '</' . $tag . '>';
619
+	protected static function _inline_tag($tag = 'span', $content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
620
+		$attributes = ! empty($id) ? ' id="'.EEH_HTML::sanitize_id($id).'"' : '';
621
+		$attributes .= ! empty($class) ? ' class="'.$class.'"' : '';
622
+		$attributes .= ! empty($style) ? ' style="'.$style.'"' : '';
623
+		$attributes .= ! empty($other_attributes) ? ' '.$other_attributes : '';
624
+		return '<'.$tag.' '.$attributes.'>'.$content.'</'.$tag.'>';
625 625
 	}
626 626
 
627 627
 
@@ -637,8 +637,8 @@  discard block
 block discarded – undo
637 637
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
638 638
 	 * @return string
639 639
 	 */
640
-	public static function label( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
641
-		return EEH_HTML::_inline_tag( 'label', $content, $id, $class, $style, $other_attributes );
640
+	public static function label($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
641
+		return EEH_HTML::_inline_tag('label', $content, $id, $class, $style, $other_attributes);
642 642
 	}
643 643
 
644 644
 
@@ -654,8 +654,8 @@  discard block
 block discarded – undo
654 654
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
655 655
 	 * @return string
656 656
 	 */
657
-	public static function span( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
658
-		return EEH_HTML::_inline_tag( 'span', $content, $id, $class, $style, $other_attributes );
657
+	public static function span($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
658
+		return EEH_HTML::_inline_tag('span', $content, $id, $class, $style, $other_attributes);
659 659
 	}
660 660
 
661 661
 
@@ -671,8 +671,8 @@  discard block
 block discarded – undo
671 671
 	 * @param string $other_attributes - additional attributes like "colspan", inline JS, "rel" tags, etc
672 672
 	 * @return string
673 673
 	 */
674
-	public static function strong( $content = '', $id = '', $class = '', $style = '', $other_attributes = '' ) {
675
-		return EEH_HTML::_inline_tag( 'strong', $content, $id, $class, $style, $other_attributes );
674
+	public static function strong($content = '', $id = '', $class = '', $style = '', $other_attributes = '') {
675
+		return EEH_HTML::_inline_tag('strong', $content, $id, $class, $style, $other_attributes);
676 676
 	}
677 677
 
678 678
 
@@ -684,8 +684,8 @@  discard block
 block discarded – undo
684 684
 	 * @param string $comment
685 685
 	 * @return string
686 686
 	 */
687
-	public static function comment( $comment = '' ) {
688
-		return ! empty( $comment ) ? EEH_HTML::nl() . '<!-- ' . $comment . ' -->' : '';
687
+	public static function comment($comment = '') {
688
+		return ! empty($comment) ? EEH_HTML::nl().'<!-- '.$comment.' -->' : '';
689 689
 	}
690 690
 
691 691
 
@@ -696,8 +696,8 @@  discard block
 block discarded – undo
696 696
 	 * @param int $nmbr - the number of line breaks to return
697 697
 	 * @return string
698 698
 	 */
699
-	public static function br( $nmbr = 1 ) {
700
-		return str_repeat( '<br />', $nmbr );
699
+	public static function br($nmbr = 1) {
700
+		return str_repeat('<br />', $nmbr);
701 701
 	}
702 702
 
703 703
 
@@ -708,8 +708,8 @@  discard block
 block discarded – undo
708 708
 	 * @param int $nmbr - the number of non-breaking spaces to return
709 709
 	 * @return string
710 710
 	 */
711
-	public static function nbsp( $nmbr = 1 ) {
712
-		return str_repeat( '&nbsp;', $nmbr );
711
+	public static function nbsp($nmbr = 1) {
712
+		return str_repeat('&nbsp;', $nmbr);
713 713
 	}
714 714
 
715 715
 
@@ -723,9 +723,9 @@  discard block
 block discarded – undo
723 723
 	 * @param string $id
724 724
 	 * @return string
725 725
 	 */
726
-	public static function sanitize_id( $id = '' ) {
727
-		$key = str_replace( ' ', '-', trim( $id ) );
728
-		return preg_replace( '/[^a-zA-Z0-9_\-]/', '', $key );
726
+	public static function sanitize_id($id = '') {
727
+		$key = str_replace(' ', '-', trim($id));
728
+		return preg_replace('/[^a-zA-Z0-9_\-]/', '', $key);
729 729
 	}
730 730
 
731 731
 
@@ -737,10 +737,10 @@  discard block
 block discarded – undo
737 737
 	 * @param string $tag
738 738
 	 * @return string - newline character plus # of indents passed (can be + or -)
739 739
 	 */
740
-	public static function nl( $indent = 0, $tag = 'none' ) {
740
+	public static function nl($indent = 0, $tag = 'none') {
741 741
 		$html = "\n";
742
-		EEH_HTML::indent( $indent, $tag );
743
-		for ( $x = 0; $x < EEH_HTML::$_indent[ $tag ]; $x++ ) {
742
+		EEH_HTML::indent($indent, $tag);
743
+		for ($x = 0; $x < EEH_HTML::$_indent[$tag]; $x++) {
744 744
 			$html .= "\t";
745 745
 		}
746 746
 		return $html;
@@ -755,17 +755,17 @@  discard block
 block discarded – undo
755 755
 	 * @param int    $indent can be negative to decrease the indentation level
756 756
 	 * @param string $tag
757 757
 	 */
758
-	public static function indent( $indent, $tag = 'none' ){
758
+	public static function indent($indent, $tag = 'none') {
759 759
 		static $default_indentation = FALSE;
760
-		if ( ! $default_indentation ) {
760
+		if ( ! $default_indentation) {
761 761
 			EEH_HTML::_set_default_indentation();
762 762
 			$default_indentation = TRUE;
763 763
 		}
764
-		if ( ! isset( EEH_HTML::$_indent[ $tag ] )) {
765
-			EEH_HTML::$_indent[ $tag ] = 0;
764
+		if ( ! isset(EEH_HTML::$_indent[$tag])) {
765
+			EEH_HTML::$_indent[$tag] = 0;
766 766
 		}
767
-		EEH_HTML::$_indent[ $tag ] += (int)$indent;
768
-		EEH_HTML::$_indent[ $tag ] = EEH_HTML::$_indent[ $tag ] >= 0 ? EEH_HTML::$_indent[ $tag ] : 0;
767
+		EEH_HTML::$_indent[$tag] += (int) $indent;
768
+		EEH_HTML::$_indent[$tag] = EEH_HTML::$_indent[$tag] >= 0 ? EEH_HTML::$_indent[$tag] : 0;
769 769
 	}
770 770
 
771 771
 
@@ -811,15 +811,15 @@  discard block
 block discarded – undo
811 811
 	 * @global array $allowedtags
812 812
 	 * @return array
813 813
 	 */
814
-	public static function get_simple_tags(){
814
+	public static function get_simple_tags() {
815 815
 		global $allowedtags;
816 816
 		$tags_we_allow = $allowedtags;
817
-		$tags_we_allow['ol']=array();
818
-		$tags_we_allow['ul']=array();
819
-		$tags_we_allow['li']=array();
820
-		$tags_we_allow['br']=array();
821
-		$tags_we_allow['p']=array();
822
-		return apply_filters( 'FHEE__EEH_HTML__get_simple_tags', $tags_we_allow );
817
+		$tags_we_allow['ol'] = array();
818
+		$tags_we_allow['ul'] = array();
819
+		$tags_we_allow['li'] = array();
820
+		$tags_we_allow['br'] = array();
821
+		$tags_we_allow['p'] = array();
822
+		return apply_filters('FHEE__EEH_HTML__get_simple_tags', $tags_we_allow);
823 823
 	}
824 824
 
825 825
 
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2 2
  /**
3
- *
4
- * Class EEH_HTML
5
- *
3
+  *
4
+  * Class EEH_HTML
5
+  *
6 6
   * Sometimes when writing PHP you need to generate some standard HTML,
7 7
   * but either not enough to warrant creating a template file,
8 8
   * or the amount of PHP conditionals and/or loops peppered throughout the HTML
9 9
   * just make it really ugly and difficult to read.
10 10
   * This class simply adds a bunch of methods for generating basic HTML tags.
11 11
   * Most of the methods have the same name as the HTML tag they generate, and most have the same set of parameters.
12
- *
13
- * @package         Event Espresso
14
- * @subpackage    core
15
- * @author				Brent Christensen
16
- * 
17
- *
18
- */
12
+  *
13
+  * @package         Event Espresso
14
+  * @subpackage    core
15
+  * @author				Brent Christensen
16
+  * 
17
+  *
18
+  */
19 19
 
20 20
 class EEH_HTML {
21 21
 
Please login to merge, or discard this patch.