Completed
Branch FET-9783-command-bus (ec950d)
by
unknown
39:17 queued 24:45
created
reg_steps/payment_options/events_requiring_pre_approval.template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 
2
-	<h4><span class="orange-text"><?php _e('Important Notice: Events Requiring Pre-Approval', 'event_espresso');?></span></h4>
2
+	<h4><span class="orange-text"><?php _e('Important Notice: Events Requiring Pre-Approval', 'event_espresso'); ?></span></h4>
3 3
 	<p id="events-requiring-pre-approval-pg" class="small-text drk-grey-text">
4 4
 		<?php echo $events_requiring_pre_approval_msg; ?>
5 5
 	</p>
6 6
 	<ul id="spco-pre-approval-events-ul"><?php echo $events_requiring_pre_approval; ?></ul>
7 7
 
8
-	<?php echo $default_hidden_inputs;  ?>
9
-	<?php echo $extra_hidden_inputs;  ?>
8
+	<?php echo $default_hidden_inputs; ?>
9
+	<?php echo $extra_hidden_inputs; ?>
10 10
 
11 11
 	<!--	<input id="reg-page-selected-method-of-payment" type="hidden" value="payments_closed" name="selected_method_of_payment">-->
12 12
 <!--	<input type="hidden" id="reg-page-no-payment-required-payment_options" name="_reg-page-no-payment-required" value="1" />-->
Please login to merge, or discard this patch.
reg_steps/payment_options/no_payment_required.template.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2
-if( is_array( $registrations_for_free_events ) && ! empty( $registrations_for_free_events ) ) {
2
+if (is_array($registrations_for_free_events) && ! empty($registrations_for_free_events)) {
3 3
 	echo apply_filters(
4 4
 		'FHEE__registration_page_payment_options__no_payment_required_hdr',
5 5
 		sprintf(
6
-			__( '%1$sNo Payment Required%2$s', 'event_espresso' ),
6
+			__('%1$sNo Payment Required%2$s', 'event_espresso'),
7 7
 			'<h6>',
8 8
 			'</h6>'
9 9
 		)
10 10
 	);
11
-	foreach ( $registrations_for_free_events as $registration_for_free_event ) {
12
-		if ( $registration_for_free_event instanceof EE_Registration && $registration_for_free_event->ticket()->is_free() ) {
13
-			if ( $registration_for_free_event->event() instanceof EE_Event ) {
11
+	foreach ($registrations_for_free_events as $registration_for_free_event) {
12
+		if ($registration_for_free_event instanceof EE_Registration && $registration_for_free_event->ticket()->is_free()) {
13
+			if ($registration_for_free_event->event() instanceof EE_Event) {
14 14
 				?>
15 15
 				<p>
16 16
 					<?php echo apply_filters(
17 17
 						'FHEE__registration_page_payment_options__no_payment_required_pg',
18 18
 						sprintf(
19
-							__( '"%1$s" for "%2$s" is free, so no payment is required and no billing will occur.', 'event_espresso' ),
19
+							__('"%1$s" for "%2$s" is free, so no payment is required and no billing will occur.', 'event_espresso'),
20 20
 							$registration_for_free_event->ticket()->name(),
21 21
 							$registration_for_free_event->event()->name()
22 22
 						)
Please login to merge, or discard this patch.
single_page_checkout/reg_steps/payment_options/sold_out_events.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 
2
-	<h4 class="ee-status sold-out"><b><?php _e('Sold Out', 'event_espresso');?></b></h4>
2
+	<h4 class="ee-status sold-out"><b><?php _e('Sold Out', 'event_espresso'); ?></b></h4>
3 3
 	<ul id="spco-sold-out-events-ul"><?php echo $sold_out_events; ?></ul>
4
-	<h6 class="pink-text"><?php _e("We're Sorry", 'event_espresso');?></h6>
4
+	<h6 class="pink-text"><?php _e("We're Sorry", 'event_espresso'); ?></h6>
5 5
 	<p id="events-requiring-pre-approval-pg" class="small-text drk-grey-text">
6 6
 		<?php echo $sold_out_events_msg; ?>
7 7
 	</p>
8 8
 
9
-	<?php echo $default_hidden_inputs;  ?>
10
-	<?php echo $extra_hidden_inputs;  ?>
9
+	<?php echo $default_hidden_inputs; ?>
10
+	<?php echo $extra_hidden_inputs; ?>
Please login to merge, or discard this patch.
EE_SPCO_Reg_Step_Registration_Confirmation.class.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2 2
  /**
3
- *
4
- * Class EE_SPCO_Reg_Step_Registration_Confirmation
5
- *
6
- * Description
7
- *
8
- * @package 			Event Espresso
9
- * @subpackage 	core
10
- * @author 				Brent Christensen
11
- * @since 				4.5.0
12
- *
13
- */
3
+  *
4
+  * Class EE_SPCO_Reg_Step_Registration_Confirmation
5
+  *
6
+  * Description
7
+  *
8
+  * @package 			Event Espresso
9
+  * @subpackage 	core
10
+  * @author 				Brent Christensen
11
+  * @since 				4.5.0
12
+  *
13
+  */
14 14
 class EE_SPCO_Reg_Step_Registration_Confirmation extends EE_SPCO_Reg_Step {
15 15
 
16 16
 	/**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 	 * @param    EE_Checkout $checkout
21 21
 	 * @return 	\EE_SPCO_Reg_Step_Registration_Confirmation
22 22
 	 */
23
-	public function __construct( EE_Checkout $checkout ) {
23
+	public function __construct(EE_Checkout $checkout) {
24 24
 		$this->_slug = 'registration_confirmation';
25 25
 		$this->_name = __('Registration Confirmation', 'event_espresso');
26
-		$this->_template = SPCO_REG_STEPS_PATH . $this->_slug . DS . 'registration_page_confirmation.template.php';
26
+		$this->_template = SPCO_REG_STEPS_PATH.$this->_slug.DS.'registration_page_confirmation.template.php';
27 27
 		$this->checkout = $checkout;
28 28
 	}
29 29
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * @return boolean
44 44
 	 */
45 45
 	public function initialize_reg_step() {
46
-		$this->checkout->remove_reg_step( $this->_slug );
46
+		$this->checkout->remove_reg_step($this->_slug);
47 47
 	}
48 48
 
49 49
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 
44 44
 	/**
45
-	 * @return boolean
45
+	 * @return boolean|null
46 46
 	 */
47 47
 	public function initialize_reg_step() {
48 48
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 
171 171
 	/**
172
-	 * @return boolean
172
+	 * @return boolean|null
173 173
 	 */
174 174
 	public function update_reg_step() {
175 175
 		EE_Error::doing_it_wrong( __CLASS__ . '::' . __FILE__, __( 'Can not call update_reg_step() on the Finalize Registration reg step.', 'event_espresso'), '4.6.0' );
Please login to merge, or discard this patch.
single_page_checkout/templates/registration_page_wrapper.template.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <div id="ee-single-page-checkout-dv" class="">
2
-	<?php if ( apply_filters(
2
+	<?php if (apply_filters(
3 3
 			'FHEE__registration_page_wrapper_template__display_time_limit',
4
-			FALSE ) ) { ?>
4
+			FALSE )) { ?>
5 5
 	<p id="spco-registration-time-limit-pg" class="spco-steps-pg ee-attention important-notice">
6 6
 		<?php echo sprintf(
7 7
 			apply_filters(
8 8
 				'FHEE__registration_page_wrapper_template___time_limit',
9 9
 				__('You have %1$s to complete your registration.', 'event_espresso')
10 10
 			),
11
-			'<span id="spco-registration-time-limit-spn" class="spco-registration-time-limit-spn">' . $registration_time_limit	. '</span>'
11
+			'<span id="spco-registration-time-limit-spn" class="spco-registration-time-limit-spn">'.$registration_time_limit.'</span>'
12 12
 		);
13 13
 		?>
14 14
 		<span id="spco-registration-expiration-spn" class=""
@@ -16,27 +16,27 @@  discard block
 block discarded – undo
16 16
 	</p>
17 17
 	<?php } ?>
18 18
 	<?php
19
-if ( ! $empty_cart ) {
20
-	if ( ! $revisit && apply_filters( 'FHEE__registration_page_wrapper_template__steps_display', TRUE )) {
19
+if ( ! $empty_cart) {
20
+	if ( ! $revisit && apply_filters('FHEE__registration_page_wrapper_template__steps_display', TRUE)) {
21 21
 ?>
22 22
 	<h2 id="spco-steps-big-hdr" class="spco-steps-big-hdr"><?php _e(' Steps', 'event_espresso'); ?></h2>
23 23
 
24 24
 	<div id="spco-steps-display-dv">
25 25
 	<?php
26 26
 		$step_nmbr = 1;
27
-		$total_steps = count( $reg_steps ) - 1;
28
-		foreach ( $reg_steps as $reg_step ) {
29
-			if ( $reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration' ) {
27
+		$total_steps = count($reg_steps) - 1;
28
+		foreach ($reg_steps as $reg_step) {
29
+			if ($reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration') {
30 30
 				$slug = $reg_step->slug();
31 31
 				$step_display_dv_class = $reg_step->is_current_step() ? 'active-step' : 'inactive-step';
32 32
 		?>
33 33
 		<div id="spco-step-<?php echo $slug; ?>-display-dv" class="spco-step-display-dv <?php echo $step_display_dv_class; ?> steps-<?php echo $total_steps; ?>">
34 34
 			<h4 id="spco-step-<?php echo $slug; ?>-display-hdr" class="spco-steps-display-hdr">
35
-				<span class="spco-step-big-nmbr"><?php echo $step_nmbr; ?></span>&nbsp;<span class="spco-step-name"><?php echo str_replace( '&nbsp;', '<br/>&nbsp;', $reg_step->name() ); ?></span>
35
+				<span class="spco-step-big-nmbr"><?php echo $step_nmbr; ?></span>&nbsp;<span class="spco-step-name"><?php echo str_replace('&nbsp;', '<br/>&nbsp;', $reg_step->name()); ?></span>
36 36
 			</h4>
37 37
 		</div>
38 38
 
39
-		<?php if ( $step_nmbr < $total_steps ) { ?>
39
+		<?php if ($step_nmbr < $total_steps) { ?>
40 40
 		<div class="spco-step-arrow-dv">&raquo;</div>
41 41
 		<?php
42 42
 				}
@@ -50,22 +50,22 @@  discard block
 block discarded – undo
50 50
 	<?php
51 51
 	}
52 52
 
53
-	do_action( 'AHEE__SPCO__before_registration_steps' );
53
+	do_action('AHEE__SPCO__before_registration_steps');
54 54
 	$step_nmbr = 1;
55
-	foreach ( $reg_steps as $reg_step ) {
56
-		if ( $reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration' ) {
55
+	foreach ($reg_steps as $reg_step) {
56
+		if ($reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration') {
57 57
 			$slug = $reg_step->slug();
58
-			do_action( 'AHEE__' . $slug . '__reg_step_start', $reg_step );
58
+			do_action('AHEE__'.$slug.'__reg_step_start', $reg_step);
59 59
 			// todo: deprecate hook AHEE__registration_page_attendee_information__start
60 60
 	?>
61 61
 		<div id="spco-<?php echo $slug; ?>-dv" class="spco-step-dv <?php echo $reg_step->div_class(); ?>">
62 62
 			<?php echo $reg_step->display_reg_form(); ?>
63
-			<?php do_action( 'AHEE__SPCO_after_reg_step_form', $slug, $next_step ); ?>
63
+			<?php do_action('AHEE__SPCO_after_reg_step_form', $slug, $next_step); ?>
64 64
 		</div>
65 65
 			<?php $step_nmbr++;
66 66
 		}
67 67
 	}
68
-	do_action( 'AHEE__SPCO__after_registration_steps' );
68
+	do_action('AHEE__SPCO__after_registration_steps');
69 69
 
70 70
 } else {
71 71
 ?>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	<?php echo $cookies_not_set_msg; ?>
75 75
 <?php
76 76
 }
77
-do_action( 'AHEE__SPCO__reg_form_footer' );
77
+do_action('AHEE__SPCO__reg_form_footer');
78 78
 ?>
79 79
 
80 80
 </div>
Please login to merge, or discard this patch.
modules/ticket_selector/EED_Ticket_Selector.module.php 4 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 	protected static $_event = NULL;
36 36
 
37 37
 	/**
38
-	* array of datetimes and the spaces available for them
39
-	*
40
-	* @access private
41
-	* @var array
42
-	*/
38
+	 * array of datetimes and the spaces available for them
39
+	 *
40
+	 * @access private
41
+	 * @var array
42
+	 */
43 43
 	private static $_available_spaces = array();
44 44
 
45 45
 
@@ -855,11 +855,11 @@  discard block
 block discarded – undo
855 855
 
856 856
 
857 857
 	/**
858
-	* 	load js
859
-	*
860
-	* 	@access 		public
861
-	* 	@return 		void
862
-	*/
858
+	 * 	load js
859
+	 *
860
+	 * 	@access 		public
861
+	 * 	@return 		void
862
+	 */
863 863
 	public static function load_tckt_slctr_assets() {
864 864
 		// add some style
865 865
 		if ( apply_filters( 'FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', FALSE ) ) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 	 *
491 491
 	 *	@access public
492 492
 	 * 	@access 		public
493
-	 * 	@return		array  or FALSE
493
+	 * 	@return		boolean|null  or FALSE
494 494
 	 */
495 495
 	public function process_ticket_selections() {
496 496
 		do_action( 'EED_Ticket_Selector__process_ticket_selections__before' );
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 	 *    validate_post_data
636 636
 	 *
637 637
 	 * @access        private
638
-	 * @return        array  or FALSE
638
+	 * @return        string  or FALSE
639 639
 	 */
640 640
 	private static function _validate_post_data() {
641 641
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 	 * @access   private
753 753
 	 * @param EE_Ticket $ticket
754 754
 	 * @param int       $qty
755
-	 * @return TRUE on success, FALSE on fail
755
+	 * @return boolean on success, FALSE on fail
756 756
 	 */
757 757
 	private static function _add_ticket_to_cart( EE_Ticket $ticket = NULL, $qty = 1 ) {
758 758
 		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
Please login to merge, or discard this patch.
Spacing   +206 added lines, -206 removed lines patch added patch discarded remove patch
@@ -57,15 +57,15 @@  discard block
 block discarded – undo
57 57
 	 * @return EED_Ticket_Selector
58 58
 	 */
59 59
 	public static function instance() {
60
-		return parent::get_instance( __CLASS__ );
60
+		return parent::get_instance(__CLASS__);
61 61
 	}
62 62
 
63 63
 
64 64
 
65
-	protected function set_config(){
66
-		$this->set_config_section( 'template_settings' );
67
-		$this->set_config_class( 'EE_Ticket_Selector_Config' );
68
-		$this->set_config_name( 'EED_Ticket_Selector' );
65
+	protected function set_config() {
66
+		$this->set_config_section('template_settings');
67
+		$this->set_config_class('EE_Ticket_Selector_Config');
68
+		$this->set_config_name('EED_Ticket_Selector');
69 69
 	}
70 70
 
71 71
 
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	public static function set_hooks() {
82 82
 		// routing
83
-		EE_Config::register_route( 'iframe', 'EED_Ticket_Selector', 'ticket_selector_iframe', 'ticket_selector' );
84
-		EE_Config::register_route( 'process_ticket_selections', 'EED_Ticket_Selector', 'process_ticket_selections' );
85
-		add_action( 'wp_loaded', array( 'EED_Ticket_Selector', 'set_definitions' ), 2 );
83
+		EE_Config::register_route('iframe', 'EED_Ticket_Selector', 'ticket_selector_iframe', 'ticket_selector');
84
+		EE_Config::register_route('process_ticket_selections', 'EED_Ticket_Selector', 'process_ticket_selections');
85
+		add_action('wp_loaded', array('EED_Ticket_Selector', 'set_definitions'), 2);
86 86
 		//add_action( 'AHEE_event_details_before_post', array( 'EED_Ticket_Selector', 'ticket_selector_form_open' ), 10, 1 );
87
-		add_action( 'AHEE_event_details_header_bottom', array( 'EED_Ticket_Selector', 'display_ticket_selector' ), 10, 1 );
87
+		add_action('AHEE_event_details_header_bottom', array('EED_Ticket_Selector', 'display_ticket_selector'), 10, 1);
88 88
 		//add_action( 'AHEE__ticket_selector_chart__template__after_ticket_selector', array( 'EED_Ticket_Selector', 'display_ticket_selector_submit' ), 10, 1 );
89 89
 		//add_action( 'AHEE_event_details_after_post', array( 'EED_Ticket_Selector', 'ticket_selector_form_close' ), 10 );
90
-		add_action( 'wp_enqueue_scripts', array( 'EED_Ticket_Selector', 'load_tckt_slctr_assets' ), 10 );
90
+		add_action('wp_enqueue_scripts', array('EED_Ticket_Selector', 'load_tckt_slctr_assets'), 10);
91 91
 	}
92 92
 
93 93
 
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
 	 *  @return 	void
100 100
 	 */
101 101
 	public static function set_hooks_admin() {
102
-		add_action( 'wp_loaded', array( 'EED_Ticket_Selector', 'set_definitions' ), 2 );
102
+		add_action('wp_loaded', array('EED_Ticket_Selector', 'set_definitions'), 2);
103 103
 		//add button for iframe code to event editor.
104
-		add_filter( 'get_sample_permalink_html', array( 'EED_Ticket_Selector', 'iframe_code_button' ), 10, 4 );
105
-		add_action( 'admin_enqueue_scripts', array( 'EED_Ticket_Selector', 'load_tckt_slctr_assets_admin' ), 10 );
104
+		add_filter('get_sample_permalink_html', array('EED_Ticket_Selector', 'iframe_code_button'), 10, 4);
105
+		add_action('admin_enqueue_scripts', array('EED_Ticket_Selector', 'load_tckt_slctr_assets_admin'), 10);
106 106
 	}
107 107
 
108 108
 
@@ -114,15 +114,15 @@  discard block
 block discarded – undo
114 114
 	 *  @return 	void
115 115
 	 */
116 116
 	public static function set_definitions() {
117
-		define( 'TICKET_SELECTOR_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' . DS );
118
-		define( 'TICKET_SELECTOR_TEMPLATES_PATH', str_replace( '\\', DS, plugin_dir_path( __FILE__ )) . 'templates' . DS );
117
+		define('TICKET_SELECTOR_ASSETS_URL', plugin_dir_url(__FILE__).'assets'.DS);
118
+		define('TICKET_SELECTOR_TEMPLATES_PATH', str_replace('\\', DS, plugin_dir_path(__FILE__)).'templates'.DS);
119 119
 
120 120
 		//if config is not set, initialize
121 121
 		//If config is not set, set it.
122
-		if ( ! isset( EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector ) ) {
122
+		if ( ! isset(EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector)) {
123 123
 			EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector = new EE_Ticket_Selector_Config();
124 124
 		}
125
-		EE_Registry::$i18n_js_strings[ 'ts_embed_iframe_title' ] = __( 'Copy and Paste the following:', 'event_espresso' );
125
+		EE_Registry::$i18n_js_strings['ts_embed_iframe_title'] = __('Copy and Paste the following:', 'event_espresso');
126 126
 	}
127 127
 
128 128
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * 	@param	object 			$WP
134 134
 	 * 	@return 	void
135 135
 	 */
136
-	public function run( $WP ) {}
136
+	public function run($WP) {}
137 137
 
138 138
 
139 139
 	/**
@@ -145,23 +145,23 @@  discard block
 block discarded – undo
145 145
 	public function ticket_selector_iframe() {
146 146
 		self::$_in_iframe = true;
147 147
 		/** @type EEM_Event $EEM_Event */
148
-		$EEM_Event = EE_Registry::instance()->load_model( 'Event' );
148
+		$EEM_Event = EE_Registry::instance()->load_model('Event');
149 149
 		$event = $EEM_Event->get_one_by_ID(
150
-			EE_Registry::instance()->REQ->get( 'event', 0 )
150
+			EE_Registry::instance()->REQ->get('event', 0)
151 151
 		);
152
-		EE_Registry::instance()->REQ->set_espresso_page( true );
153
-		$template_args['ticket_selector'] = EED_Ticket_Selector::display_ticket_selector( $event );
152
+		EE_Registry::instance()->REQ->set_espresso_page(true);
153
+		$template_args['ticket_selector'] = EED_Ticket_Selector::display_ticket_selector($event);
154 154
 		$template_args['css'] = apply_filters(
155 155
 			'FHEE__EED_Ticket_Selector__ticket_selector_iframe__css',
156 156
 			array(
157
-				TICKET_SELECTOR_ASSETS_URL . 'ticket_selector_embed.css?ver=' . EVENT_ESPRESSO_VERSION,
158
-				TICKET_SELECTOR_ASSETS_URL . 'ticket_selector.css?ver=' . EVENT_ESPRESSO_VERSION,
159
-				includes_url( 'css/dashicons.min.css?ver=' . $GLOBALS['wp_version'] ),
160
-				EE_GLOBAL_ASSETS_URL . 'css/espresso_default.css?ver=' . EVENT_ESPRESSO_VERSION
157
+				TICKET_SELECTOR_ASSETS_URL.'ticket_selector_embed.css?ver='.EVENT_ESPRESSO_VERSION,
158
+				TICKET_SELECTOR_ASSETS_URL.'ticket_selector.css?ver='.EVENT_ESPRESSO_VERSION,
159
+				includes_url('css/dashicons.min.css?ver='.$GLOBALS['wp_version']),
160
+				EE_GLOBAL_ASSETS_URL.'css/espresso_default.css?ver='.EVENT_ESPRESSO_VERSION
161 161
 			)
162 162
 		);
163
-		EE_Registry::$i18n_js_strings[ 'ticket_selector_iframe' ] = true;
164
-		EE_Registry::$i18n_js_strings[ 'EEDTicketSelectorMsg' ] = __( 'Please choose at least one ticket before continuing.', 'event_espresso' );
163
+		EE_Registry::$i18n_js_strings['ticket_selector_iframe'] = true;
164
+		EE_Registry::$i18n_js_strings['EEDTicketSelectorMsg'] = __('Please choose at least one ticket before continuing.', 'event_espresso');
165 165
 		$template_args['eei18n'] = apply_filters(
166 166
 			'FHEE__EED_Ticket_Selector__ticket_selector_iframe__eei18n_js_strings',
167 167
 			EE_Registry::localize_i18n_js_strings()
@@ -169,18 +169,18 @@  discard block
 block discarded – undo
169 169
 		$template_args['js'] = apply_filters(
170 170
 			'FHEE__EED_Ticket_Selector__ticket_selector_iframe__js',
171 171
 			array(
172
-				includes_url( 'js/jquery/jquery.js?ver=' . $GLOBALS['wp_version'] ),
173
-				EE_GLOBAL_ASSETS_URL . 'scripts/espresso_core.js?ver=' . EVENT_ESPRESSO_VERSION,
174
-				TICKET_SELECTOR_ASSETS_URL . 'ticket_selector_iframe_embed.js?ver=' . EVENT_ESPRESSO_VERSION
172
+				includes_url('js/jquery/jquery.js?ver='.$GLOBALS['wp_version']),
173
+				EE_GLOBAL_ASSETS_URL.'scripts/espresso_core.js?ver='.EVENT_ESPRESSO_VERSION,
174
+				TICKET_SELECTOR_ASSETS_URL.'ticket_selector_iframe_embed.js?ver='.EVENT_ESPRESSO_VERSION
175 175
 			)
176 176
 		);
177
-		$template_args[ 'notices' ] = EEH_Template::display_template(
178
-			EE_TEMPLATES . 'espresso-ajax-notices.template.php',
177
+		$template_args['notices'] = EEH_Template::display_template(
178
+			EE_TEMPLATES.'espresso-ajax-notices.template.php',
179 179
 			array(),
180 180
 			true
181 181
 		);
182 182
 		EEH_Template::display_template(
183
-			TICKET_SELECTOR_TEMPLATES_PATH . 'ticket_selector_chart_iframe.template.php',
183
+			TICKET_SELECTOR_TEMPLATES_PATH.'ticket_selector_chart_iframe.template.php',
184 184
 			$template_args
185 185
 		);
186 186
 		exit;
@@ -199,23 +199,23 @@  discard block
 block discarded – undo
199 199
 	 *
200 200
 	 * @return string The new html string for the permalink area.
201 201
 	 */
202
-	public static function iframe_code_button( $permalink_string, $id, $new_title, $new_slug ) {
202
+	public static function iframe_code_button($permalink_string, $id, $new_title, $new_slug) {
203 203
 		//make sure this is ONLY when editing and the event id has been set.
204
-		if ( ! empty( $id ) )  {
205
-			$post = get_post( $id );
204
+		if ( ! empty($id)) {
205
+			$post = get_post($id);
206 206
 
207 207
 			//if NOT event then let's get out.
208
-			if ( $post->post_type !== 'espresso_events' ) {
208
+			if ($post->post_type !== 'espresso_events') {
209 209
 				return $permalink_string;
210 210
 			}
211 211
 
212
-			$ticket_selector_url = add_query_arg( array( 'ticket_selector' => 'iframe', 'event' => $id ), site_url() );
212
+			$ticket_selector_url = add_query_arg(array('ticket_selector' => 'iframe', 'event' => $id), site_url());
213 213
 
214
-			$permalink_string .= '<a id="js-ticket-selector-embed-trigger" class="button button-small" href="#"  tabindex="-1">' . __('Embed', 'event_espresso') . '</a> ';
214
+			$permalink_string .= '<a id="js-ticket-selector-embed-trigger" class="button button-small" href="#"  tabindex="-1">'.__('Embed', 'event_espresso').'</a> ';
215 215
 			$permalink_string .= '
216 216
 <div id="js-ts-iframe" style="display:none">
217 217
 	<div style="width:100%; height: 500px;">
218
-		<iframe src="' . $ticket_selector_url . '" width="100%" height="100%"></iframe>
218
+		<iframe src="' . $ticket_selector_url.'" width="100%" height="100%"></iframe>
219 219
 	</div>
220 220
 </div>';
221 221
 		}
@@ -234,22 +234,22 @@  discard block
 block discarded – undo
234 234
 	 * @param 	mixed $event
235 235
 	 * @return 	bool
236 236
 	 */
237
-	protected static function set_event( $event = null ) {
238
-		if( $event === null ) {
237
+	protected static function set_event($event = null) {
238
+		if ($event === null) {
239 239
 			global $post;
240 240
 			$event = $post;
241 241
 		}
242
-		if ( $event instanceof EE_Event ) {
242
+		if ($event instanceof EE_Event) {
243 243
 			self::$_event = $event;
244
-		} else if ( $event instanceof WP_Post && isset( $event->EE_Event ) && $event->EE_Event instanceof EE_Event ) {
244
+		} else if ($event instanceof WP_Post && isset($event->EE_Event) && $event->EE_Event instanceof EE_Event) {
245 245
 			self::$_event = $event->EE_Event;
246
-		} else if ( $event instanceof WP_Post && $event->post_type == 'espresso_events' ) {
247
-			$event->EE_Event = EEM_Event::instance()->instantiate_class_from_post_object( $event );
246
+		} else if ($event instanceof WP_Post && $event->post_type == 'espresso_events') {
247
+			$event->EE_Event = EEM_Event::instance()->instantiate_class_from_post_object($event);
248 248
 			self::$_event = $event->EE_Event;
249 249
 		} else {
250
-			$user_msg = __( 'No Event object or an invalid Event object was supplied.', 'event_espresso' );
251
-			$dev_msg = $user_msg . __( 'In order to generate a ticket selector, please ensure you are passing either an EE_Event object or a WP_Post object of the post type "espresso_event" to the EE_Ticket_Selector class constructor.', 'event_espresso' );
252
-			EE_Error::add_error( $user_msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__ );
250
+			$user_msg = __('No Event object or an invalid Event object was supplied.', 'event_espresso');
251
+			$dev_msg = $user_msg.__('In order to generate a ticket selector, please ensure you are passing either an EE_Event object or a WP_Post object of the post type "espresso_event" to the EE_Ticket_Selector class constructor.', 'event_espresso');
252
+			EE_Error::add_error($user_msg.'||'.$dev_msg, __FILE__, __FUNCTION__, __LINE__);
253 253
 			return false;
254 254
 		}
255 255
 		return true;
@@ -268,11 +268,11 @@  discard block
 block discarded – undo
268 268
 	 * @param 	bool 	$view_details
269 269
 	 * @return 	string
270 270
 	 */
271
-	public static function display_ticket_selector( $event = NULL, $view_details = FALSE ) {
271
+	public static function display_ticket_selector($event = NULL, $view_details = FALSE) {
272 272
 		// reset filter for displaying submit button
273
-		remove_filter( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true' );
273
+		remove_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true');
274 274
 		// poke and prod incoming event till it tells us what it is
275
-		if ( ! EED_Ticket_Selector::set_event( $event )) {
275
+		if ( ! EED_Ticket_Selector::set_event($event)) {
276 276
 			return false;
277 277
 		}
278 278
 		$event_post = self::$_event instanceof EE_Event ? self::$_event->ID() : $event;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 			&& (
284 284
 				! self::$_event->display_ticket_selector()
285 285
 				|| $view_details
286
-				|| post_password_required( $event_post )
286
+				|| post_password_required($event_post)
287 287
 				|| (
288 288
 					$_event_active_status != EE_Datetime::active
289 289
 					&& $_event_active_status != EE_Datetime::upcoming
@@ -301,68 +301,68 @@  discard block
 block discarded – undo
301 301
 		$template_args = array();
302 302
 		$template_args['event_status'] = $_event_active_status;
303 303
 
304
-		$template_args['date_format'] = apply_filters( 'FHEE__EED_Ticket_Selector__display_ticket_selector__date_format', get_option( 'date_format' ) );
305
-		$template_args['time_format'] = apply_filters( 'FHEE__EED_Ticket_Selector__display_ticket_selector__time_format', get_option( 'time_format' ) );
304
+		$template_args['date_format'] = apply_filters('FHEE__EED_Ticket_Selector__display_ticket_selector__date_format', get_option('date_format'));
305
+		$template_args['time_format'] = apply_filters('FHEE__EED_Ticket_Selector__display_ticket_selector__time_format', get_option('time_format'));
306 306
 
307 307
 		$template_args['EVT_ID'] = self::$_event->ID();
308 308
 		$template_args['event'] = self::$_event;
309 309
 
310 310
 		// is the event expired ?
311 311
 		$template_args['event_is_expired'] = self::$_event->is_expired();
312
-		if ( $template_args['event_is_expired'] ) {
313
-			return '<div class="ee-event-expired-notice"><span class="important-notice">' . __( 'We\'re sorry, but all tickets sales have ended because the event is expired.', 'event_espresso' ) . '</span></div>';
312
+		if ($template_args['event_is_expired']) {
313
+			return '<div class="ee-event-expired-notice"><span class="important-notice">'.__('We\'re sorry, but all tickets sales have ended because the event is expired.', 'event_espresso').'</span></div>';
314 314
 		}
315 315
 
316 316
 		$ticket_query_args = array(
317
-			array( 'Datetime.EVT_ID' => self::$_event->ID() ),
318
-			'order_by' => array( 'TKT_order' => 'ASC', 'TKT_required' => 'DESC', 'TKT_start_date' => 'ASC', 'TKT_end_date' => 'ASC' , 'Datetime.DTT_EVT_start' => 'DESC' )
317
+			array('Datetime.EVT_ID' => self::$_event->ID()),
318
+			'order_by' => array('TKT_order' => 'ASC', 'TKT_required' => 'DESC', 'TKT_start_date' => 'ASC', 'TKT_end_date' => 'ASC', 'Datetime.DTT_EVT_start' => 'DESC')
319 319
 		);
320 320
 
321
-		if ( ! EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector->show_expired_tickets ) {
321
+		if ( ! EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector->show_expired_tickets) {
322 322
 			//use the correct applicable time query depending on what version of core is being run.
323
-			$current_time = method_exists( 'EEM_Datetime', 'current_time_for_query' ) ? time() : current_time('timestamp');
324
-			$ticket_query_args[0]['TKT_end_date'] = array( '>', $current_time );
323
+			$current_time = method_exists('EEM_Datetime', 'current_time_for_query') ? time() : current_time('timestamp');
324
+			$ticket_query_args[0]['TKT_end_date'] = array('>', $current_time);
325 325
 		}
326 326
 
327 327
 		// get all tickets for this event ordered by the datetime
328
-		$template_args['tickets'] = EEM_Ticket::instance()->get_all( $ticket_query_args );
328
+		$template_args['tickets'] = EEM_Ticket::instance()->get_all($ticket_query_args);
329 329
 
330
-		if ( count( $template_args['tickets'] ) < 1 ) {
331
-			return '<div class="ee-event-expired-notice"><span class="important-notice">' . __( 'We\'re sorry, but all ticket sales have ended.', 'event_espresso' ) . '</span></div>';
330
+		if (count($template_args['tickets']) < 1) {
331
+			return '<div class="ee-event-expired-notice"><span class="important-notice">'.__('We\'re sorry, but all ticket sales have ended.', 'event_espresso').'</span></div>';
332 332
 		}
333 333
 
334 334
 		// filter the maximum qty that can appear in the Ticket Selector qty dropdowns
335
-		$template_args['max_atndz'] = apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector__max_tickets', self::$_event->additional_limit() );
336
-		if ( $template_args['max_atndz'] < 1 ) {
337
-			$sales_closed_msg = __( 'We\'re sorry, but ticket sales have been closed at this time. Please check back again later.', 'event_espresso' );
338
-			if ( current_user_can( 'edit_post', self::$_event->ID() )) {
339
-				$sales_closed_msg .=  sprintf(
340
-					__( '%sNote to Event Admin:%sThe "Maximum number of tickets allowed per order for this event" in the Event Registration Options has been set to "0". This effectively turns off ticket sales. %s(click to edit this event)%s', 'event_espresso' ),
335
+		$template_args['max_atndz'] = apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector__max_tickets', self::$_event->additional_limit());
336
+		if ($template_args['max_atndz'] < 1) {
337
+			$sales_closed_msg = __('We\'re sorry, but ticket sales have been closed at this time. Please check back again later.', 'event_espresso');
338
+			if (current_user_can('edit_post', self::$_event->ID())) {
339
+				$sales_closed_msg .= sprintf(
340
+					__('%sNote to Event Admin:%sThe "Maximum number of tickets allowed per order for this event" in the Event Registration Options has been set to "0". This effectively turns off ticket sales. %s(click to edit this event)%s', 'event_espresso'),
341 341
 					'<div class="ee-attention" style="text-align: left;"><b>',
342 342
 					'</b><br />',
343
-					$link = '<span class="edit-link"><a class="post-edit-link" href="' . get_edit_post_link( self::$_event->ID() ) . '">',
343
+					$link = '<span class="edit-link"><a class="post-edit-link" href="'.get_edit_post_link(self::$_event->ID()).'">',
344 344
 					'</a></span></div>'
345 345
 				);
346 346
 			}
347
-			return '<p><span class="important-notice">' . $sales_closed_msg . '</span></p>';
347
+			return '<p><span class="important-notice">'.$sales_closed_msg.'</span></p>';
348 348
 		}
349 349
 
350
-		$templates['ticket_selector'] = TICKET_SELECTOR_TEMPLATES_PATH . 'ticket_selector_chart.template.php';
351
-		$templates['ticket_selector'] = apply_filters( 'FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', $templates['ticket_selector'], self::$_event );
350
+		$templates['ticket_selector'] = TICKET_SELECTOR_TEMPLATES_PATH.'ticket_selector_chart.template.php';
351
+		$templates['ticket_selector'] = apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', $templates['ticket_selector'], self::$_event);
352 352
 
353 353
 		// redirecting to another site for registration ??
354 354
 		$external_url = self::$_event->external_url() !== NULL || self::$_event->external_url() !== '' ? self::$_event->external_url() : FALSE;
355 355
 		// set up the form (but not for the admin)
356
-		$ticket_selector = ! is_admin() ? EED_Ticket_Selector::ticket_selector_form_open( self::$_event->ID(), $external_url ) : '';
356
+		$ticket_selector = ! is_admin() ? EED_Ticket_Selector::ticket_selector_form_open(self::$_event->ID(), $external_url) : '';
357 357
 		// if not redirecting to another site for registration
358
-		if ( ! $external_url ) {
358
+		if ( ! $external_url) {
359 359
 			// then display the ticket selector
360
-			$ticket_selector .= EEH_Template::locate_template( $templates['ticket_selector'], $template_args );
360
+			$ticket_selector .= EEH_Template::locate_template($templates['ticket_selector'], $template_args);
361 361
 		} else {
362 362
 			// if not we still need to trigger the display of the submit button
363
-			add_filter( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true' );
363
+			add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true');
364 364
 			//display notice to admin that registration is external
365
-			$ticket_selector .= ! is_admin() ? '' : __( 'Registration is at an external URL for this event.', 'event_espresso' );
365
+			$ticket_selector .= ! is_admin() ? '' : __('Registration is at an external URL for this event.', 'event_espresso');
366 366
 		}
367 367
 		// submit button and form close tag
368 368
 		$ticket_selector .= ! is_admin() ? EED_Ticket_Selector::display_ticket_selector_submit() : '';
@@ -382,25 +382,25 @@  discard block
 block discarded – undo
382 382
 	 * @param 		string $external_url
383 383
 	 * @return 		string
384 384
 	 */
385
-	public static function ticket_selector_form_open( $ID = 0, $external_url = '' ) {
385
+	public static function ticket_selector_form_open($ID = 0, $external_url = '') {
386 386
 		// if redirecting, we don't need any anything else
387
-		if ( $external_url ) {
388
-			$html = '<form method="GET" action="' . EEH_URL::refactor_url( $external_url ) . '">';
389
-			$query_args = EEH_URL::get_query_string( $external_url );
390
-			foreach ( $query_args as $query_arg => $value ) {
391
-				$html .= '<input type="hidden" name="' . $query_arg . '" value="' . $value . '">';
387
+		if ($external_url) {
388
+			$html = '<form method="GET" action="'.EEH_URL::refactor_url($external_url).'">';
389
+			$query_args = EEH_URL::get_query_string($external_url);
390
+			foreach ($query_args as $query_arg => $value) {
391
+				$html .= '<input type="hidden" name="'.$query_arg.'" value="'.$value.'">';
392 392
 			}
393 393
 			return $html;
394 394
 		}
395
-		$checkout_url = EEH_Event_View::event_link_url( $ID );
396
-		if ( ! $checkout_url ) {
397
-			EE_Error::add_error( __('The URL for the Event Details page could not be retrieved.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
395
+		$checkout_url = EEH_Event_View::event_link_url($ID);
396
+		if ( ! $checkout_url) {
397
+			EE_Error::add_error(__('The URL for the Event Details page could not be retrieved.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
398 398
 		}
399 399
 		$extra_params = self::$_in_iframe ? ' target="_blank"' : '';
400
-		$html = '<form method="POST" action="' . $checkout_url . '"' . $extra_params . '>';
401
-		$html .= wp_nonce_field( 	'process_ticket_selections', 'process_ticket_selections_nonce', TRUE, FALSE );
400
+		$html = '<form method="POST" action="'.$checkout_url.'"'.$extra_params.'>';
401
+		$html .= wp_nonce_field('process_ticket_selections', 'process_ticket_selections_nonce', TRUE, FALSE);
402 402
 		$html .= '<input type="hidden" name="ee" value="process_ticket_selections">';
403
-		$html = apply_filters( 'FHEE__EE_Ticket_Selector__ticket_selector_form_open__html', $html, self::$_event );
403
+		$html = apply_filters('FHEE__EE_Ticket_Selector__ticket_selector_form_open__html', $html, self::$_event);
404 404
 		return $html;
405 405
 	}
406 406
 
@@ -415,23 +415,23 @@  discard block
 block discarded – undo
415 415
 	 * 	@return		string
416 416
 	 */
417 417
 	public static function display_ticket_selector_submit() {
418
-		if ( ! is_admin() ) {
419
-			if ( apply_filters( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', FALSE ) ) {
418
+		if ( ! is_admin()) {
419
+			if (apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', FALSE)) {
420 420
 				$btn_text = apply_filters(
421 421
 					'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text',
422
-					__('Register Now', 'event_espresso' ),
422
+					__('Register Now', 'event_espresso'),
423 423
 					self::$_event
424 424
 				);
425 425
 				$external_url = self::$_event->external_url();
426
-				$html = '<input id="ticket-selector-submit-'. self::$_event->ID() .'-btn"';
426
+				$html = '<input id="ticket-selector-submit-'.self::$_event->ID().'-btn"';
427 427
 				$html .= ' class="ticket-selector-submit-btn ';
428
-				$html .= empty( $external_url ) ? 'ticket-selector-submit-ajax"' : '"';
429
-				$html .= ' type="submit" value="' . $btn_text . '" />';
430
-				$html .= apply_filters( 'FHEE__EE_Ticket_Selector__after_ticket_selector_submit', '', self::$_event );
428
+				$html .= empty($external_url) ? 'ticket-selector-submit-ajax"' : '"';
429
+				$html .= ' type="submit" value="'.$btn_text.'" />';
430
+				$html .= apply_filters('FHEE__EE_Ticket_Selector__after_ticket_selector_submit', '', self::$_event);
431 431
 				$html .= '<div class="clear"><br/></div></form>';
432 432
 				return $html;
433
-			} else if ( is_archive() ) {
434
-				return EED_Ticket_Selector::ticket_selector_form_close() . EED_Ticket_Selector::display_view_details_btn();
433
+			} else if (is_archive()) {
434
+				return EED_Ticket_Selector::ticket_selector_form_close().EED_Ticket_Selector::display_view_details_btn();
435 435
 			}
436 436
 		}
437 437
 		return '';
@@ -463,13 +463,13 @@  discard block
 block discarded – undo
463 463
 	 * 	@return		string
464 464
 	 */
465 465
 	public static function display_view_details_btn() {
466
-		if ( ! self::$_event->get_permalink() ) {
467
-			EE_Error::add_error( __('The URL for the Event Details page could not be retrieved.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
466
+		if ( ! self::$_event->get_permalink()) {
467
+			EE_Error::add_error(__('The URL for the Event Details page could not be retrieved.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
468 468
 		}
469
-		$view_details_btn = '<form method="POST" action="' . self::$_event->get_permalink() . '">';
470
-		$btn_text = apply_filters( 'FHEE__EE_Ticket_Selector__display_view_details_btn__btn_text', __( 'View Details', 'event_espresso' ), self::$_event );
471
-		$view_details_btn .= '<input id="ticket-selector-submit-'. self::$_event->ID() .'-btn" class="ticket-selector-submit-btn view-details-btn" type="submit" value="' . $btn_text . '" />';
472
-		$view_details_btn .= apply_filters( 'FHEE__EE_Ticket_Selector__after_view_details_btn', '', self::$_event );
469
+		$view_details_btn = '<form method="POST" action="'.self::$_event->get_permalink().'">';
470
+		$btn_text = apply_filters('FHEE__EE_Ticket_Selector__display_view_details_btn__btn_text', __('View Details', 'event_espresso'), self::$_event);
471
+		$view_details_btn .= '<input id="ticket-selector-submit-'.self::$_event->ID().'-btn" class="ticket-selector-submit-btn view-details-btn" type="submit" value="'.$btn_text.'" />';
472
+		$view_details_btn .= apply_filters('FHEE__EE_Ticket_Selector__after_view_details_btn', '', self::$_event);
473 473
 		$view_details_btn .= '<div class="clear"><br/></div>';
474 474
 		$view_details_btn .= '</form>';
475 475
 		return $view_details_btn;
@@ -488,11 +488,11 @@  discard block
 block discarded – undo
488 488
 	 * 	@return		array  or FALSE
489 489
 	 */
490 490
 	public function process_ticket_selections() {
491
-		do_action( 'EED_Ticket_Selector__process_ticket_selections__before' );
491
+		do_action('EED_Ticket_Selector__process_ticket_selections__before');
492 492
 		// check nonce
493
-		if ( ! is_admin() && ( ! EE_Registry::instance()->REQ->is_set( 'process_ticket_selections_nonce' ) || ! wp_verify_nonce( EE_Registry::instance()->REQ->get( 'process_ticket_selections_nonce' ), 'process_ticket_selections' ))) {
493
+		if ( ! is_admin() && ( ! EE_Registry::instance()->REQ->is_set('process_ticket_selections_nonce') || ! wp_verify_nonce(EE_Registry::instance()->REQ->get('process_ticket_selections_nonce'), 'process_ticket_selections'))) {
494 494
 			EE_Error::add_error(
495
-				sprintf( __( 'We\'re sorry but your request failed to pass a security check.%sPlease click the back button on your browser and try again.', 'event_espresso' ), '<br/>' ),
495
+				sprintf(__('We\'re sorry but your request failed to pass a security check.%sPlease click the back button on your browser and try again.', 'event_espresso'), '<br/>'),
496 496
 				__FILE__, __FUNCTION__, __LINE__
497 497
 			);
498 498
 			return FALSE;
@@ -506,16 +506,16 @@  discard block
 block discarded – undo
506 506
 
507 507
 		//we should really only have 1 registration in the works now (ie, no MER) so clear any previous items in the cart.
508 508
 		// When MER happens this will probably need to be tweaked, possibly wrapped in a conditional checking for some constant defined in MER etc.
509
-		EE_Registry::instance()->load_core( 'Session' );
509
+		EE_Registry::instance()->load_core('Session');
510 510
 		// unless otherwise requested, clear the session
511
-		if ( apply_filters( 'FHEE__EE_Ticket_Selector__process_ticket_selections__clear_session', TRUE )) {
512
-			EE_Registry::instance()->SSN->clear_session( __CLASS__, __FUNCTION__ );
511
+		if (apply_filters('FHEE__EE_Ticket_Selector__process_ticket_selections__clear_session', TRUE)) {
512
+			EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
513 513
 		}
514 514
 		//d( EE_Registry::instance()->SSN );
515 515
 
516
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
516
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
517 517
 		// do we have an event id?
518
-		if ( EE_Registry::instance()->REQ->is_set( 'tkt-slctr-event-id' ) ) {
518
+		if (EE_Registry::instance()->REQ->is_set('tkt-slctr-event-id')) {
519 519
 			// validate/sanitize data
520 520
 			$valid = self::_validate_post_data();
521 521
 
@@ -525,41 +525,41 @@  discard block
 block discarded – undo
525 525
 			//EEH_Debug_Tools::printr( $valid[ 'max_atndz' ], 'max_atndz', __FILE__, __LINE__ );
526 526
 
527 527
 			//check total tickets ordered vs max number of attendees that can register
528
-			if ( $valid['total_tickets'] > $valid['max_atndz'] ) {
528
+			if ($valid['total_tickets'] > $valid['max_atndz']) {
529 529
 
530 530
 				// ordering too many tickets !!!
531 531
 				$total_tickets_string = _n('You have attempted to purchase %s ticket.', 'You have attempted to purchase %s tickets.', $valid['total_tickets'], 'event_espresso');
532
-				$limit_error_1 = sprintf( $total_tickets_string, $valid['total_tickets'] );
532
+				$limit_error_1 = sprintf($total_tickets_string, $valid['total_tickets']);
533 533
 				// dev only message
534 534
 				$max_atndz_string = _n('The registration limit for this event is %s ticket per registration, therefore the total number of tickets you may purchase at a time can not exceed %s.', 'The registration limit for this event is %s tickets per registration, therefore the total number of tickets you may purchase at a time can not exceed %s.', $valid['max_atndz'], 'event_espresso');
535
-				$limit_error_2 = sprintf( $max_atndz_string, $valid['max_atndz'], $valid['max_atndz'] );
536
-				EE_Error::add_error( $limit_error_1 . '<br/>' . $limit_error_2, __FILE__, __FUNCTION__, __LINE__ );
535
+				$limit_error_2 = sprintf($max_atndz_string, $valid['max_atndz'], $valid['max_atndz']);
536
+				EE_Error::add_error($limit_error_1.'<br/>'.$limit_error_2, __FILE__, __FUNCTION__, __LINE__);
537 537
 			} else {
538 538
 
539 539
 				// all data appears to be valid
540 540
 				$tckts_slctd = FALSE;
541 541
 				$success = TRUE;
542 542
 				// load cart
543
-				EE_Registry::instance()->load_core( 'Cart' );
543
+				EE_Registry::instance()->load_core('Cart');
544 544
 
545 545
 				// cycle thru the number of data rows sent from the event listing
546
-				for ( $x = 0; $x < $valid['rows']; $x++ ) {
546
+				for ($x = 0; $x < $valid['rows']; $x++) {
547 547
 					// does this row actually contain a ticket quantity?
548
-					if ( isset( $valid['qty'][$x] ) && $valid['qty'][$x] > 0 ) {
548
+					if (isset($valid['qty'][$x]) && $valid['qty'][$x] > 0) {
549 549
 						// YES we have a ticket quantity
550 550
 						$tckts_slctd = TRUE;
551 551
 						//						d( $valid['ticket_obj'][$x] );
552
-						if ( $valid['ticket_obj'][$x] instanceof EE_Ticket ) {
552
+						if ($valid['ticket_obj'][$x] instanceof EE_Ticket) {
553 553
 							// then add ticket to cart
554
-							$ticket_added = self::_add_ticket_to_cart( $valid['ticket_obj'][$x], $valid['qty'][$x] );
554
+							$ticket_added = self::_add_ticket_to_cart($valid['ticket_obj'][$x], $valid['qty'][$x]);
555 555
 							$success = ! $ticket_added ? FALSE : $success;
556
-							if ( EE_Error::has_error() ) {
556
+							if (EE_Error::has_error()) {
557 557
 								break;
558 558
 							}
559 559
 						} else {
560 560
 							// nothing added to cart retrieved
561 561
 							EE_Error::add_error(
562
-								sprintf( __( 'A valid ticket could not be retrieved for the event.%sPlease click the back button on your browser and try again.', 'event_espresso' ), '<br/>' ),
562
+								sprintf(__('A valid ticket could not be retrieved for the event.%sPlease click the back button on your browser and try again.', 'event_espresso'), '<br/>'),
563 563
 								__FILE__, __FUNCTION__, __LINE__
564 564
 							);
565 565
 						}
@@ -568,45 +568,45 @@  discard block
 block discarded – undo
568 568
 				//d( EE_Registry::instance()->CART );
569 569
 				//die(); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< KILL REDIRECT HERE BEFORE CART UPDATE
570 570
 
571
-				if ( $tckts_slctd ) {
572
-					if ( $success ) {
573
-						do_action( 'FHEE__EE_Ticket_Selector__process_ticket_selections__before_redirecting_to_checkout', EE_Registry::instance()->CART, $this );
571
+				if ($tckts_slctd) {
572
+					if ($success) {
573
+						do_action('FHEE__EE_Ticket_Selector__process_ticket_selections__before_redirecting_to_checkout', EE_Registry::instance()->CART, $this);
574 574
 						EE_Registry::instance()->CART->recalculate_all_cart_totals();
575
-						EE_Registry::instance()->CART->save_cart( FALSE );
575
+						EE_Registry::instance()->CART->save_cart(FALSE);
576 576
 						EE_Registry::instance()->SSN->update();
577 577
 						//d( EE_Registry::instance()->CART );
578 578
 						//die(); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< OR HERE TO KILL REDIRECT AFTER CART UPDATE
579 579
 						// just return TRUE for registrations being made from admin
580
-						if ( is_admin() ) {
580
+						if (is_admin()) {
581 581
 							return TRUE;
582 582
 						}
583
-						wp_safe_redirect( apply_filters( 'FHEE__EE_Ticket_Selector__process_ticket_selections__success_redirect_url', EE_Registry::instance()->CFG->core->reg_page_url() ));
583
+						wp_safe_redirect(apply_filters('FHEE__EE_Ticket_Selector__process_ticket_selections__success_redirect_url', EE_Registry::instance()->CFG->core->reg_page_url()));
584 584
 						exit();
585 585
 
586 586
 					} else {
587
-						if ( ! EE_Error::has_error() ) {
587
+						if ( ! EE_Error::has_error()) {
588 588
 							// nothing added to cart
589
-							EE_Error::add_attention( __( 'No tickets were added for the event', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
589
+							EE_Error::add_attention(__('No tickets were added for the event', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
590 590
 						}
591 591
 					}
592 592
 
593 593
 				} else {
594 594
 					// no ticket quantities were selected
595
-					EE_Error::add_error( __( 'You need to select a ticket quantity before you can proceed.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
595
+					EE_Error::add_error(__('You need to select a ticket quantity before you can proceed.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
596 596
 				}
597 597
 			}
598 598
 			//die(); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< KILL BEFORE REDIRECT
599 599
 			// at this point, just return if registration is being made from admin
600
-			if ( is_admin() ) {
600
+			if (is_admin()) {
601 601
 				return FALSE;
602 602
 			}
603
-			if ( $valid['return_url'] ) {
604
-				EE_Error::get_notices( FALSE, TRUE );
605
-				wp_safe_redirect( $valid['return_url'] );
603
+			if ($valid['return_url']) {
604
+				EE_Error::get_notices(FALSE, TRUE);
605
+				wp_safe_redirect($valid['return_url']);
606 606
 				exit();
607
-			} elseif ( isset( $event_to_add['id'] )) {
608
-				EE_Error::get_notices( FALSE, TRUE );
609
-				wp_safe_redirect( get_permalink( $event_to_add['id'] ));
607
+			} elseif (isset($event_to_add['id'])) {
608
+				EE_Error::get_notices(FALSE, TRUE);
609
+				wp_safe_redirect(get_permalink($event_to_add['id']));
610 610
 				exit();
611 611
 			} else {
612 612
 				echo EE_Error::get_notices();
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 		} else {
616 616
 			// $_POST['tkt-slctr-event-id'] was not set ?!?!?!?
617 617
 			EE_Error::add_error(
618
-				sprintf( __( 'An event id was not provided or was not received.%sPlease click the back button on your browser and try again.', 'event_espresso' ), '<br/>' ),
618
+				sprintf(__('An event id was not provided or was not received.%sPlease click the back button on your browser and try again.', 'event_espresso'), '<br/>'),
619 619
 				__FILE__, __FUNCTION__, __LINE__
620 620
 			);
621 621
 		}
@@ -633,18 +633,18 @@  discard block
 block discarded – undo
633 633
 	 * @return        array  or FALSE
634 634
 	 */
635 635
 	private static function _validate_post_data() {
636
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
636
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
637 637
 
638 638
 		// start with an empty array()
639 639
 		$valid_data = array();
640 640
 		//		d( $_POST );
641 641
 		//if event id is valid
642
-		$id = absint( EE_Registry::instance()->REQ->get( 'tkt-slctr-event-id' ));
643
-		if ( $id ) {
642
+		$id = absint(EE_Registry::instance()->REQ->get('tkt-slctr-event-id'));
643
+		if ($id) {
644 644
 			// grab valid id
645 645
 			$valid_data['id'] = $id;
646 646
 			// grab and sanitize return-url
647
-			$valid_data['return_url'] = esc_url_raw( EE_Registry::instance()->REQ->get( 'tkt-slctr-return-url-' . $id ));
647
+			$valid_data['return_url'] = esc_url_raw(EE_Registry::instance()->REQ->get('tkt-slctr-return-url-'.$id));
648 648
 			// array of other form names
649 649
 			$inputs_to_clean = array(
650 650
 				'event_id' => 'tkt-slctr-event-id',
@@ -657,22 +657,22 @@  discard block
 block discarded – undo
657 657
 			// let's track the total number of tickets ordered.'
658 658
 			$valid_data['total_tickets'] = 0;
659 659
 			// cycle through $inputs_to_clean array
660
-			foreach ( $inputs_to_clean as $what => $input_to_clean ) {
660
+			foreach ($inputs_to_clean as $what => $input_to_clean) {
661 661
 				// check for POST data
662
-				if ( EE_Registry::instance()->REQ->is_set( $input_to_clean . $id )) {
662
+				if (EE_Registry::instance()->REQ->is_set($input_to_clean.$id)) {
663 663
 					// grab value
664
-					$input_value = EE_Registry::instance()->REQ->get( $input_to_clean . $id );
664
+					$input_value = EE_Registry::instance()->REQ->get($input_to_clean.$id);
665 665
 					switch ($what) {
666 666
 
667 667
 						// integers
668 668
 						case 'event_id':
669
-							$valid_data[$what] = absint( $input_value );
669
+							$valid_data[$what] = absint($input_value);
670 670
 							// get event via the event id we put in the form
671
-							$valid_data['event'] = EE_Registry::instance()->load_model( 'Event' )->get_one_by_ID( $valid_data['event_id'] );
671
+							$valid_data['event'] = EE_Registry::instance()->load_model('Event')->get_one_by_ID($valid_data['event_id']);
672 672
 							break;
673 673
 						case 'rows':
674 674
 						case 'max_atndz':
675
-							$valid_data[$what] = absint( $input_value );
675
+							$valid_data[$what] = absint($input_value);
676 676
 							break;
677 677
 
678 678
 						// arrays of integers
@@ -680,27 +680,27 @@  discard block
 block discarded – undo
680 680
 							//							d( $input_value );
681 681
 							$row_qty = $input_value;
682 682
 							// if qty is coming from a radio button input, then we need to assemble an array of rows
683
-							if( ! is_array( $row_qty )) {
683
+							if ( ! is_array($row_qty)) {
684 684
 								// get number of rows
685
-								$rows = EE_Registry::instance()->REQ->is_set( 'tkt-slctr-rows-' . $id ) ? absint( EE_Registry::instance()->REQ->get( 'tkt-slctr-rows-' . $id )) : 1;
685
+								$rows = EE_Registry::instance()->REQ->is_set('tkt-slctr-rows-'.$id) ? absint(EE_Registry::instance()->REQ->get('tkt-slctr-rows-'.$id)) : 1;
686 686
 								//								d( $rows );
687 687
 								// explode ints by the dash
688
-								$row_qty = explode( '-', $row_qty );
689
-								$row = isset( $row_qty[0] ) ? ( absint( $row_qty[0] )) : 1;
690
-								$qty = isset( $row_qty[1] ) ? absint( $row_qty[1] ) : 0;
691
-								$row_qty = array( $row => $qty );
688
+								$row_qty = explode('-', $row_qty);
689
+								$row = isset($row_qty[0]) ? (absint($row_qty[0])) : 1;
690
+								$qty = isset($row_qty[1]) ? absint($row_qty[1]) : 0;
691
+								$row_qty = array($row => $qty);
692 692
 								//								 d( $row_qty );
693
-								for( $x = 1; $x <= $rows; $x++ ) {
694
-									if ( ! isset( $row_qty[$x] )) {
693
+								for ($x = 1; $x <= $rows; $x++) {
694
+									if ( ! isset($row_qty[$x])) {
695 695
 										$row_qty[$x] = 0;
696 696
 									}
697 697
 								}
698 698
 							}
699
-							ksort( $row_qty );
699
+							ksort($row_qty);
700 700
 							//							 d( $row_qty );
701 701
 							// cycle thru values
702
-							foreach ( $row_qty as $qty ) {
703
-								$qty = absint( $qty );
702
+							foreach ($row_qty as $qty) {
703
+								$qty = absint($qty);
704 704
 								// sanitize as integers
705 705
 								$valid_data[$what][] = $qty;
706 706
 								$valid_data['total_tickets'] += $qty;
@@ -711,19 +711,19 @@  discard block
 block discarded – undo
711 711
 						case 'ticket_id':
712 712
 							$value_array = array();
713 713
 							// cycle thru values
714
-							foreach ( $input_value as $key=>$value ) {
714
+							foreach ($input_value as $key=>$value) {
715 715
 								// allow only numbers, letters,  spaces, commas and dashes
716
-								$value_array[ $key ] = wp_strip_all_tags( $value );
716
+								$value_array[$key] = wp_strip_all_tags($value);
717 717
 								// get ticket via the ticket id we put in the form
718
-								$ticket_obj = EE_Registry::instance()->load_model( 'Ticket' )->get_one_by_ID( $value );
719
-								$valid_data['ticket_obj'][ $key ] = $ticket_obj;
718
+								$ticket_obj = EE_Registry::instance()->load_model('Ticket')->get_one_by_ID($value);
719
+								$valid_data['ticket_obj'][$key] = $ticket_obj;
720 720
 							}
721
-							$valid_data[ $what ] = $value_array;
721
+							$valid_data[$what] = $value_array;
722 722
 							break;
723 723
 
724 724
 						case 'return_url' :
725 725
 							// grab and sanitize return-url
726
-							$valid_data[$what] = esc_url_raw( $input_value );
726
+							$valid_data[$what] = esc_url_raw($input_value);
727 727
 							break;
728 728
 
729 729
 					} 	// end switch $what
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
 			} 	// end foreach $inputs_to_clean
732 732
 
733 733
 		} else {
734
-			EE_Error::add_error( __('The event id provided was not valid.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
734
+			EE_Error::add_error(__('The event id provided was not valid.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
735 735
 			return FALSE;
736 736
 		}
737 737
 
@@ -749,28 +749,28 @@  discard block
 block discarded – undo
749 749
 	 * @param int       $qty
750 750
 	 * @return TRUE on success, FALSE on fail
751 751
 	 */
752
-	private static function _add_ticket_to_cart( EE_Ticket $ticket = NULL, $qty = 1 ) {
753
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
752
+	private static function _add_ticket_to_cart(EE_Ticket $ticket = NULL, $qty = 1) {
753
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
754 754
 		// get the number of spaces left for this datetime ticket
755
-		$available_spaces = self::_ticket_datetime_availability( $ticket );
755
+		$available_spaces = self::_ticket_datetime_availability($ticket);
756 756
 		// compare available spaces against the number of tickets being purchased
757
-		if ( $available_spaces >= $qty ) {
757
+		if ($available_spaces >= $qty) {
758 758
 			// allow addons to prevent a ticket from being added to cart
759
-			if ( ! apply_filters( 'FHEE__EE_Ticket_Selector___add_ticket_to_cart__allow_add_to_cart', true, $ticket, $qty, $available_spaces ) ) {
759
+			if ( ! apply_filters('FHEE__EE_Ticket_Selector___add_ticket_to_cart__allow_add_to_cart', true, $ticket, $qty, $available_spaces)) {
760 760
 				return false;
761 761
 			}
762 762
 			// add event to cart
763
-			if( EE_Registry::instance()->CART->add_ticket_to_cart( $ticket, $qty )) {
764
-				self::_recalculate_ticket_datetime_availability( $ticket, $qty );
763
+			if (EE_Registry::instance()->CART->add_ticket_to_cart($ticket, $qty)) {
764
+				self::_recalculate_ticket_datetime_availability($ticket, $qty);
765 765
 				return true;
766 766
 			} else {
767 767
 				return false;
768 768
 			}
769 769
 		} else {
770 770
 			// tickets can not be purchased but let's find the exact number left for the last ticket selected PRIOR to subtracting tickets
771
-			$available_spaces = self::_ticket_datetime_availability( $ticket, true );
771
+			$available_spaces = self::_ticket_datetime_availability($ticket, true);
772 772
 			// greedy greedy greedy eh?
773
-			if ( $available_spaces > 0 ) {
773
+			if ($available_spaces > 0) {
774 774
 				// add error messaging - we're using the _n function that will generate the appropriate singular or plural message based on the number of $available_spaces
775 775
 				EE_Error::add_error(
776 776
 					sprintf(
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 					__FILE__, __FUNCTION__, __LINE__
787 787
 				);
788 788
 			} else {
789
-				EE_Error::add_error( __('We\'re sorry, but there are no available spaces left for this event at this particular date and time.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
789
+				EE_Error::add_error(__('We\'re sorry, but there are no available spaces left for this event at this particular date and time.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
790 790
 			}
791 791
 			return false;
792 792
 		}
@@ -804,22 +804,22 @@  discard block
 block discarded – undo
804 804
 	 * @param 	bool         $get_original_ticket_spaces
805 805
 	 * @return 	int
806 806
 	 */
807
-	private static function _ticket_datetime_availability( EE_Ticket $ticket, $get_original_ticket_spaces = FALSE ) {
807
+	private static function _ticket_datetime_availability(EE_Ticket $ticket, $get_original_ticket_spaces = FALSE) {
808 808
 		// if the $_available_spaces array has not been set up yet...
809
-		if ( ! isset( self::$_available_spaces['tickets'][ $ticket->ID() ] )) {
810
-				self::_set_initial_ticket_datetime_availability( $ticket );
809
+		if ( ! isset(self::$_available_spaces['tickets'][$ticket->ID()])) {
810
+				self::_set_initial_ticket_datetime_availability($ticket);
811 811
 		}
812 812
 		$available_spaces = $ticket->qty() - $ticket->sold();
813
-		if ( isset( self::$_available_spaces['tickets'][ $ticket->ID() ] )) {
813
+		if (isset(self::$_available_spaces['tickets'][$ticket->ID()])) {
814 814
 			// loop thru tickets, which will ALSO include individual ticket records AND a total
815
-			foreach ( self::$_available_spaces['tickets'][ $ticket->ID() ] as $DTD_ID => $spaces  ) {
815
+			foreach (self::$_available_spaces['tickets'][$ticket->ID()] as $DTD_ID => $spaces) {
816 816
 				// if we want the original datetime availability BEFORE we started subtracting tickets ?
817
-				if ( $get_original_ticket_spaces ) {
817
+				if ($get_original_ticket_spaces) {
818 818
 					// then grab the available spaces from the "tickets" array and compare with the above to get the lowest number
819
-					$available_spaces = min( $available_spaces, self::$_available_spaces['tickets'][ $ticket->ID() ][ $DTD_ID ] );
819
+					$available_spaces = min($available_spaces, self::$_available_spaces['tickets'][$ticket->ID()][$DTD_ID]);
820 820
 				} else {
821 821
 					// we want the updated ticket availability as stored in the "datetimes" array
822
-					$available_spaces = min( $available_spaces, self::$_available_spaces['datetimes'][ $DTD_ID ] );
822
+					$available_spaces = min($available_spaces, self::$_available_spaces['datetimes'][$DTD_ID]);
823 823
 				}
824 824
 			}
825 825
 		}
@@ -835,23 +835,23 @@  discard block
 block discarded – undo
835 835
 	 * @param 	EE_Ticket $ticket
836 836
 	 * @return 	int
837 837
 	 */
838
-	private static function _set_initial_ticket_datetime_availability( EE_Ticket $ticket ) {
838
+	private static function _set_initial_ticket_datetime_availability(EE_Ticket $ticket) {
839 839
 		// first, get all of the datetimes that are available to this ticket
840 840
 		$datetimes = $ticket->get_many_related(
841 841
 			'Datetime',
842
-			array( array( 'DTT_EVT_end' => array( '>=', EEM_Datetime::instance()->current_time_for_query( 'DTT_EVT_end' ) ) ), 'order_by' => array( 'DTT_EVT_start' => 'ASC' ))
842
+			array(array('DTT_EVT_end' => array('>=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_end'))), 'order_by' => array('DTT_EVT_start' => 'ASC'))
843 843
 		);
844
-		if ( ! empty( $datetimes )) {
844
+		if ( ! empty($datetimes)) {
845 845
 			// now loop thru all of the datetimes
846
-			foreach ( $datetimes as $datetime  ) {
847
-				if ( $datetime instanceof EE_Datetime ) {
846
+			foreach ($datetimes as $datetime) {
847
+				if ($datetime instanceof EE_Datetime) {
848 848
 					// the number of spaces available for the datetime without considering individual ticket quantities
849 849
 					$spaces_remaining = $datetime->spaces_remaining();
850 850
 					// save the total available spaces ( the lesser of the ticket qty minus the number of tickets sold or the datetime spaces remaining) to this ticket using the datetime ID as the key
851
-					self::$_available_spaces['tickets'][ $ticket->ID() ][ $datetime->ID() ] = min(( $ticket->qty() - $ticket->sold() ), $spaces_remaining );
851
+					self::$_available_spaces['tickets'][$ticket->ID()][$datetime->ID()] = min(($ticket->qty() - $ticket->sold()), $spaces_remaining);
852 852
 					// if the remaining spaces for this datetime is already set, then compare that against the datetime spaces remaining, and take the lowest number,
853 853
 					// else just take the datetime spaces remaining, and assign to the datetimes array
854
-					self::$_available_spaces['datetimes'][ $datetime->ID() ] = isset( self::$_available_spaces['datetimes'][ $datetime->ID() ] ) ? min( self::$_available_spaces['datetimes'][ $datetime->ID() ], $spaces_remaining ) : $spaces_remaining;
854
+					self::$_available_spaces['datetimes'][$datetime->ID()] = isset(self::$_available_spaces['datetimes'][$datetime->ID()]) ? min(self::$_available_spaces['datetimes'][$datetime->ID()], $spaces_remaining) : $spaces_remaining;
855 855
 				}
856 856
 			}
857 857
 		}
@@ -867,12 +867,12 @@  discard block
 block discarded – undo
867 867
 	 * @param 	int   $qty
868 868
 	 * @return 	int
869 869
 	 */
870
-	private static function _recalculate_ticket_datetime_availability( EE_Ticket $ticket, $qty = 0 ) {
871
-		if ( isset( self::$_available_spaces['tickets'][ $ticket->ID() ] )) {
870
+	private static function _recalculate_ticket_datetime_availability(EE_Ticket $ticket, $qty = 0) {
871
+		if (isset(self::$_available_spaces['tickets'][$ticket->ID()])) {
872 872
 			// loop thru tickets, which will ALSO include individual ticket records AND a total
873
-			foreach ( self::$_available_spaces['tickets'][ $ticket->ID() ] as $DTD_ID => $spaces  ) {
873
+			foreach (self::$_available_spaces['tickets'][$ticket->ID()] as $DTD_ID => $spaces) {
874 874
 				// subtract the qty of selected tickets from each datetime's available spaces this ticket has access to,
875
-				self::$_available_spaces['datetimes'][ $DTD_ID ] = self::$_available_spaces['datetimes'][ $DTD_ID ] - $qty;
875
+				self::$_available_spaces['datetimes'][$DTD_ID] = self::$_available_spaces['datetimes'][$DTD_ID] - $qty;
876 876
 			}
877 877
 		}
878 878
 	}
@@ -889,8 +889,8 @@  discard block
 block discarded – undo
889 889
 	*/
890 890
 	public static function load_tckt_slctr_assets() {
891 891
 		// add some style
892
-		if ( apply_filters( 'FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', FALSE ) ) {
893
-			wp_register_style('ticket_selector', TICKET_SELECTOR_ASSETS_URL . 'ticket_selector.css');
892
+		if (apply_filters('FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', FALSE)) {
893
+			wp_register_style('ticket_selector', TICKET_SELECTOR_ASSETS_URL.'ticket_selector.css');
894 894
 			wp_enqueue_style('ticket_selector');
895 895
 			// make it dance
896 896
 			//			wp_register_script('ticket_selector', TICKET_SELECTOR_ASSETS_URL . 'ticket_selector.js', array('espresso_core'), '', TRUE);
@@ -904,9 +904,9 @@  discard block
 block discarded – undo
904 904
 
905 905
 	public static function load_tckt_slctr_assets_admin() {
906 906
 		//iframe button js on admin event editor page
907
-		if ( EE_Registry::instance()->REQ->get('page') == 'espresso_events' && EE_Registry::instance()->REQ->get('action') == 'edit' ) {
908
-			wp_register_script( 'ticket_selector_embed', TICKET_SELECTOR_ASSETS_URL . 'ticket-selector-embed.js', array( 'ee-dialog' ), EVENT_ESPRESSO_VERSION, true );
909
-			wp_enqueue_script( 'ticket_selector_embed' );
907
+		if (EE_Registry::instance()->REQ->get('page') == 'espresso_events' && EE_Registry::instance()->REQ->get('action') == 'edit') {
908
+			wp_register_script('ticket_selector_embed', TICKET_SELECTOR_ASSETS_URL.'ticket-selector-embed.js', array('ee-dialog'), EVENT_ESPRESSO_VERSION, true);
909
+			wp_enqueue_script('ticket_selector_embed');
910 910
 		}
911 911
 	}
912 912
 
Please login to merge, or discard this patch.
modules/ticket_selector/templates/ticket_selector_chart.template.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
 				<th scope="col" class="ee-ticket-selector-ticket-qty-th cntr">
34 34
 					<?php
35 35
 						/**
36
-						* Filters the text printed for the header of the quantity column in the ticket selector table
37
-						*
38
-						* @since 4.7.2
39
-						*
40
-						* @param string 'Qty*' The translatable text to display in the table header for the Quantity of tickets
41
-						* @param int $EVT_ID The Event ID
42
-						*/
36
+						 * Filters the text printed for the header of the quantity column in the ticket selector table
37
+						 *
38
+						 * @since 4.7.2
39
+						 *
40
+						 * @param string 'Qty*' The translatable text to display in the table header for the Quantity of tickets
41
+						 * @param int $EVT_ID The Event ID
42
+						 */
43 43
 						echo esc_html( apply_filters( 'FHEE__ticket_selector_chart_template__table_header_qty', __( 'Qty*', 'event_espresso' ), $EVT_ID ) );
44 44
 					?>
45 45
 				</th>
Please login to merge, or discard this patch.
Spacing   +145 added lines, -145 removed lines patch added patch discarded remove patch
@@ -8,32 +8,32 @@  discard block
 block discarded – undo
8 8
 
9 9
 $row = 1;
10 10
 $max = 1;
11
-$ticket_count = count( $tickets );
11
+$ticket_count = count($tickets);
12 12
 
13
-if ( ! $ticket_count ) {
13
+if ( ! $ticket_count) {
14 14
 	return;
15 15
 }
16 16
 
17 17
 $required_ticket_sold_out = FALSE;
18
-$template_settings = isset ( EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector ) ? EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector : new EE_Ticket_Selector_Config();
18
+$template_settings = isset (EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector) ? EE_Registry::instance()->CFG->template_settings->EED_Ticket_Selector : new EE_Ticket_Selector_Config();
19 19
 ob_start();
20 20
 
21
-foreach ( $tickets as $TKT_ID => $ticket ) {
22
-	if ( $ticket instanceof EE_Ticket ) {
21
+foreach ($tickets as $TKT_ID => $ticket) {
22
+	if ($ticket instanceof EE_Ticket) {
23 23
 		//	d( $ticket );
24
-		$max =$ticket->max();
24
+		$max = $ticket->max();
25 25
 		$min = 0;
26 26
 		$remaining = $ticket->remaining();
27
-		if ( $ticket->is_on_sale() && $ticket->is_remaining() ) {
27
+		if ($ticket->is_on_sale() && $ticket->is_remaining()) {
28 28
 			// offer the number of $tickets_remaining or $max_atndz, whichever is smaller
29
-			$max = min( $remaining, $max_atndz );
29
+			$max = min($remaining, $max_atndz);
30 30
 			// but... we also want to restrict the number of tickets by the ticket max setting,
31 31
 			// however, the max still can't be higher than what was just set above
32
-			$max = $ticket->max() > 0 ? min( $ticket->max(), $max ) : $max;
32
+			$max = $ticket->max() > 0 ? min($ticket->max(), $max) : $max;
33 33
 			// and we also want to restrict the minimum number of tickets by the ticket min setting
34 34
 			$min = $ticket->min() > 0 ? $ticket->min() : 0;
35 35
 			// and if the ticket is required, then make sure that min qty is at least 1
36
-			$min = $ticket->required() ? max( $min, 1 ) : $min;
36
+			$min = $ticket->required() ? max($min, 1) : $min;
37 37
 		} else {
38 38
 			// set flag if ticket is required (flag is set to start date so that future tickets are not blocked)
39 39
 			$required_ticket_sold_out = $ticket->required() && ! $remaining ? $ticket->start_date() : $required_ticket_sold_out;
@@ -42,40 +42,40 @@  discard block
 block discarded – undo
42 42
 		$ticket_price = $ticket->get_ticket_total_with_taxes();
43 43
 		$ticket_bundle = FALSE;
44 44
 		// for ticket bundles, set min and max qty the same
45
-		if ( $ticket->min() != 0 && $ticket->min() == $ticket->max() ) {
45
+		if ($ticket->min() != 0 && $ticket->min() == $ticket->max()) {
46 46
 			$ticket_price = $ticket_price * $ticket->min();
47 47
 			$ticket_bundle = TRUE;
48 48
 		}
49
-		$ticket_price = apply_filters( 'FHEE__ticket_selector_chart_template__ticket_price', $ticket_price, $ticket );
49
+		$ticket_price = apply_filters('FHEE__ticket_selector_chart_template__ticket_price', $ticket_price, $ticket);
50 50
 		// if a previous required ticket with the same sale start date is sold out, then mark this ticket as sold out as well.
51 51
 		// tickets that go on sale at a later date than the required ticket  will NOT be affected
52 52
 		$tkt_status = $required_ticket_sold_out !== FALSE && $required_ticket_sold_out === $ticket->start_date() ? EE_Ticket::sold_out : $ticket->ticket_status();
53 53
 		$tkt_status = $event_status === EE_Datetime::sold_out ? EE_Ticket::sold_out : $tkt_status;
54 54
 		// check ticket status
55
-		switch ( $tkt_status ) {
55
+		switch ($tkt_status) {
56 56
 			// sold_out
57 57
 			case EE_Ticket::sold_out :
58
-				$ticket_status = '<span class="ticket-sales-sold-out">' . $ticket->ticket_status( TRUE ) . '</span>';
58
+				$ticket_status = '<span class="ticket-sales-sold-out">'.$ticket->ticket_status(TRUE).'</span>';
59 59
 				$status_class = 'ticket-sales-sold-out lt-grey-text';
60 60
 			break;
61 61
 			// expired
62 62
 			case EE_Ticket::expired :
63
-				$ticket_status = '<span class="ticket-sales-expired">' . $ticket->ticket_status( TRUE ) . '</span>';
63
+				$ticket_status = '<span class="ticket-sales-expired">'.$ticket->ticket_status(TRUE).'</span>';
64 64
 				$status_class = 'ticket-sales-expired lt-grey-text';
65 65
 			break;
66 66
 			// archived
67 67
 			case EE_Ticket::archived :
68
-				$ticket_status = '<span class="archived-ticket">' . $ticket->ticket_status( TRUE ) . '</span>';
68
+				$ticket_status = '<span class="archived-ticket">'.$ticket->ticket_status(TRUE).'</span>';
69 69
 				$status_class = 'archived-ticket hidden';
70 70
 			break;
71 71
 			// pending
72 72
 			case EE_Ticket::pending :
73
-				$ticket_status = '<span class="ticket-pending">' . $ticket->ticket_status( TRUE ) . '</span>';
73
+				$ticket_status = '<span class="ticket-pending">'.$ticket->ticket_status(TRUE).'</span>';
74 74
 				$status_class = 'ticket-pending';
75 75
 			break;
76 76
 			// onsale
77 77
 			case EE_Ticket::onsale :
78
-				$ticket_status = '<span class="ticket-on-sale">' . $ticket->ticket_status( TRUE ) . '</span>';
78
+				$ticket_status = '<span class="ticket-on-sale">'.$ticket->ticket_status(TRUE).'</span>';
79 79
 				$status_class = 'ticket-on-sale';
80 80
 			break;
81 81
 		}
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
 		 *
91 91
 		 * @var string|bool
92 92
 		 */
93
-		if ( false !== ( $new_row_content = apply_filters( 'FHEE__ticket_selector_chart_template__do_ticket_entire_row', false, $ticket, $max, $min, $required_ticket_sold_out, $ticket_price, $ticket_bundle, $ticket_status, $status_class ) ) ) {
93
+		if (false !== ($new_row_content = apply_filters('FHEE__ticket_selector_chart_template__do_ticket_entire_row', false, $ticket, $max, $min, $required_ticket_sold_out, $ticket_price, $ticket_bundle, $ticket_status, $status_class))) {
94 94
 			echo $new_row_content;
95 95
 			continue;
96 96
 		}
97 97
 	?>
98
-				<tr class="tckt-slctr-tbl-tr <?php echo $status_class . ' ' . espresso_get_object_css_class( $ticket ); ?>">
98
+				<tr class="tckt-slctr-tbl-tr <?php echo $status_class.' '.espresso_get_object_css_class($ticket); ?>">
99 99
 		<?php
100 100
 		/**
101 101
 		 * Allow plugins to hook in and abort the generation and display of the contents of this
@@ -107,24 +107,24 @@  discard block
 block discarded – undo
107 107
 		 *
108 108
 		 * @var string|bool
109 109
 		 */
110
-		if ( false !== ( $new_row_cells_content = apply_filters( 'FHEE__ticket_selector_chart_template__do_ticket_inside_row', false, $ticket, $max, $min, $required_ticket_sold_out, $ticket_price, $ticket_bundle, $ticket_status, $status_class ) ) ) {
110
+		if (false !== ($new_row_cells_content = apply_filters('FHEE__ticket_selector_chart_template__do_ticket_inside_row', false, $ticket, $max, $min, $required_ticket_sold_out, $ticket_price, $ticket_bundle, $ticket_status, $status_class))) {
111 111
 			echo $new_row_cells_content;
112 112
 			echo '</tr>';
113 113
 			continue;
114 114
 		}
115 115
 		?>
116 116
 					<td class="tckt-slctr-tbl-td-name">
117
-						<b><?php echo $ticket->get_pretty('TKT_name');?></b>
118
-						<?php if ( $template_settings->show_ticket_details ) : ?>
119
-							<a id="display-tckt-slctr-tkt-details-<?php echo $EVT_ID . '-' . $TKT_ID; ?>" class="display-tckt-slctr-tkt-details display-the-hidden lt-grey-text smaller-text hide-if-no-js" rel="tckt-slctr-tkt-details-<?php echo $EVT_ID . '-' . $TKT_ID; ?>" title="<?php echo esc_attr( apply_filters( 'FHEE__ticket_selector_chart_template__show_ticket_details_link_title', __( 'click to show additional ticket details', 'event_espresso' )) ); ?>">
120
-								<?php echo sprintf( __( 'show%1$sdetails%1$s+', 'event_espresso' ), '&nbsp;' ); ?>
117
+						<b><?php echo $ticket->get_pretty('TKT_name'); ?></b>
118
+						<?php if ($template_settings->show_ticket_details) : ?>
119
+							<a id="display-tckt-slctr-tkt-details-<?php echo $EVT_ID.'-'.$TKT_ID; ?>" class="display-tckt-slctr-tkt-details display-the-hidden lt-grey-text smaller-text hide-if-no-js" rel="tckt-slctr-tkt-details-<?php echo $EVT_ID.'-'.$TKT_ID; ?>" title="<?php echo esc_attr(apply_filters('FHEE__ticket_selector_chart_template__show_ticket_details_link_title', __('click to show additional ticket details', 'event_espresso'))); ?>">
120
+								<?php echo sprintf(__('show%1$sdetails%1$s+', 'event_espresso'), '&nbsp;'); ?>
121 121
 							</a>
122
-							<a id="hide-tckt-slctr-tkt-details-<?php echo $EVT_ID . '-' . $TKT_ID; ?>" class="hide-tckt-slctr-tkt-details hide-the-displayed lt-grey-text smaller-text hide-if-no-js" rel="tckt-slctr-tkt-details-<?php echo $EVT_ID . '-' . $TKT_ID; ?>" title="<?php echo esc_attr( apply_filters( 'FHEE__ticket_selector_chart_template__hide_ticket_details_link_title', __( 'click to hide additional ticket details', 'event_espresso' )) ); ?>" style="display:none;">
123
-								<?php echo sprintf( __( 'hide%1$sdetails%1$s-', 'event_espresso' ), '&nbsp;' ); ?>
122
+							<a id="hide-tckt-slctr-tkt-details-<?php echo $EVT_ID.'-'.$TKT_ID; ?>" class="hide-tckt-slctr-tkt-details hide-the-displayed lt-grey-text smaller-text hide-if-no-js" rel="tckt-slctr-tkt-details-<?php echo $EVT_ID.'-'.$TKT_ID; ?>" title="<?php echo esc_attr(apply_filters('FHEE__ticket_selector_chart_template__hide_ticket_details_link_title', __('click to hide additional ticket details', 'event_espresso'))); ?>" style="display:none;">
123
+								<?php echo sprintf(__('hide%1$sdetails%1$s-', 'event_espresso'), '&nbsp;'); ?>
124 124
 							</a>
125 125
 						<?php endif; //end show details check ?>
126
-					<?php if ( $ticket->required() ) { ?>
127
-						<p class="ticket-required-pg"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_required_message', __( 'This ticket is required and must be purchased.', 'event_espresso' )); ?></p>
126
+					<?php if ($ticket->required()) { ?>
127
+						<p class="ticket-required-pg"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_required_message', __('This ticket is required and must be purchased.', 'event_espresso')); ?></p>
128 128
 					<?php } ?>
129 129
 					<?php
130 130
 //	echo '<br/><b>$max_atndz : ' . $max_atndz . '</b>';
@@ -138,63 +138,63 @@  discard block
 block discarded – undo
138 138
 //	echo '<br/><b> $ticket->required() : ' .  $ticket->uses() . '</b>';
139 139
 					?>
140 140
 					</td>
141
-					<?php if ( apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE )) { ?>
142
-					<td class="tckt-slctr-tbl-td-price jst-rght"><?php echo EEH_Template::format_currency( $ticket_price ); ?>&nbsp;<span class="smaller-text no-bold"><?php
143
-						if ( $ticket_bundle ) {
144
-							echo apply_filters( 'FHEE__ticket_selector_chart_template__per_ticket_bundle_text', __( ' / bundle', 'event_espresso' ));
141
+					<?php if (apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE)) { ?>
142
+					<td class="tckt-slctr-tbl-td-price jst-rght"><?php echo EEH_Template::format_currency($ticket_price); ?>&nbsp;<span class="smaller-text no-bold"><?php
143
+						if ($ticket_bundle) {
144
+							echo apply_filters('FHEE__ticket_selector_chart_template__per_ticket_bundle_text', __(' / bundle', 'event_espresso'));
145 145
 						} else {
146
-							echo apply_filters( 'FHEE__ticket_selector_chart_template__per_ticket_text', __( '', 'event_espresso' ));
146
+							echo apply_filters('FHEE__ticket_selector_chart_template__per_ticket_text', __('', 'event_espresso'));
147 147
 						}?></span>&nbsp;</td>
148 148
 					<?php } ?>
149 149
 					<td class="tckt-slctr-tbl-td-qty cntr">
150 150
 					<?php
151 151
 					$hidden_input_qty = $max_atndz > 1 ? TRUE : FALSE;
152 152
 					// sold out or other status ?
153
-					if ( $tkt_status == EE_Ticket::sold_out || $remaining == 0 ) {
153
+					if ($tkt_status == EE_Ticket::sold_out || $remaining == 0) {
154 154
 					?>
155
-						<span class="sold-out"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_sold_out_msg', __( 'Sold&nbsp;Out', 'event_espresso' ));?></span>
155
+						<span class="sold-out"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_sold_out_msg', __('Sold&nbsp;Out', 'event_espresso')); ?></span>
156 156
 					<?php
157
-					} else if ( $tkt_status == EE_Ticket::expired || $tkt_status == EE_Ticket::archived ) {
157
+					} else if ($tkt_status == EE_Ticket::expired || $tkt_status == EE_Ticket::archived) {
158 158
 						echo $ticket_status;
159
-					} else if ( $tkt_status == EE_Ticket::pending ) {
159
+					} else if ($tkt_status == EE_Ticket::pending) {
160 160
 					?>
161 161
 					<div class="ticket-pending-pg">
162
-						<span class="ticket-pending"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_goes_on_sale_msg', __( 'Goes&nbsp;On&nbsp;Sale', 'event_espresso' )); ?></span><br/>
163
-						<span class="small-text"><?php echo $ticket->get_i18n_datetime( 'TKT_start_date', apply_filters( 'FHEE__EED_Ticket_Selector__display_goes_on_sale__date_format', $date_format ) ); ?></span>
162
+						<span class="ticket-pending"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_goes_on_sale_msg', __('Goes&nbsp;On&nbsp;Sale', 'event_espresso')); ?></span><br/>
163
+						<span class="small-text"><?php echo $ticket->get_i18n_datetime('TKT_start_date', apply_filters('FHEE__EED_Ticket_Selector__display_goes_on_sale__date_format', $date_format)); ?></span>
164 164
 					</div>
165 165
 					<?php
166 166
 					// min qty purchasable is less than tickets available
167
-					} else if ( $ticket->min() > $remaining ) {
167
+					} else if ($ticket->min() > $remaining) {
168 168
 					?>
169 169
 					<div class="archived-ticket-pg">
170
-						<span class="archived-ticket small-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_not_available_msg', __( 'Not Available', 'event_espresso' )); ?></span><br/>
170
+						<span class="archived-ticket small-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_not_available_msg', __('Not Available', 'event_espresso')); ?></span><br/>
171 171
 					</div>
172 172
 					<?php
173 173
 					// if only one attendee is allowed to register at a time
174
-					} else if ( $max_atndz  == 1 ) {
174
+					} else if ($max_atndz == 1) {
175 175
 						// display submit button since we have tickets available
176
-						add_filter( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true' );
176
+						add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true');
177 177
 				?>
178
-					<input type="radio" name="tkt-slctr-qty-<?php echo $EVT_ID; ?>" id="ticket-selector-tbl-qty-slct-<?php echo $EVT_ID . '-' . $row; ?>" class="ticket-selector-tbl-qty-slct" value="<?php echo $row . '-'; ?>1" <?php echo $row == 1 ? ' checked="checked"' : ''; ?>  title=""/>
178
+					<input type="radio" name="tkt-slctr-qty-<?php echo $EVT_ID; ?>" id="ticket-selector-tbl-qty-slct-<?php echo $EVT_ID.'-'.$row; ?>" class="ticket-selector-tbl-qty-slct" value="<?php echo $row.'-'; ?>1" <?php echo $row == 1 ? ' checked="checked"' : ''; ?>  title=""/>
179 179
 			<?php
180 180
 						$hidden_input_qty = FALSE;
181 181
 
182
-					} else if ( $max_atndz  == 0 ) {
183
-						echo '<span class="sold-out">' . apply_filters( 'FHEE__ticket_selector_chart_template__ticket_closed_msg', __( 'Closed', 'event_espresso' )) . '</span>';
184
-					} elseif ( $max > 0 ) {
182
+					} else if ($max_atndz == 0) {
183
+						echo '<span class="sold-out">'.apply_filters('FHEE__ticket_selector_chart_template__ticket_closed_msg', __('Closed', 'event_espresso')).'</span>';
184
+					} elseif ($max > 0) {
185 185
 						// display submit button since we have tickets available
186
-						add_filter( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true' );
186
+						add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true');
187 187
 
188 188
 				?>
189
-					<select name="tkt-slctr-qty-<?php echo $EVT_ID; ?>[]" id="ticket-selector-tbl-qty-slct-<?php echo $EVT_ID . '-' . $row; ?>" class="ticket-selector-tbl-qty-slct" title="">
189
+					<select name="tkt-slctr-qty-<?php echo $EVT_ID; ?>[]" id="ticket-selector-tbl-qty-slct-<?php echo $EVT_ID.'-'.$row; ?>" class="ticket-selector-tbl-qty-slct" title="">
190 190
 					<?php
191 191
 						// this ensures that non-required tickets with non-zero MIN QTYs don't HAVE to be purchased
192
-						if ( ! $ticket->required() && $min !== 0 ) {
192
+						if ( ! $ticket->required() && $min !== 0) {
193 193
 					?>
194 194
 						<option value="0">&nbsp;0&nbsp;</option>
195 195
 					<?php }
196 196
 						// offer ticket quantities from the min to the max
197
-						for ( $i = $min; $i <= $max; $i++) {
197
+						for ($i = $min; $i <= $max; $i++) {
198 198
 					?>
199 199
 						<option value="<?php echo $i; ?>">&nbsp;<?php echo $i; ?>&nbsp;</option>
200 200
 					<?php } ?>
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 
205 205
 					}
206 206
 					// depending on group reg we need to change the format for qty
207
-					if ( $hidden_input_qty ) {
207
+					if ($hidden_input_qty) {
208 208
 					?>
209 209
 					<input type="hidden" name="tkt-slctr-qty-<?php echo $EVT_ID; ?>[]" value="0" />
210 210
 					<?php
@@ -214,33 +214,33 @@  discard block
 block discarded – undo
214 214
 
215 215
 					</td>
216 216
 				</tr>
217
-				<?php if ( $template_settings->show_ticket_details ) : ?>
218
-					<tr class="tckt-slctr-tkt-details-tr <?php echo espresso_get_object_css_class( $ticket, '', 'details' );?>">
217
+				<?php if ($template_settings->show_ticket_details) : ?>
218
+					<tr class="tckt-slctr-tkt-details-tr <?php echo espresso_get_object_css_class($ticket, '', 'details'); ?>">
219 219
 						<td class="tckt-slctr-tkt-details-td" colspan="3" >
220
-							<div id="tckt-slctr-tkt-details-<?php echo $EVT_ID . '-' . $TKT_ID; ?>-dv" class="tckt-slctr-tkt-details-dv" style="display: none;">
220
+							<div id="tckt-slctr-tkt-details-<?php echo $EVT_ID.'-'.$TKT_ID; ?>-dv" class="tckt-slctr-tkt-details-dv" style="display: none;">
221 221
 
222 222
 								<section class="tckt-slctr-tkt-details-sctn">
223
-									<h3><?php _e( 'Details', 'event_espresso' ); ?></h3>
223
+									<h3><?php _e('Details', 'event_espresso'); ?></h3>
224 224
 									<p><?php echo $ticket->description(); ?></p>
225 225
 
226
-									<?php if ( $ticket_price != 0 && apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE )) { ?>
226
+									<?php if ($ticket_price != 0 && apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE)) { ?>
227 227
 									<section class="tckt-slctr-tkt-price-sctn">
228
-										<h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_price_breakdown_heading', __( 'Price', 'event_espresso' )); ?></h5>
228
+										<h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_price_breakdown_heading', __('Price', 'event_espresso')); ?></h5>
229 229
 										<div class="tckt-slctr-tkt-details-tbl-wrap-dv">
230 230
 											<table class="tckt-slctr-tkt-details-tbl">
231 231
 												<thead>
232 232
 													<tr>
233
-														<th class="ee-third-width"><span class="small-text"><?php _e( 'Name', 'event_espresso' ); ?></span></th>
234
-														<th class="jst-cntr"><span class="small-text"><?php _e( 'Description', 'event_espresso' ); ?></span></th>
235
-														<th class="ee-fourth-width jst-rght"><span class="small-text"><?php _e( 'Amount', 'event_espresso' ); ?></span></th>
233
+														<th class="ee-third-width"><span class="small-text"><?php _e('Name', 'event_espresso'); ?></span></th>
234
+														<th class="jst-cntr"><span class="small-text"><?php _e('Description', 'event_espresso'); ?></span></th>
235
+														<th class="ee-fourth-width jst-rght"><span class="small-text"><?php _e('Amount', 'event_espresso'); ?></span></th>
236 236
 													</tr>
237 237
 												</thead>
238 238
 												<tbody>
239
-										<?php if ( $ticket->base_price() instanceof EE_Price ) { ?>
239
+										<?php if ($ticket->base_price() instanceof EE_Price) { ?>
240 240
 													<tr>
241
-														<td data-th="<?php _e( 'Name', 'event_espresso' ); ?>" class="small-text"><b><?php echo $ticket->base_price()->name(); ?></b></td>
242
-														<td data-th="<?php _e( 'Description', 'event_espresso' ); ?>" class="small-text"><?php echo $ticket->base_price()->desc(); ?></td>
243
-														<td data-th="<?php _e( 'Amount', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo $ticket->base_price()->pretty_price(); ?></td>
241
+														<td data-th="<?php _e('Name', 'event_espresso'); ?>" class="small-text"><b><?php echo $ticket->base_price()->name(); ?></b></td>
242
+														<td data-th="<?php _e('Description', 'event_espresso'); ?>" class="small-text"><?php echo $ticket->base_price()->desc(); ?></td>
243
+														<td data-th="<?php _e('Amount', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo $ticket->base_price()->pretty_price(); ?></td>
244 244
 													</tr>
245 245
 													<?php
246 246
 															$running_total = $ticket->base_price()->amount();
@@ -248,44 +248,44 @@  discard block
 block discarded – undo
248 248
 															$running_total = 0;
249 249
 														}
250 250
 														// now add price modifiers
251
-														foreach ( $ticket->price_modifiers() as $price_mod ) { ?>
251
+														foreach ($ticket->price_modifiers() as $price_mod) { ?>
252 252
 													<tr>
253
-														<td data-th="<?php _e( 'Name', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo $price_mod->name(); ?></td>
254
-													<?php if ( $price_mod->is_percent() ) { ?>
255
-														<td data-th="<?php _e( 'Description', 'event_espresso' ); ?>" class="small-text"><?php echo $price_mod->desc(); ?> <?php echo $price_mod->amount(); ?>%</td>
253
+														<td data-th="<?php _e('Name', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo $price_mod->name(); ?></td>
254
+													<?php if ($price_mod->is_percent()) { ?>
255
+														<td data-th="<?php _e('Description', 'event_espresso'); ?>" class="small-text"><?php echo $price_mod->desc(); ?> <?php echo $price_mod->amount(); ?>%</td>
256 256
 														<?php
257
-															$new_sub_total = $running_total * ( $price_mod->amount() / 100 );
257
+															$new_sub_total = $running_total * ($price_mod->amount() / 100);
258 258
 															$new_sub_total = $price_mod->is_discount() ? $new_sub_total * -1 : $new_sub_total;
259 259
 														?>
260 260
 													<?php } else { ?>
261 261
 														<?php $new_sub_total = $price_mod->is_discount() ? $price_mod->amount() * -1 : $price_mod->amount(); ?>
262
-														<td data-th="<?php _e( 'Description', 'event_espresso' ); ?>" class="small-text"><?php echo $price_mod->desc(); ?></td>
262
+														<td data-th="<?php _e('Description', 'event_espresso'); ?>" class="small-text"><?php echo $price_mod->desc(); ?></td>
263 263
 														<?php $new_sub_total = $price_mod->is_discount() ? $price_mod->amount() * -1 : $price_mod->amount(); ?>
264 264
 													<?php } ?>
265
-														<td data-th="<?php _e( 'Amount', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo EEH_Template::format_currency( $new_sub_total ); ?></td>
265
+														<td data-th="<?php _e('Amount', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo EEH_Template::format_currency($new_sub_total); ?></td>
266 266
 														<?php $running_total += $new_sub_total; ?>
267 267
 													</tr>
268 268
 												<?php } ?>
269
-												<?php if ( $ticket->taxable() ) { ?>
269
+												<?php if ($ticket->taxable()) { ?>
270 270
 													<?php //$ticket_subtotal =$ticket->get_ticket_subtotal(); ?>
271 271
 													<tr>
272
-														<td colspan="2" class="jst-rght small-text sbttl"><b><?php _e( 'subtotal', 'event_espresso' ); ?></b></td>
273
-														<td data-th="<?php _e( 'subtotal', 'event_espresso' ); ?>" class="jst-rght small-text"><b><?php echo  EEH_Template::format_currency( $running_total ); ?></b></td>
272
+														<td colspan="2" class="jst-rght small-text sbttl"><b><?php _e('subtotal', 'event_espresso'); ?></b></td>
273
+														<td data-th="<?php _e('subtotal', 'event_espresso'); ?>" class="jst-rght small-text"><b><?php echo  EEH_Template::format_currency($running_total); ?></b></td>
274 274
 													</tr>
275 275
 
276
-													<?php foreach ( $ticket->get_ticket_taxes_for_admin() as $tax ) { ?>
276
+													<?php foreach ($ticket->get_ticket_taxes_for_admin() as $tax) { ?>
277 277
 													<tr>
278
-														<td data-th="<?php _e( 'Name', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo $tax->name(); ?></td>
279
-														<td data-th="<?php _e( 'Description', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo $tax->amount(); ?>%</td>
280
-														<?php $tax_amount = $running_total * ( $tax->amount() / 100 ); ?>
281
-														<td data-th="<?php _e( 'Amount', 'event_espresso' ); ?>" class="jst-rght small-text"><?php echo EEH_Template::format_currency( $tax_amount ); ?></td>
278
+														<td data-th="<?php _e('Name', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo $tax->name(); ?></td>
279
+														<td data-th="<?php _e('Description', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo $tax->amount(); ?>%</td>
280
+														<?php $tax_amount = $running_total * ($tax->amount() / 100); ?>
281
+														<td data-th="<?php _e('Amount', 'event_espresso'); ?>" class="jst-rght small-text"><?php echo EEH_Template::format_currency($tax_amount); ?></td>
282 282
 														<?php $running_total += $tax_amount; ?>
283 283
 													</tr>
284 284
 													<?php } ?>
285 285
 												<?php } ?>
286 286
 													<tr>
287
-														<td colspan="2" class="jst-rght small-text ttl-lbl-td"><b><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_total_price', __( 'Total', 'event_espresso' )); ?></b></td>
288
-														<td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_total_price', __( 'Total', 'event_espresso' )); ?>" class="jst-rght small-text"><b><?php echo EEH_Template::format_currency( $running_total ); ?></b></td>
287
+														<td colspan="2" class="jst-rght small-text ttl-lbl-td"><b><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_total_price', __('Total', 'event_espresso')); ?></b></td>
288
+														<td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_total_price', __('Total', 'event_espresso')); ?>" class="jst-rght small-text"><b><?php echo EEH_Template::format_currency($running_total); ?></b></td>
289 289
 													</tr>
290 290
 												</tbody>
291 291
 											</table>
@@ -295,106 +295,106 @@  discard block
 block discarded – undo
295 295
 									<?php } ?>
296 296
 
297 297
 									<section class="tckt-slctr-tkt-sale-dates-sctn">
298
-										<h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_sales_date_heading', __( 'Sale Dates', 'event_espresso' )); ?></h5>
299
-										<span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_dates_available_message', __( 'The dates when this option is available for purchase.', 'event_espresso' )); ?></span><br/>
300
-										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_goes_on_sale', __( 'Goes On Sale:', 'event_espresso' )); ?></span><span class="dashicons dashicons-calendar"></span><?php echo $ticket->get_i18n_datetime( 'TKT_start_date', $date_format) . ' &nbsp; '; ?><span class="dashicons dashicons-clock"></span><?php echo $ticket->get_i18n_datetime( 'TKT_start_date',  $time_format ) ; ?><br/>
301
-										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_sales_end', __( 'Sales End:', 'event_espresso' )); ?></span><span class="dashicons dashicons-calendar"></span><?php echo $ticket->get_i18n_datetime( 'TKT_end_date', $date_format ) . ' &nbsp; '; ?><span class="dashicons dashicons-clock"></span><?php echo $ticket->get_i18n_datetime( 'TKT_end_date', $time_format ) ; ?><br/>
298
+										<h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_sales_date_heading', __('Sale Dates', 'event_espresso')); ?></h5>
299
+										<span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_dates_available_message', __('The dates when this option is available for purchase.', 'event_espresso')); ?></span><br/>
300
+										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_goes_on_sale', __('Goes On Sale:', 'event_espresso')); ?></span><span class="dashicons dashicons-calendar"></span><?php echo $ticket->get_i18n_datetime('TKT_start_date', $date_format).' &nbsp; '; ?><span class="dashicons dashicons-clock"></span><?php echo $ticket->get_i18n_datetime('TKT_start_date', $time_format); ?><br/>
301
+										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_sales_end', __('Sales End:', 'event_espresso')); ?></span><span class="dashicons dashicons-calendar"></span><?php echo $ticket->get_i18n_datetime('TKT_end_date', $date_format).' &nbsp; '; ?><span class="dashicons dashicons-clock"></span><?php echo $ticket->get_i18n_datetime('TKT_end_date', $time_format); ?><br/>
302 302
 									</section>
303 303
 									<br/>
304 304
 
305
-									<?php do_action( 'AHEE__ticket_selector_chart_template__after_ticket_date', $ticket ); ?>
305
+									<?php do_action('AHEE__ticket_selector_chart_template__after_ticket_date', $ticket); ?>
306 306
 
307
-									<?php if ( $ticket->min() &&$ticket->max() ) { ?>
307
+									<?php if ($ticket->min() && $ticket->max()) { ?>
308 308
 									<section class="tckt-slctr-tkt-quantities-sctn">
309
-										<h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_heading', __( 'Purchasable Quantities', 'event_espresso' )); ?></h5>
310
-										<span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_message', __( 'The number of tickets that can be purchased per transaction (if available).', 'event_espresso' )); ?></span><br/>
311
-										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty', __( 'Minimum Qty:', 'event_espresso' )); ?></span><?php echo $ticket->min() > 0 ? $ticket->min() : 0; ?>
312
-										<?php if ( $ticket->min() > $remaining ) { ?> &nbsp; <span class="important-notice small-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty_message', __( 'The Minimum Quantity purchasable for this ticket exceeds the number of spaces remaining', 'event_espresso' )); ?></span><?php } ?><br/>
309
+										<h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_heading', __('Purchasable Quantities', 'event_espresso')); ?></h5>
310
+										<span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_message', __('The number of tickets that can be purchased per transaction (if available).', 'event_espresso')); ?></span><br/>
311
+										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty', __('Minimum Qty:', 'event_espresso')); ?></span><?php echo $ticket->min() > 0 ? $ticket->min() : 0; ?>
312
+										<?php if ($ticket->min() > $remaining) { ?> &nbsp; <span class="important-notice small-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_min_qty_message', __('The Minimum Quantity purchasable for this ticket exceeds the number of spaces remaining', 'event_espresso')); ?></span><?php } ?><br/>
313 313
 										<?php //$max = min( $max, $max_atndz );?>
314
-										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_max_qty', __( 'Maximum Qty:', 'event_espresso' )); ?></span><?php echo $ticket->max() === EE_INF ? __( 'no limit', 'event_espresso' ) : max( $ticket->max(), 1 ); ?><br/>
314
+										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_purchasable_quantities_max_qty', __('Maximum Qty:', 'event_espresso')); ?></span><?php echo $ticket->max() === EE_INF ? __('no limit', 'event_espresso') : max($ticket->max(), 1); ?><br/>
315 315
 									</section>
316 316
 									<br/>
317 317
 									<?php } ?>
318 318
 
319
-									<?php if ( $ticket->uses() !== EE_INF && ( ! defined( 'EE_DECAF' ) || EE_DECAF !== TRUE )) { ?>
319
+									<?php if ($ticket->uses() !== EE_INF && ( ! defined('EE_DECAF') || EE_DECAF !== TRUE)) { ?>
320 320
 									<section class="tckt-slctr-tkt-uses-sctn">
321
-										<h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_heading', __( 'Event Date Ticket Uses', 'event_espresso' )); ?></h5>
321
+										<h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_heading', __('Event Date Ticket Uses', 'event_espresso')); ?></h5>
322 322
 										<span class="drk-grey-text small-text no-bold"> - <?php
323 323
 											echo apply_filters(
324 324
 												'FHEE__ticket_selector_chart_template__ticket_details_event_date_ticket_uses_message',
325 325
 												sprintf(
326
-													__( 'The number of separate event datetimes (see table below) that this ticket can be used to gain admittance to.%1$s%2$sAdmission is always one person per ticket.%3$s', 'event_espresso' ),
326
+													__('The number of separate event datetimes (see table below) that this ticket can be used to gain admittance to.%1$s%2$sAdmission is always one person per ticket.%3$s', 'event_espresso'),
327 327
 													'<br/>',
328 328
 													'<strong>',
329 329
 													'</strong>'
330 330
 												)
331 331
 											);
332 332
 											?></span><br/>
333
-										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_date_number_datetimes', __( '# Datetimes:', 'event_espresso' )); ?></span><?php  echo $ticket->uses();?><br/>
333
+										<span class="ticket-details-label-spn drk-grey-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_date_number_datetimes', __('# Datetimes:', 'event_espresso')); ?></span><?php  echo $ticket->uses(); ?><br/>
334 334
 									</section>
335 335
 									<?php } ?>
336 336
 
337 337
 									<?php
338
-									$datetimes = $ticket->datetimes_ordered( $event_is_expired, FALSE );
338
+									$datetimes = $ticket->datetimes_ordered($event_is_expired, FALSE);
339 339
 									$chart_column_width = $template_settings->show_ticket_sale_columns ? ' ee-fourth-width' : ' ee-half-width';
340
-									if ( ! empty( $datetimes )) { ?>
340
+									if ( ! empty($datetimes)) { ?>
341 341
 									<section class="tckt-slctr-tkt-datetimes-sctn">
342
-										<h5><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_heading', __( 'Access', 'event_espresso' )); ?></h5>
343
-										<span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_message', __( 'This option allows access to the following dates and times.', 'event_espresso' )); ?></span>
342
+										<h5><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_heading', __('Access', 'event_espresso')); ?></h5>
343
+										<span class="drk-grey-text small-text no-bold"> - <?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_message', __('This option allows access to the following dates and times.', 'event_espresso')); ?></span>
344 344
 										<div class="tckt-slctr-tkt-details-tbl-wrap-dv">
345 345
 											<table class="tckt-slctr-tkt-details-tbl">
346 346
 												<thead>
347 347
 													<tr>
348 348
 														<th class="tckt-slctr-tkt-details-date-th">
349
-															<span class="dashicons dashicons-calendar"></span><span class="small-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date', __( 'Date ', 'event_espresso' )); ?></span>
349
+															<span class="dashicons dashicons-calendar"></span><span class="small-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date', __('Date ', 'event_espresso')); ?></span>
350 350
 														</th>
351 351
 														<th class="tckt-slctr-tkt-details-time-th <?php echo $chart_column_width; ?>">
352
-															<span class="dashicons dashicons-clock"></span><span class="small-text"><?php _e( 'Time ', 'event_espresso' ); ?></span>
352
+															<span class="dashicons dashicons-clock"></span><span class="small-text"><?php _e('Time ', 'event_espresso'); ?></span>
353 353
 														</th>
354
-														<?php if ( $template_settings->show_ticket_sale_columns ) : ?>
354
+														<?php if ($template_settings->show_ticket_sale_columns) : ?>
355 355
 															<th class="tckt-slctr-tkt-details-this-ticket-sold-th ee-fourth-width cntr">
356
-																<span class="smaller-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold', sprintf( __( 'Sold', 'event_espresso' ), '<br/>' )); ?></span>
356
+																<span class="smaller-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold', sprintf(__('Sold', 'event_espresso'), '<br/>')); ?></span>
357 357
 															</th>
358 358
 															<th class="tckt-slctr-tkt-details-this-ticket-left-th ee-fourth-width cntr">
359
-																<span class="smaller-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left', sprintf( __( 'Remaining', 'event_espresso' ), '<br/>' )); ?></span>
359
+																<span class="smaller-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left', sprintf(__('Remaining', 'event_espresso'), '<br/>')); ?></span>
360 360
 															</th>
361 361
 															<th class="tckt-slctr-tkt-details-total-tickets-sold-th ee-fourth-width cntr">
362
-																<span class="smaller-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold', sprintf( __( 'Total%sSold', 'event_espresso' ), '<br/>' )); ?></span>
362
+																<span class="smaller-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold', sprintf(__('Total%sSold', 'event_espresso'), '<br/>')); ?></span>
363 363
 															</th>
364 364
 															<th class="tckt-slctr-tkt-details-total-tickets-left-th ee-fourth-width cntr">
365
-																<span class="smaller-text"><?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left', sprintf( __( 'Total Spaces%sLeft', 'event_espresso' ), '<br/>' )); ?></span>
365
+																<span class="smaller-text"><?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left', sprintf(__('Total Spaces%sLeft', 'event_espresso'), '<br/>')); ?></span>
366 366
 															</th>
367 367
 														<?php endif; //end $template_settings->show_ticket_sale_columns conditional ?>
368 368
 													</tr>
369 369
 												</thead>
370 370
 												<tbody>
371 371
 											<?php
372
-												foreach ( $datetimes as $datetime ) {
373
-													if ( $datetime instanceof EE_Datetime ) {
372
+												foreach ($datetimes as $datetime) {
373
+													if ($datetime instanceof EE_Datetime) {
374 374
 											?>
375 375
 
376 376
 												<tr>
377
-													<td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date', __( 'Event Date ', 'event_espresso' )); ?>" class="small-text">
377
+													<td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_event_date', __('Event Date ', 'event_espresso')); ?>" class="small-text">
378 378
 														<?php $datetime_name = $datetime->name(); ?>
379
-														<?php echo ! empty( $datetime_name ) ? '<b>' . $datetime_name . '</b><br/>' : ''; ?>
380
-														<?php echo $datetime->date_range( $date_format, __( ' to  ', 'event_espresso' )); ?>
379
+														<?php echo ! empty($datetime_name) ? '<b>'.$datetime_name.'</b><br/>' : ''; ?>
380
+														<?php echo $datetime->date_range($date_format, __(' to  ', 'event_espresso')); ?>
381 381
 													</td>
382
-													<td data-th="<?php _e( 'Time ', 'event_espresso' ); ?>" class="cntr small-text">
383
-														<?php echo $datetime->time_range( $time_format, __( ' to  ', 'event_espresso' )); ?>
382
+													<td data-th="<?php _e('Time ', 'event_espresso'); ?>" class="cntr small-text">
383
+														<?php echo $datetime->time_range($time_format, __(' to  ', 'event_espresso')); ?>
384 384
 													</td>
385
-													<?php if ( $template_settings->show_ticket_sale_columns ) : ?>
386
-														<td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold', __( 'Sold', 'event_espresso' )); ?>" class="cntr small-text">
385
+													<?php if ($template_settings->show_ticket_sale_columns) : ?>
386
+														<td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_sold', __('Sold', 'event_espresso')); ?>" class="cntr small-text">
387 387
 															<?php echo $ticket->sold(); ?>
388 388
 														</td>
389
-														<td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left', __( 'Remaining', 'event_espresso' )); ?>" class="cntr small-text">
390
-															<?php echo $ticket->qty() === EE_INF ? '<span class="smaller-text">' .  __( 'unlimited ', 'event_espresso' ) . '</span>' : $ticket->qty() - $ticket->sold(); ?>
389
+														<td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_this_ticket_left', __('Remaining', 'event_espresso')); ?>" class="cntr small-text">
390
+															<?php echo $ticket->qty() === EE_INF ? '<span class="smaller-text">'.__('unlimited ', 'event_espresso').'</span>' : $ticket->qty() - $ticket->sold(); ?>
391 391
 														</td>
392
-														<td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold', __( 'Total Sold', 'event_espresso' )); ?>" class="cntr small-text">
392
+														<td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_sold', __('Total Sold', 'event_espresso')); ?>" class="cntr small-text">
393 393
 															<?php echo $datetime->sold(); ?>
394 394
 														</td>
395
-												<?php $tkts_left = $datetime->sold_out() ? '<span class="sold-out smaller-text">' . __( 'Sold&nbsp;Out', 'event_espresso' ) . '</span>' : $datetime->spaces_remaining(); ?>
396
-														<td data-th="<?php echo apply_filters( 'FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left', __( 'Total Spaces Left', 'event_espresso' )); ?>" class="cntr small-text">
397
-															<?php echo $tkts_left === EE_INF ? '<span class="smaller-text">' .  __( 'unlimited ', 'event_espresso' ) . '</span>' : $tkts_left; ?>
395
+												<?php $tkts_left = $datetime->sold_out() ? '<span class="sold-out smaller-text">'.__('Sold&nbsp;Out', 'event_espresso').'</span>' : $datetime->spaces_remaining(); ?>
396
+														<td data-th="<?php echo apply_filters('FHEE__ticket_selector_chart_template__ticket_details_event_access_table_total_ticket_left', __('Total Spaces Left', 'event_espresso')); ?>" class="cntr small-text">
397
+															<?php echo $tkts_left === EE_INF ? '<span class="smaller-text">'.__('unlimited ', 'event_espresso').'</span>' : $tkts_left; ?>
398 398
 														</td>
399 399
 													<?php endif; //end $template_settings->show_ticket_sale_columns conditional ?>
400 400
 												</tr>
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 							</div>
413 413
 						</td>
414 414
 					</tr>
415
-				<?php endif;  //end template_settings->show_ticket_details check?>
415
+				<?php endif; //end template_settings->show_ticket_details check?>
416 416
 	<?php
417 417
 			$row++;
418 418
 		}
@@ -421,32 +421,32 @@  discard block
 block discarded – undo
421 421
 $ticket_row_html = ob_get_clean();
422 422
 // if there is only ONE ticket with a max qty of ONE, and it is free... then not much need for the ticket selector
423 423
 $hide_ticket_selector = $ticket_count == 1 && $max == 1 && $ticket->is_free() ? true : false;
424
-$hide_ticket_selector = apply_filters( 'FHEE__ticket_selector_chart_template__hide_ticket_selector', $hide_ticket_selector, $EVT_ID );
424
+$hide_ticket_selector = apply_filters('FHEE__ticket_selector_chart_template__hide_ticket_selector', $hide_ticket_selector, $EVT_ID);
425 425
 //EEH_Debug_Tools::printr( $ticket_count, '$ticket_count', __FILE__, __LINE__ );
426 426
 //EEH_Debug_Tools::printr( $max, '$max', __FILE__, __LINE__ );
427 427
 //EEH_Debug_Tools::printr( $hide_ticket_selector, '$hide_ticket_selector', __FILE__, __LINE__ );
428 428
 //EEH_Debug_Tools::printr( $table_style, '$table_style', __FILE__, __LINE__ );
429 429
 remove_filter(
430 430
 	'FHEE__EE_Ticket_Selector__after_ticket_selector_submit',
431
-	array( 'EED_Ticket_Selector', 'no_tkt_slctr_end_dv' )
431
+	array('EED_Ticket_Selector', 'no_tkt_slctr_end_dv')
432 432
 );
433 433
 remove_filter(
434 434
 	'FHEE__EE_Ticket_Selector__after_view_details_btn',
435
-	array( 'EED_Ticket_Selector', 'no_tkt_slctr_end_dv' )
435
+	array('EED_Ticket_Selector', 'no_tkt_slctr_end_dv')
436 436
 );
437
-if ( ! $hide_ticket_selector ) {
437
+if ( ! $hide_ticket_selector) {
438 438
 ?>
439 439
 <div id="tkt-slctr-tbl-wrap-dv-<?php echo $EVT_ID; ?>" class="tkt-slctr-tbl-wrap-dv">
440 440
 
441
-	<?php do_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', $event ); ?>
441
+	<?php do_action('AHEE__ticket_selector_chart__template__before_ticket_selector', $event); ?>
442 442
 
443 443
 	<table id="tkt-slctr-tbl-<?php echo $EVT_ID; ?>" class="tkt-slctr-tbl">
444 444
 		<thead>
445 445
 			<tr>
446 446
 				<th scope="col" class="ee-ticket-selector-ticket-details-th">
447
-					<?php echo esc_html( apply_filters( 'FHEE__ticket_selector_chart_template__table_header_available_tickets', '', $EVT_ID ) ); ?>
447
+					<?php echo esc_html(apply_filters('FHEE__ticket_selector_chart_template__table_header_available_tickets', '', $EVT_ID)); ?>
448 448
 				</th>
449
-				<?php if ( apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE )) { ?>
449
+				<?php if (apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE)) { ?>
450 450
 				<th scope="col" class="ee-ticket-selector-ticket-price-th cntr">
451 451
 					<?php
452 452
 						/**
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 						 * @param string 'Price' The translatable text to display in the table header for price
458 458
 						 * @param int $EVT_ID The Event ID
459 459
 						 */
460
-						echo esc_html( apply_filters( 'FHEE__ticket_selector_chart_template__table_header_price', __( 'Price', 'event_espresso' ), $EVT_ID ) );
460
+						echo esc_html(apply_filters('FHEE__ticket_selector_chart_template__table_header_price', __('Price', 'event_espresso'), $EVT_ID));
461 461
 					?>
462 462
 				</th>
463 463
 				<?php } ?>
@@ -471,24 +471,24 @@  discard block
 block discarded – undo
471 471
 						* @param string 'Qty*' The translatable text to display in the table header for the Quantity of tickets
472 472
 						* @param int $EVT_ID The Event ID
473 473
 						*/
474
-						echo esc_html( apply_filters( 'FHEE__ticket_selector_chart_template__table_header_qty', __( 'Qty*', 'event_espresso' ), $EVT_ID ) );
474
+						echo esc_html(apply_filters('FHEE__ticket_selector_chart_template__table_header_qty', __('Qty*', 'event_espresso'), $EVT_ID));
475 475
 					?>
476 476
 				</th>
477 477
 			</tr>
478 478
 		</thead>
479 479
 		<tbody>
480
-			<?php echo $ticket_row_html;?>
480
+			<?php echo $ticket_row_html; ?>
481 481
 		</tbody>
482 482
 	</table>
483 483
 
484 484
 	<input type="hidden" name="noheader" value="true" />
485
-	<input type="hidden" name="tkt-slctr-return-url-<?php echo $EVT_ID ?>" value="<?php echo EEH_URL::filter_input_server_url();?>" />
485
+	<input type="hidden" name="tkt-slctr-return-url-<?php echo $EVT_ID ?>" value="<?php echo EEH_URL::filter_input_server_url(); ?>" />
486 486
 	<input type="hidden" name="tkt-slctr-rows-<?php echo $EVT_ID; ?>" value="<?php echo $row - 1; ?>" />
487 487
 	<input type="hidden" name="tkt-slctr-max-atndz-<?php echo $EVT_ID; ?>" value="<?php echo $max_atndz; ?>" />
488 488
 	<input type="hidden" name="tkt-slctr-event-id" value="<?php echo $EVT_ID; ?>" />
489 489
 
490 490
 <?php
491
-if ( $max_atndz > 0 && ! $hide_ticket_selector ) {
491
+if ($max_atndz > 0 && ! $hide_ticket_selector) {
492 492
 	echo apply_filters(
493 493
 		'FHEE__ticket_selector_chart_template__maximum_tickets_purchased_footnote',
494 494
 		''
@@ -496,10 +496,10 @@  discard block
 block discarded – undo
496 496
 }
497 497
 ?>
498 498
 
499
-	<?php do_action( 'AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event ); ?>
499
+	<?php do_action('AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event); ?>
500 500
 
501 501
 </div>
502
-<?php } else if ( isset( $TKT_ID ) ) { ?>
502
+<?php } else if (isset($TKT_ID)) { ?>
503 503
 <input type="hidden" name="tkt-slctr-qty-<?php echo $EVT_ID; ?>[]" value="1"/>
504 504
 <input type="hidden" name="tkt-slctr-ticket-id-<?php echo $EVT_ID; ?>[]" value="<?php echo $TKT_ID; ?>"/>
505 505
 <input type="hidden" name="noheader" value="true"/>
@@ -508,27 +508,27 @@  discard block
 block discarded – undo
508 508
 <input type="hidden" name="tkt-slctr-max-atndz-<?php echo $EVT_ID; ?>" value="<?php echo $max_atndz; ?>"/>
509 509
 <input type="hidden" name="tkt-slctr-event-id" value="<?php echo $EVT_ID; ?>"/>
510 510
 <?php
511
-	if ( $ticket instanceof EE_Ticket ) {
512
-		do_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', $event );
511
+	if ($ticket instanceof EE_Ticket) {
512
+		do_action('AHEE__ticket_selector_chart__template__before_ticket_selector', $event);
513 513
 		$ticket_description = $ticket->description();
514 514
 ?>
515 515
 <div id="no-tkt-slctr-ticket-dv-<?php echo $EVT_ID; ?>" class="no-tkt-slctr-ticket-dv">
516 516
 	<div class="no-tkt-slctr-ticket-content-dv">
517 517
 		<h5><?php echo $ticket->name(); ?></h5>
518
-		<?php if ( ! empty( $ticket_description ) ) { ?>
518
+		<?php if ( ! empty($ticket_description)) { ?>
519 519
 		<p><?php echo $ticket_description; ?></p>
520 520
 		<?php } ?>
521 521
 	</div>
522 522
 <?php
523 523
 		add_filter(
524 524
 			'FHEE__EE_Ticket_Selector__after_ticket_selector_submit',
525
-			array( 'EED_Ticket_Selector', 'no_tkt_slctr_end_dv' )
525
+			array('EED_Ticket_Selector', 'no_tkt_slctr_end_dv')
526 526
 		);
527 527
 		add_filter(
528 528
 			'FHEE__EE_Ticket_Selector__after_view_details_btn',
529
-			array( 'EED_Ticket_Selector', 'no_tkt_slctr_end_dv' )
529
+			array('EED_Ticket_Selector', 'no_tkt_slctr_end_dv')
530 530
 		);
531
-		do_action( 'AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event );
531
+		do_action('AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event);
532 532
 	}
533 533
 }
534 534
 ?>
Please login to merge, or discard this patch.
payment_methods/Admin_Only/EE_PMT_Admin_Only.pm.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2,16 +2,16 @@
 block discarded – undo
2 2
 if (!defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('No direct script access allowed');
4 4
 /**
5
- *
6
- * EE_PMT_Admin_Only.
7
- * These payment methods really shouldn't be shown on frontend and contain nearly no functionality.
8
- * They should just be used admin-side for recording payments like Cash, Check, etc.
9
- *
10
- * @package			Event Espresso
11
- * @subpackage
12
- * @author				Mike Nelson
13
- *
14
- */
5
+	 *
6
+	 * EE_PMT_Admin_Only.
7
+	 * These payment methods really shouldn't be shown on frontend and contain nearly no functionality.
8
+	 * They should just be used admin-side for recording payments like Cash, Check, etc.
9
+	 *
10
+	 * @package			Event Espresso
11
+	 * @subpackage
12
+	 * @author				Mike Nelson
13
+	 *
14
+	 */
15 15
 class EE_PMT_Admin_Only extends EE_PMT_Base{
16 16
 
17 17
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION'))
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('No direct script access allowed');
4 4
 /**
5 5
  *
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @author				Mike Nelson
13 13
  *
14 14
  */
15
-class EE_PMT_Admin_Only extends EE_PMT_Base{
15
+class EE_PMT_Admin_Only extends EE_PMT_Base {
16 16
 
17 17
 
18 18
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * @param \EE_Transaction $transaction
35 35
 	 * @return NULL
36 36
 	 */
37
-	public function generate_new_billing_form( EE_Transaction $transaction = NULL ) {
37
+	public function generate_new_billing_form(EE_Transaction $transaction = NULL) {
38 38
 		return NULL;
39 39
 	}
40 40
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 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 7
  * Event Espresso
7 8
  *
Please login to merge, or discard this patch.
payment_methods/Bank/templates/bank_payment_details_content.template.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -3,27 +3,27 @@
 block discarded – undo
3 3
 if (!defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 /**
6
- * Event Espresso
7
- *
8
- * Event Registration and Management Plugin for WordPress
9
- *
10
- * @ package			Event Espresso
11
- * @ author			Seth Shoultes
12
- * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
13
- * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
14
- * @ link					http://www.eventespresso.com
15
- * @ version		 	4.3
16
- *
17
- * ------------------------------------------------------------------------
18
- *
19
- * bank_payment_overview_content
20
- *
21
- * @package			Event Espresso
22
- * @subpackage
23
- * @author				Mike Nelson
24
- *
25
- * ------------------------------------------------------------------------
26
- */
6
+	 * Event Espresso
7
+	 *
8
+	 * Event Registration and Management Plugin for WordPress
9
+	 *
10
+	 * @ package			Event Espresso
11
+	 * @ author			Seth Shoultes
12
+	 * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
13
+	 * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
14
+	 * @ link					http://www.eventespresso.com
15
+	 * @ version		 	4.3
16
+	 *
17
+	 * ------------------------------------------------------------------------
18
+	 *
19
+	 * bank_payment_overview_content
20
+	 *
21
+	 * @package			Event Espresso
22
+	 * @subpackage
23
+	 * @author				Mike Nelson
24
+	 *
25
+	 * ------------------------------------------------------------------------
26
+	 */
27 27
 ?><div class="event-display-boxes">
28 28
 			<h4 id="page_title" class="payment_type_title section-heading"><?php echo $page_title ?></h4>
29 29
 				<p class="instruct"><?php echo wpautop( $payment_instructions ) ?></p>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 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
  * Event Espresso
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?><div class="event-display-boxes">
28 28
 			<h4 id="page_title" class="payment_type_title section-heading"><?php echo $page_title ?></h4>
29
-				<p class="instruct"><?php echo wpautop( $payment_instructions ) ?></p>
29
+				<p class="instruct"><?php echo wpautop($payment_instructions) ?></p>
30 30
 		</div>
31 31
 <?php
32 32
 // End of file bank_payment_overview_content.template.php
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 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 7
  * Event Espresso
7 8
  *
Please login to merge, or discard this patch.