Completed
Branch fix/events-archive-config-rese... (0ef832)
by
unknown
12:05 queued 09:36
created
espresso.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
  * @since           4.0
39 39
  */
40 40
 if (function_exists('espresso_version')) {
41
-    if (! function_exists('espresso_duplicate_plugin_error')) {
41
+    if ( ! function_exists('espresso_duplicate_plugin_error')) {
42 42
         /**
43 43
          *    espresso_duplicate_plugin_error
44 44
          *    displays if more than one version of EE is activated at the same time
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
63 63
 } else {
64 64
     define('EE_MIN_PHP_VER_REQUIRED', '5.6.2');
65
-    if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
65
+    if ( ! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
66 66
         /**
67 67
          * espresso_minimum_php_version_error
68 68
          *
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 
117 117
         register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
118 118
 
119
-        require_once __DIR__ . '/core/bootstrap_espresso.php';
119
+        require_once __DIR__.'/core/bootstrap_espresso.php';
120 120
         bootstrap_espresso();
121 121
     }
122 122
 }
123
-if (! function_exists('espresso_deactivate_plugin')) {
123
+if ( ! function_exists('espresso_deactivate_plugin')) {
124 124
     /**
125 125
      *    deactivate_plugin
126 126
      * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
      */
132 132
     function espresso_deactivate_plugin($plugin_basename = '')
133 133
     {
134
-        if (! function_exists('deactivate_plugins')) {
135
-            require_once ABSPATH . 'wp-admin/includes/plugin.php';
134
+        if ( ! function_exists('deactivate_plugins')) {
135
+            require_once ABSPATH.'wp-admin/includes/plugin.php';
136 136
         }
137 137
         unset($_GET['activate'], $_REQUEST['activate']);
138 138
         deactivate_plugins($plugin_basename);
Please login to merge, or discard this patch.
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -38,103 +38,103 @@
 block discarded – undo
38 38
  * @since           4.0
39 39
  */
40 40
 if (function_exists('espresso_version')) {
41
-    if (! function_exists('espresso_duplicate_plugin_error')) {
42
-        /**
43
-         *    espresso_duplicate_plugin_error
44
-         *    displays if more than one version of EE is activated at the same time
45
-         */
46
-        function espresso_duplicate_plugin_error()
47
-        {
48
-            ?>
41
+	if (! function_exists('espresso_duplicate_plugin_error')) {
42
+		/**
43
+		 *    espresso_duplicate_plugin_error
44
+		 *    displays if more than one version of EE is activated at the same time
45
+		 */
46
+		function espresso_duplicate_plugin_error()
47
+		{
48
+			?>
49 49
             <div class="error">
50 50
                 <p>
51 51
                     <?php
52
-                    echo esc_html__(
53
-                        'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
54
-                        'event_espresso'
55
-                    ); ?>
52
+					echo esc_html__(
53
+						'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
54
+						'event_espresso'
55
+					); ?>
56 56
                 </p>
57 57
             </div>
58 58
             <?php
59
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
60
-        }
61
-    }
62
-    add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
59
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
60
+		}
61
+	}
62
+	add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
63 63
 } else {
64
-    define('EE_MIN_PHP_VER_REQUIRED', '5.6.2');
65
-    if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
66
-        /**
67
-         * espresso_minimum_php_version_error
68
-         *
69
-         * @return void
70
-         */
71
-        function espresso_minimum_php_version_error()
72
-        {
73
-            ?>
64
+	define('EE_MIN_PHP_VER_REQUIRED', '5.6.2');
65
+	if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
66
+		/**
67
+		 * espresso_minimum_php_version_error
68
+		 *
69
+		 * @return void
70
+		 */
71
+		function espresso_minimum_php_version_error()
72
+		{
73
+			?>
74 74
             <div class="error">
75 75
                 <p>
76 76
                     <?php
77
-                    printf(
78
-                        esc_html__(
79
-                            'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
80
-                            'event_espresso'
81
-                        ),
82
-                        EE_MIN_PHP_VER_REQUIRED,
83
-                        PHP_VERSION,
84
-                        '<br/>',
85
-                        '<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
86
-                    );
87
-                    ?>
77
+					printf(
78
+						esc_html__(
79
+							'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
80
+							'event_espresso'
81
+						),
82
+						EE_MIN_PHP_VER_REQUIRED,
83
+						PHP_VERSION,
84
+						'<br/>',
85
+						'<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
86
+					);
87
+					?>
88 88
                 </p>
89 89
             </div>
90 90
             <?php
91
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
92
-        }
91
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
92
+		}
93 93
 
94
-        add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
95
-    } else {
96
-        define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
97
-        /**
98
-         * espresso_version
99
-         * Returns the plugin version
100
-         *
101
-         * @return string
102
-         */
103
-        function espresso_version()
104
-        {
105
-            return apply_filters('FHEE__espresso__espresso_version', '4.10.27.rc.005');
106
-        }
94
+		add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
95
+	} else {
96
+		define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
97
+		/**
98
+		 * espresso_version
99
+		 * Returns the plugin version
100
+		 *
101
+		 * @return string
102
+		 */
103
+		function espresso_version()
104
+		{
105
+			return apply_filters('FHEE__espresso__espresso_version', '4.10.27.rc.005');
106
+		}
107 107
 
108
-        /**
109
-         * espresso_plugin_activation
110
-         * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
111
-         */
112
-        function espresso_plugin_activation()
113
-        {
114
-            update_option('ee_espresso_activation', true);
115
-        }
108
+		/**
109
+		 * espresso_plugin_activation
110
+		 * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
111
+		 */
112
+		function espresso_plugin_activation()
113
+		{
114
+			update_option('ee_espresso_activation', true);
115
+		}
116 116
 
117
-        register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
117
+		register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
118 118
 
119
-        require_once __DIR__ . '/core/bootstrap_espresso.php';
120
-        bootstrap_espresso();
121
-    }
119
+		require_once __DIR__ . '/core/bootstrap_espresso.php';
120
+		bootstrap_espresso();
121
+	}
122 122
 }
123 123
 if (! function_exists('espresso_deactivate_plugin')) {
124
-    /**
125
-     *    deactivate_plugin
126
-     * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
127
-     *
128
-     * @access public
129
-     * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
130
-     * @return    void
131
-     */
132
-    function espresso_deactivate_plugin($plugin_basename = '')
133
-    {
134
-        if (! function_exists('deactivate_plugins')) {
135
-            require_once ABSPATH . 'wp-admin/includes/plugin.php';
136
-        }
137
-        unset($_GET['activate'], $_REQUEST['activate']);
138
-        deactivate_plugins($plugin_basename);
139
-    }
124
+	/**
125
+	 *    deactivate_plugin
126
+	 * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
127
+	 *
128
+	 * @access public
129
+	 * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
130
+	 * @return    void
131
+	 */
132
+	function espresso_deactivate_plugin($plugin_basename = '')
133
+	{
134
+		if (! function_exists('deactivate_plugins')) {
135
+			require_once ABSPATH . 'wp-admin/includes/plugin.php';
136
+		}
137
+		unset($_GET['activate'], $_REQUEST['activate']);
138
+		deactivate_plugins($plugin_basename);
139
+	}
140 140
 }
Please login to merge, or discard this patch.
admin/new/pricing/templates/event_tickets_datetime_ticket_row.template.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
             <!--<div class="total-price-container"><?php printf(
110 110
                 esc_html__('Total Final Price: %s', 'event_espresso'),
111
-                '<span class="ticket-price-amount">' . $TKT_price . '</span>'
111
+                '<span class="ticket-price-amount">'.$TKT_price.'</span>'
112 112
             ); ?> </div>-->
113 113
             <textarea name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_description]"
114 114
                       class="edit-ticket-TKT_description ee-full-textarea-inp"
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                         ); ?></label>
208 208
                 </div>
209 209
                 <div class="ticket-is-taxable-container">
210
-                    <?php if (! empty($tax_rows)) { ?>
210
+                    <?php if ( ! empty($tax_rows)) { ?>
211 211
                         <?php if ($disabled) : ?>
212 212
                             <?php
213 213
                             $tax_value = ! empty($TKT_taxable) ? 1 : 0;
Please login to merge, or discard this patch.
Braces   +40 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,8 +19,11 @@  discard block
 block discarded – undo
19 19
                    class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>">
20 20
             <input type="text" name="archived_ticket[TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp"
21 21
                    value="<?php echo $TKT_start_date; ?>" disabled>
22
-        <?php else : ?>
23
-            <input id="edit-ticket-TKT_start_date-<?php echo $tkt_row; ?>" type="text"
22
+        <?php else {
23
+	: ?>
24
+            <input id="edit-ticket-TKT_start_date-<?php echo $tkt_row;
25
+}
26
+?>" type="text"
24 27
                    name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]"
25 28
                    class="edit-ticket-TKT_start_date ee-text-inp ee-datepicker" value="<?php echo $TKT_start_date; ?>"
26 29
                    data-context="start-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>"
@@ -34,8 +37,11 @@  discard block
 block discarded – undo
34 37
                    class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>">
35 38
             <input type="text" name="archived_ticket[TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp"
36 39
                    value="<?php echo $TKT_end_date; ?>" disabled>
37
-        <?php else : ?>
38
-            <input id="edit-ticket-TKT_end_date-<?php echo $tkt_row; ?>" type="text"
40
+        <?php else {
41
+	: ?>
42
+            <input id="edit-ticket-TKT_end_date-<?php echo $tkt_row;
43
+}
44
+?>" type="text"
39 45
                    name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]"
40 46
                    class="edit-ticket-TKT_end_date ee-text-inp ee-datepicker" value="<?php echo $TKT_end_date; ?>"
41 47
                    data-context="end-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>"
@@ -51,8 +57,11 @@  discard block
 block discarded – undo
51 57
             <input type="text" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_base_price]"
52 58
                    class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric"
53 59
                    value="<?php echo $TKT_base_price; ?>" disabled>
54
-        <?php else : ?>
55
-            <input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; ?>" type="text"
60
+        <?php else {
61
+	: ?>
62
+            <input id="edit-ticket-TKT_base_price-<?php echo $tkt_row;
63
+}
64
+?>" type="text"
56 65
                    name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]"
57 66
                    class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric"
58 67
                    value="<?php echo $TKT_base_price; ?>">
@@ -69,8 +78,11 @@  discard block
 block discarded – undo
69 78
             <input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric"
70 79
                    name="archived_ticket[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>"
71 80
                    disabled>
72
-        <?php else : ?>
73
-            <input type="text" id="edit-ticket-TKT_qty-<?php echo $tkt_row; ?>"
81
+        <?php else {
82
+	: ?>
83
+            <input type="text" id="edit-ticket-TKT_qty-<?php echo $tkt_row;
84
+}
85
+?>"
74 86
                    class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric"
75 87
                    name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]"
76 88
                    value="<?php echo $TKT_qty_for_input; ?>">
@@ -149,9 +161,12 @@  discard block
 block discarded – undo
149 161
                                 <input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric"
150 162
                                        name="archived_ticket[<?php echo $tkt_row; ?>][TKT_uses]"
151 163
                                        value="<?php echo $TKT_uses; ?>" disabled>
152
-                            <?php else : ?>
164
+                            <?php else {
165
+	: ?>
153 166
                                 <input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric"
154
-                                       name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_uses]"
167
+                                       name="<?php echo $edit_tickets_name;
168
+}
169
+?>[<?php echo $tkt_row; ?>][TKT_uses]"
155 170
                                        value="<?php echo $TKT_uses; ?>">
156 171
                             <?php endif; ?>
157 172
                         </td>
@@ -163,9 +178,12 @@  discard block
 block discarded – undo
163 178
                                 <input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric"
164 179
                                        name="archived_ticket[<?php echo $tkt_row; ?>][TKT_min]"
165 180
                                        value="<?php echo $TKT_min; ?>" disabled>
166
-                            <?php else : ?>
181
+                            <?php else {
182
+	: ?>
167 183
                                 <input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric"
168
-                                       name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_min]"
184
+                                       name="<?php echo $edit_tickets_name;
185
+}
186
+?>[<?php echo $tkt_row; ?>][TKT_min]"
169 187
                                        value="<?php echo $TKT_min; ?>">
170 188
                             <?php endif; ?>
171 189
                         </td>
@@ -177,9 +195,12 @@  discard block
 block discarded – undo
177 195
                                 <input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric"
178 196
                                        name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]"
179 197
                                        value="<?php echo $TKT_max; ?>" disabled>
180
-                            <?php else : ?>
198
+                            <?php else {
199
+	: ?>
181 200
                                 <input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric"
182
-                                       name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]"
201
+                                       name="<?php echo $edit_tickets_name;
202
+}
203
+?>[<?php echo $tkt_row; ?>][TKT_max]"
183 204
                                        value="<?php echo $TKT_max; ?>">
184 205
                             <?php endif; ?>
185 206
                         </td>
@@ -218,8 +239,11 @@  discard block
 block discarded – undo
218 239
                         <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"
219 240
                                type="checkbox" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_taxable]"
220 241
                                value="1"<?php echo $TKT_taxable; ?> disabled>
221
-                        <?php else : ?>
222
-                        <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"
242
+                        <?php else {
243
+	: ?>
244
+                        <input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row;
245
+}
246
+?>"
223 247
                                type="checkbox"
224 248
                                name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_taxable]"
225 249
                                value="1"<?php echo $TKT_taxable; ?>>
Please login to merge, or discard this patch.
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 ?>
59 59
 <tr valign="top" class="ee-ticket-sortable ticket-row<?php echo $ticket_archive_class;
60 60
 if (WP_DEBUG) {
61
-    echo ' ee-wp-debug';
61
+	echo ' ee-wp-debug';
62 62
 } ?>" id="display-ticketrow-<?php echo $tkt_row; ?>">
63 63
     <!--<td class="ee-tkt-order-field"><span class="dashicons dashicons-sort<?php echo $tkt_status_class; ?>">
64 64
     <input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_order]" class="edit-ticket-TKT_order" value ="<?php echo $TKT_order; ?>" ></span></td>-->
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
                    class="edit-ticket-TKT_row" value="<?php echo $tkt_row; ?>">
168 168
 
169 169
             <!--<div class="total-price-container"><?php printf(
170
-                esc_html__('Total Final Price: %s', 'event_espresso'),
171
-                '<span class="ticket-price-amount">' . $TKT_price . '</span>'
172
-            ); ?> </div>-->
170
+				esc_html__('Total Final Price: %s', 'event_espresso'),
171
+				'<span class="ticket-price-amount">' . $TKT_price . '</span>'
172
+			); ?> </div>-->
173 173
             <textarea name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_description]"
174 174
                       class="edit-ticket-TKT_description ee-full-textarea-inp"
175 175
                       placeholder="Ticket Description"><?php echo $TKT_description; ?></textarea>
@@ -183,20 +183,20 @@  discard block
 block discarded – undo
183 183
                     <thead>
184 184
                     <tr valign="bottom">
185 185
                         <td><span class="TD_TKT_number_datetimes_label"><?php
186
-                                esc_html_e(
187
-                                    '# Datetimes',
188
-                                    'event_espresso'
189
-                                ); ?></span></td>
186
+								esc_html_e(
187
+									'# Datetimes',
188
+									'event_espresso'
189
+								); ?></span></td>
190 190
                         <td><span class="TD_TKT_min_qty_label"><?php
191
-                                esc_html_e(
192
-                                    'Minimum Quantity',
193
-                                    'event_espresso'
194
-                                ); ?></span></td>
191
+								esc_html_e(
192
+									'Minimum Quantity',
193
+									'event_espresso'
194
+								); ?></span></td>
195 195
                         <td><span class="TD_TKT_max_qty_label"><?php
196
-                                esc_html_e(
197
-                                    'Maximum Quantity',
198
-                                    'event_espresso'
199
-                                ); ?></span></td>
196
+								esc_html_e(
197
+									'Maximum Quantity',
198
+									'event_espresso'
199
+								); ?></span></td>
200 200
                     </tr>
201 201
                     </thead>
202 202
                     <tbody>
@@ -254,24 +254,24 @@  discard block
 block discarded – undo
254 254
                     <input type="checkbox"
255 255
                            name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_required]"
256 256
                            class="edit-ticket-TKT_required" value="1"<?php
257
-                            echo $TKT_required
258
-                                ? ' checked="checked"'
259
-                                : '';
260
-                            echo $disabled
261
-                                ? ' disabled'
262
-                                : ''; ?>>
257
+							echo $TKT_required
258
+								? ' checked="checked"'
259
+								: '';
260
+							echo $disabled
261
+								? ' disabled'
262
+								: ''; ?>>
263 263
                     <label for="edit-ticket-TKT_required"><?php
264
-                        esc_html_e(
265
-                            'This ticket is required (will appear first in frontend ticket lists).',
266
-                            'event_espresso'
267
-                        ); ?></label>
264
+						esc_html_e(
265
+							'This ticket is required (will appear first in frontend ticket lists).',
266
+							'event_espresso'
267
+						); ?></label>
268 268
                 </div>
269 269
                 <div class="ticket-is-taxable-container">
270 270
                     <?php if (! empty($tax_rows)) { ?>
271 271
                         <?php if ($disabled) : ?>
272 272
                             <?php
273
-                            $tax_value = ! empty($TKT_taxable) ? 1 : 0;
274
-                            ?>
273
+							$tax_value = ! empty($TKT_taxable) ? 1 : 0;
274
+							?>
275 275
                         <input class="TKT-taxable-checkbox" type="hidden"
276 276
                                name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_taxable]"
277 277
                                value="<?php echo $tax_value; ?>">
@@ -285,16 +285,16 @@  discard block
 block discarded – undo
285 285
                                value="1"<?php echo $TKT_taxable; ?>>
286 286
                         <?php endif; ?>
287 287
                     <label for="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"> <?php
288
-                        esc_html_e('This ticket is taxable.', 'event_espresso'); ?>
288
+						esc_html_e('This ticket is taxable.', 'event_espresso'); ?>
289 289
                     <?php } //end tax_rows check ?>
290 290
                 </div>
291 291
             </div>
292 292
             <div class="price-table-container">
293 293
                 <h4 class="tickets-heading price-table-info"<?php echo $show_price_modifier; ?>><?php
294
-                    esc_html_e(
295
-                        'Price Modifiers',
296
-                        'event_espresso'
297
-                    ); ?></h4>
294
+					esc_html_e(
295
+						'Price Modifiers',
296
+						'event_espresso'
297
+					); ?></h4>
298 298
                 <table class="price-table">
299 299
                     <thead class="price-table-info"<?php echo $show_price_modifier; ?>>
300 300
                     <tr>
@@ -314,10 +314,10 @@  discard block
 block discarded – undo
314 314
                     <tr class="price-subtotal-row TKT-taxes-display"<?php echo $display_subtotal; ?>>
315 315
                         <td colspan="4" class="ee-numeric">
316 316
                             <span class="TKT-taxable-subtotal-label"><strong><?php
317
-                                    esc_html_e(
318
-                                        'Subtotal',
319
-                                        'event_espresso'
320
-                                    ); ?></strong></span>
317
+									esc_html_e(
318
+										'Subtotal',
319
+										'event_espresso'
320
+									); ?></strong></span>
321 321
                         </td>
322 322
                         <td class="ee-numeric">
323 323
                             <span
@@ -350,51 +350,51 @@  discard block
 block discarded – undo
350 350
             <div style="clear:both"></div>
351 351
             <h4 class="tickets-heading"><?php esc_html_e('Event Datetimes', 'event_espresso'); ?></h4>
352 352
             <p><?php
353
-                esc_html_e(
354
-                    'This ticket will be usable (allow entrance) for the following selected event datetimes (click to select).  The "# Datetimes" amount (above) indicates how many of the assigned datetimes the ticket holder can gain access to:',
355
-                    'event_espresso'
356
-                ); ?></p>
353
+				esc_html_e(
354
+					'This ticket will be usable (allow entrance) for the following selected event datetimes (click to select).  The "# Datetimes" amount (above) indicates how many of the assigned datetimes the ticket holder can gain access to:',
355
+					'event_espresso'
356
+				); ?></p>
357 357
             <ul class="datetime-tickets-list">
358 358
                 <?php echo $ticket_datetimes_list; ?>
359 359
             </ul>
360 360
 
361 361
             <?php do_action(
362
-                'AHEE__event_tickets_datetime_ticket_row_template__advanced_details_end',
363
-                $tkt_row,
364
-                $TKT_ID
365
-            ); ?>
362
+				'AHEE__event_tickets_datetime_ticket_row_template__advanced_details_end',
363
+				$tkt_row,
364
+				$TKT_ID
365
+			); ?>
366 366
             <div class="ee-editor-footer-container">
367 367
                 <div class="ee-editor-id-container">
368 368
                     <span class="ee-item-id"><?php echo
369
-                        $TKT_ID
370
-                            ? sprintf(
371
-                                esc_html__('Ticket ID: %d', 'event_espresso'),
372
-                                $TKT_ID
373
-                            )
374
-                                             : ''; ?></span>
369
+						$TKT_ID
370
+							? sprintf(
371
+								esc_html__('Ticket ID: %d', 'event_espresso'),
372
+								$TKT_ID
373
+							)
374
+											 : ''; ?></span>
375 375
                 </div>
376 376
                 <div class="save-cancel-button-container">
377 377
                     <label for="edit-ticket-TKT_is_default_selector"><?php
378
-                        esc_html_e(
379
-                            'use this new ticket as a default ticket for any new events',
380
-                            'event_espresso'
381
-                        ); ?></label>
378
+						esc_html_e(
379
+							'use this new ticket as a default ticket for any new events',
380
+							'event_espresso'
381
+						); ?></label>
382 382
                     <input type="checkbox"
383 383
                            name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_is_default_selector]"
384 384
                            class="edit-ticket-TKT_is_default_selector" value="1"<?php
385
-                            echo $disabled
386
-                                ? ' disabled'
387
-                                : ''; ?>>
385
+							echo $disabled
386
+								? ' disabled'
387
+								: ''; ?>>
388 388
                     <input type="hidden"
389 389
                            name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_is_default]"
390 390
                            class="edit-ticket-TKT_is_default" value="<?php echo $TKT_is_default; ?>">
391 391
                     <!--<button class="button-primary ee-save-button" data-context="ticket" data-ticket-row="<?php echo $tkt_row; ?>"><?php esc_html_e(
392
-                        'Update Ticket',
393
-                        'event_espresso'
394
-                    ); ?></button>-->
392
+						'Update Ticket',
393
+						'event_espresso'
394
+					); ?></button>-->
395 395
                     <button class="button-secondary ee-cancel-button" data-context="ticket"
396 396
                             data-ticket-row="<?php echo $tkt_row; ?>"><?php
397
-                                    esc_html_e('Close', 'event_espresso'); ?></button>
397
+									esc_html_e('Close', 'event_espresso'); ?></button>
398 398
                 </div>
399 399
             </div>
400 400
             <!-- these hidden inputs are for tracking changes in dtts attached to tickets during a js session -->
Please login to merge, or discard this patch.
core/domain/EnqueueAssetsInterface.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -4,45 +4,45 @@
 block discarded – undo
4 4
 interface EnqueueAssetsInterface
5 5
 {
6 6
 
7
-    /**
8
-     * a place to register scripts and stylesheets with WordPress core
9
-     * IMPORTANT !!!
10
-     * ALL JavaScript files need to be registered for loading in the footer
11
-     * by setting the 5th parameter of wp_register_script() to ` true `
12
-     *
13
-     * @return void
14
-     */
15
-    public function registerScriptsAndStylesheets();
7
+	/**
8
+	 * a place to register scripts and stylesheets with WordPress core
9
+	 * IMPORTANT !!!
10
+	 * ALL JavaScript files need to be registered for loading in the footer
11
+	 * by setting the 5th parameter of wp_register_script() to ` true `
12
+	 *
13
+	 * @return void
14
+	 */
15
+	public function registerScriptsAndStylesheets();
16 16
 
17
-    /**
18
-     * a place to enqueue previously registered stylesheets
19
-     * this will be called during the wp_enqueue_scripts hook for frontend requests
20
-     *
21
-     * @return void
22
-     */
23
-    public function enqueueStylesheets();
17
+	/**
18
+	 * a place to enqueue previously registered stylesheets
19
+	 * this will be called during the wp_enqueue_scripts hook for frontend requests
20
+	 *
21
+	 * @return void
22
+	 */
23
+	public function enqueueStylesheets();
24 24
 
25
-    /**
26
-     * a place to enqueue previously registered stylesheets
27
-     * this will be called during the admin_enqueue_scripts hook for admin requests
28
-     *
29
-     * @return void
30
-     */
31
-    public function enqueueAdminStylesheets();
25
+	/**
26
+	 * a place to enqueue previously registered stylesheets
27
+	 * this will be called during the admin_enqueue_scripts hook for admin requests
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function enqueueAdminStylesheets();
32 32
 
33
-    /**
34
-     * a place to enqueue previously registered scripts for frontend requests
35
-     *
36
-     * @return void
37
-     */
38
-    public function enqueueScripts();
33
+	/**
34
+	 * a place to enqueue previously registered scripts for frontend requests
35
+	 *
36
+	 * @return void
37
+	 */
38
+	public function enqueueScripts();
39 39
 
40
-    /**
41
-     * a place to enqueue previously registered scripts for admin requests
42
-     *
43
-     * @return void
44
-     */
45
-    public function enqueueAdminScripts();
40
+	/**
41
+	 * a place to enqueue previously registered scripts for admin requests
42
+	 *
43
+	 * @return void
44
+	 */
45
+	public function enqueueAdminScripts();
46 46
 }
47 47
 // End of file EnqueueAssetsInterface.php
48 48
 // Location: EventEspresso\core\domain/EnqueueAssetsInterface.php
Please login to merge, or discard this patch.
admin_pages/messages/help_tabs/messages_overview_types.help_tab.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <p><strong><?php esc_html_e('Message Types', 'event_espresso'); ?></strong></p>
2 2
 <p>
3 3
     <?php
4
-    printf(
5
-        esc_html__(
6
-            'Messages are email notifications that are sent out by Event Espresso. Message Types are the %1$skinds%2$s of messages that get delivered.  They can be thought of as the "type" of package that is being delivered by the messenger. For example, Event Espresso comes with two Message Types attached to the Email Messenger:',
7
-            'event_espresso'
8
-        ),
9
-        '<em>',
10
-        '</em>'
11
-    );
12
-    ?>
4
+	printf(
5
+		esc_html__(
6
+			'Messages are email notifications that are sent out by Event Espresso. Message Types are the %1$skinds%2$s of messages that get delivered.  They can be thought of as the "type" of package that is being delivered by the messenger. For example, Event Espresso comes with two Message Types attached to the Email Messenger:',
7
+			'event_espresso'
8
+		),
9
+		'<em>',
10
+		'</em>'
11
+	);
12
+	?>
13 13
 </p>
14 14
 <ul>
15 15
     <li>
@@ -24,20 +24,20 @@  discard block
 block discarded – undo
24 24
 <p><strong><?php esc_html_e('Contexts', 'event_espresso'); ?></strong></p>
25 25
 <p>
26 26
     <?php esc_html_e(
27
-        'Each Message Type (kind of message) has different contexts. Contexts are dynamic and typically represent recipients (individuals receiving email notifications). For example, when the Registration Confirmation message type is triggered, it will send out a message to the following recipients: Event Administrator, Primary Registrant, and Additional Registrants. On the other hand, the Payment Message Type has only two recipients: Event Administrator and Primary Registrant.',
28
-        'event_espresso'
29
-    ); ?>
27
+		'Each Message Type (kind of message) has different contexts. Contexts are dynamic and typically represent recipients (individuals receiving email notifications). For example, when the Registration Confirmation message type is triggered, it will send out a message to the following recipients: Event Administrator, Primary Registrant, and Additional Registrants. On the other hand, the Payment Message Type has only two recipients: Event Administrator and Primary Registrant.',
28
+		'event_espresso'
29
+	); ?>
30 30
 </p>
31 31
 <p>
32 32
     <?php esc_html_e(
33
-        'A message context can be deactivated by removing a recipient from the "TO" field. This will set the field to blank and you can save changes. Deactivated message contexts will appear in grey when viewed in the Messages Overview tab. To re-activate a message context, go to that message context and setup a recipient (using one of the available shortcodes) and save changes. This will reactivate the message context and it will appear as blue in the Messages Overview tab.',
34
-        'event_espresso'
35
-    ); ?>
33
+		'A message context can be deactivated by removing a recipient from the "TO" field. This will set the field to blank and you can save changes. Deactivated message contexts will appear in grey when viewed in the Messages Overview tab. To re-activate a message context, go to that message context and setup a recipient (using one of the available shortcodes) and save changes. This will reactivate the message context and it will appear as blue in the Messages Overview tab.',
34
+		'event_espresso'
35
+	); ?>
36 36
 </p>
37 37
 <p><strong><?php esc_html_e('Activation / Deactivation of Message Types', 'event_espresso'); ?></strong></p>
38 38
 <p>
39 39
     <?php esc_html_e(
40
-        'When a new install of Event Espresso is activated, all message types will be activated except for those for Cancelled and Declined registrations. The message types for Cancelled and Declined registrations can be easily activated through the Settings tab for Messages. Deactivating and re-activating Event Espresso will keep the current settings saved.',
41
-        'event_espresso'
42
-    ); ?>
40
+		'When a new install of Event Espresso is activated, all message types will be activated except for those for Cancelled and Declined registrations. The message types for Cancelled and Declined registrations can be easily activated through the Settings tab for Messages. Deactivating and re-activating Event Espresso will keep the current settings saved.',
41
+		'event_espresso'
42
+	); ?>
43 43
 </p>
Please login to merge, or discard this patch.
admin_pages/payments/help_tabs/payment_methods_overview.help_tab.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
                 'The URL of the button image for this payment method in the registration process. You may use any uploaded image on your website (click %s next to the field to select). If left blank, the default button image will be used.',
54 54
                 'event_espresso'
55 55
             ),
56
-            '<img src="' . admin_url('images/media-button-image.gif') . '">'
56
+            '<img src="'.admin_url('images/media-button-image.gif').'">'
57 57
         );
58 58
         ?>
59 59
     </li>
Please login to merge, or discard this patch.
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -12,62 +12,62 @@  discard block
 block discarded – undo
12 12
         <strong><?php esc_html_e('Name', 'event_espresso'); ?></strong>
13 13
         <br>
14 14
         <?php esc_html_e(
15
-            'The name of the payment method as customers see it in the registration form, in emails, in receipts, etc.',
16
-            'event_espresso'
17
-        ); ?>
15
+			'The name of the payment method as customers see it in the registration form, in emails, in receipts, etc.',
16
+			'event_espresso'
17
+		); ?>
18 18
     </li>
19 19
     <li>
20 20
         <strong><?php esc_html_e('Description', 'event_espresso'); ?></strong>
21 21
         <br />
22 22
         <?php esc_html_e(
23
-            'The description of how to use the payment method as customers will see it. This is mostly only seen during registration.',
24
-            'event_espresso'
25
-        ); ?>
23
+			'The description of how to use the payment method as customers will see it. This is mostly only seen during registration.',
24
+			'event_espresso'
25
+		); ?>
26 26
     </li>
27 27
     <li>
28 28
         <strong><?php esc_html_e('Admin-Only Name', 'event_espresso'); ?></strong>
29 29
         <br />
30 30
         <?php esc_html_e(
31
-            'The name of the payment method as seen internally by site administrators and staff.',
32
-            'event_espresso'
33
-        ); ?>
31
+			'The name of the payment method as seen internally by site administrators and staff.',
32
+			'event_espresso'
33
+		); ?>
34 34
     </li>
35 35
     <li>
36 36
         <strong><?php esc_html_e('Admin-Only Description', 'event_espresso'); ?></strong>
37 37
         <br />
38 38
         <?php esc_html_e(
39
-            'The description of the payment method as seen internally by site administrators and staff.',
40
-            'event_espresso'
41
-        ); ?>
39
+			'The description of the payment method as seen internally by site administrators and staff.',
40
+			'event_espresso'
41
+		); ?>
42 42
     </li>
43 43
     <li>
44 44
         <strong><?php esc_html_e('Debug (sandbox) Mode', 'event_espresso'); ?></strong>
45 45
         <br />
46 46
         <?php esc_html_e(
47
-            'Many payment methods have a debug/sandbox mode where payments are not processed but are only simulated. This is helpful when setup and debugging.',
48
-            'event_espresso'
49
-        ); ?>
47
+			'Many payment methods have a debug/sandbox mode where payments are not processed but are only simulated. This is helpful when setup and debugging.',
48
+			'event_espresso'
49
+		); ?>
50 50
     </li>
51 51
     <li>
52 52
         <strong><?php esc_html_e('Open by Default', 'event_espresso'); ?></strong>
53 53
         <br />
54 54
         <?php esc_html_e(
55
-            'If checked, this payment method will be selected by default (assuming no other valid payment methods are also marked as open by default.)',
56
-            'event_espresso'
57
-        ); ?>
55
+			'If checked, this payment method will be selected by default (assuming no other valid payment methods are also marked as open by default.)',
56
+			'event_espresso'
57
+		); ?>
58 58
     </li>
59 59
     <li>
60 60
         <strong><?php esc_html_e('Button URL', 'event_espresso'); ?></strong>
61 61
         <br />
62 62
         <?php
63
-        printf(
64
-            esc_html__(
65
-                'The URL of the button image for this payment method in the registration process. You may use any uploaded image on your website (click %s next to the field to select). If left blank, the default button image will be used.',
66
-                'event_espresso'
67
-            ),
68
-            '<img src="' . admin_url('images/media-button-image.gif') . '">'
69
-        );
70
-        ?>
63
+		printf(
64
+			esc_html__(
65
+				'The URL of the button image for this payment method in the registration process. You may use any uploaded image on your website (click %s next to the field to select). If left blank, the default button image will be used.',
66
+				'event_espresso'
67
+			),
68
+			'<img src="' . admin_url('images/media-button-image.gif') . '">'
69
+		);
70
+		?>
71 71
     </li>
72 72
     <li><strong><?php esc_html_e('Usable From', 'event_espresso'); ?></strong>
73 73
         <br />
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
         <ul>
76 76
             <li>
77 77
                 <?php esc_html_e(
78
-                    'Front-end Registration Page: the payment method will appear as an option during the normal registration process to customers and they can use it to process payments.',
79
-                    'event_espresso'
80
-                ); ?>
78
+					'Front-end Registration Page: the payment method will appear as an option during the normal registration process to customers and they can use it to process payments.',
79
+					'event_espresso'
80
+				); ?>
81 81
             </li>
82 82
             <li>
83 83
                 <?php esc_html_e(
84
-                    'Admin Registration Page: when recording payments made from the transaction admin page, the payment method will appear as an option. Note: currently payments can only be RECORDED from the admin, they cannot be PROCESSED.',
85
-                    'event_espresso'
86
-                ); ?>
84
+					'Admin Registration Page: when recording payments made from the transaction admin page, the payment method will appear as an option. Note: currently payments can only be RECORDED from the admin, they cannot be PROCESSED.',
85
+					'event_espresso'
86
+				); ?>
87 87
             </li>
88 88
         </ul>
89 89
     </li>
@@ -91,17 +91,17 @@  discard block
 block discarded – undo
91 91
 <strong><?php esc_html_e('Recommendations', 'event_espresso'); ?></strong>
92 92
 <br />
93 93
 <?php printf(
94
-    esc_html__(
95
-        'Want to see a tour of this screen? Click on the Payment Methods Overview Tour button which appears on the right side of the page. %1$sTo learn more about the options on this page, take a look at the different tabs that appear on the left side of the page.',
96
-        'event_espresso'
97
-    ),
98
-    '<br />'
94
+	esc_html__(
95
+		'Want to see a tour of this screen? Click on the Payment Methods Overview Tour button which appears on the right side of the page. %1$sTo learn more about the options on this page, take a look at the different tabs that appear on the left side of the page.',
96
+		'event_espresso'
97
+	),
98
+	'<br />'
99 99
 ); ?>
100 100
 <p>
101 101
     <strong><?php esc_html_e('Screen Options', 'event_espresso'); ?></strong>
102 102
     <br />
103 103
     <?php esc_html_e(
104
-        'You can customize the information that is shown on this page by toggling the Screen Options tab. Then you can add or remove checkmarks to hide or show certain content.',
105
-        'event_espresso'
106
-    ); ?>
104
+		'You can customize the information that is shown on this page by toggling the Screen Options tab. Then you can add or remove checkmarks to hide or show certain content.',
105
+		'event_espresso'
106
+	); ?>
107 107
 </p>
108 108
\ No newline at end of file
Please login to merge, or discard this patch.
pricing/templates/event_tickets_datetime_attached_tickets_row.template.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
                           placeholder="Datetime Description (optional)"><?php echo $DTT_description; ?></textarea>
9 9
             </div>
10 10
             <?php do_action(
11
-                'AHEE__event_tickets_datetime_attached_tickets_row_template__advanced_details_after_dtt_description',
12
-                $dtt_row,
13
-                $DTT_ID
14
-            ); ?>
11
+				'AHEE__event_tickets_datetime_attached_tickets_row_template__advanced_details_after_dtt_description',
12
+				$dtt_row,
13
+				$DTT_ID
14
+			); ?>
15 15
             <h4 class="datetime-tickets-heading"><?php esc_html_e('Assigned Tickets', 'event_espresso'); ?></h4>
16 16
 
17 17
             <ul class="datetime-tickets-list">
@@ -21,28 +21,28 @@  discard block
 block discarded – undo
21 21
 
22 22
             <div class="add-datetime-ticket-container">
23 23
                 <h4 class="datetime-tickets-heading"><?php
24
-                    esc_html_e(
25
-                        'Add New Ticket',
26
-                        'event_espresso'
27
-                    ); ?></h4><?php echo $add_new_datetime_ticket_help_link; ?><br>
24
+					esc_html_e(
25
+						'Add New Ticket',
26
+						'event_espresso'
27
+					); ?></h4><?php echo $add_new_datetime_ticket_help_link; ?><br>
28 28
                 <table class="add-new-ticket-table">
29 29
                     <thead>
30 30
                     <tr valign="top">
31 31
                         <td><span class="ANT_TKT_name_label"><?php
32
-                                esc_html_e(
33
-                                    'Ticket Name',
34
-                                    'event_espresso'
35
-                                ); ?></span></td>
32
+								esc_html_e(
33
+									'Ticket Name',
34
+									'event_espresso'
35
+								); ?></span></td>
36 36
                         <td><span class="ANT_TKT_goes_on_sale_label"><?php
37
-                                esc_html_e(
38
-                                    'Sale Starts',
39
-                                    'event_espresso'
40
-                                ); ?></span></td>
37
+								esc_html_e(
38
+									'Sale Starts',
39
+									'event_espresso'
40
+								); ?></span></td>
41 41
                         <td><span class="ANT_TKT_sell_until_label"><?php
42
-                                esc_html_e(
43
-                                    'Sell Until',
44
-                                    'event_espresso'
45
-                                ); ?></span></td>
42
+								esc_html_e(
43
+									'Sell Until',
44
+									'event_espresso'
45
+								); ?></span></td>
46 46
                         <td><span class="ANT_TKT_price_label"><?php esc_html_e('Price', 'event_espresso'); ?></span>
47 47
                         </td>
48 48
                         <td><span class="ANT_TKT_qty_label"><?php esc_html_e('Qty', 'event_espresso'); ?></span></td>
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
                 <div class="ee-editor-footer-container">
93 93
                     <div class="ee-editor-id-container">
94 94
                         <span class="ee-item-id"><?php
95
-                            echo $DTT_ID
96
-                                ? sprintf(
97
-                                    esc_html__('Datetime ID: %d', 'event_espresso'),
98
-                                    $DTT_ID
99
-                                )
100
-                                : ''; ?></span>
95
+							echo $DTT_ID
96
+								? sprintf(
97
+									esc_html__('Datetime ID: %d', 'event_espresso'),
98
+									$DTT_ID
99
+								)
100
+								: ''; ?></span>
101 101
                     </div>
102 102
                     <div class="save-cancel-button-container">
103 103
                         <button data-context="short-ticket" data-datetime-row="<?php echo $dtt_row; ?>"
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Datetime_List_Shortcodes.lib.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     private function _get_datetimes_from_event(EE_Event $event)
169 169
     {
170 170
         return isset($this->_extra_data['data']->events)
171
-            ? $this->_extra_data['data']->events[ $event->ID() ]['dtt_objs']
171
+            ? $this->_extra_data['data']->events[$event->ID()]['dtt_objs']
172 172
             : [];
173 173
     }
174 174
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     private function _get_datetimes_from_ticket(EE_Ticket $ticket)
183 183
     {
184 184
         return isset($this->_extra_data['data']->tickets)
185
-            ? $this->_extra_data['data']->tickets[ $ticket->ID() ]['dtt_objs']
185
+            ? $this->_extra_data['data']->tickets[$ticket->ID()]['dtt_objs']
186 186
             : [];
187 187
     }
188 188
 }
Please login to merge, or discard this patch.
Indentation   +164 added lines, -164 removed lines patch added patch discarded remove patch
@@ -20,168 +20,168 @@
 block discarded – undo
20 20
 {
21 21
 
22 22
 
23
-    protected function _init_props()
24
-    {
25
-        $this->label       = esc_html__('Datetime List Shortcodes', 'event_espresso');
26
-        $this->description = esc_html__('All shortcodes specific to datetime lists', 'event_espresso');
27
-        $this->_shortcodes = [
28
-            '[DATETIME_LIST]' => esc_html__(
29
-                'Will output a list of datetimes according to the layout specified in the datetime list field.',
30
-                'event_espresso'
31
-            ),
32
-        ];
33
-    }
34
-
35
-
36
-    /**
37
-     * @throws EE_Error
38
-     * @throws ReflectionException
39
-     */
40
-    protected function _parser($shortcode)
41
-    {
42
-        switch ($shortcode) {
43
-            case '[DATETIME_LIST]':
44
-                return $this->_get_datetime_list();
45
-        }
46
-        return '';
47
-    }
48
-
49
-
50
-    /**
51
-     * figure out what the incoming data is and then return the appropriate parsed value.
52
-     *
53
-     * @return string
54
-     * @throws EE_Error
55
-     * @throws EE_Error
56
-     * @throws ReflectionException
57
-     */
58
-    private function _get_datetime_list()
59
-    {
60
-        $this->_validate_list_requirements();
61
-
62
-        if ($this->_data['data'] instanceof EE_Ticket) {
63
-            return $this->_get_datetime_list_for_ticket();
64
-        }
65
-        if ($this->_data['data'] instanceof EE_Event) {
66
-            return $this->_get_datetime_list_for_event();
67
-        }
68
-        if (
69
-            $this->_data['data'] instanceof EE_Messages_Addressee
70
-            && $this->_data['data']->reg_obj instanceof EE_Registration
71
-        ) {
72
-            return $this->_get_datetime_list_for_registration();
73
-        }
74
-        // prevent recursive loop
75
-        return '';
76
-    }
77
-
78
-
79
-    /**
80
-     * return parsed list of datetimes for an event
81
-     *
82
-     * @return string
83
-     * @throws EE_Error
84
-     * @throws ReflectionException
85
-     */
86
-    private function _get_datetime_list_for_event()
87
-    {
88
-        $event            = $this->_data['data'];
89
-        $valid_shortcodes = ['datetime', 'attendee'];
90
-        $template         = is_array($this->_data['template']) && isset($this->_data['template']['datetime_list'])
91
-            ? $this->_data['template']['datetime_list']
92
-            : $this->_extra_data['template']['datetime_list'];
93
-
94
-        // here we're setting up the datetimes for the datetime list template for THIS event.
95
-        $dtt_parsed = '';
96
-        $datetimes  = $this->_get_datetimes_from_event($event);
97
-
98
-        // each datetime in this case should be an datetime object.
99
-        foreach ($datetimes as $datetime) {
100
-            $dtt_parsed .= $this->_shortcode_helper->parse_datetime_list_template(
101
-                $template,
102
-                $datetime,
103
-                $valid_shortcodes,
104
-                $this->_extra_data
105
-            );
106
-        }
107
-
108
-        return $dtt_parsed;
109
-    }
110
-
111
-
112
-    /**
113
-     * return parsed list of datetimes for an ticket
114
-     *
115
-     * @return string
116
-     * @throws EE_Error
117
-     */
118
-    private function _get_datetime_list_for_ticket()
119
-    {
120
-        $valid_shortcodes = ['datetime', 'attendee'];
121
-
122
-        $template = is_array($this->_data['template']) && isset($this->_data['template']['datetime_list'])
123
-            ? $this->_data['template']['datetime_list']
124
-            : $this->_extra_data['template']['datetime_list'];
125
-        $ticket   = $this->_data['data'];
126
-
127
-        // here we're setting up the datetimes for the datetime list template for THIS ticket.
128
-        $dtt_parsed = '';
129
-        $datetimes  = $this->_get_datetimes_from_ticket($ticket);
130
-
131
-        // each datetime in this case should be an datetime object.
132
-        foreach ($datetimes as $datetime) {
133
-            $dtt_parsed .= $this->_shortcode_helper->parse_datetime_list_template(
134
-                $template,
135
-                $datetime,
136
-                $valid_shortcodes,
137
-                $this->_extra_data
138
-            );
139
-        }
140
-
141
-        return $dtt_parsed;
142
-    }
143
-
144
-
145
-    /**
146
-     * return parsed list of datetimes from a given registration.
147
-     *
148
-     * @return string
149
-     * @throws EE_Error
150
-     * @throws EE_Error
151
-     */
152
-    private function _get_datetime_list_for_registration()
153
-    {
154
-        $registration = $this->_data['data']->reg_obj;
155
-
156
-        // now let's just get the ticket, set $this->_data['data'] to the ticket and then call _get_datetime_list_for__ticket();
157
-        $this->_data['data'] = $registration->ticket();
158
-        return $this->_get_datetime_list_for_ticket();
159
-    }
160
-
161
-
162
-    /**
163
-     * @param EE_Event $event
164
-     * @return array|mixed
165
-     * @throws EE_Error
166
-     * @throws ReflectionException
167
-     */
168
-    private function _get_datetimes_from_event(EE_Event $event)
169
-    {
170
-        return isset($this->_extra_data['data']->events)
171
-            ? $this->_extra_data['data']->events[ $event->ID() ]['dtt_objs']
172
-            : [];
173
-    }
174
-
175
-
176
-    /**
177
-     * @param EE_Ticket $ticket
178
-     * @return array|mixed
179
-     * @throws EE_Error
180
-     */
181
-    private function _get_datetimes_from_ticket(EE_Ticket $ticket)
182
-    {
183
-        return isset($this->_extra_data['data']->tickets)
184
-            ? $this->_extra_data['data']->tickets[ $ticket->ID() ]['dtt_objs']
185
-            : [];
186
-    }
23
+	protected function _init_props()
24
+	{
25
+		$this->label       = esc_html__('Datetime List Shortcodes', 'event_espresso');
26
+		$this->description = esc_html__('All shortcodes specific to datetime lists', 'event_espresso');
27
+		$this->_shortcodes = [
28
+			'[DATETIME_LIST]' => esc_html__(
29
+				'Will output a list of datetimes according to the layout specified in the datetime list field.',
30
+				'event_espresso'
31
+			),
32
+		];
33
+	}
34
+
35
+
36
+	/**
37
+	 * @throws EE_Error
38
+	 * @throws ReflectionException
39
+	 */
40
+	protected function _parser($shortcode)
41
+	{
42
+		switch ($shortcode) {
43
+			case '[DATETIME_LIST]':
44
+				return $this->_get_datetime_list();
45
+		}
46
+		return '';
47
+	}
48
+
49
+
50
+	/**
51
+	 * figure out what the incoming data is and then return the appropriate parsed value.
52
+	 *
53
+	 * @return string
54
+	 * @throws EE_Error
55
+	 * @throws EE_Error
56
+	 * @throws ReflectionException
57
+	 */
58
+	private function _get_datetime_list()
59
+	{
60
+		$this->_validate_list_requirements();
61
+
62
+		if ($this->_data['data'] instanceof EE_Ticket) {
63
+			return $this->_get_datetime_list_for_ticket();
64
+		}
65
+		if ($this->_data['data'] instanceof EE_Event) {
66
+			return $this->_get_datetime_list_for_event();
67
+		}
68
+		if (
69
+			$this->_data['data'] instanceof EE_Messages_Addressee
70
+			&& $this->_data['data']->reg_obj instanceof EE_Registration
71
+		) {
72
+			return $this->_get_datetime_list_for_registration();
73
+		}
74
+		// prevent recursive loop
75
+		return '';
76
+	}
77
+
78
+
79
+	/**
80
+	 * return parsed list of datetimes for an event
81
+	 *
82
+	 * @return string
83
+	 * @throws EE_Error
84
+	 * @throws ReflectionException
85
+	 */
86
+	private function _get_datetime_list_for_event()
87
+	{
88
+		$event            = $this->_data['data'];
89
+		$valid_shortcodes = ['datetime', 'attendee'];
90
+		$template         = is_array($this->_data['template']) && isset($this->_data['template']['datetime_list'])
91
+			? $this->_data['template']['datetime_list']
92
+			: $this->_extra_data['template']['datetime_list'];
93
+
94
+		// here we're setting up the datetimes for the datetime list template for THIS event.
95
+		$dtt_parsed = '';
96
+		$datetimes  = $this->_get_datetimes_from_event($event);
97
+
98
+		// each datetime in this case should be an datetime object.
99
+		foreach ($datetimes as $datetime) {
100
+			$dtt_parsed .= $this->_shortcode_helper->parse_datetime_list_template(
101
+				$template,
102
+				$datetime,
103
+				$valid_shortcodes,
104
+				$this->_extra_data
105
+			);
106
+		}
107
+
108
+		return $dtt_parsed;
109
+	}
110
+
111
+
112
+	/**
113
+	 * return parsed list of datetimes for an ticket
114
+	 *
115
+	 * @return string
116
+	 * @throws EE_Error
117
+	 */
118
+	private function _get_datetime_list_for_ticket()
119
+	{
120
+		$valid_shortcodes = ['datetime', 'attendee'];
121
+
122
+		$template = is_array($this->_data['template']) && isset($this->_data['template']['datetime_list'])
123
+			? $this->_data['template']['datetime_list']
124
+			: $this->_extra_data['template']['datetime_list'];
125
+		$ticket   = $this->_data['data'];
126
+
127
+		// here we're setting up the datetimes for the datetime list template for THIS ticket.
128
+		$dtt_parsed = '';
129
+		$datetimes  = $this->_get_datetimes_from_ticket($ticket);
130
+
131
+		// each datetime in this case should be an datetime object.
132
+		foreach ($datetimes as $datetime) {
133
+			$dtt_parsed .= $this->_shortcode_helper->parse_datetime_list_template(
134
+				$template,
135
+				$datetime,
136
+				$valid_shortcodes,
137
+				$this->_extra_data
138
+			);
139
+		}
140
+
141
+		return $dtt_parsed;
142
+	}
143
+
144
+
145
+	/**
146
+	 * return parsed list of datetimes from a given registration.
147
+	 *
148
+	 * @return string
149
+	 * @throws EE_Error
150
+	 * @throws EE_Error
151
+	 */
152
+	private function _get_datetime_list_for_registration()
153
+	{
154
+		$registration = $this->_data['data']->reg_obj;
155
+
156
+		// now let's just get the ticket, set $this->_data['data'] to the ticket and then call _get_datetime_list_for__ticket();
157
+		$this->_data['data'] = $registration->ticket();
158
+		return $this->_get_datetime_list_for_ticket();
159
+	}
160
+
161
+
162
+	/**
163
+	 * @param EE_Event $event
164
+	 * @return array|mixed
165
+	 * @throws EE_Error
166
+	 * @throws ReflectionException
167
+	 */
168
+	private function _get_datetimes_from_event(EE_Event $event)
169
+	{
170
+		return isset($this->_extra_data['data']->events)
171
+			? $this->_extra_data['data']->events[ $event->ID() ]['dtt_objs']
172
+			: [];
173
+	}
174
+
175
+
176
+	/**
177
+	 * @param EE_Ticket $ticket
178
+	 * @return array|mixed
179
+	 * @throws EE_Error
180
+	 */
181
+	private function _get_datetimes_from_ticket(EE_Ticket $ticket)
182
+	{
183
+		return isset($this->_extra_data['data']->tickets)
184
+			? $this->_extra_data['data']->tickets[ $ticket->ID() ]['dtt_objs']
185
+			: [];
186
+	}
187 187
 }
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Ticket_List_Shortcodes.lib.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     private function _get_tickets_from_event(EE_Event $event)
203 203
     {
204 204
         return isset($this->_extra_data['data']->events)
205
-            ? $this->_extra_data['data']->events[ $event->ID() ]['tkt_objs']
205
+            ? $this->_extra_data['data']->events[$event->ID()]['tkt_objs']
206 206
             : [];
207 207
     }
208 208
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     private function _get_ticket_list_from_registration(EE_Registration $registration)
217 217
     {
218 218
         return isset($this->_extra_data['data']->registrations)
219
-            ? [$this->_extra_data['data']->registrations[ $registration->ID() ]['tkt_obj']]
219
+            ? [$this->_extra_data['data']->registrations[$registration->ID()]['tkt_obj']]
220 220
             : [];
221 221
     }
222 222
 }
Please login to merge, or discard this patch.
Indentation   +204 added lines, -204 removed lines patch added patch discarded remove patch
@@ -19,208 +19,208 @@
 block discarded – undo
19 19
 class EE_Ticket_List_Shortcodes extends EE_Shortcodes
20 20
 {
21 21
 
22
-    public function __construct()
23
-    {
24
-        parent::__construct();
25
-    }
26
-
27
-
28
-    protected function _init_props()
29
-    {
30
-        $this->label       = esc_html__('Ticket List Shortcodes', 'event_espresso');
31
-        $this->description = esc_html__('All shortcodes specific to ticket lists', 'event_espresso');
32
-        $this->_shortcodes = [
33
-            '[TICKET_LIST]' => esc_html__('Will output a list of tickets', 'event_espresso'),
34
-        ];
35
-    }
36
-
37
-
38
-    /**
39
-     * @param string $shortcode
40
-     * @return string
41
-     * @throws EE_Error
42
-     * @throws ReflectionException
43
-     */
44
-    protected function _parser($shortcode)
45
-    {
46
-        switch ($shortcode) {
47
-            case '[TICKET_LIST]':
48
-                return $this->_get_ticket_list();
49
-        }
50
-        return '';
51
-    }
52
-
53
-
54
-    /**
55
-     * figure out what the incoming data is and then return the appropriate parsed value.
56
-     *
57
-     * @return string
58
-     * @throws EE_Error
59
-     * @throws ReflectionException
60
-     */
61
-    private function _get_ticket_list()
62
-    {
63
-        $this->_validate_list_requirements();
64
-
65
-        if ($this->_data['data'] instanceof EE_Messages_Addressee) {
66
-            return $this->_get_ticket_list_for_main();
67
-        }
68
-        if ($this->_data['data'] instanceof EE_Registration) {
69
-            return $this->_get_ticket_list_for_attendee();
70
-        }
71
-        if ($this->_data['data'] instanceof EE_Event) {
72
-            return $this->_get_ticket_list_for_event();
73
-        }
74
-        // prevent recursive loop
75
-        return '';
76
-    }
77
-
78
-
79
-    /**
80
-     * This returns the parsed ticket list for main template;
81
-     */
82
-    private function _get_ticket_list_for_main()
83
-    {
84
-        $valid_shortcodes = [
85
-            'ticket',
86
-            'event_list',
87
-            'attendee_list',
88
-            'datetime_list',
89
-            'attendee',
90
-            'line_item_list',
91
-            'primary_registration_details',
92
-            'recipient_details',
93
-        ];
94
-        $template         = $this->_data['template'];
95
-        $data             = $this->_data['data'];
96
-        $ticket_list      = '';
97
-
98
-
99
-        // now we need to loop through the ticket list and send data to the EE_Parser helper.
100
-        foreach ($data->tickets as $ticket) {
101
-            $ticket_list .= $this->_shortcode_helper->parse_ticket_list_template(
102
-                $template,
103
-                $ticket['ticket'],
104
-                $valid_shortcodes,
105
-                $this->_extra_data
106
-            );
107
-        }
108
-
109
-        return $ticket_list;
110
-    }
111
-
112
-
113
-    /**
114
-     * return parsed list of tickets for an event
115
-     *
116
-     * @return string
117
-     * @throws EE_Error
118
-     * @throws ReflectionException
119
-     */
120
-    private function _get_ticket_list_for_event()
121
-    {
122
-        $valid_shortcodes = [
123
-            'ticket',
124
-            'attendee_list',
125
-            'datetime_list',
126
-            'attendee',
127
-            'venue',
128
-            'line_item_list',
129
-            'primary_registration_details',
130
-            'recipient_details',
131
-        ];
132
-        $template         = is_array($this->_data['template']) && isset($this->_data['template']['ticket_list'])
133
-            ? $this->_data['template']['ticket_list']
134
-            : $this->_extra_data['template']['ticket_list'];
135
-        $event            = $this->_data['data'];
136
-
137
-        // let's remove any existing [EVENT_LIST] shortcodes from the ticket list template so that we don't get recursion.
138
-        $template = str_replace('[EVENT_LIST]', '', $template);
139
-
140
-        // here we're setting up the tickets for the ticket list template for THIS event.
141
-        $tkt_parsed = '';
142
-        $tickets    = $this->_get_tickets_from_event($event);
143
-
144
-        // each ticket in this case should be an ticket object.
145
-        foreach ($tickets as $ticket) {
146
-            $tkt_parsed .= $this->_shortcode_helper->parse_ticket_list_template(
147
-                $template,
148
-                $ticket,
149
-                $valid_shortcodes,
150
-                $this->_extra_data
151
-            );
152
-        }
153
-
154
-        return $tkt_parsed;
155
-    }
156
-
157
-
158
-    /**
159
-     * return parsed list of tickets for an attendee
160
-     *
161
-     * @return string
162
-     * @throws EE_Error
163
-     * @throws ReflectionException
164
-     */
165
-    private function _get_ticket_list_for_attendee()
166
-    {
167
-        $valid_shortcodes = [
168
-            'ticket',
169
-            'event_list',
170
-            'datetime_list',
171
-            'attendee',
172
-            'primary_registration_details',
173
-            'recipient_details',
174
-        ];
175
-
176
-        $template     = is_array($this->_data['template']) && isset($this->_data['template']['ticket_list'])
177
-            ? $this->_data['template']['ticket_list']
178
-            : $this->_extra_data['template']['ticket_list'];
179
-        $registration = $this->_data['data'];
180
-
181
-        // let's remove any existing [ATTENDEE_LIST] shortcode from the ticket list template so that we don't get recursion.
182
-        $template = str_replace('[ATTENDEE_LIST]', '', $template);
183
-
184
-        // here we're setting up the tickets for the ticket list template for THIS attendee.
185
-        $tkt_parsed = '';
186
-        $tickets    = $this->_get_ticket_list_from_registration($registration);
187
-
188
-        // each ticket in this case should be an ticket object.
189
-        foreach ($tickets as $ticket) {
190
-            $tkt_parsed .= $this->_shortcode_helper->parse_ticket_list_template(
191
-                $template,
192
-                $ticket,
193
-                $valid_shortcodes,
194
-                $this->_extra_data
195
-            );
196
-        }
197
-
198
-        return $tkt_parsed;
199
-    }
200
-
201
-
202
-    /**
203
-     * @throws EE_Error
204
-     * @throws ReflectionException
205
-     */
206
-    private function _get_tickets_from_event(EE_Event $event)
207
-    {
208
-        return isset($this->_extra_data['data']->events)
209
-            ? $this->_extra_data['data']->events[ $event->ID() ]['tkt_objs']
210
-            : [];
211
-    }
212
-
213
-
214
-    /**
215
-     * @param EE_Registration $registration
216
-     * @return array
217
-     * @throws EE_Error
218
-     * @throws ReflectionException
219
-     */
220
-    private function _get_ticket_list_from_registration(EE_Registration $registration)
221
-    {
222
-        return isset($this->_extra_data['data']->registrations)
223
-            ? [$this->_extra_data['data']->registrations[ $registration->ID() ]['tkt_obj']]
224
-            : [];
225
-    }
22
+	public function __construct()
23
+	{
24
+		parent::__construct();
25
+	}
26
+
27
+
28
+	protected function _init_props()
29
+	{
30
+		$this->label       = esc_html__('Ticket List Shortcodes', 'event_espresso');
31
+		$this->description = esc_html__('All shortcodes specific to ticket lists', 'event_espresso');
32
+		$this->_shortcodes = [
33
+			'[TICKET_LIST]' => esc_html__('Will output a list of tickets', 'event_espresso'),
34
+		];
35
+	}
36
+
37
+
38
+	/**
39
+	 * @param string $shortcode
40
+	 * @return string
41
+	 * @throws EE_Error
42
+	 * @throws ReflectionException
43
+	 */
44
+	protected function _parser($shortcode)
45
+	{
46
+		switch ($shortcode) {
47
+			case '[TICKET_LIST]':
48
+				return $this->_get_ticket_list();
49
+		}
50
+		return '';
51
+	}
52
+
53
+
54
+	/**
55
+	 * figure out what the incoming data is and then return the appropriate parsed value.
56
+	 *
57
+	 * @return string
58
+	 * @throws EE_Error
59
+	 * @throws ReflectionException
60
+	 */
61
+	private function _get_ticket_list()
62
+	{
63
+		$this->_validate_list_requirements();
64
+
65
+		if ($this->_data['data'] instanceof EE_Messages_Addressee) {
66
+			return $this->_get_ticket_list_for_main();
67
+		}
68
+		if ($this->_data['data'] instanceof EE_Registration) {
69
+			return $this->_get_ticket_list_for_attendee();
70
+		}
71
+		if ($this->_data['data'] instanceof EE_Event) {
72
+			return $this->_get_ticket_list_for_event();
73
+		}
74
+		// prevent recursive loop
75
+		return '';
76
+	}
77
+
78
+
79
+	/**
80
+	 * This returns the parsed ticket list for main template;
81
+	 */
82
+	private function _get_ticket_list_for_main()
83
+	{
84
+		$valid_shortcodes = [
85
+			'ticket',
86
+			'event_list',
87
+			'attendee_list',
88
+			'datetime_list',
89
+			'attendee',
90
+			'line_item_list',
91
+			'primary_registration_details',
92
+			'recipient_details',
93
+		];
94
+		$template         = $this->_data['template'];
95
+		$data             = $this->_data['data'];
96
+		$ticket_list      = '';
97
+
98
+
99
+		// now we need to loop through the ticket list and send data to the EE_Parser helper.
100
+		foreach ($data->tickets as $ticket) {
101
+			$ticket_list .= $this->_shortcode_helper->parse_ticket_list_template(
102
+				$template,
103
+				$ticket['ticket'],
104
+				$valid_shortcodes,
105
+				$this->_extra_data
106
+			);
107
+		}
108
+
109
+		return $ticket_list;
110
+	}
111
+
112
+
113
+	/**
114
+	 * return parsed list of tickets for an event
115
+	 *
116
+	 * @return string
117
+	 * @throws EE_Error
118
+	 * @throws ReflectionException
119
+	 */
120
+	private function _get_ticket_list_for_event()
121
+	{
122
+		$valid_shortcodes = [
123
+			'ticket',
124
+			'attendee_list',
125
+			'datetime_list',
126
+			'attendee',
127
+			'venue',
128
+			'line_item_list',
129
+			'primary_registration_details',
130
+			'recipient_details',
131
+		];
132
+		$template         = is_array($this->_data['template']) && isset($this->_data['template']['ticket_list'])
133
+			? $this->_data['template']['ticket_list']
134
+			: $this->_extra_data['template']['ticket_list'];
135
+		$event            = $this->_data['data'];
136
+
137
+		// let's remove any existing [EVENT_LIST] shortcodes from the ticket list template so that we don't get recursion.
138
+		$template = str_replace('[EVENT_LIST]', '', $template);
139
+
140
+		// here we're setting up the tickets for the ticket list template for THIS event.
141
+		$tkt_parsed = '';
142
+		$tickets    = $this->_get_tickets_from_event($event);
143
+
144
+		// each ticket in this case should be an ticket object.
145
+		foreach ($tickets as $ticket) {
146
+			$tkt_parsed .= $this->_shortcode_helper->parse_ticket_list_template(
147
+				$template,
148
+				$ticket,
149
+				$valid_shortcodes,
150
+				$this->_extra_data
151
+			);
152
+		}
153
+
154
+		return $tkt_parsed;
155
+	}
156
+
157
+
158
+	/**
159
+	 * return parsed list of tickets for an attendee
160
+	 *
161
+	 * @return string
162
+	 * @throws EE_Error
163
+	 * @throws ReflectionException
164
+	 */
165
+	private function _get_ticket_list_for_attendee()
166
+	{
167
+		$valid_shortcodes = [
168
+			'ticket',
169
+			'event_list',
170
+			'datetime_list',
171
+			'attendee',
172
+			'primary_registration_details',
173
+			'recipient_details',
174
+		];
175
+
176
+		$template     = is_array($this->_data['template']) && isset($this->_data['template']['ticket_list'])
177
+			? $this->_data['template']['ticket_list']
178
+			: $this->_extra_data['template']['ticket_list'];
179
+		$registration = $this->_data['data'];
180
+
181
+		// let's remove any existing [ATTENDEE_LIST] shortcode from the ticket list template so that we don't get recursion.
182
+		$template = str_replace('[ATTENDEE_LIST]', '', $template);
183
+
184
+		// here we're setting up the tickets for the ticket list template for THIS attendee.
185
+		$tkt_parsed = '';
186
+		$tickets    = $this->_get_ticket_list_from_registration($registration);
187
+
188
+		// each ticket in this case should be an ticket object.
189
+		foreach ($tickets as $ticket) {
190
+			$tkt_parsed .= $this->_shortcode_helper->parse_ticket_list_template(
191
+				$template,
192
+				$ticket,
193
+				$valid_shortcodes,
194
+				$this->_extra_data
195
+			);
196
+		}
197
+
198
+		return $tkt_parsed;
199
+	}
200
+
201
+
202
+	/**
203
+	 * @throws EE_Error
204
+	 * @throws ReflectionException
205
+	 */
206
+	private function _get_tickets_from_event(EE_Event $event)
207
+	{
208
+		return isset($this->_extra_data['data']->events)
209
+			? $this->_extra_data['data']->events[ $event->ID() ]['tkt_objs']
210
+			: [];
211
+	}
212
+
213
+
214
+	/**
215
+	 * @param EE_Registration $registration
216
+	 * @return array
217
+	 * @throws EE_Error
218
+	 * @throws ReflectionException
219
+	 */
220
+	private function _get_ticket_list_from_registration(EE_Registration $registration)
221
+	{
222
+		return isset($this->_extra_data['data']->registrations)
223
+			? [$this->_extra_data['data']->registrations[ $registration->ID() ]['tkt_obj']]
224
+			: [];
225
+	}
226 226
 }
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Event_List_Shortcodes.lib.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
     private function _get_events_from_registration(EE_Registration $registration)
164 164
     {
165 165
         return isset($this->_extra_data['data']->registrations)
166
-            ? [$this->_extra_data['data']->registrations[ $registration->ID() ]['evt_obj']]
166
+            ? [$this->_extra_data['data']->registrations[$registration->ID()]['evt_obj']]
167 167
             : [];
168 168
     }
169 169
 }
Please login to merge, or discard this patch.
Indentation   +152 added lines, -152 removed lines patch added patch discarded remove patch
@@ -19,156 +19,156 @@
 block discarded – undo
19 19
 class EE_Event_List_Shortcodes extends EE_Shortcodes
20 20
 {
21 21
 
22
-    public function __construct()
23
-    {
24
-        parent::__construct();
25
-    }
26
-
27
-
28
-    protected function _init_props()
29
-    {
30
-        $this->label       = esc_html__('Event List Shortcodes', 'event_espresso');
31
-        $this->description = esc_html__('All shortcodes specific to event lists', 'event_espresso');
32
-        $this->_shortcodes = [
33
-            '[EVENT_LIST]' => esc_html__('Will output a list of events', 'event_espresso'),
34
-        ];
35
-    }
36
-
37
-
38
-    /**
39
-     * @param string $shortcode
40
-     * @return string
41
-     * @throws EE_Error
42
-     * @throws ReflectionException
43
-     */
44
-    protected function _parser($shortcode)
45
-    {
46
-        switch ($shortcode) {
47
-            case '[EVENT_LIST]':
48
-                return $this->_get_event_list();
49
-        }
50
-        return '';
51
-    }
52
-
53
-
54
-    /**
55
-     * figure out what the incoming data is and then return the appropriate parsed value.
56
-     *
57
-     * @return string
58
-     * @throws EE_Error
59
-     * @throws ReflectionException
60
-     */
61
-    private function _get_event_list()
62
-    {
63
-        $this->_validate_list_requirements();
64
-
65
-        if ($this->_data['data'] instanceof EE_Messages_Addressee) {
66
-            return $this->_get_event_list_for_main();
67
-        }
68
-        if ($this->_data['data'] instanceof EE_Registration) {
69
-            return $this->_get_event_list_for_registration();
70
-        }
71
-        // prevent recursive loop
72
-        return '';
73
-    }
74
-
75
-
76
-    /**
77
-     * This returns the parsed event list for main template
78
-     *
79
-     * @return string
80
-     */
81
-    private function _get_event_list_for_main()
82
-    {
83
-
84
-        $valid_shortcodes = [
85
-            'event',
86
-            'attendee_list',
87
-            'ticket_list',
88
-            'datetime_list',
89
-            'venue',
90
-            'attendee',
91
-            'recipient_list',
92
-            'recipient_details',
93
-            'primary_registration_list',
94
-            'primary_registration_details',
95
-            'event_author',
96
-            'organization',
97
-        ];
98
-        $template         = $this->_data['template'];
99
-        $data             = $this->_data['data'];
100
-        $events           = '';
101
-
102
-        // now we need to loop through the events array in EE_Messages_Addressee and send data to the EE_Parser helper.
103
-        foreach ($data->events as $event) {
104
-            $events .= $this->_shortcode_helper->parse_event_list_template(
105
-                $template,
106
-                $event['event'],
107
-                $valid_shortcodes,
108
-                $this->_extra_data
109
-            );
110
-        }
111
-        return $events;
112
-    }
113
-
114
-
115
-    /**
116
-     * This returns the parsed event list for an attendee
117
-     *
118
-     * @return string
119
-     * @throws EE_Error
120
-     * @throws ReflectionException
121
-     */
122
-    private function _get_event_list_for_registration()
123
-    {
124
-        $valid_shortcodes = [
125
-            'event',
126
-            'ticket_list',
127
-            'datetime_list',
128
-            'attendee',
129
-            'event_author',
130
-            'recipient_details',
131
-            'recipient_list',
132
-            'venue',
133
-            'organization',
134
-        ];
135
-        $template         = is_array($this->_data['template']) && isset($this->_data['template']['event_list'])
136
-            ? $this->_data['template']['event_list']
137
-            : $this->_extra_data['template']['event_list'];
138
-        $registration     = $this->_data['data'];
139
-
140
-        // let's remove any existing [ATTENDEE_LIST] shortcode from the event list template so that we don't get recursion.
141
-        $template = str_replace('[ATTENDEE_LIST]', '', $template);
142
-
143
-        // here we're setting up the events for the event_list template for THIS registration.
144
-        $all_events = $this->_get_events_from_registration($registration);
145
-
146
-        // we're NOT going to prepare a list of attendees this time around
147
-        $events = '';
148
-
149
-        foreach ($all_events as $event) {
150
-            $events .= $this->_shortcode_helper->parse_event_list_template(
151
-                $template,
152
-                $event,
153
-                $valid_shortcodes,
154
-                $this->_extra_data
155
-            );
156
-        }
157
-
158
-        return $events;
159
-    }
160
-
161
-
162
-    /**
163
-     * @param EE_Registration $registration
164
-     * @return array
165
-     * @throws EE_Error
166
-     * @throws ReflectionException
167
-     */
168
-    private function _get_events_from_registration(EE_Registration $registration)
169
-    {
170
-        return isset($this->_extra_data['data']->registrations)
171
-            ? [$this->_extra_data['data']->registrations[ $registration->ID() ]['evt_obj']]
172
-            : [];
173
-    }
22
+	public function __construct()
23
+	{
24
+		parent::__construct();
25
+	}
26
+
27
+
28
+	protected function _init_props()
29
+	{
30
+		$this->label       = esc_html__('Event List Shortcodes', 'event_espresso');
31
+		$this->description = esc_html__('All shortcodes specific to event lists', 'event_espresso');
32
+		$this->_shortcodes = [
33
+			'[EVENT_LIST]' => esc_html__('Will output a list of events', 'event_espresso'),
34
+		];
35
+	}
36
+
37
+
38
+	/**
39
+	 * @param string $shortcode
40
+	 * @return string
41
+	 * @throws EE_Error
42
+	 * @throws ReflectionException
43
+	 */
44
+	protected function _parser($shortcode)
45
+	{
46
+		switch ($shortcode) {
47
+			case '[EVENT_LIST]':
48
+				return $this->_get_event_list();
49
+		}
50
+		return '';
51
+	}
52
+
53
+
54
+	/**
55
+	 * figure out what the incoming data is and then return the appropriate parsed value.
56
+	 *
57
+	 * @return string
58
+	 * @throws EE_Error
59
+	 * @throws ReflectionException
60
+	 */
61
+	private function _get_event_list()
62
+	{
63
+		$this->_validate_list_requirements();
64
+
65
+		if ($this->_data['data'] instanceof EE_Messages_Addressee) {
66
+			return $this->_get_event_list_for_main();
67
+		}
68
+		if ($this->_data['data'] instanceof EE_Registration) {
69
+			return $this->_get_event_list_for_registration();
70
+		}
71
+		// prevent recursive loop
72
+		return '';
73
+	}
74
+
75
+
76
+	/**
77
+	 * This returns the parsed event list for main template
78
+	 *
79
+	 * @return string
80
+	 */
81
+	private function _get_event_list_for_main()
82
+	{
83
+
84
+		$valid_shortcodes = [
85
+			'event',
86
+			'attendee_list',
87
+			'ticket_list',
88
+			'datetime_list',
89
+			'venue',
90
+			'attendee',
91
+			'recipient_list',
92
+			'recipient_details',
93
+			'primary_registration_list',
94
+			'primary_registration_details',
95
+			'event_author',
96
+			'organization',
97
+		];
98
+		$template         = $this->_data['template'];
99
+		$data             = $this->_data['data'];
100
+		$events           = '';
101
+
102
+		// now we need to loop through the events array in EE_Messages_Addressee and send data to the EE_Parser helper.
103
+		foreach ($data->events as $event) {
104
+			$events .= $this->_shortcode_helper->parse_event_list_template(
105
+				$template,
106
+				$event['event'],
107
+				$valid_shortcodes,
108
+				$this->_extra_data
109
+			);
110
+		}
111
+		return $events;
112
+	}
113
+
114
+
115
+	/**
116
+	 * This returns the parsed event list for an attendee
117
+	 *
118
+	 * @return string
119
+	 * @throws EE_Error
120
+	 * @throws ReflectionException
121
+	 */
122
+	private function _get_event_list_for_registration()
123
+	{
124
+		$valid_shortcodes = [
125
+			'event',
126
+			'ticket_list',
127
+			'datetime_list',
128
+			'attendee',
129
+			'event_author',
130
+			'recipient_details',
131
+			'recipient_list',
132
+			'venue',
133
+			'organization',
134
+		];
135
+		$template         = is_array($this->_data['template']) && isset($this->_data['template']['event_list'])
136
+			? $this->_data['template']['event_list']
137
+			: $this->_extra_data['template']['event_list'];
138
+		$registration     = $this->_data['data'];
139
+
140
+		// let's remove any existing [ATTENDEE_LIST] shortcode from the event list template so that we don't get recursion.
141
+		$template = str_replace('[ATTENDEE_LIST]', '', $template);
142
+
143
+		// here we're setting up the events for the event_list template for THIS registration.
144
+		$all_events = $this->_get_events_from_registration($registration);
145
+
146
+		// we're NOT going to prepare a list of attendees this time around
147
+		$events = '';
148
+
149
+		foreach ($all_events as $event) {
150
+			$events .= $this->_shortcode_helper->parse_event_list_template(
151
+				$template,
152
+				$event,
153
+				$valid_shortcodes,
154
+				$this->_extra_data
155
+			);
156
+		}
157
+
158
+		return $events;
159
+	}
160
+
161
+
162
+	/**
163
+	 * @param EE_Registration $registration
164
+	 * @return array
165
+	 * @throws EE_Error
166
+	 * @throws ReflectionException
167
+	 */
168
+	private function _get_events_from_registration(EE_Registration $registration)
169
+	{
170
+		return isset($this->_extra_data['data']->registrations)
171
+			? [$this->_extra_data['data']->registrations[ $registration->ID() ]['evt_obj']]
172
+			: [];
173
+	}
174 174
 }
Please login to merge, or discard this patch.