Completed
Branch FET/asset-manager (433489)
by
unknown
32:42 queued 18:11
created
core/libraries/shortcodes/EE_Organization_Shortcodes.lib.php 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -58,96 +58,96 @@  discard block
 block discarded – undo
58 58
 			'[CO_GOOGLE_URL]' => esc_html__('Link to organization Google page', 'event_espresso'),
59 59
 			'[CO_LINKEDIN_URL]' => esc_html__('Link to organization LinkedIn page', 'event_espresso'),
60 60
 			'[CO_INSTAGRAM_URL]' => esc_html__('Link to organization Instagram page', 'event_espresso'),
61
-			'[CO_TAX_NUMBER_*]' => sprintf( esc_html__('This is the shortcode used for displaying any tax number for the company.  %1$sNote: This is a special dynamic shortcode.%2$s You can use the "prefix" parameter to indicate what the prefix for this tax number is.  It defaults to "VAT/Tax Number:".  To change this prefix you do the following format for this shortcode:  [CO_TAX_NUMBER_* prefix="GST: "] and that will output: GST: 12345t56.  Also take note that if you have NO number in your settings, the prefix is not output either.', 'event_espresso' ),'<strong>','</strong>')
61
+			'[CO_TAX_NUMBER_*]' => sprintf(esc_html__('This is the shortcode used for displaying any tax number for the company.  %1$sNote: This is a special dynamic shortcode.%2$s You can use the "prefix" parameter to indicate what the prefix for this tax number is.  It defaults to "VAT/Tax Number:".  To change this prefix you do the following format for this shortcode:  [CO_TAX_NUMBER_* prefix="GST: "] and that will output: GST: 12345t56.  Also take note that if you have NO number in your settings, the prefix is not output either.', 'event_espresso'), '<strong>', '</strong>')
62 62
 			);
63 63
 	}
64 64
 
65 65
 
66
-	protected function _parser( $shortcode ) {
66
+	protected function _parser($shortcode) {
67 67
 
68
-		switch ( $shortcode ) {
68
+		switch ($shortcode) {
69 69
 
70 70
 			case '[COMPANY]' :
71
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
71
+				return EE_Registry::instance()->CFG->organization->get_pretty('name');
72 72
 				break;
73 73
 
74 74
 			case '[CO_ADD1]' :
75
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'address_1' );
75
+				return EE_Registry::instance()->CFG->organization->get_pretty('address_1');
76 76
 				break;
77 77
 
78 78
 			case '[CO_ADD2]' :
79
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'address_2' );
79
+				return EE_Registry::instance()->CFG->organization->get_pretty('address_2');
80 80
 				break;
81 81
 
82 82
 			case '[CO_CITY]' :
83
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'city' );
83
+				return EE_Registry::instance()->CFG->organization->get_pretty('city');
84 84
 				break;
85 85
 
86 86
 			case '[CO_STATE]' :
87
-				$state = EE_Registry::instance()->load_model( 'State' )->get_one_by_ID( EE_Registry::instance()->CFG->organization->STA_ID );
87
+				$state = EE_Registry::instance()->load_model('State')->get_one_by_ID(EE_Registry::instance()->CFG->organization->STA_ID);
88 88
 				return $state->name();
89 89
 				break;
90 90
 
91 91
 			case '[CO_ZIP]' :
92
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'zip' );
92
+				return EE_Registry::instance()->CFG->organization->get_pretty('zip');
93 93
 				break;
94 94
 
95 95
 			case '[CO_EMAIL]' :
96
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
96
+				return EE_Registry::instance()->CFG->organization->get_pretty('email');
97 97
 				break;
98 98
 
99 99
 			case '[CO_PHONE]' :
100
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'phone' );
100
+				return EE_Registry::instance()->CFG->organization->get_pretty('phone');
101 101
 				break;
102 102
 
103 103
 			case '[CO_LOGO]' :
104
-				return '<img src="' . EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' ) . '" id="headerImage" />';
104
+				return '<img src="'.EE_Registry::instance()->CFG->organization->get_pretty('logo_url').'" id="headerImage" />';
105 105
 				break;
106 106
 
107 107
 			case '[CO_LOGO_URL]' :
108
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
108
+				return EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
109 109
 				break;
110 110
 
111 111
 			case '[CO_FACEBOOK_URL]' :
112
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
112
+				return EE_Registry::instance()->CFG->organization->get_pretty('facebook');
113 113
 				break;
114 114
 
115 115
 			case '[CO_TWITTER_URL]' :
116
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
116
+				return EE_Registry::instance()->CFG->organization->get_pretty('twitter');
117 117
 				break;
118 118
 
119 119
 			case '[CO_PINTEREST_URL]' :
120
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
120
+				return EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
121 121
 				break;
122 122
 
123 123
 			case '[CO_LINKEDIN_URL]' :
124
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
124
+				return EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
125 125
 				break;
126 126
 
127 127
 			case '[CO_GOOGLE_URL]' :
128
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
128
+				return EE_Registry::instance()->CFG->organization->get_pretty('google');
129 129
 				break;
130 130
 
131 131
 			case '[CO_INSTAGRAM_URL]' :
132
-				return EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
132
+				return EE_Registry::instance()->CFG->organization->get_pretty('instagram');
133 133
 				break;
134 134
 
135 135
 		}
136 136
 
137 137
 		//also allow for parameter shortcode
138
-		if ( strpos( $shortcode, '[CO_TAX_NUMBER_*' ) !== FALSE ) {
138
+		if (strpos($shortcode, '[CO_TAX_NUMBER_*') !== FALSE) {
139 139
 			//first see if there is any company tax number set and bail early if not
140 140
 			$tax_number = EE_Registry::instance()->CFG->organization->vat;
141
-			if ( empty( $tax_number ) ) {
141
+			if (empty($tax_number)) {
142 142
 				return '';
143 143
 			}
144 144
 
145 145
 			//see if there are any attributes.
146
-			$attrs = $this->_get_shortcode_attrs( $shortcode );
146
+			$attrs = $this->_get_shortcode_attrs($shortcode);
147 147
 
148 148
 			//set custom attrs if present (or default)
149
-			$prefix = isset( $attrs['prefix'] ) ? $attrs['prefix'] : esc_html__('VAT/Tax Number: ', 'event_espresso');
150
-			return $prefix . $tax_number;
149
+			$prefix = isset($attrs['prefix']) ? $attrs['prefix'] : esc_html__('VAT/Tax Number: ', 'event_espresso');
150
+			return $prefix.$tax_number;
151 151
 		}
152 152
 
153 153
 		return '';
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
reg_steps/payment_options/payment_options_main.template.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,34 +8,34 @@
 block discarded – undo
8 8
 ?>
9 9
 
10 10
 	<h4 id="reg-page-totals-hdr" class="">
11
-		<span class="drk-grey-text"><?php _e('Registrations:', 'event_espresso'); ?></span> <?php echo $reg_count;?>
11
+		<span class="drk-grey-text"><?php _e('Registrations:', 'event_espresso'); ?></span> <?php echo $reg_count; ?>
12 12
 	</h4>
13 13
 
14 14
 	<div class="spco-payment-info-dv">
15 15
 		<table id="spco-payment-info-table">
16 16
 			<thead>
17 17
 				<tr>
18
-					<th scope="col" width=""><?php _e('Name and Description', 'event_espresso');?></th>
19
-					<th scope="col" width="15%" class="jst-cntr"><?php _e('Price', 'event_espresso');?></th>
20
-					<th scope="col" width="5%" class="jst-cntr"><?php _e( 'Qty', 'event_espresso' ); ?></th>
21
-					<th scope="col" width="15%" class="jst-cntr"><?php _e('Total', 'event_espresso');?></th>
22
-					<?php	do_action( 'AHEE__registration_page_payment_options__payment_info_table_thead_row_end' ); ?>
18
+					<th scope="col" width=""><?php _e('Name and Description', 'event_espresso'); ?></th>
19
+					<th scope="col" width="15%" class="jst-cntr"><?php _e('Price', 'event_espresso'); ?></th>
20
+					<th scope="col" width="5%" class="jst-cntr"><?php _e('Qty', 'event_espresso'); ?></th>
21
+					<th scope="col" width="15%" class="jst-cntr"><?php _e('Total', 'event_espresso'); ?></th>
22
+					<?php	do_action('AHEE__registration_page_payment_options__payment_info_table_thead_row_end'); ?>
23 23
 				</tr>
24 24
 			</thead>
25 25
 			<tbody>
26
-			<?php echo $transaction_details;?>
27
-			<?php	do_action( 'AHEE__registration_page_payment_options__payment_info_table_tbody_end' ); ?>
26
+			<?php echo $transaction_details; ?>
27
+			<?php	do_action('AHEE__registration_page_payment_options__payment_info_table_tbody_end'); ?>
28 28
 			</tbody>
29 29
 		</table>
30 30
 	</div>
31 31
 	<div class="clear-float"> </div>
32 32
 
33
-	<?php  echo $before_payment_options;  ?>
33
+	<?php  echo $before_payment_options; ?>
34 34
 
35 35
 	<div id="methods-of-payment">
36 36
 		<?php echo $payment_options; ?>
37 37
 	</div>
38 38
 	<!-- end #methods-of-payment -->
39 39
 
40
-	<?php  echo $after_payment_options;  ?>
40
+	<?php  echo $after_payment_options; ?>
41 41
 
Please login to merge, or discard this patch.
strategies/validation/EE_Full_HTML_Validation_Strategy.strategy.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,20 +10,20 @@  discard block
 block discarded – undo
10 10
  * @since 				4.6
11 11
  *
12 12
  */
13
-class EE_Full_HTML_Validation_Strategy extends EE_Validation_Strategy_Base{
13
+class EE_Full_HTML_Validation_Strategy extends EE_Validation_Strategy_Base {
14 14
 
15 15
 	/**
16 16
 	 * @param null $validation_error_message
17 17
 	 */
18
-	public function __construct( $validation_error_message = NULL ) {
19
-		if ( ! $validation_error_message ) {
18
+	public function __construct($validation_error_message = NULL) {
19
+		if ( ! $validation_error_message) {
20 20
 			$validation_error_message = sprintf(
21
-				__( 'Only the following HTML tags are allowed:%1$s%2$s', "event_espresso" ),
21
+				__('Only the following HTML tags are allowed:%1$s%2$s', "event_espresso"),
22 22
 				'<br />',
23 23
 				$this->get_list_of_allowed_tags()
24 24
 			);
25 25
 		}
26
-		parent::__construct( $validation_error_message );
26
+		parent::__construct($validation_error_message);
27 27
 	}
28 28
 
29 29
 
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public function get_list_of_allowed_tags() {
39 39
 		global $allowedposttags;
40
-		ksort( $allowedposttags );
41
-		return implode( ', ', array_keys( $allowedposttags ) );
40
+		ksort($allowedposttags);
41
+		return implode(', ', array_keys($allowedposttags));
42 42
 	}
43 43
 
44 44
 
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	public function validate($normalized_value) {
51 51
 		global $allowedposttags;
52
-		parent::validate( $normalized_value );
53
-		$normalized_value_sans_tags =  wp_kses( "$normalized_value", $allowedposttags );
54
-		if ( strlen( $normalized_value ) > strlen( $normalized_value_sans_tags ) ) {
55
-			throw new EE_Validation_Error( $this->get_validation_error_message(), 'complex_html_tags' );
52
+		parent::validate($normalized_value);
53
+		$normalized_value_sans_tags = wp_kses("$normalized_value", $allowedposttags);
54
+		if (strlen($normalized_value) > strlen($normalized_value_sans_tags)) {
55
+			throw new EE_Validation_Error($this->get_validation_error_message(), 'complex_html_tags');
56 56
 		}
57 57
 	}
58 58
 }
59 59
\ No newline at end of file
Please login to merge, or discard this patch.
core/EE_Deprecated.core.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -881,7 +881,7 @@
 block discarded – undo
881 881
 
882 882
 	/**
883 883
 	 * @deprecated 4.9.0
884
-	 * @return array
884
+	 * @return EE_messenger[]
885 885
 	 */
886 886
 	public function get_installed_messengers() {
887 887
 		// EE_messages has been deprecated
Please login to merge, or discard this patch.
Spacing   +178 added lines, -178 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 use EventEspresso\core\interfaces\InterminableInterface;
5 5
 use EventEspresso\core\services\licensing\LicenseService;
6 6
 
7
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
8
-	exit( 'No direct script access allowed' );
7
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
8
+	exit('No direct script access allowed');
9 9
 }
10 10
 /**
11 11
  * ************************************************************************
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 	$action_or_filter = 'action'
49 49
 ) {
50 50
 	$action_or_filter = $action_or_filter === 'action'
51
-		? esc_html__( 'action', 'event_espresso' )
52
-		: esc_html__( 'filter', 'event_espresso' );
51
+		? esc_html__('action', 'event_espresso')
52
+		: esc_html__('filter', 'event_espresso');
53 53
 	EE_Error::doing_it_wrong(
54 54
 		$deprecated_filter,
55 55
 		sprintf(
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
  * @param \EE_Checkout $checkout
74 74
  * @return string
75 75
  */
76
-function ee_deprecated__registration_checkout__button_text( $submit_button_text, EE_Checkout $checkout ) {
76
+function ee_deprecated__registration_checkout__button_text($submit_button_text, EE_Checkout $checkout) {
77 77
 	// list of old filters
78 78
 	$deprecated_filters = array(
79 79
 		'update_registration_details' => true,
@@ -83,16 +83,16 @@  discard block
 block discarded – undo
83 83
 		'proceed_to' => true,
84 84
 	);
85 85
 	// loop thru and call doing_it_wrong() or remove any that aren't being used
86
-	foreach ( $deprecated_filters as $deprecated_filter => $on ) {
86
+	foreach ($deprecated_filters as $deprecated_filter => $on) {
87 87
 		// was this filter called ?
88
-		if ( has_action( 'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__' . $deprecated_filter )) {
88
+		if (has_action('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__'.$deprecated_filter)) {
89 89
 			// only display doing_it_wrong() notice to Event Admins during non-AJAX requests
90
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_ee', 'hide_doing_it_wrong_for_deprecated_SPCO_filter' ) && ! defined( 'DOING_AJAX' ) ) {
90
+			if (EE_Registry::instance()->CAP->current_user_can('ee_read_ee', 'hide_doing_it_wrong_for_deprecated_SPCO_filter') && ! defined('DOING_AJAX')) {
91 91
 				EE_Error::doing_it_wrong(
92
-					'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__' . $deprecated_filter,
92
+					'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__'.$deprecated_filter,
93 93
 					sprintf(
94
-						__( 'The %1$s filter is deprecated.  It *may* work as an attempt to build in backwards compatibility.  However, it is recommended to use the following new filter: %2$s"%3$s" found in "%4$s"', 'event_espresso' ),
95
-						'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__' . $deprecated_filter,
94
+						__('The %1$s filter is deprecated.  It *may* work as an attempt to build in backwards compatibility.  However, it is recommended to use the following new filter: %2$s"%3$s" found in "%4$s"', 'event_espresso'),
95
+						'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__'.$deprecated_filter,
96 96
 						'<br />',
97 97
 						'FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text',
98 98
 						'/modules/single_page_checkout/inc/EE_SPCO_Reg_Step.class.php'
@@ -101,24 +101,24 @@  discard block
 block discarded – undo
101 101
 				);
102 102
 			}
103 103
 		} else {
104
-			unset( $deprecated_filters[ $deprecated_filter ] );
104
+			unset($deprecated_filters[$deprecated_filter]);
105 105
 		}
106 106
 	}
107
-	if ( ! empty( $deprecated_filters )) {
108
-
109
-		if ( $checkout->current_step->slug() == 'attendee_information' && $checkout->revisit && isset( $deprecated_filters[ 'update_registration_details' ] )) {
110
-			$submit_button_text = apply_filters( 'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__update_registration_details', $submit_button_text );
111
-		} else if ( $checkout->current_step->slug() == 'payment_options' && $checkout->revisit && isset( $deprecated_filters[ 'process_payment' ] ) ) {
112
-			$submit_button_text = apply_filters( 'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__process_payment', $submit_button_text );
113
-		} else if ( $checkout->next_step instanceof EE_SPCO_Reg_Step && $checkout->next_step->slug() == 'finalize_registration' && isset( $deprecated_filters[ 'finalize_registration' ] ) ) {
114
-			$submit_button_text = apply_filters( 'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__finalize_registration', $submit_button_text );
107
+	if ( ! empty($deprecated_filters)) {
108
+
109
+		if ($checkout->current_step->slug() == 'attendee_information' && $checkout->revisit && isset($deprecated_filters['update_registration_details'])) {
110
+			$submit_button_text = apply_filters('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__update_registration_details', $submit_button_text);
111
+		} else if ($checkout->current_step->slug() == 'payment_options' && $checkout->revisit && isset($deprecated_filters['process_payment'])) {
112
+			$submit_button_text = apply_filters('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__process_payment', $submit_button_text);
113
+		} else if ($checkout->next_step instanceof EE_SPCO_Reg_Step && $checkout->next_step->slug() == 'finalize_registration' && isset($deprecated_filters['finalize_registration'])) {
114
+			$submit_button_text = apply_filters('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__finalize_registration', $submit_button_text);
115 115
 		}
116
-		if ( $checkout->next_step instanceof EE_SPCO_Reg_Step ) {
117
-			if ( $checkout->payment_required() && $checkout->next_step->slug() == 'payment_options' && isset( $deprecated_filters[ 'and_proceed_to_payment' ] ) ) {
118
-				$submit_button_text .= apply_filters( 'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__and_proceed_to_payment', $submit_button_text );
116
+		if ($checkout->next_step instanceof EE_SPCO_Reg_Step) {
117
+			if ($checkout->payment_required() && $checkout->next_step->slug() == 'payment_options' && isset($deprecated_filters['and_proceed_to_payment'])) {
118
+				$submit_button_text .= apply_filters('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__and_proceed_to_payment', $submit_button_text);
119 119
 			}
120
-			if ( $checkout->next_step->slug() != 'finalize_registration' && ! $checkout->revisit && isset( $deprecated_filters[ 'proceed_to' ] ) ) {
121
-				$submit_button_text = apply_filters( 'FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__proceed_to', $submit_button_text ) . $checkout->next_step->name();
120
+			if ($checkout->next_step->slug() != 'finalize_registration' && ! $checkout->revisit && isset($deprecated_filters['proceed_to'])) {
121
+				$submit_button_text = apply_filters('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__proceed_to', $submit_button_text).$checkout->next_step->name();
122 122
 			}
123 123
 		}
124 124
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	return $submit_button_text;
127 127
 
128 128
 }
129
-add_filter( 'FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', 'ee_deprecated__registration_checkout__button_text', 10, 2 );
129
+add_filter('FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', 'ee_deprecated__registration_checkout__button_text', 10, 2);
130 130
 
131 131
 
132 132
 
@@ -137,16 +137,16 @@  discard block
 block discarded – undo
137 137
  * @param \EE_Checkout $checkout
138 138
  * @param boolean $status_updates
139 139
  */
140
-function ee_deprecated_finalize_transaction( EE_Checkout $checkout, $status_updates ) {
140
+function ee_deprecated_finalize_transaction(EE_Checkout $checkout, $status_updates) {
141 141
 	$action_ref = NULL;
142
-	$action_ref = has_action( 'AHEE__EE_Transaction__finalize__new_transaction' ) ? 'AHEE__EE_Transaction__finalize__new_transaction' : $action_ref;
143
-	$action_ref = has_action( 'AHEE__EE_Transaction__finalize__all_transaction' ) ? 'AHEE__EE_Transaction__finalize__all_transaction' : $action_ref;
144
-	if ( $action_ref ) {
142
+	$action_ref = has_action('AHEE__EE_Transaction__finalize__new_transaction') ? 'AHEE__EE_Transaction__finalize__new_transaction' : $action_ref;
143
+	$action_ref = has_action('AHEE__EE_Transaction__finalize__all_transaction') ? 'AHEE__EE_Transaction__finalize__all_transaction' : $action_ref;
144
+	if ($action_ref) {
145 145
 
146 146
 		EE_Error::doing_it_wrong(
147 147
 			$action_ref,
148 148
 			sprintf(
149
-				__( 'This action is deprecated.  It *may* work as an attempt to build in backwards compatibility.  However, it is recommended to use one of the following new actions: %1$s"%3$s" found in "%2$s" %1$s"%4$s" found in "%2$s" %1$s"%5$s" found in "%2$s" %1$s"%6$s" found in "%2$s"', 'event_espresso' ),
149
+				__('This action is deprecated.  It *may* work as an attempt to build in backwards compatibility.  However, it is recommended to use one of the following new actions: %1$s"%3$s" found in "%2$s" %1$s"%4$s" found in "%2$s" %1$s"%5$s" found in "%2$s" %1$s"%6$s" found in "%2$s"', 'event_espresso'),
150 150
 				'<br />',
151 151
 				'/core/business/EE_Transaction_Processor.class.php',
152 152
 				'AHEE__EE_Transaction_Processor__finalize',
@@ -156,39 +156,39 @@  discard block
 block discarded – undo
156 156
 			),
157 157
 			'4.6.0'
158 158
 		);
159
-		switch ( $action_ref ) {
159
+		switch ($action_ref) {
160 160
 			case 'AHEE__EE_Transaction__finalize__new_transaction' :
161
-				do_action( 'AHEE__EE_Transaction__finalize__new_transaction', $checkout->transaction, $checkout->admin_request );
161
+				do_action('AHEE__EE_Transaction__finalize__new_transaction', $checkout->transaction, $checkout->admin_request);
162 162
 				break;
163 163
 			case 'AHEE__EE_Transaction__finalize__all_transaction' :
164
-				do_action( 'AHEE__EE_Transaction__finalize__new_transaction', $checkout->transaction, array( 'new_reg' => ! $checkout->revisit, 'to_approved' => $status_updates ), $checkout->admin_request );
164
+				do_action('AHEE__EE_Transaction__finalize__new_transaction', $checkout->transaction, array('new_reg' => ! $checkout->revisit, 'to_approved' => $status_updates), $checkout->admin_request);
165 165
 				break;
166 166
 		}
167 167
 	}
168 168
 }
169
-add_action( 'AHEE__EE_SPCO_Reg_Step_Finalize_Registration__process_reg_step__completed', 'ee_deprecated_finalize_transaction', 10, 2 );
169
+add_action('AHEE__EE_SPCO_Reg_Step_Finalize_Registration__process_reg_step__completed', 'ee_deprecated_finalize_transaction', 10, 2);
170 170
 /**
171 171
  * ee_deprecated_finalize_registration
172 172
  *
173 173
  * @param EE_Registration $registration
174 174
  */
175
-function ee_deprecated_finalize_registration( EE_Registration $registration ) {
176
-	$action_ref = has_action( 'AHEE__EE_Registration__finalize__update_and_new_reg' ) ? 'AHEE__EE_Registration__finalize__update_and_new_reg' : NULL;
177
-	if ( $action_ref ) {
175
+function ee_deprecated_finalize_registration(EE_Registration $registration) {
176
+	$action_ref = has_action('AHEE__EE_Registration__finalize__update_and_new_reg') ? 'AHEE__EE_Registration__finalize__update_and_new_reg' : NULL;
177
+	if ($action_ref) {
178 178
 		EE_Error::doing_it_wrong(
179 179
 			$action_ref,
180 180
 			sprintf(
181
-				__( 'This action is deprecated.  It *may* work as an attempt to build in backwards compatibility.  However, it is recommended to use the following new action: %1$s"%3$s" found in "%2$s"', 'event_espresso' ),
181
+				__('This action is deprecated.  It *may* work as an attempt to build in backwards compatibility.  However, it is recommended to use the following new action: %1$s"%3$s" found in "%2$s"', 'event_espresso'),
182 182
 				'<br />',
183 183
 				'/core/business/EE_Registration_Processor.class.php',
184 184
 				'AHEE__EE_Registration_Processor__trigger_registration_status_changed_hook'
185 185
 			),
186 186
 			'4.6.0'
187 187
 		);
188
-		do_action( 'AHEE__EE_Registration__finalize__update_and_new_reg', $registration, ( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX )));
188
+		do_action('AHEE__EE_Registration__finalize__update_and_new_reg', $registration, (is_admin() && ! (defined('DOING_AJAX') && DOING_AJAX)));
189 189
 	}
190 190
 }
191
-add_action( 'AHEE__EE_Registration_Processor__trigger_registration_update_notifications', 'ee_deprecated_finalize_registration', 10, 1 );
191
+add_action('AHEE__EE_Registration_Processor__trigger_registration_update_notifications', 'ee_deprecated_finalize_registration', 10, 1);
192 192
 
193 193
 
194 194
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
  * Called after EED_Module::set_hooks() and EED_Module::set_admin_hooks() was called.
197 197
  * Checks if any deprecated hooks were hooked-into and provide doing_it_wrong messages appropriately.
198 198
  */
199
-function ee_deprecated_hooks(){
199
+function ee_deprecated_hooks() {
200 200
 	/**
201 201
 	 * @var $hooks array where keys are hook names, and their values are array{
202 202
 	 *			@type string $version  when deprecated
@@ -207,25 +207,25 @@  discard block
 block discarded – undo
207 207
 	$hooks = array(
208 208
 		'AHEE__EE_System___do_setup_validations' => array(
209 209
 			'version' => '4.6.0',
210
-			'alternative' => __( 'Instead use "AHEE__EEH_Activation__validate_messages_system" which is called after validating messages (done on every new install, upgrade, reactivation, and downgrade)', 'event_espresso' ),
210
+			'alternative' => __('Instead use "AHEE__EEH_Activation__validate_messages_system" which is called after validating messages (done on every new install, upgrade, reactivation, and downgrade)', 'event_espresso'),
211 211
 			'still_works' => FALSE
212 212
 		)
213 213
 	);
214
-	foreach( $hooks as $name => $deprecation_info ){
215
-		if( has_action( $name ) ){
214
+	foreach ($hooks as $name => $deprecation_info) {
215
+		if (has_action($name)) {
216 216
 			EE_Error::doing_it_wrong(
217 217
 				$name,
218 218
 				sprintf(
219
-					__('This filter is deprecated. %1$s%2$s','event_espresso'),
220
-					$deprecation_info[ 'still_works' ] ?  __('It *may* work as an attempt to build in backwards compatibility.', 'event_espresso') : __( 'It has been completely removed.', 'event_espresso' ),
221
-					isset( $deprecation_info[ 'alternative' ] ) ? $deprecation_info[ 'alternative' ] : __( 'Please read the current EE4 documentation further or contact Support.', 'event_espresso' )
219
+					__('This filter is deprecated. %1$s%2$s', 'event_espresso'),
220
+					$deprecation_info['still_works'] ?  __('It *may* work as an attempt to build in backwards compatibility.', 'event_espresso') : __('It has been completely removed.', 'event_espresso'),
221
+					isset($deprecation_info['alternative']) ? $deprecation_info['alternative'] : __('Please read the current EE4 documentation further or contact Support.', 'event_espresso')
222 222
 				),
223
-				isset( $deprecation_info[ 'version' ] ) ? $deprecation_info[ 'version' ] : __( 'recently', 'event_espresso' )
223
+				isset($deprecation_info['version']) ? $deprecation_info['version'] : __('recently', 'event_espresso')
224 224
 			);
225 225
 		}
226 226
 	}
227 227
 }
228
-add_action( 'AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons', 'ee_deprecated_hooks' );
228
+add_action('AHEE__EE_System__set_hooks_for_shortcodes_modules_and_addons', 'ee_deprecated_hooks');
229 229
 
230 230
 
231 231
 
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
  * @return boolean
237 237
  */
238 238
 function ee_deprecated_using_old_registration_admin_custom_questions_form_hooks() {
239
-	$in_use =  has_filter( 'FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns' )
240
-			|| has_action( 'AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save' );
241
-	if( $in_use ) {
239
+	$in_use = has_filter('FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns')
240
+			|| has_action('AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save');
241
+	if ($in_use) {
242 242
 		$msg = __(
243 243
 			'We detected you are using the filter FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns or AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save.'
244 244
 			. 'Both of these have been deprecated and should not be used anymore. You should instead use FHEE__EE_Form_Section_Proper___construct__options_array to customize the contents of the form,'
@@ -247,18 +247,18 @@  discard block
 block discarded – undo
247 247
 			'event_espresso' )
248 248
 		;
249 249
 		EE_Error::doing_it_wrong(
250
-			__CLASS__ . '::' . __FUNCTION__,
250
+			__CLASS__.'::'.__FUNCTION__,
251 251
 			$msg,
252 252
 			'4.8.32.rc.000'
253 253
 		);
254 254
 		//it seems the doing_it_wrong messages get output during some hidden html tags, so add an error to make sure this gets noticed
255
-		if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
256
-			EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ );
255
+		if (is_admin() && ! defined('DOING_AJAX')) {
256
+			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
257 257
 		}
258 258
 	}
259 259
 	return $in_use;
260 260
 }
261
-add_action( 'AHEE__Registrations_Admin_Page___registration_details_metabox__start', 'ee_deprecated_using_old_registration_admin_custom_questions_form_hooks' );
261
+add_action('AHEE__Registrations_Admin_Page___registration_details_metabox__start', 'ee_deprecated_using_old_registration_admin_custom_questions_form_hooks');
262 262
 
263 263
 /**
264 264
  * @deprecated since 4.8.32.rc.000 because it has issues on https://events.codebasehq.com/projects/event-espresso/tickets/9165
@@ -267,34 +267,34 @@  discard block
 block discarded – undo
267 267
  * @param EE_Admin_Page $admin_page
268 268
  * @return void
269 269
  */
270
-function ee_deprecated_update_attendee_registration_form_old( $admin_page ) {
270
+function ee_deprecated_update_attendee_registration_form_old($admin_page) {
271 271
 	//check if the old hooks are in use. If not, do the default
272
-	if( ! ee_deprecated_using_old_registration_admin_custom_questions_form_hooks()
273
-		|| ! $admin_page instanceof EE_Admin_Page ) {
272
+	if ( ! ee_deprecated_using_old_registration_admin_custom_questions_form_hooks()
273
+		|| ! $admin_page instanceof EE_Admin_Page) {
274 274
 		return;
275 275
 	}
276 276
 	$req_data = $admin_page->get_request_data();
277
-	$qstns = isset( $req_data['qstn'] ) ? $req_data['qstn'] : FALSE;
278
-	$REG_ID = isset( $req_data['_REG_ID'] ) ? absint( $req_data['_REG_ID'] ) : FALSE;
279
-	$qstns = apply_filters( 'FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns', $qstns );
280
-	if ( ! $REG_ID || ! $qstns ) {
281
-		EE_Error::add_error( __('An error occurred. No registration ID and/or registration questions were received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
277
+	$qstns = isset($req_data['qstn']) ? $req_data['qstn'] : FALSE;
278
+	$REG_ID = isset($req_data['_REG_ID']) ? absint($req_data['_REG_ID']) : FALSE;
279
+	$qstns = apply_filters('FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns', $qstns);
280
+	if ( ! $REG_ID || ! $qstns) {
281
+		EE_Error::add_error(__('An error occurred. No registration ID and/or registration questions were received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
282 282
 	}
283 283
 	$success = TRUE;
284 284
 
285 285
 	// allow others to get in on this awesome fun   :D
286
-	do_action( 'AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save', $REG_ID, $qstns );
286
+	do_action('AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save', $REG_ID, $qstns);
287 287
 	// loop thru questions... FINALLY!!!
288 288
 
289
-	foreach ( $qstns as $QST_ID => $qstn ) {
289
+	foreach ($qstns as $QST_ID => $qstn) {
290 290
 		//if $qstn isn't an array then it doesn't already have an answer, so let's create the answer
291
-		if ( !is_array($qstn) ) {
292
-			$success = $this->_save_new_answer( $REG_ID, $QST_ID, $qstn);
291
+		if ( ! is_array($qstn)) {
292
+			$success = $this->_save_new_answer($REG_ID, $QST_ID, $qstn);
293 293
 			continue;
294 294
 		}
295 295
 
296 296
 
297
-		foreach ( $qstn as $ANS_ID => $ANS_value ) {
297
+		foreach ($qstn as $ANS_ID => $ANS_value) {
298 298
 			//get answer
299 299
 			$query_params = array(
300 300
 				0 => array(
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 				);
306 306
 			$answer = EEM_Answer::instance()->get_one($query_params);
307 307
 			//this MAY be an array but NOT have an answer because its multi select.  If so then we need to create the answer
308
-			if ( ! $answer instanceof EE_Answer ) {
308
+			if ( ! $answer instanceof EE_Answer) {
309 309
 				$set_values = array(
310 310
 					'QST_ID' => $QST_ID,
311 311
 					'REG_ID' => $REG_ID,
@@ -320,11 +320,11 @@  discard block
 block discarded – undo
320 320
 		}
321 321
 	}
322 322
 	$what = __('Registration Form', 'event_espresso');
323
-	$route = $REG_ID ? array( 'action' => 'view_registration', '_REG_ID' => $REG_ID ) : array( 'action' => 'default' );
324
-	$admin_page->redirect_after_action( $success, $what, __('updated', 'event_espresso'), $route );
323
+	$route = $REG_ID ? array('action' => 'view_registration', '_REG_ID' => $REG_ID) : array('action' => 'default');
324
+	$admin_page->redirect_after_action($success, $what, __('updated', 'event_espresso'), $route);
325 325
 	exit;
326 326
 }
327
-add_action( 'AHEE__Registrations_Admin_Page___update_attendee_registration_form__start', 'ee_deprecated_update_attendee_registration_form_old', 10, 1 );
327
+add_action('AHEE__Registrations_Admin_Page___update_attendee_registration_form__start', 'ee_deprecated_update_attendee_registration_form_old', 10, 1);
328 328
 /**
329 329
  * Render the registration admin page's custom questions area in the old fashion
330 330
  * and firing the old hooks. When this method is removed, we can probably also
@@ -337,31 +337,31 @@  discard block
 block discarded – undo
337 337
  * @return bool
338 338
  * @throws \EE_Error
339 339
  */
340
-function ee_deprecated_reg_questions_meta_box_old( $do_default_action, $admin_page, $registration ) {
340
+function ee_deprecated_reg_questions_meta_box_old($do_default_action, $admin_page, $registration) {
341 341
 	//check if the old hooks are in use. If not, do the default
342
-	if( ! ee_deprecated_using_old_registration_admin_custom_questions_form_hooks()
343
-		|| ! $admin_page instanceof EE_Admin_Page ) {
342
+	if ( ! ee_deprecated_using_old_registration_admin_custom_questions_form_hooks()
343
+		|| ! $admin_page instanceof EE_Admin_Page) {
344 344
 		return $do_default_action;
345 345
 	}
346
-	add_filter( 'FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array( $admin_page, 'form_before_question_group' ), 10, 1 );
347
-	add_filter( 'FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array( $admin_page, 'form_after_question_group' ), 10, 1 );
348
-	add_filter( 'FHEE__EEH_Form_Fields__label_html', array( $admin_page, 'form_form_field_label_wrap' ), 10, 1 );
349
-	add_filter( 'FHEE__EEH_Form_Fields__input_html', array( $admin_page, 'form_form_field_input__wrap' ), 10, 1 );
346
+	add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array($admin_page, 'form_before_question_group'), 10, 1);
347
+	add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array($admin_page, 'form_after_question_group'), 10, 1);
348
+	add_filter('FHEE__EEH_Form_Fields__label_html', array($admin_page, 'form_form_field_label_wrap'), 10, 1);
349
+	add_filter('FHEE__EEH_Form_Fields__input_html', array($admin_page, 'form_form_field_input__wrap'), 10, 1);
350 350
 
351
-	$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options( $registration, $registration->get('EVT_ID') );
351
+	$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options($registration, $registration->get('EVT_ID'));
352 352
 
353
-	EE_Registry::instance()->load_helper( 'Form_Fields' );
353
+	EE_Registry::instance()->load_helper('Form_Fields');
354 354
 	$template_args = array(
355
-		'att_questions' => EEH_Form_Fields::generate_question_groups_html( $question_groups ),
355
+		'att_questions' => EEH_Form_Fields::generate_question_groups_html($question_groups),
356 356
 		'reg_questions_form_action' => 'edit_registration',
357 357
 		'REG_ID' => $registration->ID()
358 358
 	);
359
-	$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_questions.template.php';
360
-	echo EEH_Template::display_template( $template_path, $template_args, TRUE );
359
+	$template_path = REG_TEMPLATE_PATH.'reg_admin_details_main_meta_box_reg_questions.template.php';
360
+	echo EEH_Template::display_template($template_path, $template_args, TRUE);
361 361
 	//indicate that we should not do the default admin page code
362 362
 	return false;
363 363
 }
364
-add_action( 'FHEE__Registrations_Admin_Page___reg_questions_meta_box__do_default', 'ee_deprecated_reg_questions_meta_box_old', 10, 3 );
364
+add_action('FHEE__Registrations_Admin_Page___reg_questions_meta_box__do_default', 'ee_deprecated_reg_questions_meta_box_old', 10, 3);
365 365
 
366 366
 
367 367
 
@@ -402,9 +402,9 @@  discard block
 block discarded – undo
402 402
 			'4.9.0'
403 403
 		);
404 404
 		/** @var EE_Message_Resource_Manager $message_resource_manager */
405
-		$message_resource_manager = EE_Registry::instance()->load_lib( 'Message_Resource_Manager' );
406
-		$messenger = $message_resource_manager->get_messenger( $messenger_name );
407
-		$message_type = $message_resource_manager->get_message_type( $message_type_name );
405
+		$message_resource_manager = EE_Registry::instance()->load_lib('Message_Resource_Manager');
406
+		$messenger = $message_resource_manager->get_messenger($messenger_name);
407
+		$message_type = $message_resource_manager->get_message_type($message_type_name);
408 408
 		return EE_Registry::instance()->load_lib(
409 409
 			'Messages_Template_Defaults',
410 410
 			array(
@@ -469,15 +469,15 @@  discard block
 block discarded – undo
469 469
 	/**
470 470
 	 * @param string $method
471 471
 	 */
472
-	public function _class_is_deprecated( $method ) {
472
+	public function _class_is_deprecated($method) {
473 473
 		EE_Error::doing_it_wrong(
474
-			'EE_messages::' . $method,
475
-			__( 'EE_messages has been deprecated.  Please use EE_Message_Resource_Manager instead.' ),
474
+			'EE_messages::'.$method,
475
+			__('EE_messages has been deprecated.  Please use EE_Message_Resource_Manager instead.'),
476 476
 			'4.9.0',
477 477
 			'4.10.0.p'
478 478
 		);
479 479
 		// Please use EE_Message_Resource_Manager instead
480
-		$this->_message_resource_manager = EE_Registry::instance()->load_lib( 'Message_Resource_Manager' );
480
+		$this->_message_resource_manager = EE_Registry::instance()->load_lib('Message_Resource_Manager');
481 481
 	}
482 482
 
483 483
 
@@ -487,10 +487,10 @@  discard block
 block discarded – undo
487 487
 	 * @param string $messenger_name
488 488
 	 * @return boolean TRUE if it was PREVIOUSLY active, and FALSE if it was previously inactive
489 489
 	 */
490
-	public function ensure_messenger_is_active( $messenger_name ) {
490
+	public function ensure_messenger_is_active($messenger_name) {
491 491
 		// EE_messages has been deprecated
492
-		$this->_class_is_deprecated( __FUNCTION__ );
493
-		return $this->_message_resource_manager->ensure_messenger_is_active( $messenger_name );
492
+		$this->_class_is_deprecated(__FUNCTION__);
493
+		return $this->_message_resource_manager->ensure_messenger_is_active($messenger_name);
494 494
 	}
495 495
 
496 496
 
@@ -502,10 +502,10 @@  discard block
 block discarded – undo
502 502
 	 * @return bool true if it got activated (or was active) and false if not.
503 503
 	 * @throws \EE_Error
504 504
 	 */
505
-	public function ensure_message_type_is_active( $message_type, $messenger ) {
505
+	public function ensure_message_type_is_active($message_type, $messenger) {
506 506
 		// EE_messages has been deprecated
507
-		$this->_class_is_deprecated( __FUNCTION__ );
508
-		return $this->_message_resource_manager->ensure_message_type_is_active( $message_type, $messenger );
507
+		$this->_class_is_deprecated(__FUNCTION__);
508
+		return $this->_message_resource_manager->ensure_message_type_is_active($message_type, $messenger);
509 509
 	}
510 510
 
511 511
 
@@ -518,10 +518,10 @@  discard block
 block discarded – undo
518 518
 	 *                                            they are already setup.)
519 519
 	 * @return boolean an array of generated templates or false if nothing generated/activated.
520 520
 	 */
521
-	public function activate_messenger( $messenger_name, $mts_to_activate = array() ) {
521
+	public function activate_messenger($messenger_name, $mts_to_activate = array()) {
522 522
 		// EE_messages has been deprecated
523
-		$this->_class_is_deprecated( __FUNCTION__ );
524
-		return $this->_message_resource_manager->activate_messenger( $messenger_name, $mts_to_activate );
523
+		$this->_class_is_deprecated(__FUNCTION__);
524
+		return $this->_message_resource_manager->activate_messenger($messenger_name, $mts_to_activate);
525 525
 	}
526 526
 
527 527
 
@@ -533,10 +533,10 @@  discard block
 block discarded – undo
533 533
 	 *
534 534
 	 * @return bool true is a generating messenger and can be sent OR FALSE meaning cannot send.
535 535
 	 */
536
-	public function is_generating_messenger_and_active( EE_messenger $messenger, EE_message_type $message_type ) {
536
+	public function is_generating_messenger_and_active(EE_messenger $messenger, EE_message_type $message_type) {
537 537
 		// EE_messages has been deprecated
538
-		$this->_class_is_deprecated( __FUNCTION__ );
539
-		return $this->_message_resource_manager->is_generating_messenger_and_active( $messenger, $message_type );
538
+		$this->_class_is_deprecated(__FUNCTION__);
539
+		return $this->_message_resource_manager->is_generating_messenger_and_active($messenger, $message_type);
540 540
 	}
541 541
 
542 542
 
@@ -546,10 +546,10 @@  discard block
 block discarded – undo
546 546
 	 * @param string $messenger
547 547
 	 * @return EE_messenger | null
548 548
 	 */
549
-	public function get_messenger_if_active( $messenger ) {
549
+	public function get_messenger_if_active($messenger) {
550 550
 		// EE_messages has been deprecated
551
-		$this->_class_is_deprecated( __FUNCTION__ );
552
-		return $this->_message_resource_manager->get_active_messenger( $messenger );
551
+		$this->_class_is_deprecated(__FUNCTION__);
552
+		return $this->_message_resource_manager->get_active_messenger($messenger);
553 553
 	}
554 554
 
555 555
 
@@ -570,9 +570,9 @@  discard block
 block discarded – undo
570 570
 	 *                  'message_type' => null
571 571
 	 *                  )
572 572
 	 */
573
-	public function validate_for_use( EE_Message $message ) {
573
+	public function validate_for_use(EE_Message $message) {
574 574
 		// EE_messages has been deprecated
575
-		$this->_class_is_deprecated( __FUNCTION__ );
575
+		$this->_class_is_deprecated(__FUNCTION__);
576 576
 		return array(
577 577
 			'messenger'    => $message->messenger_object(),
578 578
 			'message_type' => $message->message_type_object(),
@@ -600,41 +600,41 @@  discard block
 block discarded – undo
600 600
 		$send = true
601 601
 	) {
602 602
 		// EE_messages has been deprecated
603
-		$this->_class_is_deprecated( __FUNCTION__ );
603
+		$this->_class_is_deprecated(__FUNCTION__);
604 604
 		/** @type EE_Messages_Processor $processor */
605
-		$processor = EE_Registry::instance()->load_lib( 'Messages_Processor' );
605
+		$processor = EE_Registry::instance()->load_lib('Messages_Processor');
606 606
 		$error = false;
607 607
 		//try to intelligently determine what method we'll call based on the incoming data.
608 608
 		//if generating and sending are different then generate and send immediately.
609
-		if ( ! empty( $sending_messenger ) && $sending_messenger != $generating_messenger && $send ) {
609
+		if ( ! empty($sending_messenger) && $sending_messenger != $generating_messenger && $send) {
610 610
 			//in the legacy system, when generating and sending were different, that means all the
611 611
 			//vars are already in the request object.  So let's just use that.
612 612
 			try {
613 613
 				/** @type EE_Message_To_Generate_From_Request $mtg */
614
-				$mtg = EE_Registry::instance()->load_lib( 'Message_To_Generate_From_Request' );
615
-				$processor->generate_and_send_now( $mtg );
616
-			} catch ( EE_Error $e ) {
614
+				$mtg = EE_Registry::instance()->load_lib('Message_To_Generate_From_Request');
615
+				$processor->generate_and_send_now($mtg);
616
+			} catch (EE_Error $e) {
617 617
 				$error_msg = __(
618 618
 					'Please note that a system message failed to send due to a technical issue.',
619 619
 					'event_espresso'
620 620
 				);
621 621
 				// add specific message for developers if WP_DEBUG in on
622
-				$error_msg .= '||' . $e->getMessage();
623
-				EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
622
+				$error_msg .= '||'.$e->getMessage();
623
+				EE_Error::add_error($error_msg, __FILE__, __FUNCTION__, __LINE__);
624 624
 				$error = true;
625 625
 			}
626 626
 		} else {
627
-			$processor->generate_for_all_active_messengers( $type, $vars, $send );
627
+			$processor->generate_for_all_active_messengers($type, $vars, $send);
628 628
 			//let's find out if there were any errors and how many successfully were queued.
629 629
 			$count_errors = $processor->get_queue()->count_STS_in_queue(
630
-				array( EEM_Message::status_failed, EEM_Message::status_debug_only )
630
+				array(EEM_Message::status_failed, EEM_Message::status_debug_only)
631 631
 			);
632
-			$count_queued = $processor->get_queue()->count_STS_in_queue( EEM_Message::status_incomplete );
633
-			$count_retry = $processor->get_queue()->count_STS_in_queue( EEM_Message::status_retry );
632
+			$count_queued = $processor->get_queue()->count_STS_in_queue(EEM_Message::status_incomplete);
633
+			$count_retry = $processor->get_queue()->count_STS_in_queue(EEM_Message::status_retry);
634 634
 			$count_errors = $count_errors + $count_retry;
635
-			if ( $count_errors > 0 ) {
635
+			if ($count_errors > 0) {
636 636
 				$error = true;
637
-				if ( $count_errors > 1 && $count_retry > 1 && $count_queued > 1 ) {
637
+				if ($count_errors > 1 && $count_retry > 1 && $count_queued > 1) {
638 638
 					$message = sprintf(
639 639
 						__(
640 640
 							'There were %d errors and %d messages successfully queued for generation and sending',
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 						$count_errors,
644 644
 						$count_queued
645 645
 					);
646
-				} elseif ( $count_errors > 1 && $count_queued === 1 ) {
646
+				} elseif ($count_errors > 1 && $count_queued === 1) {
647 647
 					$message = sprintf(
648 648
 						__(
649 649
 							'There were %d errors and %d message successfully queued for generation.',
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 						$count_errors,
653 653
 						$count_queued
654 654
 					);
655
-				} elseif ( $count_errors === 1 && $count_queued > 1 ) {
655
+				} elseif ($count_errors === 1 && $count_queued > 1) {
656 656
 					$message = sprintf(
657 657
 						__(
658 658
 							'There was %d error and %d messages successfully queued for generation.',
@@ -670,9 +670,9 @@  discard block
 block discarded – undo
670 670
 						$count_errors
671 671
 					);
672 672
 				}
673
-				EE_Error::add_error( $message, __FILE__, __FUNCTION__, __LINE__ );
673
+				EE_Error::add_error($message, __FILE__, __FUNCTION__, __LINE__);
674 674
 			} else {
675
-				if ( $count_queued === 1 ) {
675
+				if ($count_queued === 1) {
676 676
 					$message = sprintf(
677 677
 						__(
678 678
 							'%d message successfully queued for generation.',
@@ -689,18 +689,18 @@  discard block
 block discarded – undo
689 689
 						$count_queued
690 690
 					);
691 691
 				}
692
-				EE_Error::add_success( $message );
692
+				EE_Error::add_success($message);
693 693
 			}
694 694
 		}
695 695
 		//if no error then return the generated message(s).
696
-		if ( ! $error && ! $send ) {
697
-			$generated_queue = $processor->generate_queue( false );
696
+		if ( ! $error && ! $send) {
697
+			$generated_queue = $processor->generate_queue(false);
698 698
 			//get message and return.
699 699
 			$generated_queue->get_message_repository()->rewind();
700 700
 			$messages = array();
701
-			while ( $generated_queue->get_message_repository()->valid() ) {
701
+			while ($generated_queue->get_message_repository()->valid()) {
702 702
 				$message = $generated_queue->get_message_repository()->current();
703
-				if ( $message instanceof EE_Message ) {
703
+				if ($message instanceof EE_Message) {
704 704
 					//set properties that might be expected by add-ons (backward compat)
705 705
 					$message->content = $message->content();
706 706
 					$message->template_pack = $message->get_template_pack();
@@ -725,10 +725,10 @@  discard block
 block discarded – undo
725 725
 	 * @param bool    $send      true we will do a test send using the messenger delivery, false we just do a regular preview
726 726
 	 * @return string          The body of the message.
727 727
 	 */
728
-	public function preview_message( $type, $context, $messenger, $send = false ) {
728
+	public function preview_message($type, $context, $messenger, $send = false) {
729 729
 		// EE_messages has been deprecated
730
-		$this->_class_is_deprecated( __FUNCTION__ );
731
-		return EED_Messages::preview_message( $type, $context, $messenger, $send );
730
+		$this->_class_is_deprecated(__FUNCTION__);
731
+		return EED_Messages::preview_message($type, $context, $messenger, $send);
732 732
 	}
733 733
 
734 734
 
@@ -742,14 +742,14 @@  discard block
 block discarded – undo
742 742
 	 *
743 743
 	 * @return bool          success or fail.
744 744
 	 */
745
-	public function send_message_with_messenger_only( $messenger, $message_type, $message ) {
745
+	public function send_message_with_messenger_only($messenger, $message_type, $message) {
746 746
 		// EE_messages has been deprecated
747
-		$this->_class_is_deprecated( __FUNCTION__ );
747
+		$this->_class_is_deprecated(__FUNCTION__);
748 748
 		//setup for sending to new method.
749 749
 		/** @type EE_Messages_Queue $queue */
750
-		$queue = EE_Registry::instance()->load_lib( 'Messages_Queue' );
750
+		$queue = EE_Registry::instance()->load_lib('Messages_Queue');
751 751
 		//make sure we have a proper message object
752
-		if ( ! $message instanceof EE_Message && is_object( $message ) && isset( $message->content ) ) {
752
+		if ( ! $message instanceof EE_Message && is_object($message) && isset($message->content)) {
753 753
 			$msg = EE_Message_Factory::create(
754 754
 				array(
755 755
 					'MSG_messenger'    => $messenger,
@@ -761,15 +761,15 @@  discard block
 block discarded – undo
761 761
 		} else {
762 762
 			$msg = $message;
763 763
 		}
764
-		if ( ! $msg instanceof EE_Message ) {
764
+		if ( ! $msg instanceof EE_Message) {
765 765
 			return false;
766 766
 		}
767 767
 		//make sure any content in a content property (if not empty) is set on the MSG_content.
768
-		if ( ! empty( $msg->content ) ) {
769
-			$msg->set( 'MSG_content', $msg->content );
768
+		if ( ! empty($msg->content)) {
769
+			$msg->set('MSG_content', $msg->content);
770 770
 		}
771
-		$queue->add( $msg );
772
-		return EED_Messages::send_message_with_messenger_only( $messenger, $message_type, $queue );
771
+		$queue->add($msg);
772
+		return EED_Messages::send_message_with_messenger_only($messenger, $message_type, $queue);
773 773
 	}
774 774
 
775 775
 
@@ -783,11 +783,11 @@  discard block
 block discarded – undo
783 783
 	 * @return array|object if creation is successful then we return an array of info, otherwise an error_object is returned.
784 784
 	 * @throws \EE_Error
785 785
 	 */
786
-	public function create_new_templates( $messenger, $message_type, $GRP_ID = 0, $is_global = false ) {
786
+	public function create_new_templates($messenger, $message_type, $GRP_ID = 0, $is_global = false) {
787 787
 		// EE_messages has been deprecated
788
-		$this->_class_is_deprecated( __FUNCTION__ );
789
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
790
-		return EEH_MSG_Template::create_new_templates( $messenger, $message_type, $GRP_ID, $is_global );
788
+		$this->_class_is_deprecated(__FUNCTION__);
789
+		EE_Registry::instance()->load_helper('MSG_Template');
790
+		return EEH_MSG_Template::create_new_templates($messenger, $message_type, $GRP_ID, $is_global);
791 791
 	}
792 792
 
793 793
 
@@ -798,11 +798,11 @@  discard block
 block discarded – undo
798 798
 	 * @param  string $message_type_name name of EE_message_type
799 799
 	 * @return array
800 800
 	 */
801
-	public function get_fields( $messenger_name, $message_type_name ) {
801
+	public function get_fields($messenger_name, $message_type_name) {
802 802
 		// EE_messages has been deprecated
803
-		$this->_class_is_deprecated( __FUNCTION__ );
804
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
805
-		return EEH_MSG_Template::get_fields( $messenger_name, $message_type_name );
803
+		$this->_class_is_deprecated(__FUNCTION__);
804
+		EE_Registry::instance()->load_helper('MSG_Template');
805
+		return EEH_MSG_Template::get_fields($messenger_name, $message_type_name);
806 806
 	}
807 807
 
808 808
 
@@ -816,13 +816,13 @@  discard block
 block discarded – undo
816 816
 	 * @return array                    multidimensional array of messenger and message_type objects
817 817
 	 *                                    (messengers index, and message_type index);
818 818
 	 */
819
-	public function get_installed( $type = 'all', $skip_cache = false ) {
819
+	public function get_installed($type = 'all', $skip_cache = false) {
820 820
 		// EE_messages has been deprecated
821
-		$this->_class_is_deprecated( __FUNCTION__ );
822
-		if ( $skip_cache ) {
821
+		$this->_class_is_deprecated(__FUNCTION__);
822
+		if ($skip_cache) {
823 823
 			$this->_message_resource_manager->reset_active_messengers_and_message_types();
824 824
 		}
825
-		switch ( $type ) {
825
+		switch ($type) {
826 826
 			case 'messengers' :
827 827
 				return array(
828 828
 					'messenger' => $this->_message_resource_manager->installed_messengers(),
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 	 */
852 852
 	public function get_active_messengers() {
853 853
 		// EE_messages has been deprecated
854
-		$this->_class_is_deprecated( __FUNCTION__ );
854
+		$this->_class_is_deprecated(__FUNCTION__);
855 855
 		return $this->_message_resource_manager->active_messengers();
856 856
 	}
857 857
 
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 	 */
864 864
 	public function get_active_message_types() {
865 865
 		// EE_messages has been deprecated
866
-		$this->_class_is_deprecated( __FUNCTION__ );
866
+		$this->_class_is_deprecated(__FUNCTION__);
867 867
 		return $this->_message_resource_manager->list_of_active_message_types();
868 868
 	}
869 869
 
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 	 */
876 876
 	public function get_active_message_type_objects() {
877 877
 		// EE_messages has been deprecated
878
-		$this->_class_is_deprecated( __FUNCTION__ );
878
+		$this->_class_is_deprecated(__FUNCTION__);
879 879
 		return $this->_message_resource_manager->get_active_message_type_objects();
880 880
 	}
881 881
 
@@ -887,10 +887,10 @@  discard block
 block discarded – undo
887 887
 	 * @param string $messenger The messenger being checked
888 888
 	 * @return EE_message_type[]    (or empty array if none present)
889 889
 	 */
890
-	public function get_active_message_types_per_messenger( $messenger ) {
890
+	public function get_active_message_types_per_messenger($messenger) {
891 891
 		// EE_messages has been deprecated
892
-		$this->_class_is_deprecated( __FUNCTION__ );
893
-		return $this->_message_resource_manager->get_active_message_types_for_messenger( $messenger );
892
+		$this->_class_is_deprecated(__FUNCTION__);
893
+		return $this->_message_resource_manager->get_active_message_types_for_messenger($messenger);
894 894
 	}
895 895
 
896 896
 
@@ -901,10 +901,10 @@  discard block
 block discarded – undo
901 901
 	 * @param string $message_type The string should correspond to a message type.
902 902
 	 * @return EE_message_type|null
903 903
 	 */
904
-	public function get_active_message_type( $messenger, $message_type ) {
904
+	public function get_active_message_type($messenger, $message_type) {
905 905
 		// EE_messages has been deprecated
906
-		$this->_class_is_deprecated( __FUNCTION__ );
907
-		return $this->_message_resource_manager->get_active_message_type_for_messenger( $messenger, $message_type );
906
+		$this->_class_is_deprecated(__FUNCTION__);
907
+		return $this->_message_resource_manager->get_active_message_type_for_messenger($messenger, $message_type);
908 908
 	}
909 909
 
910 910
 
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
 	 */
916 916
 	public function get_installed_message_types() {
917 917
 		// EE_messages has been deprecated
918
-		$this->_class_is_deprecated( __FUNCTION__ );
918
+		$this->_class_is_deprecated(__FUNCTION__);
919 919
 		return $this->_message_resource_manager->installed_message_types();
920 920
 	}
921 921
 
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
 	 */
928 928
 	public function get_installed_messengers() {
929 929
 		// EE_messages has been deprecated
930
-		$this->_class_is_deprecated( __FUNCTION__ );
930
+		$this->_class_is_deprecated(__FUNCTION__);
931 931
 		return $this->_message_resource_manager->installed_messengers();
932 932
 	}
933 933
 
@@ -938,10 +938,10 @@  discard block
 block discarded – undo
938 938
 	 * @param   bool $slugs_only Whether to return an array of just slugs and labels (true) or all contexts indexed by message type.
939 939
 	 * @return array
940 940
 	 */
941
-	public function get_all_contexts( $slugs_only = true ) {
941
+	public function get_all_contexts($slugs_only = true) {
942 942
 		// EE_messages has been deprecated
943
-		$this->_class_is_deprecated( __FUNCTION__ );
944
-		return $this->_message_resource_manager->get_all_contexts( $slugs_only );
943
+		$this->_class_is_deprecated(__FUNCTION__);
944
+		return $this->_message_resource_manager->get_all_contexts($slugs_only);
945 945
 	}
946 946
 
947 947
 
@@ -1000,7 +1000,7 @@  discard block
 block discarded – undo
1000 1000
 add_filter(
1001 1001
 	'FHEE__EventEspresso_modules_events_archive_EventsArchiveIframe__display__css',
1002 1002
 	function($event_list_iframe_css) {
1003
-		if ( ! has_filter( 'FHEE__EventsArchiveIframe__event_list_iframe__css' )) {
1003
+		if ( ! has_filter('FHEE__EventsArchiveIframe__event_list_iframe__css')) {
1004 1004
 			return $event_list_iframe_css;
1005 1005
 		}
1006 1006
 		deprecated_espresso_action_or_filter_doing_it_wrong(
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
 add_filter(
1021 1021
 	'FHEE__EventEspresso_modules_events_archive_EventsArchiveIframe__display__js',
1022 1022
 	function($event_list_iframe_js) {
1023
-		if ( ! has_filter( 'FHEE__EED_Ticket_Selector__ticket_selector_iframe__js' )) {
1023
+		if ( ! has_filter('FHEE__EED_Ticket_Selector__ticket_selector_iframe__js')) {
1024 1024
 			return $event_list_iframe_js;
1025 1025
 		}
1026 1026
 		deprecated_espresso_action_or_filter_doing_it_wrong(
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 add_action(
1041 1041
 	'AHEE__EE_Capabilities__addCaps__complete',
1042 1042
 	function($capabilities_map) {
1043
-		if ( ! has_action( 'AHEE__EE_Capabilities__init_role_caps__complete' )) {
1043
+		if ( ! has_action('AHEE__EE_Capabilities__init_role_caps__complete')) {
1044 1044
 			return;
1045 1045
 		}
1046 1046
 		deprecated_espresso_action_or_filter_doing_it_wrong(
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
 add_filter(
1061 1061
 	'FHEE_EventEspresso_core_services_commands_attendee_CreateAttendeeCommandHandler__findExistingAttendee__existing_attendee',
1062 1062
 	function($existing_attendee, $registration, $attendee_data) {
1063
-		if ( ! has_filter( 'FHEE_EE_Single_Page_Checkout__save_registration_items__find_existing_attendee' )) {
1063
+		if ( ! has_filter('FHEE_EE_Single_Page_Checkout__save_registration_items__find_existing_attendee')) {
1064 1064
 			return $existing_attendee;
1065 1065
 		}
1066 1066
 		deprecated_espresso_action_or_filter_doing_it_wrong(
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
             $existing_attendee, $registration, $attendee_data
1077 1077
         );
1078 1078
 	},
1079
-	10,3
1079
+	10, 3
1080 1080
 );
1081 1081
 
1082 1082
 /**
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
      */
1141 1141
     public function event_list_title($event_list_title = '')
1142 1142
     {
1143
-        if (! empty($this->title)) {
1143
+        if ( ! empty($this->title)) {
1144 1144
             return $this->title;
1145 1145
         }
1146 1146
         return $event_list_title;
Please login to merge, or discard this patch.
Indentation   +149 added lines, -149 removed lines patch added patch discarded remove patch
@@ -1052,7 +1052,7 @@  discard block
 block discarded – undo
1052 1052
 		);
1053 1053
 		do_action(
1054 1054
 			'AHEE__EE_Capabilities__init_role_caps__complete',
1055
-            $capabilities_map
1055
+			$capabilities_map
1056 1056
 		);
1057 1057
 	}
1058 1058
 );
@@ -1072,9 +1072,9 @@  discard block
 block discarded – undo
1072 1072
 			'filter'
1073 1073
 		);
1074 1074
 		return apply_filters(
1075
-            'FHEE_EE_Single_Page_Checkout__save_registration_items__find_existing_attendee',
1076
-            $existing_attendee, $registration, $attendee_data
1077
-        );
1075
+			'FHEE_EE_Single_Page_Checkout__save_registration_items__find_existing_attendee',
1076
+			$existing_attendee, $registration, $attendee_data
1077
+		);
1078 1078
 	},
1079 1079
 	10,3
1080 1080
 );
@@ -1087,89 +1087,89 @@  discard block
 block discarded – undo
1087 1087
 class EE_Event_List_Query extends WP_Query
1088 1088
 {
1089 1089
 
1090
-    private $title;
1091
-
1092
-    private $css_class;
1093
-
1094
-    private $category_slug;
1095
-
1096
-    /**
1097
-     * EE_Event_List_Query constructor.
1098
-     *
1099
-     * @param array $args
1100
-     */
1101
-    public function __construct($args = array())
1102
-    {
1103
-        \EE_Error::doing_it_wrong(
1104
-            __METHOD__,
1105
-            __(
1106
-                'Usage is deprecated. Please use \EventEspresso\core\domain\services\wp_queries\EventListQuery instead.',
1107
-                'event_espresso'
1108
-            ),
1109
-            '4.9.27',
1110
-            '5.0.0'
1111
-        );
1112
-        $this->title = isset($args['title']) ? $args['title'] : '';
1113
-        $this->css_class = isset($args['css_class']) ? $args['css_class'] : '';
1114
-        $this->category_slug = isset($args['category_slug']) ? $args['category_slug'] : '';
1115
-        $limit = isset($args['limit']) && absint($args['limit']) ? $args['limit'] : 10;
1116
-        // the current "page" we are viewing
1117
-        $paged = max(1, get_query_var('paged'));
1118
-        // Force these args
1119
-        $args = array_merge(
1120
-            $args, array(
1121
-            'post_type'              => 'espresso_events',
1122
-            'posts_per_page'         => $limit,
1123
-            'update_post_term_cache' => false,
1124
-            'update_post_meta_cache' => false,
1125
-            'paged'                  => $paged,
1126
-            'offset'                 => ($paged - 1) * $limit
1127
-        )
1128
-        );
1129
-        // run the query
1130
-        parent::__construct($args);
1131
-    }
1132
-
1133
-
1134
-
1135
-    /**
1136
-     * event_list_title
1137
-     *
1138
-     * @param string $event_list_title
1139
-     * @return string
1140
-     */
1141
-    public function event_list_title($event_list_title = '')
1142
-    {
1143
-        if (! empty($this->title)) {
1144
-            return $this->title;
1145
-        }
1146
-        return $event_list_title;
1147
-    }
1148
-
1149
-
1150
-
1151
-    /**
1152
-     * event_list_css
1153
-     *
1154
-     * @param string $event_list_css
1155
-     * @return string
1156
-     */
1157
-    public function event_list_css($event_list_css = '')
1158
-    {
1159
-        $event_list_css .= ! empty($event_list_css)
1160
-            ? ' '
1161
-            : '';
1162
-        $event_list_css .= ! empty($this->css_class)
1163
-            ? $this->css_class
1164
-            : '';
1165
-        $event_list_css .= ! empty($event_list_css)
1166
-            ? ' '
1167
-            : '';
1168
-        $event_list_css .= ! empty($this->category_slug)
1169
-            ? $this->category_slug
1170
-            : '';
1171
-        return $event_list_css;
1172
-    }
1090
+	private $title;
1091
+
1092
+	private $css_class;
1093
+
1094
+	private $category_slug;
1095
+
1096
+	/**
1097
+	 * EE_Event_List_Query constructor.
1098
+	 *
1099
+	 * @param array $args
1100
+	 */
1101
+	public function __construct($args = array())
1102
+	{
1103
+		\EE_Error::doing_it_wrong(
1104
+			__METHOD__,
1105
+			__(
1106
+				'Usage is deprecated. Please use \EventEspresso\core\domain\services\wp_queries\EventListQuery instead.',
1107
+				'event_espresso'
1108
+			),
1109
+			'4.9.27',
1110
+			'5.0.0'
1111
+		);
1112
+		$this->title = isset($args['title']) ? $args['title'] : '';
1113
+		$this->css_class = isset($args['css_class']) ? $args['css_class'] : '';
1114
+		$this->category_slug = isset($args['category_slug']) ? $args['category_slug'] : '';
1115
+		$limit = isset($args['limit']) && absint($args['limit']) ? $args['limit'] : 10;
1116
+		// the current "page" we are viewing
1117
+		$paged = max(1, get_query_var('paged'));
1118
+		// Force these args
1119
+		$args = array_merge(
1120
+			$args, array(
1121
+			'post_type'              => 'espresso_events',
1122
+			'posts_per_page'         => $limit,
1123
+			'update_post_term_cache' => false,
1124
+			'update_post_meta_cache' => false,
1125
+			'paged'                  => $paged,
1126
+			'offset'                 => ($paged - 1) * $limit
1127
+		)
1128
+		);
1129
+		// run the query
1130
+		parent::__construct($args);
1131
+	}
1132
+
1133
+
1134
+
1135
+	/**
1136
+	 * event_list_title
1137
+	 *
1138
+	 * @param string $event_list_title
1139
+	 * @return string
1140
+	 */
1141
+	public function event_list_title($event_list_title = '')
1142
+	{
1143
+		if (! empty($this->title)) {
1144
+			return $this->title;
1145
+		}
1146
+		return $event_list_title;
1147
+	}
1148
+
1149
+
1150
+
1151
+	/**
1152
+	 * event_list_css
1153
+	 *
1154
+	 * @param string $event_list_css
1155
+	 * @return string
1156
+	 */
1157
+	public function event_list_css($event_list_css = '')
1158
+	{
1159
+		$event_list_css .= ! empty($event_list_css)
1160
+			? ' '
1161
+			: '';
1162
+		$event_list_css .= ! empty($this->css_class)
1163
+			? $this->css_class
1164
+			: '';
1165
+		$event_list_css .= ! empty($event_list_css)
1166
+			? ' '
1167
+			: '';
1168
+		$event_list_css .= ! empty($this->category_slug)
1169
+			? $this->category_slug
1170
+			: '';
1171
+		return $event_list_css;
1172
+	}
1173 1173
 
1174 1174
 }
1175 1175
 
@@ -1186,66 +1186,66 @@  discard block
 block discarded – undo
1186 1186
 {
1187 1187
 
1188 1188
 
1189
-    /**
1190
-     *    class constructor
1191
-     *
1192
-     * @deprecated 4.9.59.p
1193
-     */
1194
-    public function __construct()
1195
-    {
1196
-        EE_Error::doing_it_wrong(
1197
-            __METHOD__,
1198
-            sprintf(
1199
-                esc_html__('%1$s has been replaced by %2$s.', 'event_espresso'),
1200
-                __CLASS__,
1201
-                'EventEspresso\core\services\licensing\LicenseServices'
1202
-            ),
1203
-            '4.9.59.p'
1204
-        );
1205
-    }
1206
-
1207
-
1208
-    /**
1209
-     * The purpose of this function is to display information about Event Espresso data collection
1210
-     * and a optin selection for extra data collecting by users.
1211
-     *
1212
-     * @param bool $extra
1213
-     * @return string html.
1214
-     * @deprecated 4.9.59.p
1215
-     */
1216
-    public static function espresso_data_collection_optin_text($extra = true)
1217
-    {
1218
-        EE_Error::doing_it_wrong(
1219
-            __METHOD__,
1220
-            sprintf(
1221
-                esc_html__('%1$s has been replaced by %2$s.', 'event_espresso'),
1222
-                __METHOD__,
1223
-                'EventEspresso\core\domain\services\Stats::optinText'
1224
-            ),
1225
-            '4.9.59.p'
1226
-        );
1227
-        Stats::optinText($extra);
1228
-    }
1229
-
1230
-    /**
1231
-     * This is a handy helper method for retrieving whether there is an update available for the given plugin.
1232
-     *
1233
-     * @param  string $basename Use the equivalent result from plugin_basename() for this param as WP uses that to
1234
-     *                          identify plugins. Defaults to core update
1235
-     * @return boolean           True if update available, false if not.
1236
-     * @deprecated 4.9.59.p
1237
-     */
1238
-    public static function is_update_available($basename = '')
1239
-    {
1240
-        EE_Error::doing_it_wrong(
1241
-            __METHOD__,
1242
-            sprintf(
1243
-                esc_html__('%1$s has been replaced by %2$s.', 'event_espresso'),
1244
-                __METHOD__,
1245
-                'EventEspresso\core\services\licensing\LicenseService::isUpdateAvailable'
1246
-            ),
1247
-            '4.9.59.p'
1248
-        );
1249
-        return LicenseService::isUpdateAvailable($basename);
1250
-    }
1189
+	/**
1190
+	 *    class constructor
1191
+	 *
1192
+	 * @deprecated 4.9.59.p
1193
+	 */
1194
+	public function __construct()
1195
+	{
1196
+		EE_Error::doing_it_wrong(
1197
+			__METHOD__,
1198
+			sprintf(
1199
+				esc_html__('%1$s has been replaced by %2$s.', 'event_espresso'),
1200
+				__CLASS__,
1201
+				'EventEspresso\core\services\licensing\LicenseServices'
1202
+			),
1203
+			'4.9.59.p'
1204
+		);
1205
+	}
1206
+
1207
+
1208
+	/**
1209
+	 * The purpose of this function is to display information about Event Espresso data collection
1210
+	 * and a optin selection for extra data collecting by users.
1211
+	 *
1212
+	 * @param bool $extra
1213
+	 * @return string html.
1214
+	 * @deprecated 4.9.59.p
1215
+	 */
1216
+	public static function espresso_data_collection_optin_text($extra = true)
1217
+	{
1218
+		EE_Error::doing_it_wrong(
1219
+			__METHOD__,
1220
+			sprintf(
1221
+				esc_html__('%1$s has been replaced by %2$s.', 'event_espresso'),
1222
+				__METHOD__,
1223
+				'EventEspresso\core\domain\services\Stats::optinText'
1224
+			),
1225
+			'4.9.59.p'
1226
+		);
1227
+		Stats::optinText($extra);
1228
+	}
1229
+
1230
+	/**
1231
+	 * This is a handy helper method for retrieving whether there is an update available for the given plugin.
1232
+	 *
1233
+	 * @param  string $basename Use the equivalent result from plugin_basename() for this param as WP uses that to
1234
+	 *                          identify plugins. Defaults to core update
1235
+	 * @return boolean           True if update available, false if not.
1236
+	 * @deprecated 4.9.59.p
1237
+	 */
1238
+	public static function is_update_available($basename = '')
1239
+	{
1240
+		EE_Error::doing_it_wrong(
1241
+			__METHOD__,
1242
+			sprintf(
1243
+				esc_html__('%1$s has been replaced by %2$s.', 'event_espresso'),
1244
+				__METHOD__,
1245
+				'EventEspresso\core\services\licensing\LicenseService::isUpdateAvailable'
1246
+			),
1247
+			'4.9.59.p'
1248
+		);
1249
+		return LicenseService::isUpdateAvailable($basename);
1250
+	}
1251 1251
 }
1252 1252
\ No newline at end of file
Please login to merge, or discard this patch.
messages/defaults/default/email_payment_reminder_content.template.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -31,29 +31,29 @@  discard block
 block discarded – undo
31 31
 						<tbody>
32 32
 							<tr>
33 33
 								<td>
34
-									<h2><?php printf( esc_html__( 'Hello, %s:', 'event_espresso' ), '[PRIMARY_REGISTRANT_FNAME] [PRIMARY_REGISTRANT_LNAME]' ); ?></h2>
35
-									<p class="lead"><?php esc_html_e( "We'd like to remind you that you still owe money for the following transaction:", 'event_espresso' ); ?></p>
36
-									<h3><?php esc_html_e( 'Payment Details:', 'event_espresso' ); ?></h3>
34
+									<h2><?php printf(esc_html__('Hello, %s:', 'event_espresso'), '[PRIMARY_REGISTRANT_FNAME] [PRIMARY_REGISTRANT_LNAME]'); ?></h2>
35
+									<p class="lead"><?php esc_html_e("We'd like to remind you that you still owe money for the following transaction:", 'event_espresso'); ?></p>
36
+									<h3><?php esc_html_e('Payment Details:', 'event_espresso'); ?></h3>
37 37
 									<ul>
38 38
 										<li>
39
-											<strong><?php esc_html_e( 'Payment Status:', 'event_espresso' ); ?></strong> [PAYMENT_STATUS]
39
+											<strong><?php esc_html_e('Payment Status:', 'event_espresso'); ?></strong> [PAYMENT_STATUS]
40 40
 										</li>
41 41
 										<li>
42
-											<strong><?php esc_html_e( 'Transaction ID:', 'event_espresso' ); ?></strong> [TXN_ID]
42
+											<strong><?php esc_html_e('Transaction ID:', 'event_espresso'); ?></strong> [TXN_ID]
43 43
 										</li>
44 44
 										<li>
45
-											<strong><?php esc_html_e( 'Total Cost:', 'event_espresso' ); ?></strong> [TOTAL_COST]
45
+											<strong><?php esc_html_e('Total Cost:', 'event_espresso'); ?></strong> [TOTAL_COST]
46 46
 										</li>
47 47
 										<li>
48
-											<strong><?php esc_html_e( 'Amount Due:', 'event_espresso' ); ?></strong> [TOTAL_OWING]
48
+											<strong><?php esc_html_e('Amount Due:', 'event_espresso'); ?></strong> [TOTAL_OWING]
49 49
 										</li>
50 50
 									</ul>
51 51
 									<p class="callout">
52
-										<?php printf( esc_html__( 'Please %sretry your payment%s, or choose an alternate payment method to reserve your space.', 'event_espresso' ), '<a href="[PAYMENT_URL]">', '</a>' ); ?>
52
+										<?php printf(esc_html__('Please %sretry your payment%s, or choose an alternate payment method to reserve your space.', 'event_espresso'), '<a href="[PAYMENT_URL]">', '</a>'); ?>
53 53
 									</p>
54 54
 									[EVENT_LIST]
55 55
 									<p class="callout">
56
-										<?php printf( esc_html__( 'Please %sretry your payment%s, or choose an alternate payment method to reserve your space.', 'event_espresso' ), '<a href="[PAYMENT_URL]">', '</a>' ); ?>
56
+										<?php printf(esc_html__('Please %sretry your payment%s, or choose an alternate payment method to reserve your space.', 'event_espresso'), '<a href="[PAYMENT_URL]">', '</a>'); ?>
57 57
 									</p>
58 58
 								</td>
59 59
 							</tr>
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
 									<tbody>
79 79
 										<tr>
80 80
 											<td>
81
-												<h3><?php esc_html_e( 'Connect with Us:', 'event_espresso' ); ?></h3>
82
-												<a class="soc-btn fb" href="[CO_FACEBOOK_URL]"><?php esc_html_e( 'Facebook', 'event_espresso' ); ?></a>
83
-												<a class="soc-btn tw" href="[CO_TWITTER_URL]"><?php esc_html_e( 'Twitter', 'event_espresso' ); ?></a>
84
-												<a class="soc-btn gp" href="[CO_GOOGLE_URL]"><?php esc_html_e( 'Google+', 'event_espresso' ); ?></a>
81
+												<h3><?php esc_html_e('Connect with Us:', 'event_espresso'); ?></h3>
82
+												<a class="soc-btn fb" href="[CO_FACEBOOK_URL]"><?php esc_html_e('Facebook', 'event_espresso'); ?></a>
83
+												<a class="soc-btn tw" href="[CO_TWITTER_URL]"><?php esc_html_e('Twitter', 'event_espresso'); ?></a>
84
+												<a class="soc-btn gp" href="[CO_GOOGLE_URL]"><?php esc_html_e('Google+', 'event_espresso'); ?></a>
85 85
 											</td>
86 86
 										</tr>
87 87
 									</tbody>
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
 									<tbody>
92 92
 										<tr>
93 93
 											<td>
94
-												<h3><?php esc_html_e( 'Contact Info:', 'event_espresso' ); ?></h3>
95
-												<?php esc_html_e( 'Phone:', 'event_espresso' ); ?> <strong>[CO_PHONE]</strong>
96
-												<?php esc_html_e( 'Email:', 'event_espresso' ); ?>
94
+												<h3><?php esc_html_e('Contact Info:', 'event_espresso'); ?></h3>
95
+												<?php esc_html_e('Phone:', 'event_espresso'); ?> <strong>[CO_PHONE]</strong>
96
+												<?php esc_html_e('Email:', 'event_espresso'); ?>
97 97
 												<strong><a href="mailto:[CO_EMAIL]" target="_blank">[CO_EMAIL]</a></strong>
98 98
 											</td>
99 99
 										</tr>
Please login to merge, or discard this patch.
messages/defaults/default/email_payment_reminder_content_admin.template.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,23 +31,23 @@  discard block
 block discarded – undo
31 31
 						<tbody>
32 32
 							<tr>
33 33
 								<td>
34
-									<h1><?php esc_html_e( 'Payment Reminder Notification', 'event_espresso' ); ?></h1>
35
-									<?php esc_html_e( 'The following message was sent to the Primary Registrant of this transaction:', 'event_espresso' ); ?>
36
-									<h3><?php esc_html_e( 'Payment Details:', 'event_espresso' ); ?></h3>
34
+									<h1><?php esc_html_e('Payment Reminder Notification', 'event_espresso'); ?></h1>
35
+									<?php esc_html_e('The following message was sent to the Primary Registrant of this transaction:', 'event_espresso'); ?>
36
+									<h3><?php esc_html_e('Payment Details:', 'event_espresso'); ?></h3>
37 37
 									<ul>
38 38
 										<li>
39
-											<strong><?php esc_html_e( 'Payment Status:', 'event_espresso' ); ?></strong> [PAYMENT_STATUS]
39
+											<strong><?php esc_html_e('Payment Status:', 'event_espresso'); ?></strong> [PAYMENT_STATUS]
40 40
 										</li>
41
-										<li><strong><?php esc_html_e( 'Transaction ID:', 'event_espresso' ); ?></strong>
41
+										<li><strong><?php esc_html_e('Transaction ID:', 'event_espresso'); ?></strong>
42 42
 											<a href="[TRANSACTION_ADMIN_URL]">[TXN_ID]</a></li>
43 43
 										<li>
44
-											<strong><?php esc_html_e( 'Payment Gateway:', 'event_espresso' ); ?></strong> [PAYMENT_GATEWAY]
44
+											<strong><?php esc_html_e('Payment Gateway:', 'event_espresso'); ?></strong> [PAYMENT_GATEWAY]
45 45
 										</li>
46 46
 										<li>
47
-											<strong><?php esc_html_e( 'Total Cost:', 'event_espresso' ); ?></strong> [TOTAL_COST]
47
+											<strong><?php esc_html_e('Total Cost:', 'event_espresso'); ?></strong> [TOTAL_COST]
48 48
 										</li>
49 49
 										<li>
50
-											<strong><?php esc_html_e( 'Amount Due:', 'event_espresso' ); ?></strong> [TOTAL_OWING]
50
+											<strong><?php esc_html_e('Amount Due:', 'event_espresso'); ?></strong> [TOTAL_OWING]
51 51
 										</li>
52 52
 									</ul>
53 53
 								</td>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 					</table>
57 57
 				</div>
58 58
 				<div class="content">
59
-					<h2><?php esc_html_e( 'Registrant Details:', 'event_espresso' ); ?></h2>
59
+					<h2><?php esc_html_e('Registrant Details:', 'event_espresso'); ?></h2>
60 60
 					<p class="callout"><strong>[PRIMARY_REGISTRANT_FNAME] [PRIMARY_REGISTRANT_LNAME]:</strong>
61 61
 						<a href="mailto:[PRIMARY_REGISTRANT_EMAIL]">[PRIMARY_REGISTRANT_EMAIL]</a></p>
62 62
 				</div>
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Recipient_Details_Shortcodes.lib.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,14 +64,14 @@
 block discarded – undo
64 64
 		//make sure we end up with a copy of the EE_Messages_Addressee object
65 65
 		$this->_recipient = $this->_data instanceof EE_Messages_Addressee ? $this->_data : null;
66 66
 		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee
67
-		                    && is_array( $this->_data )
68
-		                    && isset( $this->_data['data'] )
69
-		                    && $this->_data['data'] instanceof EE_Messages_Addressee
67
+							&& is_array( $this->_data )
68
+							&& isset( $this->_data['data'] )
69
+							&& $this->_data['data'] instanceof EE_Messages_Addressee
70 70
 			? $this->_data['data'] :
71 71
 			$this->_recipient;
72 72
 		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee
73
-		                    && ! empty( $this->_extra_data['data'] )
74
-		                    && $this->_extra_data['data'] instanceof EE_Messages_Addressee
73
+							&& ! empty( $this->_extra_data['data'] )
74
+							&& $this->_extra_data['data'] instanceof EE_Messages_Addressee
75 75
 			? $this->_extra_data['data']
76 76
 			: $this->_recipient;
77 77
 
Please login to merge, or discard this patch.
Spacing   +66 added lines, -67 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -37,24 +37,24 @@  discard block
 block discarded – undo
37 37
 
38 38
 
39 39
 	protected function _init_props() {
40
-		$this->label = esc_html__( 'Recipient Details Shortcodes', 'event_espresso' );
41
-		$this->description = esc_html__( 'All shortcodes specific to recipient registration data', 'event_espresso' );
40
+		$this->label = esc_html__('Recipient Details Shortcodes', 'event_espresso');
41
+		$this->description = esc_html__('All shortcodes specific to recipient registration data', 'event_espresso');
42 42
 		$this->_shortcodes = array(
43
-			'[RECIPIENT_FNAME]' => esc_html__( 'Parses to the first name of the recipient for the message.', 'event_espresso' ),
44
-			'[RECIPIENT_LNAME]' => esc_html__( 'Parses to the last name of the recipient for the message.', 'event_espresso' ),
45
-			'[RECIPIENT_EMAIL]' => esc_html__( 'Parses to the email address of the recipient for the message.', 'event_espresso' ),
46
-			'[RECIPIENT_REGISTRATION_ID]' => esc_html__( 'Parses to the registration ID of the recipient for the message.', 'event_espresso' ),
47
-			'[RECIPIENT_REGISTRATION_CODE]' => esc_html__( 'Parses to the registration code of the recipient for the message.', 'event_espresso' ),
48
-			'[RECIPIENT_EDIT_REGISTRATION_LINK]' => esc_html__( 'Parses to a link for frontend editing of the registration for the recipient.', 'event_espresso' ),
49
-			'[RECIPIENT_PHONE_NUMBER]' => esc_html__( 'The Phone Number for the recipient of the message.', 'event_espresso' ),
50
-			'[RECIPIENT_ADDRESS]' => esc_html__( 'The Address for the recipient of the message.', 'event_espresso' ),
51
-			'[RECIPIENT_ADDRESS2]' => esc_html__( 'Whatever was in the address 2 field for the recipient of the message.', 'event_espresso' ),
52
-			'[RECIPIENT_CITY]' => esc_html__( 'The city for the recipient of the message.', 'event_espresso' ),
53
-			'[RECIPIENT_ZIP_PC]' => esc_html__( 'The ZIP (or Postal) Code for the recipient of the message.', 'event_espresso' ),
54
-			'[RECIPIENT_ADDRESS_STATE]' => esc_html__( 'The state/province for the recipient of the message.', 'event_espresso' ),
55
-			'[RECIPIENT_COUNTRY]' => esc_html__( 'The country for the recipient of the message.', 'event_espresso' ),
56
-			'[RECIPIENT_ANSWER_*]' => esc_html__( 'This is a special dynamic shortcode.  After the "*", add the exact text of an existing question, and if there is an answer for that question for this recipient, then it will be output in place of this shortcode.', 'event_espresso' ),
57
-			'[RECIPIENT_TOTAL_AMOUNT_PAID]' => esc_html__( 'If a single registration related to the recipient is available, that is used to retrieve the total amount that has been paid for this recipient.  Otherwise the value of 0 is printed.', 'event_espresso' )
43
+			'[RECIPIENT_FNAME]' => esc_html__('Parses to the first name of the recipient for the message.', 'event_espresso'),
44
+			'[RECIPIENT_LNAME]' => esc_html__('Parses to the last name of the recipient for the message.', 'event_espresso'),
45
+			'[RECIPIENT_EMAIL]' => esc_html__('Parses to the email address of the recipient for the message.', 'event_espresso'),
46
+			'[RECIPIENT_REGISTRATION_ID]' => esc_html__('Parses to the registration ID of the recipient for the message.', 'event_espresso'),
47
+			'[RECIPIENT_REGISTRATION_CODE]' => esc_html__('Parses to the registration code of the recipient for the message.', 'event_espresso'),
48
+			'[RECIPIENT_EDIT_REGISTRATION_LINK]' => esc_html__('Parses to a link for frontend editing of the registration for the recipient.', 'event_espresso'),
49
+			'[RECIPIENT_PHONE_NUMBER]' => esc_html__('The Phone Number for the recipient of the message.', 'event_espresso'),
50
+			'[RECIPIENT_ADDRESS]' => esc_html__('The Address for the recipient of the message.', 'event_espresso'),
51
+			'[RECIPIENT_ADDRESS2]' => esc_html__('Whatever was in the address 2 field for the recipient of the message.', 'event_espresso'),
52
+			'[RECIPIENT_CITY]' => esc_html__('The city for the recipient of the message.', 'event_espresso'),
53
+			'[RECIPIENT_ZIP_PC]' => esc_html__('The ZIP (or Postal) Code for the recipient of the message.', 'event_espresso'),
54
+			'[RECIPIENT_ADDRESS_STATE]' => esc_html__('The state/province for the recipient of the message.', 'event_espresso'),
55
+			'[RECIPIENT_COUNTRY]' => esc_html__('The country for the recipient of the message.', 'event_espresso'),
56
+			'[RECIPIENT_ANSWER_*]' => esc_html__('This is a special dynamic shortcode.  After the "*", add the exact text of an existing question, and if there is an answer for that question for this recipient, then it will be output in place of this shortcode.', 'event_espresso'),
57
+			'[RECIPIENT_TOTAL_AMOUNT_PAID]' => esc_html__('If a single registration related to the recipient is available, that is used to retrieve the total amount that has been paid for this recipient.  Otherwise the value of 0 is printed.', 'event_espresso')
58 58
 			);
59 59
 	}
60 60
 
@@ -65,36 +65,35 @@  discard block
 block discarded – undo
65 65
 	 * @param  string $shortcode the shortcode to be parsed.
66 66
 	 * @return string parsed shortcode
67 67
 	 */
68
-	protected function _parser( $shortcode ) {
68
+	protected function _parser($shortcode) {
69 69
 
70 70
 		//make sure we end up with a copy of the EE_Messages_Addressee object
71 71
 		$this->_recipient = $this->_data instanceof EE_Messages_Addressee ? $this->_data : null;
72 72
 		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee
73
-		                    && is_array( $this->_data )
74
-		                    && isset( $this->_data['data'] )
73
+		                    && is_array($this->_data)
74
+		                    && isset($this->_data['data'])
75 75
 		                    && $this->_data['data'] instanceof EE_Messages_Addressee
76
-			? $this->_data['data'] :
77
-			$this->_recipient;
76
+			? $this->_data['data'] : $this->_recipient;
78 77
 		$this->_recipient = ! $this->_recipient instanceof EE_Messages_Addressee
79
-		                    && ! empty( $this->_extra_data['data'] )
78
+		                    && ! empty($this->_extra_data['data'])
80 79
 		                    && $this->_extra_data['data'] instanceof EE_Messages_Addressee
81 80
 			? $this->_extra_data['data']
82 81
 			: $this->_recipient;
83 82
 
84
-		if ( ! $this->_recipient instanceof EE_Messages_Addressee ) {
83
+		if ( ! $this->_recipient instanceof EE_Messages_Addressee) {
85 84
 			return '';
86 85
 		}
87 86
 
88 87
 		$attendee = $this->_recipient->att_obj;
89
-		if ( ! $attendee instanceof EE_Attendee ) {
88
+		if ( ! $attendee instanceof EE_Attendee) {
90 89
 			return '';
91 90
 		}
92 91
 
93
-		$this->_registrations_for_recipient = isset( $this->_recipient->attendees[ $attendee->ID() ]['reg_objs'] )
94
-			? $this->_recipient->attendees[ $attendee->ID() ]['reg_objs']
92
+		$this->_registrations_for_recipient = isset($this->_recipient->attendees[$attendee->ID()]['reg_objs'])
93
+			? $this->_recipient->attendees[$attendee->ID()]['reg_objs']
95 94
 			: array();
96 95
 
97
-		switch ( $shortcode ) {
96
+		switch ($shortcode) {
98 97
 			case '[RECIPIENT_FNAME]' :
99 98
 				return $attendee->fname();
100 99
 				break;
@@ -108,21 +107,21 @@  discard block
 block discarded – undo
108 107
 				break;
109 108
 
110 109
 			case '[RECIPIENT_REGISTRATION_ID]' :
111
-				if ( ! $this->_recipient->reg_obj instanceof EE_Registration ) {
110
+				if ( ! $this->_recipient->reg_obj instanceof EE_Registration) {
112 111
 					return '';
113 112
 				}
114 113
 				return $this->_get_reg_id();
115 114
 				break;
116 115
 
117 116
 			case '[RECIPIENT_REGISTRATION_CODE]' :
118
-				if ( ! $this->_recipient->reg_obj instanceof EE_Registration ) {
117
+				if ( ! $this->_recipient->reg_obj instanceof EE_Registration) {
119 118
 					return '';
120 119
 				}
121 120
 				return $this->_get_reg_code();
122 121
 				break;
123 122
 
124 123
 			case '[RECIPIENT_EDIT_REGISTRATION_LINK]' :
125
-				if ( ! $this->_recipient->reg_obj instanceof EE_Registration ) {
124
+				if ( ! $this->_recipient->reg_obj instanceof EE_Registration) {
126 125
 					return '';
127 126
 				}
128 127
 				return $this->_recipient->reg_obj->edit_attendee_information_url();
@@ -164,23 +163,23 @@  discard block
 block discarded – undo
164 163
 				break;
165 164
 		}
166 165
 
167
-		if ( strpos( $shortcode, '[RECIPIENT_ANSWER_*' ) !== false ) {
168
-			$shortcode = str_replace( '[RECIPIENT_ANSWER_*', '', $shortcode );
169
-			$shortcode = trim( str_replace( ']', '', $shortcode ) );
166
+		if (strpos($shortcode, '[RECIPIENT_ANSWER_*') !== false) {
167
+			$shortcode = str_replace('[RECIPIENT_ANSWER_*', '', $shortcode);
168
+			$shortcode = trim(str_replace(']', '', $shortcode));
170 169
 
171 170
 
172 171
 			//now let's figure out what question has this text
173
-			if ( empty( $this->_recipient->questions ) || ! $this->_recipient->reg_obj instanceof EE_Registration ) {
172
+			if (empty($this->_recipient->questions) || ! $this->_recipient->reg_obj instanceof EE_Registration) {
174 173
 				return '';
175 174
 			}
176 175
 
177
-			foreach ( $this->_recipient->questions as $ansid => $question ) {
176
+			foreach ($this->_recipient->questions as $ansid => $question) {
178 177
 				if (
179 178
 					$question instanceof EE_Question
180
-					&& trim( $question->display_text() ) == trim( $shortcode )
181
-					&& isset( $this->_recipient->registrations[ $this->_recipient->reg_obj->ID() ]['ans_objs'][ $ansid ] )
179
+					&& trim($question->display_text()) == trim($shortcode)
180
+					&& isset($this->_recipient->registrations[$this->_recipient->reg_obj->ID()]['ans_objs'][$ansid])
182 181
 				) {
183
-					return $this->_recipient->registrations[ $this->_recipient->reg_obj->ID() ]['ans_objs'][ $ansid ]->get_pretty( 'ANS_value', 'no_wpautop' );
182
+					return $this->_recipient->registrations[$this->_recipient->reg_obj->ID()]['ans_objs'][$ansid]->get_pretty('ANS_value', 'no_wpautop');
184 183
 				}
185 184
 			}
186 185
 		}
@@ -211,53 +210,53 @@  discard block
 block discarded – undo
211 210
 	protected function _get_reg_code() {
212 211
 
213 212
 		//if only one related registration for the recipient then just return that reg code.
214
-		if ( count( $this->_registrations_for_recipient ) <= 1 )  {
213
+		if (count($this->_registrations_for_recipient) <= 1) {
215 214
 			return $this->_recipient->reg_obj->reg_code();
216 215
 		}
217 216
 
218 217
 		//k more than one registration so let's see if we can get specific to context
219 218
 		//are we parsing event_list?
220
-		if ( $this->_data instanceof EE_Event ) {
219
+		if ($this->_data instanceof EE_Event) {
221 220
 			$reg_code = array();
222 221
 			//loop through registrations for recipient and see if there is a match for this event
223
-			foreach ( $this->_registrations_for_recipient as $reg ) {
224
-				if ( $reg instanceof EE_Registration && $reg->event_ID() == $this->_data->ID() ) {
222
+			foreach ($this->_registrations_for_recipient as $reg) {
223
+				if ($reg instanceof EE_Registration && $reg->event_ID() == $this->_data->ID()) {
225 224
 					$reg_code[] = $reg->reg_code();
226 225
 				}
227 226
 			}
228
-			return implode( ', ', $reg_code );
227
+			return implode(', ', $reg_code);
229 228
 		}
230 229
 
231 230
 		//are we parsing ticket list?
232
-		if ( $this->_data instanceof EE_Ticket ) {
231
+		if ($this->_data instanceof EE_Ticket) {
233 232
 			$reg_code = array();
234 233
 			//loop through each registration for recipient and see if there is a match for this ticket
235
-			foreach ( $this->_registrations_for_recipient as $reg ) {
236
-				if ( $reg instanceof EE_Registration && $reg->ticket_ID() == $this->_data->ID() ) {
234
+			foreach ($this->_registrations_for_recipient as $reg) {
235
+				if ($reg instanceof EE_Registration && $reg->ticket_ID() == $this->_data->ID()) {
237 236
 					$reg_code = $reg->reg_code();
238 237
 				}
239 238
 			}
240
-			return implode( ', ', $reg_code );
239
+			return implode(', ', $reg_code);
241 240
 		}
242 241
 
243 242
 		//do we have a specific reg_obj?  Let's use it
244
-		if ( $this->_data instanceof EE_Messages_Addressee && $this->_data->reg_obj instanceof EE_Registration ) {
243
+		if ($this->_data instanceof EE_Messages_Addressee && $this->_data->reg_obj instanceof EE_Registration) {
245 244
 			return $this->_data->reg_obj->reg_code();
246 245
 		}
247 246
 
248 247
 		//do we have a specific reg_obj?  Let's use it
249
-		if ( $this->_data instanceof EE_Messages_Addressee && $this->_data->reg_obj instanceof EE_Registration ) {
248
+		if ($this->_data instanceof EE_Messages_Addressee && $this->_data->reg_obj instanceof EE_Registration) {
250 249
 			return $this->_data->reg_obj->reg_code();
251 250
 		}
252 251
 
253 252
 		//not able to determine the single reg code so let's return a comma delimited list of reg codes.
254 253
 		$reg_code = array();
255
-		foreach ( $this->_registrations_for_recipient as $reg ) {
256
-			if ( $reg instanceof EE_Registration ) {
254
+		foreach ($this->_registrations_for_recipient as $reg) {
255
+			if ($reg instanceof EE_Registration) {
257 256
 				$reg_code[] = $reg->reg_code();
258 257
 			}
259 258
 		}
260
-		return implode( ', ', $reg_code );
259
+		return implode(', ', $reg_code);
261 260
 	}
262 261
 
263 262
 
@@ -270,48 +269,48 @@  discard block
 block discarded – undo
270 269
 	protected function _get_reg_id() {
271 270
 
272 271
 		//if only one related registration for the recipient then just return that reg code.
273
-		if ( count( $this->_registrations_for_recipient ) <= 1 )  {
272
+		if (count($this->_registrations_for_recipient) <= 1) {
274 273
 			return $this->_recipient->reg_obj->ID();
275 274
 		}
276 275
 
277 276
 		//k more than one registration so let's see if we can get specific to context
278 277
 		//are we parsing event_list?
279
-		if ( $this->_data instanceof EE_Event ) {
278
+		if ($this->_data instanceof EE_Event) {
280 279
 			$registration_ids = array();
281 280
 			//loop through registrations for recipient and see if there is a match for this event
282
-			foreach ( $this->_registrations_for_recipient as $reg ) {
283
-				if ( $reg instanceof EE_Registration && $reg->event_ID() == $this->_data->ID() ) {
281
+			foreach ($this->_registrations_for_recipient as $reg) {
282
+				if ($reg instanceof EE_Registration && $reg->event_ID() == $this->_data->ID()) {
284 283
 					$registration_ids[] = $reg->ID();
285 284
 				}
286 285
 			}
287
-			return implode( ', ', $registration_ids );
286
+			return implode(', ', $registration_ids);
288 287
 		}
289 288
 
290 289
 		//are we parsing ticket list?
291
-		if ( $this->_data instanceof EE_Ticket ) {
290
+		if ($this->_data instanceof EE_Ticket) {
292 291
 			$registration_ids = array();
293 292
 			//loop through each registration for recipient and see if there is a match for this ticket
294
-			foreach ( $this->_registrations_for_recipient as $reg ) {
295
-				if ( $reg instanceof EE_Registration && $reg->ticket_ID() == $this->_data->ID() ) {
293
+			foreach ($this->_registrations_for_recipient as $reg) {
294
+				if ($reg instanceof EE_Registration && $reg->ticket_ID() == $this->_data->ID()) {
296 295
 					$registration_ids = $reg->ID();
297 296
 				}
298 297
 			}
299
-			return implode( ', ', $registration_ids );
298
+			return implode(', ', $registration_ids);
300 299
 		}
301 300
 
302 301
 		//do we have a specific reg_obj?  Let's use it
303
-		if ( $this->_data instanceof EE_Messages_Addressee && $this->_data->reg_obj instanceof EE_Registration ) {
302
+		if ($this->_data instanceof EE_Messages_Addressee && $this->_data->reg_obj instanceof EE_Registration) {
304 303
 			return $this->_data->reg_obj->ID();
305 304
 		}
306 305
 
307 306
 		//not able to determine the single reg code so let's return a comma delimited list of reg codes.
308 307
 		$registration_ids = array();
309
-		foreach ( $this->_registrations_for_recipient as $reg ) {
310
-			if ( $reg instanceof EE_Registration ) {
308
+		foreach ($this->_registrations_for_recipient as $reg) {
309
+			if ($reg instanceof EE_Registration) {
311 310
 				$registration_ids[] = $reg->ID();
312 311
 			}
313 312
 		}
314
-		return implode( ', ', $registration_ids );
313
+		return implode(', ', $registration_ids);
315 314
 	}
316 315
 
317 316
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Attendee_Shortcodes.lib.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
 	/**
43 43
 	 * EE_Attendee_Shortcodes constructor.
44
-	*/
44
+	 */
45 45
 	public function __construct() {
46 46
 		parent::__construct();
47 47
 	}
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -49,26 +49,26 @@  discard block
 block discarded – undo
49 49
 
50 50
 
51 51
 	protected function _init_props() {
52
-		$this->label = esc_html__( 'Attendee Shortcodes', 'event_espresso' );
53
-		$this->description = esc_html__( 'All shortcodes specific to attendee related data', 'event_espresso' );
52
+		$this->label = esc_html__('Attendee Shortcodes', 'event_espresso');
53
+		$this->description = esc_html__('All shortcodes specific to attendee related data', 'event_espresso');
54 54
 		$this->_shortcodes = array(
55
-			'[FNAME]' => esc_html__( 'First Name of an attendee.', 'event_espresso' ),
56
-			'[LNAME]' => esc_html__( 'Last Name of an attendee.', 'event_espresso' ),
57
-			'[ATTENDEE_EMAIL]' => esc_html__( 'Email address for the attendee.', 'event_espresso' ),
58
-			'[EDIT_ATTENDEE_LINK]' => esc_html__( 'Edit Registration Link (typically you\'d only use this for messages going to event administrators)', 'event_espresso' ),
59
-			'[REGISTRATION_ID]' => esc_html__( 'Unique Registration ID for the registration', 'event_espresso' ),
60
-			'[REGISTRATION_CODE]' => esc_html__( 'Unique Registration Code for the registration', 'event_espresso' ),
61
-			'[REGISTRATION_STATUS_ID]' => esc_html__( 'Parses to the registration status for the attendee', 'event_espresso' ),
62
-			'[REGISTRATION_STATUS_LABEL]' => esc_html__( 'Parses to the status label for the registrant', 'event_espresso' ),
63
-			'[REGISTRATION_TOTAL_AMOUNT_PAID]' => esc_html__( 'Parses to the total amount paid for this registration.', 'event_espresso' ),
64
-			'[FRONTEND_EDIT_REG_LINK]' => esc_html__( 'Generates a link for the given registration to edit this registration details on the frontend.', 'event_espresso' ),
65
-			'[PHONE_NUMBER]' => esc_html__( 'The Phone Number for the Registration.', 'event_espresso' ),
66
-			'[ADDRESS]' => esc_html__( 'The Address for the Registration', 'event_espresso' ),
67
-			'[ADDRESS2]' => esc_html__( 'Whatever was in the address 2 field for the registration.', 'event_espresso' ),
68
-			'[CITY]' => esc_html__( 'The city for the registration.', 'event_espresso' ),
69
-			'[ZIP_PC]' => esc_html__( 'The ZIP (or Postal) Code for the Registration.', 'event_espresso' ),
70
-			'[ADDRESS_STATE]' => esc_html__( 'The state/province for the registration.', 'event_espresso' ),
71
-			'[COUNTRY]' => esc_html__( 'The country for the registration.', 'event_espresso' )
55
+			'[FNAME]' => esc_html__('First Name of an attendee.', 'event_espresso'),
56
+			'[LNAME]' => esc_html__('Last Name of an attendee.', 'event_espresso'),
57
+			'[ATTENDEE_EMAIL]' => esc_html__('Email address for the attendee.', 'event_espresso'),
58
+			'[EDIT_ATTENDEE_LINK]' => esc_html__('Edit Registration Link (typically you\'d only use this for messages going to event administrators)', 'event_espresso'),
59
+			'[REGISTRATION_ID]' => esc_html__('Unique Registration ID for the registration', 'event_espresso'),
60
+			'[REGISTRATION_CODE]' => esc_html__('Unique Registration Code for the registration', 'event_espresso'),
61
+			'[REGISTRATION_STATUS_ID]' => esc_html__('Parses to the registration status for the attendee', 'event_espresso'),
62
+			'[REGISTRATION_STATUS_LABEL]' => esc_html__('Parses to the status label for the registrant', 'event_espresso'),
63
+			'[REGISTRATION_TOTAL_AMOUNT_PAID]' => esc_html__('Parses to the total amount paid for this registration.', 'event_espresso'),
64
+			'[FRONTEND_EDIT_REG_LINK]' => esc_html__('Generates a link for the given registration to edit this registration details on the frontend.', 'event_espresso'),
65
+			'[PHONE_NUMBER]' => esc_html__('The Phone Number for the Registration.', 'event_espresso'),
66
+			'[ADDRESS]' => esc_html__('The Address for the Registration', 'event_espresso'),
67
+			'[ADDRESS2]' => esc_html__('Whatever was in the address 2 field for the registration.', 'event_espresso'),
68
+			'[CITY]' => esc_html__('The city for the registration.', 'event_espresso'),
69
+			'[ZIP_PC]' => esc_html__('The ZIP (or Postal) Code for the Registration.', 'event_espresso'),
70
+			'[ADDRESS_STATE]' => esc_html__('The state/province for the registration.', 'event_espresso'),
71
+			'[COUNTRY]' => esc_html__('The country for the registration.', 'event_espresso')
72 72
 			);
73 73
 	}
74 74
 
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
 	 * @return string
83 83
 	 * @throws \EE_Error
84 84
 	 */
85
-	protected function _parser( $shortcode ) {
85
+	protected function _parser($shortcode) {
86 86
 
87 87
 
88
-		$this->_xtra = ! empty( $this->_extra_data ) && $this->_extra_data['data'] instanceof EE_Messages_Addressee
88
+		$this->_xtra = ! empty($this->_extra_data) && $this->_extra_data['data'] instanceof EE_Messages_Addressee
89 89
 			? $this->_extra_data['data']
90 90
 			: null;
91 91
 
@@ -94,34 +94,34 @@  discard block
 block discarded – undo
94 94
 			? null
95 95
 			: $this->_data;
96 96
 
97
-		if ( ! $registration instanceof EE_Registration ) {
97
+		if ( ! $registration instanceof EE_Registration) {
98 98
 			//let's attempt to get the txn_id for the error message.
99
-			$txn_id = isset( $this->_xtra->txn ) && $this->_xtra->txn instanceof EE_Transaction
99
+			$txn_id = isset($this->_xtra->txn) && $this->_xtra->txn instanceof EE_Transaction
100 100
 				? $this->_xtra->txn->ID()
101
-				: esc_html__( 'Unknown', 'event_espresso' );
102
-			$msg = esc_html__( 'There is no EE_Registration object in the data sent to the EE_Attendee Shortcode Parser for the messages system.', 'event_espresso' );
101
+				: esc_html__('Unknown', 'event_espresso');
102
+			$msg = esc_html__('There is no EE_Registration object in the data sent to the EE_Attendee Shortcode Parser for the messages system.', 'event_espresso');
103 103
 			$dev_msg = sprintf(
104
-				esc_html__( 'The transaction ID for this request is: %s', 'event_espresso' ),
104
+				esc_html__('The transaction ID for this request is: %s', 'event_espresso'),
105 105
 				$txn_id
106 106
 			);
107
-			throw new EE_Error( "{$msg}||{$msg} {$dev_msg}" );
107
+			throw new EE_Error("{$msg}||{$msg} {$dev_msg}");
108 108
 		}
109 109
 
110 110
 		//attendee obj for this registration
111
-		$attendee = isset( $this->_xtra->registrations[ $registration->ID() ]['att_obj'] )
112
-			?  $this->_xtra->registrations[ $registration->ID() ]['att_obj']
113
-			: null ;
111
+		$attendee = isset($this->_xtra->registrations[$registration->ID()]['att_obj'])
112
+			? $this->_xtra->registrations[$registration->ID()]['att_obj']
113
+			: null;
114 114
 
115
-		if ( ! $attendee instanceof EE_Attendee ) {
116
-			$msg = esc_html__( 'There is no EE_Attendee object in the data sent to the EE_Attendee_Shortcode parser for the messages system.', 'event_espresso' );
115
+		if ( ! $attendee instanceof EE_Attendee) {
116
+			$msg = esc_html__('There is no EE_Attendee object in the data sent to the EE_Attendee_Shortcode parser for the messages system.', 'event_espresso');
117 117
 			$dev_msg = sprintf(
118
-				esc_html__( 'The registration ID for this request is: %s', 'event_espresso' ),
118
+				esc_html__('The registration ID for this request is: %s', 'event_espresso'),
119 119
 				$registration->ID()
120 120
 			);
121
-			throw new EE_Error( "{$msg}||{$msg} {$dev_msg}" );
121
+			throw new EE_Error("{$msg}||{$msg} {$dev_msg}");
122 122
 		}
123 123
 
124
-		switch ( $shortcode ) {
124
+		switch ($shortcode) {
125 125
 
126 126
 			case '[FNAME]' :
127 127
 				return $attendee->fname();
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
core/libraries/messages/data_class/EE_Messages_Addressee.class.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	 * @param array $addressee_data We're expecting an incoming array of data that will be used to fill the properties
261 261
 	 *                              for the object.
262 262
 	 */
263
-	public function __construct( $addressee_data ) {
263
+	public function __construct($addressee_data) {
264 264
 		$this->_data = $addressee_data;
265 265
 		$this->_set_properties();
266 266
 	}
@@ -275,15 +275,15 @@  discard block
 block discarded – undo
275 275
 	 * @return void.
276 276
 	 */
277 277
 	protected function _set_properties() {
278
-		foreach ( $this->_data as $prop => $value ) {
279
-			if ( property_exists( $this, $prop ) ) {
278
+		foreach ($this->_data as $prop => $value) {
279
+			if (property_exists($this, $prop)) {
280 280
 				$this->{$prop} = $value;
281 281
 			}
282 282
 		}
283 283
 		//if user_id present we'll use this to set the fname and lname and admin_email.
284
-		if ( ! empty( $this->user_id ) ) {
284
+		if ( ! empty($this->user_id)) {
285 285
 			$this->user_id = (int) $this->user_id;
286
-			$user = get_userdata( $this->user_id );
286
+			$user = get_userdata($this->user_id);
287 287
 			$this->fname = $user->user_firstname;
288 288
 			$this->lname = $user->user_lastname;
289 289
 			$this->admin_email = $user->user_email;
Please login to merge, or discard this patch.