Passed
Push — master ( 330418...c4952f )
by Brian
05:45 queued 27s
created
includes/admin/meta-boxes/class-getpaid-meta-box-item-details.php 1 patch
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if (!defined('ABSPATH')) {
11 11
 	exit; // Exit if accessed directly
12 12
 }
13 13
 
@@ -21,27 +21,27 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WP_Post $post
23 23
 	 */
24
-    public static function output( $post ) {
24
+    public static function output($post) {
25 25
 
26 26
         // Prepare the item.
27
-        $item = new WPInv_Item( $post );
27
+        $item = new WPInv_Item($post);
28 28
 
29 29
         // Nonce field.
30
-        wp_nonce_field( 'getpaid_meta_nonce', 'getpaid_meta_nonce' );
30
+        wp_nonce_field('getpaid_meta_nonce', 'getpaid_meta_nonce');
31 31
 
32 32
         // Set the currency position.
33 33
         $position = wpinv_currency_position();
34 34
 
35
-        if ( $position == 'left_space' ) {
35
+        if ($position == 'left_space') {
36 36
             $position = 'left';
37 37
         }
38 38
 
39
-        if ( $position == 'right_space' ) {
39
+        if ($position == 'right_space') {
40 40
             $position = 'right';
41 41
         }
42 42
 
43 43
         ?>
44
-        <input type="hidden" id="_wpi_current_type" value="<?php echo esc_attr( $item->get_type( 'edit' ) ); ?>" />
44
+        <input type="hidden" id="_wpi_current_type" value="<?php echo esc_attr($item->get_type('edit')); ?>" />
45 45
         <style>
46 46
             #poststuff .input-group-text,
47 47
             #poststuff .form-control {
@@ -55,21 +55,21 @@  discard block
 block discarded – undo
55 55
         </style>
56 56
         <div class='bsui' style='max-width: 600px;padding-top: 10px;'>
57 57
 
58
-            <?php do_action( 'wpinv_item_details_metabox_before_price', $item ); ?>
58
+            <?php do_action('wpinv_item_details_metabox_before_price', $item); ?>
59 59
             <div class="form-group row">
60
-                <label class="col-sm-3 col-form-label" for="wpinv_item_price"><span><?php _e( 'Item Price', 'invoicing' )?></span></label>
60
+                <label class="col-sm-3 col-form-label" for="wpinv_item_price"><span><?php _e('Item Price', 'invoicing')?></span></label>
61 61
                 <div class="col-sm-8">
62 62
                     <div class="row">
63 63
                         <div class="col-sm-4 getpaid-price-input">
64 64
                             <div class="input-group input-group-sm">
65
-                                <?php if( 'left' == $position ) : ?>
65
+                                <?php if ('left' == $position) : ?>
66 66
                                 <div class="input-group-prepend">
67 67
                                     <span class="input-group-text" id="wpinv_item_price_symbol"><?php echo wpinv_currency_symbol(); ?></span>
68 68
                                 </div>
69 69
                                 <?php endif; ?>
70
-                                <input type="text" name="wpinv_item_price" id="wpinv_item_price" value="<?php echo esc_attr( getpaid_unstandardize_amount( $item->get_price( 'edit' ) ) ); ?>" placeholder="<?php echo esc_attr( wpinv_sanitize_amount( 0 ) ); ?>" class="form-control">
70
+                                <input type="text" name="wpinv_item_price" id="wpinv_item_price" value="<?php echo esc_attr(getpaid_unstandardize_amount($item->get_price('edit'))); ?>" placeholder="<?php echo esc_attr(wpinv_sanitize_amount(0)); ?>" class="form-control">
71 71
 
72
-                                <?php if( 'left' != $position ) : ?>
72
+                                <?php if ('left' != $position) : ?>
73 73
                                 <div class="input-group-append">
74 74
                                     <span class="input-group-text" id="wpinv_item_price_symbol"><?php echo wpinv_currency_symbol(); ?></span>
75 75
                                 </div>
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
                         </div>
80 80
                         <div class="col-sm-4 wpinv_show_if_recurring">
81 81
                             <?php
82
-                                _e( 'every' );
82
+                                _e('every');
83 83
                                 echo "&nbsp;";
84 84
                             ?>
85
-                            <input type="number" style="max-width: 60px;" value="<?php echo esc_attr( $item->get_recurring_interval( 'edit' ) ); ?>" placeholder="1" name="wpinv_recurring_interval" id="wpinv_recurring_interval" />
85
+                            <input type="number" style="max-width: 60px;" value="<?php echo esc_attr($item->get_recurring_interval('edit')); ?>" placeholder="1" name="wpinv_recurring_interval" id="wpinv_recurring_interval" />
86 86
                         </div>
87 87
                         <div class="col-sm-4 wpinv_show_if_recurring">
88 88
                             <?php
@@ -90,16 +90,16 @@  discard block
 block discarded – undo
90 90
                                     array(
91 91
                                         'id'               => 'wpinv_recurring_period',
92 92
                                         'name'             => 'wpinv_recurring_period',
93
-                                        'label'            => __( 'Period', 'invoicing' ),
94
-                                        'placeholder'      => __( 'Select Period', 'invoicing' ),
95
-                                        'value'            => $item->get_recurring_period( 'edit' ),
93
+                                        'label'            => __('Period', 'invoicing'),
94
+                                        'placeholder'      => __('Select Period', 'invoicing'),
95
+                                        'value'            => $item->get_recurring_period('edit'),
96 96
                                         'select2'          => true,
97 97
                                         'data-allow-clear' => 'false',
98 98
                                         'options'     => array(
99
-                                            'D'  => __( 'day(s)', 'invoicing' ),
100
-                                            'W'  => __( 'week(s)', 'invoicing' ),
101
-                                            'M'  => __( 'month(s)', 'invoicing' ),
102
-                                            'Y'  => __( 'year(s)', 'invoicing' ),
99
+                                            'D'  => __('day(s)', 'invoicing'),
100
+                                            'W'  => __('week(s)', 'invoicing'),
101
+                                            'M'  => __('month(s)', 'invoicing'),
102
+                                            'Y'  => __('year(s)', 'invoicing'),
103 103
                                         )
104 104
                                     )
105 105
                                 );
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
                             <?php
112 112
 
113 113
                                 // Dynamic pricing.
114
-                                if( $item->supports_dynamic_pricing() ) {
114
+                                if ($item->supports_dynamic_pricing()) {
115 115
 
116
-                                    do_action( 'wpinv_item_details_metabox_before_dynamic_pricing_checkbox', $item );
116
+                                    do_action('wpinv_item_details_metabox_before_dynamic_pricing_checkbox', $item);
117 117
 
118 118
                                     // NYP toggle.
119 119
                                     echo aui()->input(
@@ -121,31 +121,31 @@  discard block
 block discarded – undo
121 121
                                             'id'          => 'wpinv_name_your_price',
122 122
                                             'name'        => 'wpinv_name_your_price',
123 123
                                             'type'        => 'checkbox',
124
-                                            'label'       => apply_filters( 'wpinv_name_your_price_toggle_text', __( 'Let customers name their price', 'invoicing' ) ),
124
+                                            'label'       => apply_filters('wpinv_name_your_price_toggle_text', __('Let customers name their price', 'invoicing')),
125 125
                                             'value'       => '1',
126 126
                                             'checked'     => $item->user_can_set_their_price(),
127 127
                                             'no_wrap'     => true,
128 128
                                         )
129 129
                                     );
130 130
 
131
-                                    do_action( 'wpinv_item_details_metabox_dynamic_pricing_checkbox', $item );
131
+                                    do_action('wpinv_item_details_metabox_dynamic_pricing_checkbox', $item);
132 132
 
133 133
                                 }
134 134
 
135 135
                                 // Subscriptions.
136
-                                do_action( 'wpinv_item_details_metabox_before_subscription_checkbox', $item );
136
+                                do_action('wpinv_item_details_metabox_before_subscription_checkbox', $item);
137 137
                                 echo aui()->input(
138 138
                                     array(
139 139
                                         'id'          => 'wpinv_is_recurring',
140 140
                                         'name'        => 'wpinv_is_recurring',
141 141
                                         'type'        => 'checkbox',
142
-                                        'label'       => apply_filters( 'wpinv_is_recurring_toggle_text', __( 'Charge customers a recurring amount for this item', 'invoicing' ) ),
142
+                                        'label'       => apply_filters('wpinv_is_recurring_toggle_text', __('Charge customers a recurring amount for this item', 'invoicing')),
143 143
                                         'value'       => '1',
144 144
                                         'checked'     => $item->is_recurring(),
145 145
                                         'no_wrap'     => true,
146 146
                                     )
147 147
                                 );
148
-                                do_action( 'wpinv_item_details_metabox_subscription_checkbox', $item );
148
+                                do_action('wpinv_item_details_metabox_subscription_checkbox', $item);
149 149
 
150 150
                             ?>
151 151
                             <div class="wpinv_show_if_recurring">
@@ -155,30 +155,30 @@  discard block
 block discarded – undo
155 155
                     </div>
156 156
                 </div>
157 157
                 <div class="col-sm-1 pt-2 pl-0">
158
-                    <span class="wpi-help-tip dashicons dashicons-editor-help wpinv_show_if_recurring" title="<?php esc_attr_e( 'Set the subscription price, billing interval and period.', 'invoicing' ); ?>"></span>
158
+                    <span class="wpi-help-tip dashicons dashicons-editor-help wpinv_show_if_recurring" title="<?php esc_attr_e('Set the subscription price, billing interval and period.', 'invoicing'); ?>"></span>
159 159
                 </div>
160 160
             </div>
161
-            <?php do_action( 'wpinv_item_details_metabox_after_price', $item ); ?>
161
+            <?php do_action('wpinv_item_details_metabox_after_price', $item); ?>
162 162
 
163
-            <?php if( $item->supports_dynamic_pricing() ) : ?>
164
-                <?php do_action( 'wpinv_item_details_metabox_before_minimum_price', $item ); ?>
163
+            <?php if ($item->supports_dynamic_pricing()) : ?>
164
+                <?php do_action('wpinv_item_details_metabox_before_minimum_price', $item); ?>
165 165
                 <div class="wpinv_show_if_dynamic wpinv_minimum_price">
166 166
 
167 167
                     <div class="form-group row">
168 168
                         <label for="wpinv_minimum_price" class="col-sm-3 col-form-label">
169
-                            <?php _e( 'Minimum Price', 'invoicing' );?>
169
+                            <?php _e('Minimum Price', 'invoicing'); ?>
170 170
                         </label>
171 171
                         <div class="col-sm-8">
172 172
                             <div class="input-group input-group-sm">
173
-                                <?php if( 'left' == $position ) : ?>
173
+                                <?php if ('left' == $position) : ?>
174 174
                                     <div class="input-group-prepend">
175 175
                                         <span class="input-group-text" id="wpinv_item_minimum_price_symbol"><?php echo wpinv_currency_symbol(); ?></span>
176 176
                                     </div>
177 177
                                 <?php endif; ?>
178 178
 
179
-                                <input type="text" name="wpinv_minimum_price" id="wpinv_minimum_price" value="<?php echo esc_attr( getpaid_unstandardize_amount( $item->get_minimum_price( 'edit' ) ) ); ?>" placeholder="<?php echo esc_attr( wpinv_sanitize_amount( 0 ) ); ?>" class="form-control">
179
+                                <input type="text" name="wpinv_minimum_price" id="wpinv_minimum_price" value="<?php echo esc_attr(getpaid_unstandardize_amount($item->get_minimum_price('edit'))); ?>" placeholder="<?php echo esc_attr(wpinv_sanitize_amount(0)); ?>" class="form-control">
180 180
 
181
-                                <?php if( 'left' != $position ) : ?>
181
+                                <?php if ('left' != $position) : ?>
182 182
                                     <div class="input-group-append">
183 183
                                         <span class="input-group-text" id="wpinv_item_minimum_price_symbol"><?php echo wpinv_currency_symbol(); ?></span>
184 184
                                     </div>
@@ -187,45 +187,45 @@  discard block
 block discarded – undo
187 187
                         </div>
188 188
 
189 189
                         <div class="col-sm-1 pt-2 pl-0">
190
-                            <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Enter the minimum amount that users are allowed to set', 'invoicing' ); ?>"></span>
190
+                            <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Enter the minimum amount that users are allowed to set', 'invoicing'); ?>"></span>
191 191
                         </div>
192 192
                     </div>
193 193
 
194 194
                 </div>
195
-                <?php do_action( 'wpinv_item_details_metabox_minimum_price', $item ); ?>
195
+                <?php do_action('wpinv_item_details_metabox_minimum_price', $item); ?>
196 196
             <?php endif; ?>
197 197
 
198
-            <?php do_action( 'wpinv_item_details_metabox_before_maximum_renewals', $item ); ?>
198
+            <?php do_action('wpinv_item_details_metabox_before_maximum_renewals', $item); ?>
199 199
             <div class="wpinv_show_if_recurring wpinv_maximum_renewals">
200 200
 
201 201
                 <div class="form-group row">
202 202
                     <label for="wpinv_recurring_limit" class="col-sm-3 col-form-label">
203
-                        <?php _e( 'Maximum Renewals', 'invoicing' );?>
203
+                        <?php _e('Maximum Renewals', 'invoicing'); ?>
204 204
                     </label>
205 205
                     <div class="col-sm-8">
206
-                        <input type="number" value="<?php echo esc_attr( $item->get_recurring_limit( 'edit' ) ); ?>" placeholder="0" name="wpinv_recurring_limit" id="wpinv_recurring_limit" style="width: 100%;" />
206
+                        <input type="number" value="<?php echo esc_attr($item->get_recurring_limit('edit')); ?>" placeholder="0" name="wpinv_recurring_limit" id="wpinv_recurring_limit" style="width: 100%;" />
207 207
                     </div>
208 208
                     <div class="col-sm-1 pt-2 pl-0">
209
-                        <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Leave empty if you want the subscription to renew until it is cancelled.', 'invoicing' ); ?>"></span>
209
+                        <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Leave empty if you want the subscription to renew until it is cancelled.', 'invoicing'); ?>"></span>
210 210
                     </div>
211 211
                 </div>
212 212
 
213 213
             </div>
214
-            <?php do_action( 'wpinv_item_details_metabox_maximum_renewals', $item ); ?>
214
+            <?php do_action('wpinv_item_details_metabox_maximum_renewals', $item); ?>
215 215
 
216
-            <?php do_action( 'wpinv_item_details_metabox_before_free_trial', $item ); ?>
216
+            <?php do_action('wpinv_item_details_metabox_before_free_trial', $item); ?>
217 217
             <div class="wpinv_show_if_recurring wpinv_free_trial">
218 218
 
219 219
                 <div class="form-group row">
220
-                    <label class="col-sm-3 col-form-label" for="wpinv_trial_interval"><?php defined( 'GETPAID_PAID_TRIALS_VERSION' ) ? _e( 'Free/Paid Trial', 'invoicing' ) : _e( 'Free Trial', 'invoicing' )?></label>
220
+                    <label class="col-sm-3 col-form-label" for="wpinv_trial_interval"><?php defined('GETPAID_PAID_TRIALS_VERSION') ? _e('Free/Paid Trial', 'invoicing') : _e('Free Trial', 'invoicing')?></label>
221 221
 
222 222
                     <div class="col-sm-8">
223 223
                         <div class="row">
224 224
                             <div class="col-sm-6">
225
-                                <?php $value = $item->has_free_trial() ? $item->get_trial_interval( 'edit' ) : 0;?>
225
+                                <?php $value = $item->has_free_trial() ? $item->get_trial_interval('edit') : 0; ?>
226 226
 
227 227
                                 <div>
228
-                                    <input type="number" name="wpinv_trial_interval" style="width: 100%;" placeholder="0" id="wpinv_trial_interval" value="<?php echo esc_attr( $value ); ?>" >
228
+                                    <input type="number" name="wpinv_trial_interval" style="width: 100%;" placeholder="0" id="wpinv_trial_interval" value="<?php echo esc_attr($value); ?>" >
229 229
                                 </div>
230 230
                             </div>
231 231
                             <div class="col-sm-6">
@@ -234,17 +234,17 @@  discard block
 block discarded – undo
234 234
                                         array(
235 235
                                             'id'               => 'wpinv_trial_period',
236 236
                                             'name'             => 'wpinv_trial_period',
237
-                                            'label'            => __( 'Trial Period', 'invoicing' ),
238
-                                            'placeholder'      => __( 'Trial Period', 'invoicing' ),
239
-                                            'value'            => $item->get_trial_period( 'edit' ),
237
+                                            'label'            => __('Trial Period', 'invoicing'),
238
+                                            'placeholder'      => __('Trial Period', 'invoicing'),
239
+                                            'value'            => $item->get_trial_period('edit'),
240 240
                                             'select2'          => true,
241 241
                                             'data-allow-clear' => 'false',
242 242
                                             'no_wrap'          => true,
243 243
                                             'options'          => array(
244
-                                                'D'  => __( 'day(s)', 'invoicing' ),
245
-                                                'W'  => __( 'week(s)', 'invoicing' ),
246
-                                                'M'  => __( 'month(s)', 'invoicing' ),
247
-                                                'Y'  => __( 'year(s)', 'invoicing' ),
244
+                                                'D'  => __('day(s)', 'invoicing'),
245
+                                                'W'  => __('week(s)', 'invoicing'),
246
+                                                'M'  => __('month(s)', 'invoicing'),
247
+                                                'Y'  => __('year(s)', 'invoicing'),
248 248
                                             )
249 249
                                         )
250 250
                                     );
@@ -255,15 +255,15 @@  discard block
 block discarded – undo
255 255
                     </div>
256 256
 
257 257
                     <div class="col-sm-1 pt-2 pl-0">
258
-                        <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'An optional period of time to wait before charging the first recurring payment.', 'invoicing' ); ?>"></span>
258
+                        <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('An optional period of time to wait before charging the first recurring payment.', 'invoicing'); ?>"></span>
259 259
                     </div>
260 260
 
261 261
                 </div>
262 262
 
263 263
             </div>
264
-            <?php do_action( 'wpinv_item_details_metabox__free_trial', $item ); ?>
264
+            <?php do_action('wpinv_item_details_metabox__free_trial', $item); ?>
265 265
 
266
-            <?php do_action( 'wpinv_item_details_metabox_item_details', $item ); ?>
266
+            <?php do_action('wpinv_item_details_metabox_item_details', $item); ?>
267 267
         </div>
268 268
         <?php
269 269
 
@@ -274,31 +274,31 @@  discard block
 block discarded – undo
274 274
 	 *
275 275
 	 * @param int $post_id
276 276
 	 */
277
-	public static function save( $post_id ) {
277
+	public static function save($post_id) {
278 278
 
279 279
         // Prepare the item.
280
-        $item = new WPInv_Item( $post_id );
280
+        $item = new WPInv_Item($post_id);
281 281
 
282 282
         // Load new data.
283 283
         $item->set_props(
284 284
 			array(
285
-				'price'                => isset( $_POST['wpinv_item_price'] ) ? getpaid_standardize_amount( $_POST['wpinv_item_price'] ) : null,
286
-				'vat_rule'             => isset( $_POST['wpinv_vat_rules'] ) ? wpinv_clean( $_POST['wpinv_vat_rules'] ) : null,
287
-				'vat_class'            => isset( $_POST['wpinv_vat_class'] ) ? wpinv_clean( $_POST['wpinv_vat_class'] ) : null,
288
-				'type'                 => isset( $_POST['wpinv_item_type'] ) ? wpinv_clean( $_POST['wpinv_item_type'] ) : null,
289
-				'is_dynamic_pricing'   => ! empty( $_POST['wpinv_name_your_price'] ),
290
-                'minimum_price'        => isset( $_POST['wpinv_minimum_price'] ) ? getpaid_standardize_amount( $_POST['wpinv_minimum_price'] ) : null,
291
-				'is_recurring'         => ! empty( $_POST['wpinv_is_recurring'] ),
292
-				'recurring_period'     => isset( $_POST['wpinv_recurring_period'] ) ? wpinv_clean( $_POST['wpinv_recurring_period'] ) : null,
293
-				'recurring_interval'   => isset( $_POST['wpinv_recurring_interval'] ) ? (int) $_POST['wpinv_recurring_interval'] : 1,
294
-				'recurring_limit'      => isset( $_POST['wpinv_recurring_limit'] ) ? (int) $_POST['wpinv_recurring_limit'] : null,
295
-				'is_free_trial'        => isset( $_POST['wpinv_trial_interval'] ) ? ( 0 != (int) $_POST['wpinv_trial_interval'] ) : null,
296
-				'trial_period'         => isset( $_POST['wpinv_trial_period'] ) ? wpinv_clean( $_POST['wpinv_trial_period'] ) : null,
297
-				'trial_interval'       => isset( $_POST['wpinv_trial_interval'] ) ? (int) $_POST['wpinv_trial_interval'] : null,
285
+				'price'                => isset($_POST['wpinv_item_price']) ? getpaid_standardize_amount($_POST['wpinv_item_price']) : null,
286
+				'vat_rule'             => isset($_POST['wpinv_vat_rules']) ? wpinv_clean($_POST['wpinv_vat_rules']) : null,
287
+				'vat_class'            => isset($_POST['wpinv_vat_class']) ? wpinv_clean($_POST['wpinv_vat_class']) : null,
288
+				'type'                 => isset($_POST['wpinv_item_type']) ? wpinv_clean($_POST['wpinv_item_type']) : null,
289
+				'is_dynamic_pricing'   => !empty($_POST['wpinv_name_your_price']),
290
+                'minimum_price'        => isset($_POST['wpinv_minimum_price']) ? getpaid_standardize_amount($_POST['wpinv_minimum_price']) : null,
291
+				'is_recurring'         => !empty($_POST['wpinv_is_recurring']),
292
+				'recurring_period'     => isset($_POST['wpinv_recurring_period']) ? wpinv_clean($_POST['wpinv_recurring_period']) : null,
293
+				'recurring_interval'   => isset($_POST['wpinv_recurring_interval']) ? (int) $_POST['wpinv_recurring_interval'] : 1,
294
+				'recurring_limit'      => isset($_POST['wpinv_recurring_limit']) ? (int) $_POST['wpinv_recurring_limit'] : null,
295
+				'is_free_trial'        => isset($_POST['wpinv_trial_interval']) ? (0 != (int) $_POST['wpinv_trial_interval']) : null,
296
+				'trial_period'         => isset($_POST['wpinv_trial_period']) ? wpinv_clean($_POST['wpinv_trial_period']) : null,
297
+				'trial_interval'       => isset($_POST['wpinv_trial_interval']) ? (int) $_POST['wpinv_trial_interval'] : null,
298 298
 			)
299 299
         );
300 300
 
301 301
 		$item->save();
302
-		do_action( 'getpaid_item_metabox_save', $post_id, $item );
302
+		do_action('getpaid_item_metabox_save', $post_id, $item);
303 303
 	}
304 304
 }
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-discount-details.php 1 patch
Spacing   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if (!defined('ABSPATH')) {
11 11
 	exit; // Exit if accessed directly
12 12
 }
13 13
 
@@ -21,24 +21,24 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WP_Post $post
23 23
 	 */
24
-    public static function output( $post ) {
24
+    public static function output($post) {
25 25
 
26 26
         // Prepare the discount.
27
-        $discount = new WPInv_Discount( $post );
27
+        $discount = new WPInv_Discount($post);
28 28
 
29 29
         // Nonce field.
30
-        wp_nonce_field( 'getpaid_meta_nonce', 'getpaid_meta_nonce' );
30
+        wp_nonce_field('getpaid_meta_nonce', 'getpaid_meta_nonce');
31 31
 
32
-        do_action( 'wpinv_discount_form_top', $discount );
32
+        do_action('wpinv_discount_form_top', $discount);
33 33
 
34 34
         // Set the currency position.
35 35
         $position = wpinv_currency_position();
36 36
 
37
-        if ( $position == 'left_space' ) {
37
+        if ($position == 'left_space') {
38 38
             $position = 'left';
39 39
         }
40 40
 
41
-        if ( $position == 'right_space' ) {
41
+        if ($position == 'right_space') {
42 42
             $position = 'right';
43 43
         }
44 44
 
@@ -52,66 +52,66 @@  discard block
 block discarded – undo
52 52
         </style>
53 53
         <div class='bsui' style='max-width: 600px;padding-top: 10px;'>
54 54
 
55
-            <?php do_action( 'wpinv_discount_form_first', $discount ); ?>
55
+            <?php do_action('wpinv_discount_form_first', $discount); ?>
56 56
 
57
-            <?php do_action( 'wpinv_discount_form_before_code', $discount ); ?>
57
+            <?php do_action('wpinv_discount_form_before_code', $discount); ?>
58 58
             <div class="form-group row">
59 59
                 <label for="wpinv_discount_code" class="col-sm-3 col-form-label">
60
-                    <?php _e( 'Discount Code', 'invoicing' );?>
60
+                    <?php _e('Discount Code', 'invoicing'); ?>
61 61
                 </label>
62 62
                 <div class="col-sm-8">
63 63
                     <div class="row">
64 64
                         <div class="col-sm-12 form-group">
65
-                            <input type="text" value="<?php echo esc_attr( $discount->get_code( 'edit' ) ); ?>" placeholder="SUMMER_SALE" name="wpinv_discount_code" id="wpinv_discount_code" style="width: 100%;" />
65
+                            <input type="text" value="<?php echo esc_attr($discount->get_code('edit')); ?>" placeholder="SUMMER_SALE" name="wpinv_discount_code" id="wpinv_discount_code" style="width: 100%;" />
66 66
                         </div>
67 67
                         <div class="col-sm-12">
68 68
                             <?php
69
-                                do_action( 'wpinv_discount_form_before_single_use', $discount );
69
+                                do_action('wpinv_discount_form_before_single_use', $discount);
70 70
 
71 71
                                 echo aui()->input(
72 72
                                     array(
73 73
                                         'id'          => 'wpinv_discount_single_use',
74 74
                                         'name'        => 'wpinv_discount_single_use',
75 75
                                         'type'        => 'checkbox',
76
-                                        'label'       => __( 'Each customer can only use this discount once', 'invoicing' ),
76
+                                        'label'       => __('Each customer can only use this discount once', 'invoicing'),
77 77
                                         'value'       => '1',
78 78
                                         'checked'     => $discount->is_single_use(),
79 79
                                     )
80 80
                                 );
81 81
 
82
-                                do_action( 'wpinv_discount_form_single_use', $discount );
82
+                                do_action('wpinv_discount_form_single_use', $discount);
83 83
                             ?>
84 84
                         </div>
85 85
                         <div class="col-sm-12">
86 86
                             <?php
87
-                                do_action( 'wpinv_discount_form_before_recurring', $discount );
87
+                                do_action('wpinv_discount_form_before_recurring', $discount);
88 88
 
89 89
                                 echo aui()->input(
90 90
                                     array(
91 91
                                         'id'          => 'wpinv_discount_recurring',
92 92
                                         'name'        => 'wpinv_discount_recurring',
93 93
                                         'type'        => 'checkbox',
94
-                                        'label'       => __( 'Apply this discount to all recurring payments for subscriptions', 'invoicing' ),
94
+                                        'label'       => __('Apply this discount to all recurring payments for subscriptions', 'invoicing'),
95 95
                                         'value'       => '1',
96 96
                                         'checked'     => $discount->is_recurring(),
97 97
                                     )
98 98
                                 );
99 99
 
100
-                                do_action( 'wpinv_discount_form_recurring', $discount );
100
+                                do_action('wpinv_discount_form_recurring', $discount);
101 101
                             ?>
102 102
                         </div>
103 103
                     </div>
104 104
                 </div>
105 105
                 <div class="col-sm-1 pt-2 pl-0">
106
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Enter a discount code such as 10OFF.', 'invoicing' ); ?>"></span>
106
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Enter a discount code such as 10OFF.', 'invoicing'); ?>"></span>
107 107
                 </div>
108 108
             </div>
109
-            <?php do_action( 'wpinv_discount_form_code', $discount ); ?>
109
+            <?php do_action('wpinv_discount_form_code', $discount); ?>
110 110
 
111
-            <?php do_action( 'wpinv_discount_form_before_type', $discount ); ?>
111
+            <?php do_action('wpinv_discount_form_before_type', $discount); ?>
112 112
             <div class="form-group row">
113 113
                 <label for="wpinv_discount_type" class="col-sm-3 col-form-label">
114
-                    <?php _e( 'Discount Type', 'invoicing' );?>
114
+                    <?php _e('Discount Type', 'invoicing'); ?>
115 115
                 </label>
116 116
                 <div class="col-sm-8">
117 117
                     <?php
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
                             array(
120 120
                                 'id'               => 'wpinv_discount_type',
121 121
                                 'name'             => 'wpinv_discount_type',
122
-                                'label'            => __( 'Discount Type', 'invoicing' ),
123
-                                'placeholder'      => __( 'Select Discount Type', 'invoicing' ),
124
-                                'value'            => $discount->get_type( 'edit' ),
122
+                                'label'            => __('Discount Type', 'invoicing'),
123
+                                'placeholder'      => __('Select Discount Type', 'invoicing'),
124
+                                'value'            => $discount->get_type('edit'),
125 125
                                 'select2'          => true,
126 126
                                 'data-allow-clear' => 'false',
127 127
                                 'options'          => wpinv_get_discount_types()
@@ -130,19 +130,19 @@  discard block
 block discarded – undo
130 130
                     ?>
131 131
                 </div>
132 132
                 <div class="col-sm-1 pt-2 pl-0">
133
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Discount type.', 'invoicing' ); ?>"></span>
133
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Discount type.', 'invoicing'); ?>"></span>
134 134
                 </div>
135 135
             </div>
136
-            <?php do_action( 'wpinv_discount_form_type', $discount ); ?>
136
+            <?php do_action('wpinv_discount_form_type', $discount); ?>
137 137
 
138
-            <?php do_action( 'wpinv_discount_form_before_amount', $discount ); ?>
139
-            <div class="form-group row <?php echo esc_attr( $discount->get_type( 'edit' ) ); ?>" id="wpinv_discount_amount_wrap">
138
+            <?php do_action('wpinv_discount_form_before_amount', $discount); ?>
139
+            <div class="form-group row <?php echo esc_attr($discount->get_type('edit')); ?>" id="wpinv_discount_amount_wrap">
140 140
                 <label for="wpinv_discount_amount" class="col-sm-3 col-form-label">
141
-                    <?php _e( 'Discount Amount', 'invoicing' );?>
141
+                    <?php _e('Discount Amount', 'invoicing'); ?>
142 142
                 </label>
143 143
                 <div class="col-sm-8">
144 144
                     <div class="input-group input-group-sm">
145
-                        <?php if( 'left' == $position ) : ?>
145
+                        <?php if ('left' == $position) : ?>
146 146
                             <div class="input-group-prepend left wpinv-if-flat">
147 147
                                 <span class="input-group-text">
148 148
                                     <?php echo wpinv_currency_symbol(); ?>
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
                             </div>
151 151
                         <?php endif; ?>
152 152
 
153
-                        <input type="text" name="wpinv_discount_amount" id="wpinv_discount_amount" value="<?php echo esc_attr( $discount->get_amount( 'edit' ) ); ?>" placeholder="0" class="form-control">
153
+                        <input type="text" name="wpinv_discount_amount" id="wpinv_discount_amount" value="<?php echo esc_attr($discount->get_amount('edit')); ?>" placeholder="0" class="form-control">
154 154
 
155
-                        <?php if( 'right' == $position ) : ?>
155
+                        <?php if ('right' == $position) : ?>
156 156
                             <div class="input-group-prepend left wpinv-if-flat">
157 157
                                 <span class="input-group-text">
158 158
                                     <?php echo wpinv_currency_symbol(); ?>
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
                     </div>
166 166
                 </div>
167 167
                 <div class="col-sm-1 pt-2 pl-0">
168
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Enter the discount value. Ex: 10', 'invoicing' ); ?>"></span>
168
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Enter the discount value. Ex: 10', 'invoicing'); ?>"></span>
169 169
                 </div>
170 170
             </div>
171
-            <?php do_action( 'wpinv_discount_form_amount', $discount ); ?>
171
+            <?php do_action('wpinv_discount_form_amount', $discount); ?>
172 172
 
173
-            <?php do_action( 'wpinv_discount_form_before_items', $discount ); ?>
173
+            <?php do_action('wpinv_discount_form_before_items', $discount); ?>
174 174
             <div class="form-group row">
175 175
                 <label for="wpinv_discount_items" class="col-sm-3 col-form-label">
176
-                    <?php _e( 'Items', 'invoicing' );?>
176
+                    <?php _e('Items', 'invoicing'); ?>
177 177
                 </label>
178 178
                 <div class="col-sm-8">
179 179
                     <?php
@@ -181,9 +181,9 @@  discard block
 block discarded – undo
181 181
                             array(
182 182
                                 'id'               => 'wpinv_discount_items',
183 183
                                 'name'             => 'wpinv_discount_items[]',
184
-                                'label'            => __( 'Items', 'invoicing' ),
185
-                                'placeholder'      => __( 'Select Items', 'invoicing' ),
186
-                                'value'            => $discount->get_items( 'edit' ),
184
+                                'label'            => __('Items', 'invoicing'),
185
+                                'placeholder'      => __('Select Items', 'invoicing'),
186
+                                'value'            => $discount->get_items('edit'),
187 187
                                 'select2'          => true,
188 188
                                 'multiple'         => true,
189 189
                                 'data-allow-clear' => 'false',
@@ -193,15 +193,15 @@  discard block
 block discarded – undo
193 193
                     ?>
194 194
                 </div>
195 195
                 <div class="col-sm-1 pt-2 pl-0">
196
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Select the items that are allowed to use this discount or leave blank to use this discount all items.', 'invoicing' ); ?>"></span>
196
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Select the items that are allowed to use this discount or leave blank to use this discount all items.', 'invoicing'); ?>"></span>
197 197
                 </div>
198 198
             </div>
199
-            <?php do_action( 'wpinv_discount_form_items', $discount ); ?>
199
+            <?php do_action('wpinv_discount_form_items', $discount); ?>
200 200
 
201
-            <?php do_action( 'wpinv_discount_form_before_excluded_items', $discount ); ?>
201
+            <?php do_action('wpinv_discount_form_before_excluded_items', $discount); ?>
202 202
             <div class="form-group row">
203 203
                 <label for="wpinv_discount_excluded_items" class="col-sm-3 col-form-label">
204
-                    <?php _e( 'Excluded Items', 'invoicing' );?>
204
+                    <?php _e('Excluded Items', 'invoicing'); ?>
205 205
                 </label>
206 206
                 <div class="col-sm-8">
207 207
                     <?php
@@ -209,9 +209,9 @@  discard block
 block discarded – undo
209 209
                             array(
210 210
                                 'id'               => 'wpinv_discount_excluded_items',
211 211
                                 'name'             => 'wpinv_discount_excluded_items[]',
212
-                                'label'            => __( 'Excluded Items', 'invoicing' ),
213
-                                'placeholder'      => __( 'Select Items', 'invoicing' ),
214
-                                'value'            => $discount->get_excluded_items( 'edit' ),
212
+                                'label'            => __('Excluded Items', 'invoicing'),
213
+                                'placeholder'      => __('Select Items', 'invoicing'),
214
+                                'value'            => $discount->get_excluded_items('edit'),
215 215
                                 'select2'          => true,
216 216
                                 'multiple'         => true,
217 217
                                 'data-allow-clear' => 'false',
@@ -221,15 +221,15 @@  discard block
 block discarded – undo
221 221
                     ?>
222 222
                 </div>
223 223
                 <div class="col-sm-1 pt-2 pl-0">
224
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Select all the items that are not allowed to use this discount.', 'invoicing' ); ?>"></span>
224
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Select all the items that are not allowed to use this discount.', 'invoicing'); ?>"></span>
225 225
                 </div>
226 226
             </div>
227
-            <?php do_action( 'wpinv_discount_form_excluded_items', $discount ); ?>
227
+            <?php do_action('wpinv_discount_form_excluded_items', $discount); ?>
228 228
 
229
-            <?php do_action( 'wpinv_discount_form_before_required_items', $discount ); ?>
229
+            <?php do_action('wpinv_discount_form_before_required_items', $discount); ?>
230 230
             <div class="form-group row">
231 231
                 <label for="wpinv_discount_required_items" class="col-sm-3 col-form-label">
232
-                    <?php _e( 'Required Items', 'invoicing' );?>
232
+                    <?php _e('Required Items', 'invoicing'); ?>
233 233
                 </label>
234 234
                 <div class="col-sm-8">
235 235
                     <?php
@@ -237,9 +237,9 @@  discard block
 block discarded – undo
237 237
                             array(
238 238
                                 'id'               => 'wpinv_discount_required_items',
239 239
                                 'name'             => 'wpinv_discount_required_items[]',
240
-                                'label'            => __( 'Required Items', 'invoicing' ),
241
-                                'placeholder'      => __( 'Select Items', 'invoicing' ),
242
-                                'value'            => $discount->get_required_items( 'edit' ),
240
+                                'label'            => __('Required Items', 'invoicing'),
241
+                                'placeholder'      => __('Select Items', 'invoicing'),
242
+                                'value'            => $discount->get_required_items('edit'),
243 243
                                 'select2'          => true,
244 244
                                 'multiple'         => true,
245 245
                                 'data-allow-clear' => 'false',
@@ -249,15 +249,15 @@  discard block
 block discarded – undo
249 249
                     ?>
250 250
                 </div>
251 251
                 <div class="col-sm-1 pt-2 pl-0">
252
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Select all the items that are required to be in the cart before using this discount.', 'invoicing' ); ?>"></span>
252
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Select all the items that are required to be in the cart before using this discount.', 'invoicing'); ?>"></span>
253 253
                 </div>
254 254
             </div>
255
-            <?php do_action( 'wpinv_discount_form_required_items', $discount ); ?>
255
+            <?php do_action('wpinv_discount_form_required_items', $discount); ?>
256 256
 
257
-            <?php do_action( 'wpinv_discount_form_before_start', $discount ); ?>
257
+            <?php do_action('wpinv_discount_form_before_start', $discount); ?>
258 258
             <div class="form-group row">
259 259
                 <label for="wpinv_discount_start" class="col-sm-3 col-form-label">
260
-                    <?php _e( 'Start Date', 'invoicing' );?>
260
+                    <?php _e('Start Date', 'invoicing'); ?>
261 261
                 </label>
262 262
                 <div class="col-sm-8">
263 263
                     <?php
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
                                 'type'        => 'datepicker',
267 267
                                 'id'          => 'wpinv_discount_start',
268 268
                                 'name'        => 'wpinv_discount_start',
269
-                                'label'       => __( 'Start Date', 'invoicing' ),
269
+                                'label'       => __('Start Date', 'invoicing'),
270 270
                                 'placeholder' => 'YYYY-MM-DD 00:00',
271 271
                                 'class'       => 'form-control-sm',
272
-                                'value'       => $discount->get_start_date( 'edit' ),
272
+                                'value'       => $discount->get_start_date('edit'),
273 273
                                 'extra_attributes' => array(
274 274
                                     'data-enable-time' => 'true',
275 275
                                     'data-time_24hr'   => 'true',
@@ -280,15 +280,15 @@  discard block
 block discarded – undo
280 280
                     ?>
281 281
                 </div>
282 282
                 <div class="col-sm-1 pt-2 pl-0">
283
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'For no start date, leave blank. If entered, the discount can only be used after or on this date.', 'invoicing' ); ?>"></span>
283
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('For no start date, leave blank. If entered, the discount can only be used after or on this date.', 'invoicing'); ?>"></span>
284 284
                 </div>
285 285
             </div>
286
-            <?php do_action( 'wpinv_discount_form_start', $discount ); ?>
286
+            <?php do_action('wpinv_discount_form_start', $discount); ?>
287 287
 
288
-            <?php do_action( 'wpinv_discount_form_before_expiration', $discount ); ?>
288
+            <?php do_action('wpinv_discount_form_before_expiration', $discount); ?>
289 289
             <div class="form-group row">
290 290
                 <label for="wpinv_discount_expiration" class="col-sm-3 col-form-label">
291
-                    <?php _e( 'Expiration Date', 'invoicing' );?>
291
+                    <?php _e('Expiration Date', 'invoicing'); ?>
292 292
                 </label>
293 293
                 <div class="col-sm-8">
294 294
                     <?php
@@ -297,10 +297,10 @@  discard block
 block discarded – undo
297 297
                                 'type'        => 'datepicker',
298 298
                                 'id'          => 'wpinv_discount_expiration',
299 299
                                 'name'        => 'wpinv_discount_expiration',
300
-                                'label'       => __( 'Expiration Date', 'invoicing' ),
300
+                                'label'       => __('Expiration Date', 'invoicing'),
301 301
                                 'placeholder' => 'YYYY-MM-DD 00:00',
302 302
                                 'class'       => 'form-control-sm',
303
-                                'value'       => $discount->get_end_date( 'edit' ),
303
+                                'value'       => $discount->get_end_date('edit'),
304 304
                                 'extra_attributes' => array(
305 305
                                     'data-enable-time' => 'true',
306 306
                                     'data-time_24hr'   => 'true',
@@ -313,27 +313,27 @@  discard block
 block discarded – undo
313 313
                     ?>
314 314
                 </div>
315 315
                 <div class="col-sm-1 pt-2 pl-0">
316
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Optionally set the date after which the discount will expire.', 'invoicing' ); ?>"></span>
316
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Optionally set the date after which the discount will expire.', 'invoicing'); ?>"></span>
317 317
                 </div>
318 318
             </div>
319
-            <?php do_action( 'wpinv_discount_form_expiration', $discount ); ?>
319
+            <?php do_action('wpinv_discount_form_expiration', $discount); ?>
320 320
 
321
-            <?php do_action( 'wpinv_discount_form_before_min_total', $discount ); ?>
321
+            <?php do_action('wpinv_discount_form_before_min_total', $discount); ?>
322 322
             <div class="form-group row">
323 323
                 <label for="wpinv_discount_min_total" class="col-sm-3 col-form-label">
324
-                    <?php _e( 'Minimum Amount', 'invoicing' );?>
324
+                    <?php _e('Minimum Amount', 'invoicing'); ?>
325 325
                 </label>
326 326
                 <div class="col-sm-8">
327 327
                     <div class="input-group input-group-sm">
328
-                        <?php if( 'left' == $position ) : ?>
328
+                        <?php if ('left' == $position) : ?>
329 329
                             <div class="input-group-prepend">
330 330
                                 <span class="input-group-text"><?php echo wpinv_currency_symbol(); ?></span>
331 331
                             </div>
332 332
                         <?php endif; ?>
333 333
 
334
-                        <input type="text" name="wpinv_discount_min_total" id="wpinv_discount_min_total" value="<?php echo esc_attr( $discount->get_minimum_total( 'edit' ) ); ?>" placeholder="<?php esc_attr_e( 'No minimum', 'invoicing' ); ?>" class="form-control">
334
+                        <input type="text" name="wpinv_discount_min_total" id="wpinv_discount_min_total" value="<?php echo esc_attr($discount->get_minimum_total('edit')); ?>" placeholder="<?php esc_attr_e('No minimum', 'invoicing'); ?>" class="form-control">
335 335
 
336
-                        <?php if( 'left' != $position ) : ?>
336
+                        <?php if ('left' != $position) : ?>
337 337
                             <div class="input-group-append">
338 338
                                 <span class="input-group-text"><?php echo wpinv_currency_symbol(); ?></span>
339 339
                             </div>
@@ -341,27 +341,27 @@  discard block
 block discarded – undo
341 341
                     </div>
342 342
                 </div>
343 343
                 <div class="col-sm-1 pt-2 pl-0">
344
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Optionally set the minimum amount (including taxes) required to use this discount.', 'invoicing' ); ?>"></span>
344
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Optionally set the minimum amount (including taxes) required to use this discount.', 'invoicing'); ?>"></span>
345 345
                 </div>
346 346
             </div>
347
-            <?php do_action( 'wpinv_discount_form_min_total', $discount ); ?>
347
+            <?php do_action('wpinv_discount_form_min_total', $discount); ?>
348 348
 
349
-            <?php do_action( 'wpinv_discount_form_before_max_total', $discount ); ?>
349
+            <?php do_action('wpinv_discount_form_before_max_total', $discount); ?>
350 350
             <div class="form-group row">
351 351
                 <label for="wpinv_discount_max_total" class="col-sm-3 col-form-label">
352
-                    <?php _e( 'Maximum Amount', 'invoicing' );?>
352
+                    <?php _e('Maximum Amount', 'invoicing'); ?>
353 353
                 </label>
354 354
                 <div class="col-sm-8">
355 355
                     <div class="input-group input-group-sm">
356
-                        <?php if( 'left' == $position ) : ?>
356
+                        <?php if ('left' == $position) : ?>
357 357
                             <div class="input-group-prepend">
358 358
                                 <span class="input-group-text"><?php echo wpinv_currency_symbol(); ?></span>
359 359
                             </div>
360 360
                         <?php endif; ?>
361 361
 
362
-                        <input type="text" name="wpinv_discount_max_total" id="wpinv_discount_max_total" value="<?php echo esc_attr( $discount->get_maximum_total( 'edit' ) ); ?>" placeholder="<?php esc_attr_e( 'No maximum', 'invoicing' ); ?>" class="form-control">
362
+                        <input type="text" name="wpinv_discount_max_total" id="wpinv_discount_max_total" value="<?php echo esc_attr($discount->get_maximum_total('edit')); ?>" placeholder="<?php esc_attr_e('No maximum', 'invoicing'); ?>" class="form-control">
363 363
 
364
-                        <?php if( 'left' != $position ) : ?>
364
+                        <?php if ('left' != $position) : ?>
365 365
                             <div class="input-group-append">
366 366
                                 <span class="input-group-text"><?php echo wpinv_currency_symbol(); ?></span>
367 367
                             </div>
@@ -369,30 +369,30 @@  discard block
 block discarded – undo
369 369
                     </div>
370 370
                 </div>
371 371
                 <div class="col-sm-1 pt-2 pl-0">
372
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Optionally set the maximum amount (including taxes) allowed when using this discount.', 'invoicing' ); ?>"></span>
372
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Optionally set the maximum amount (including taxes) allowed when using this discount.', 'invoicing'); ?>"></span>
373 373
                 </div>
374 374
             </div>
375
-            <?php do_action( 'wpinv_discount_form_before_max_total', $discount ); ?>
375
+            <?php do_action('wpinv_discount_form_before_max_total', $discount); ?>
376 376
 
377
-            <?php do_action( 'wpinv_discount_form_before_max_uses', $discount ); ?>
377
+            <?php do_action('wpinv_discount_form_before_max_uses', $discount); ?>
378 378
             <div class="form-group row">
379 379
                 <label for="wpinv_discount_max_uses" class="col-sm-3 col-form-label">
380
-                    <?php _e( 'Maximum Uses', 'invoicing' );?>
380
+                    <?php _e('Maximum Uses', 'invoicing'); ?>
381 381
                 </label>
382 382
                 <div class="col-sm-8">
383
-                    <input type="text" value="<?php echo esc_attr( $discount->get_max_uses( 'edit' ) ); ?>" placeholder="<?php esc_attr_e( 'Unlimited', 'invoicing' ); ?>" name="wpinv_discount_max_uses" id="wpinv_discount_max_uses" style="width: 100%;" />
383
+                    <input type="text" value="<?php echo esc_attr($discount->get_max_uses('edit')); ?>" placeholder="<?php esc_attr_e('Unlimited', 'invoicing'); ?>" name="wpinv_discount_max_uses" id="wpinv_discount_max_uses" style="width: 100%;" />
384 384
                 </div>
385 385
                 <div class="col-sm-1 pt-2 pl-0">
386
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Optionally set the maximum number of times that this discount code can be used.', 'invoicing' ); ?>"></span>
386
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Optionally set the maximum number of times that this discount code can be used.', 'invoicing'); ?>"></span>
387 387
                 </div>
388 388
             </div>
389
-            <?php do_action( 'wpinv_discount_form_max_uses', $discount ); ?>
389
+            <?php do_action('wpinv_discount_form_max_uses', $discount); ?>
390 390
 
391
-            <?php do_action( 'wpinv_discount_form_last', $discount ); ?>
391
+            <?php do_action('wpinv_discount_form_last', $discount); ?>
392 392
 
393 393
         </div>
394 394
         <?php
395
-        do_action( 'wpinv_discount_form_bottom', $post );
395
+        do_action('wpinv_discount_form_bottom', $post);
396 396
     }
397 397
 
398 398
     /**
@@ -400,31 +400,31 @@  discard block
 block discarded – undo
400 400
 	 *
401 401
 	 * @param int $post_id
402 402
 	 */
403
-	public static function save( $post_id ) {
403
+	public static function save($post_id) {
404 404
 
405 405
         // Prepare the discount.
406
-        $discount = new WPInv_Discount( $post_id );
406
+        $discount = new WPInv_Discount($post_id);
407 407
 
408 408
         // Load new data.
409 409
         $discount->set_props(
410 410
 			array(
411
-				'code'                 => isset( $_POST['wpinv_discount_code'] ) ? wpinv_clean( $_POST['wpinv_discount_code'] ) : null,
412
-				'amount'               => isset( $_POST['wpinv_discount_amount'] ) ? floatval( $_POST['wpinv_discount_amount'] ) : null,
413
-				'start'                => isset( $_POST['wpinv_discount_start'] ) ? wpinv_clean( $_POST['wpinv_discount_start'] ) : null,
414
-				'expiration'           => isset( $_POST['wpinv_discount_expiration'] ) ? wpinv_clean( $_POST['wpinv_discount_expiration'] ) : null,
415
-				'is_single_use'        => ! empty( $_POST['wpinv_discount_single_use'] ),
416
-                'type'                 => isset( $_POST['wpinv_discount_type'] ) ? wpinv_clean( $_POST['wpinv_discount_type'] ) : null,
417
-				'is_recurring'         => ! empty( $_POST['wpinv_discount_recurring'] ),
418
-				'items'                => isset( $_POST['wpinv_discount_items'] ) ? wpinv_clean( $_POST['wpinv_discount_items'] ) : array(),
419
-				'excluded_items'       => isset( $_POST['wpinv_discount_excluded_items'] ) ? wpinv_clean( $_POST['wpinv_discount_excluded_items'] ) : array(),
420
-                'required_items'       => isset( $_POST['wpinv_discount_required_items'] ) ? wpinv_clean( $_POST['wpinv_discount_required_items'] ) : array(),
421
-				'max_uses'             => isset( $_POST['wpinv_discount_max_uses'] ) ? intval( $_POST['wpinv_discount_max_uses'] ) : null,
422
-				'min_total'            => isset( $_POST['wpinv_discount_min_total'] ) ? floatval( $_POST['wpinv_discount_min_total'] ) : null,
423
-				'max_total'            => isset( $_POST['wpinv_discount_max_total'] ) ? floatval( $_POST['wpinv_discount_max_total'] ) : null,
411
+				'code'                 => isset($_POST['wpinv_discount_code']) ? wpinv_clean($_POST['wpinv_discount_code']) : null,
412
+				'amount'               => isset($_POST['wpinv_discount_amount']) ? floatval($_POST['wpinv_discount_amount']) : null,
413
+				'start'                => isset($_POST['wpinv_discount_start']) ? wpinv_clean($_POST['wpinv_discount_start']) : null,
414
+				'expiration'           => isset($_POST['wpinv_discount_expiration']) ? wpinv_clean($_POST['wpinv_discount_expiration']) : null,
415
+				'is_single_use'        => !empty($_POST['wpinv_discount_single_use']),
416
+                'type'                 => isset($_POST['wpinv_discount_type']) ? wpinv_clean($_POST['wpinv_discount_type']) : null,
417
+				'is_recurring'         => !empty($_POST['wpinv_discount_recurring']),
418
+				'items'                => isset($_POST['wpinv_discount_items']) ? wpinv_clean($_POST['wpinv_discount_items']) : array(),
419
+				'excluded_items'       => isset($_POST['wpinv_discount_excluded_items']) ? wpinv_clean($_POST['wpinv_discount_excluded_items']) : array(),
420
+                'required_items'       => isset($_POST['wpinv_discount_required_items']) ? wpinv_clean($_POST['wpinv_discount_required_items']) : array(),
421
+				'max_uses'             => isset($_POST['wpinv_discount_max_uses']) ? intval($_POST['wpinv_discount_max_uses']) : null,
422
+				'min_total'            => isset($_POST['wpinv_discount_min_total']) ? floatval($_POST['wpinv_discount_min_total']) : null,
423
+				'max_total'            => isset($_POST['wpinv_discount_max_total']) ? floatval($_POST['wpinv_discount_max_total']) : null,
424 424
 			)
425 425
         );
426 426
 
427 427
 		$discount->save();
428
-		do_action( 'getpaid_discount_metabox_save', $post_id, $discount );
428
+		do_action('getpaid_discount_metabox_save', $post_id, $discount);
429 429
 	}
430 430
 }
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-invoice-payment-meta.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if (!defined('ABSPATH')) {
11 11
 	exit; // Exit if accessed directly
12 12
 }
13 13
 
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WP_Post $post
23 23
 	 */
24
-    public static function output( $post ) {
24
+    public static function output($post) {
25 25
 
26 26
         // Prepare the invoice.
27
-        $invoice = new WPInv_Invoice( $post );
27
+        $invoice = new WPInv_Invoice($post);
28 28
 
29 29
         ?>
30 30
 
@@ -40,20 +40,20 @@  discard block
 block discarded – undo
40 40
 
41 41
                     <?php
42 42
 
43
-                        if ( $invoice->is_draft() ) {
43
+                        if ($invoice->is_draft()) {
44 44
 
45 45
                             // Set gateway.
46 46
                             echo aui()->select(
47 47
                                 array(
48 48
                                     'id'               => 'wpinv_gateway',
49 49
                                     'name'             => 'wpinv_gateway',
50
-                                    'label'            => __( 'Gateway:', 'invoicing' ),
50
+                                    'label'            => __('Gateway:', 'invoicing'),
51 51
                                     'label_type'       => 'vertical',
52
-                                    'placeholder'      => __( 'Select Gateway', 'invoicing' ),
52
+                                    'placeholder'      => __('Select Gateway', 'invoicing'),
53 53
                                     'value'            => wpinv_get_default_gateway(),
54 54
                                     'select2'          => true,
55 55
                                     'data-allow-clear' => 'false',
56
-                                    'options'          => wp_list_pluck( wpinv_get_enabled_payment_gateways( true ), 'admin_label' ),
56
+                                    'options'          => wp_list_pluck(wpinv_get_enabled_payment_gateways(true), 'admin_label'),
57 57
                                 )
58 58
                             );
59 59
 
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
                                     'id'          => 'wpinv_key',
66 66
                                     'name'        => 'wpinv_key',
67 67
                                     'label'       => sprintf(
68
-                                        __( '%s Key:', 'invoicing' ),
69
-                                        ucfirst( $invoice->get_invoice_quote_type() )
68
+                                        __('%s Key:', 'invoicing'),
69
+                                        ucfirst($invoice->get_invoice_quote_type())
70 70
                                     ),
71 71
                                     'label_type'  => 'vertical',
72 72
                                     'class'       => 'form-control-sm',
73
-                                    'value'       => $invoice->get_key( 'edit' ),
73
+                                    'value'       => $invoice->get_key('edit'),
74 74
                                     'extra_attributes' => array(
75 75
                                         'onclick'  => 'this.select();',
76 76
                                         'readonly' => 'true',
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
                                     'id'          => 'wpinv_view_url',
86 86
                                     'name'        => 'wpinv_view_url',
87 87
                                     'label'       => sprintf(
88
-                                        __( '%s URL:', 'invoicing' ),
89
-                                        ucfirst( $invoice->get_invoice_quote_type() )
90
-                                    ) . '&nbsp;<a href="' . esc_url_raw( $invoice->get_view_url() ) . '" title="' . __( 'View invoice', 'invoicing' ) . '" target="_blank"><i class="fas fa-external-link-alt fa-fw"></i></a>',
88
+                                        __('%s URL:', 'invoicing'),
89
+                                        ucfirst($invoice->get_invoice_quote_type())
90
+                                    ) . '&nbsp;<a href="' . esc_url_raw($invoice->get_view_url()) . '" title="' . __('View invoice', 'invoicing') . '" target="_blank"><i class="fas fa-external-link-alt fa-fw"></i></a>',
91 91
                                     'label_type'  => 'vertical',
92 92
                                     'class'       => 'form-control-sm',
93 93
                                     'value'       => $invoice->get_view_url(),
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                             );
100 100
 
101 101
                             // If the invoice is paid...
102
-                            if ( $invoice->is_paid() || $invoice->is_refunded() ) {
102
+                            if ($invoice->is_paid() || $invoice->is_refunded()) {
103 103
 
104 104
                                 // Gateway.
105 105
                                 echo aui()->input(
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
                                         'type'        => 'text',
108 108
                                         'id'          => 'wpinv_gateway',
109 109
                                         'name'        => '',
110
-                                        'label'       => __( 'Gateway:', 'invoicing' ),
110
+                                        'label'       => __('Gateway:', 'invoicing'),
111 111
                                         'label_type'  => 'vertical',
112 112
                                         'class'       => 'form-control-sm',
113
-                                        'value'       => wpinv_get_gateway_admin_label( $invoice->get_gateway( 'edit' ) ),
113
+                                        'value'       => wpinv_get_gateway_admin_label($invoice->get_gateway('edit')),
114 114
                                         'extra_attributes' => array(
115 115
                                             'onclick'  => 'this.select();',
116 116
                                             'readonly' => 'true',
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
                                         'type'        => 'text',
126 126
                                         'id'          => 'wpinv_transaction_id',
127 127
                                         'name'        => 'wpinv_transaction_id',
128
-                                        'label'       => __( 'Transaction ID:', 'invoicing' ) . ( $transaction_url ? '&nbsp;<a href="' . esc_url( $transaction_url ) . '" title="' . __( 'View details', 'invoicing' ) . '" target="_blank"><i class="fas fa-external-link-alt fa-fw"></i></a>' : '' ),
128
+                                        'label'       => __('Transaction ID:', 'invoicing') . ($transaction_url ? '&nbsp;<a href="' . esc_url($transaction_url) . '" title="' . __('View details', 'invoicing') . '" target="_blank"><i class="fas fa-external-link-alt fa-fw"></i></a>' : ''),
129 129
                                         'label_type'  => 'vertical',
130 130
                                         'class'       => 'form-control-sm',
131
-                                        'value'       => $invoice->get_transaction_id( 'edit' ),
132
-                                        'help_text'   => apply_filters( 'wpinv_invoice_transaction_link_' . $invoice->get_gateway( 'edit' ), '', $invoice->get_transaction_id(), $invoice ),
131
+                                        'value'       => $invoice->get_transaction_id('edit'),
132
+                                        'help_text'   => apply_filters('wpinv_invoice_transaction_link_' . $invoice->get_gateway('edit'), '', $invoice->get_transaction_id(), $invoice),
133 133
                                         'extra_attributes' => array(
134 134
                                             'onclick'  => 'this.select();',
135 135
                                             'readonly' => 'true',
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
                                         'type'        => 'text',
144 144
                                         'id'          => 'wpinv_currency',
145 145
                                         'name'        => 'wpinv_currency',
146
-                                        'label'       => __( 'Currency:', 'invoicing' ),
146
+                                        'label'       => __('Currency:', 'invoicing'),
147 147
                                         'label_type'  => 'vertical',
148 148
                                         'class'       => 'form-control-sm',
149
-                                        'value'       => $invoice->get_currency( 'edit' ),
149
+                                        'value'       => $invoice->get_currency('edit'),
150 150
                                         'extra_attributes' => array(
151 151
                                             'onclick'  => 'this.select();',
152 152
                                             'readonly' => 'true',
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
                             } else {
158 158
 
159
-                                if ( 'wpi_invoice' == $invoice->get_post_type() ) {
159
+                                if ('wpi_invoice' == $invoice->get_post_type()) {
160 160
 
161 161
                                     // Payment URL.
162 162
                                     echo aui()->input(
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                                             'type'        => 'text',
165 165
                                             'id'          => 'wpinv_payment_url',
166 166
                                             'name'        => 'wpinv_payment_url',
167
-                                            'label'       => __( 'Payment URL:', 'invoicing' ),
167
+                                            'label'       => __('Payment URL:', 'invoicing'),
168 168
                                             'label_type'  => 'vertical',
169 169
                                             'class'       => 'form-control-sm',
170 170
                                             'value'       => $invoice->get_checkout_payment_url(),
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
                                         array(
181 181
                                             'id'               => 'wpinv_gateway',
182 182
                                             'name'             => 'wpinv_gateway',
183
-                                            'label'            => __( 'Gateway:', 'invoicing' ),
183
+                                            'label'            => __('Gateway:', 'invoicing'),
184 184
                                             'label_type'       => 'vertical',
185
-                                            'placeholder'      => __( 'Select Gateway', 'invoicing' ),
186
-                                            'value'            => $invoice->get_gateway( 'edit' ),
185
+                                            'placeholder'      => __('Select Gateway', 'invoicing'),
186
+                                            'value'            => $invoice->get_gateway('edit'),
187 187
                                             'select2'          => true,
188 188
                                             'data-allow-clear' => 'false',
189
-                                            'options'          => wp_list_pluck( wpinv_get_enabled_payment_gateways( true ), 'admin_label' ),
189
+                                            'options'          => wp_list_pluck(wpinv_get_enabled_payment_gateways(true), 'admin_label'),
190 190
                                         )
191 191
                                     );
192 192
 
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-invoice-address.php 1 patch
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if (!defined('ABSPATH')) {
11 11
 	exit; // Exit if accessed directly
12 12
 }
13 13
 
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WP_Post $post
23 23
 	 */
24
-    public static function output( $post ) {
24
+    public static function output($post) {
25 25
 
26 26
         // Prepare the invoice.
27
-        $invoice  = new WPInv_Invoice( $post );
28
-        $customer = $invoice->exists() ? $invoice->get_user_id( 'edit' ) : get_current_user_id();
29
-        $customer = new WP_User( $customer );
30
-        $display  = sprintf( _x( '%1$s (%2$s)', 'user dropdown', 'invoicing' ), $customer->display_name, $customer->user_email );
31
-        wp_nonce_field( 'getpaid_meta_nonce', 'getpaid_meta_nonce' );
27
+        $invoice  = new WPInv_Invoice($post);
28
+        $customer = $invoice->exists() ? $invoice->get_user_id('edit') : get_current_user_id();
29
+        $customer = new WP_User($customer);
30
+        $display  = sprintf(_x('%1$s (%2$s)', 'user dropdown', 'invoicing'), $customer->display_name, $customer->user_email);
31
+        wp_nonce_field('getpaid_meta_nonce', 'getpaid_meta_nonce');
32 32
 
33 33
         ?>
34 34
 
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
                         <div class="col-12 col-sm-6">
44 44
                             <div id="getpaid-invoice-user-id-wrapper" class="form-group">
45 45
                                 <div>
46
-                                    <label for="post_author_override"><?php _e( 'Customer', 'invoicing' );?></label>
46
+                                    <label for="post_author_override"><?php _e('Customer', 'invoicing'); ?></label>
47 47
                                 </div>
48 48
                                 <div>
49
-                                    <select name="post_author_override" id="wpinv_post_author_override" class="getpaid-customer-search form-control regular-text" data-placeholder="<?php esc_attr_e( 'Search for a customer by email or name', 'invoicing' ); ?>">
50
-                                        <option selected="selected" value="<?php echo (int) $customer->ID; ?>"><?php echo esc_html( $display ); ?> </option>)
49
+                                    <select name="post_author_override" id="wpinv_post_author_override" class="getpaid-customer-search form-control regular-text" data-placeholder="<?php esc_attr_e('Search for a customer by email or name', 'invoicing'); ?>">
50
+                                        <option selected="selected" value="<?php echo (int) $customer->ID; ?>"><?php echo esc_html($display); ?> </option>)
51 51
                                     </select>
52 52
                                 </div>
53 53
                             </div>
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                                             'type'        => 'text',
61 61
                                             'id'          => 'getpaid-invoice-new-user-email',
62 62
                                             'name'        => 'wpinv_email',
63
-                                            'label'       => __( 'Email', 'invoicing' ) . '<span class="required">*</span>',
63
+                                            'label'       => __('Email', 'invoicing') . '<span class="required">*</span>',
64 64
                                             'label_type'  => 'vertical',
65 65
                                             'placeholder' => '[email protected]',
66 66
                                             'class'       => 'form-control-sm',
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
                             </div>
71 71
                         </div>
72 72
                         <div class="col-12 col-sm-6 form-group mt-sm-4">
73
-                            <?php if ( ! $invoice->is_paid() && ! $invoice->is_refunded() ) : ?>
73
+                            <?php if (!$invoice->is_paid() && !$invoice->is_refunded()) : ?>
74 74
                                 <a id="getpaid-invoice-fill-user-details" class="button button-small button-secondary" href="javascript:void(0)">
75 75
                                     <i aria-hidden="true" class="fa fa-refresh"></i>
76
-                                    <?php _e( 'Fill User Details', 'invoicing' );?>
76
+                                    <?php _e('Fill User Details', 'invoicing'); ?>
77 77
                                 </a>
78 78
                                 <a id="getpaid-invoice-create-new-user-button" class="button button-small button-secondary" href="javascript:void(0)">
79 79
                                     <i aria-hidden="true" class="fa fa-plus"></i>
80
-                                    <?php _e( 'Add New User', 'invoicing' );?>
80
+                                    <?php _e('Add New User', 'invoicing'); ?>
81 81
                                 </a>
82 82
                                 <a id="getpaid-invoice-cancel-create-new-user" class="button button-small button-secondary d-none" href="javascript:void(0)">
83 83
                                     <i aria-hidden="true" class="fa fa-close"></i>
84
-                                    <?php _e( 'Cancel', 'invoicing' );?>
84
+                                    <?php _e('Cancel', 'invoicing'); ?>
85 85
                                 </a>
86 86
                             <?php endif; ?>
87 87
                         </div>
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
                                         'type'        => 'text',
95 95
                                         'id'          => 'wpinv_first_name',
96 96
                                         'name'        => 'wpinv_first_name',
97
-                                        'label'       => __( 'First Name', 'invoicing' ),
97
+                                        'label'       => __('First Name', 'invoicing'),
98 98
                                         'label_type'  => 'vertical',
99 99
                                         'placeholder' => '',
100 100
                                         'class'       => 'form-control-sm',
101
-                                        'value'       => $invoice->get_first_name( 'edit' ),
101
+                                        'value'       => $invoice->get_first_name('edit'),
102 102
                                     )
103 103
                                 );
104 104
                             ?>
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
                                         'type'        => 'text',
111 111
                                         'id'          => 'wpinv_last_name',
112 112
                                         'name'        => 'wpinv_last_name',
113
-                                        'label'       => __( 'Last Name', 'invoicing' ),
113
+                                        'label'       => __('Last Name', 'invoicing'),
114 114
                                         'label_type'  => 'vertical',
115 115
                                         'placeholder' => '',
116 116
                                         'class'       => 'form-control-sm',
117
-                                        'value'       => $invoice->get_last_name( 'edit' ),
117
+                                        'value'       => $invoice->get_last_name('edit'),
118 118
                                     )
119 119
                                 );
120 120
                             ?>
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
                                         'type'        => 'text',
130 130
                                         'id'          => 'wpinv_company',
131 131
                                         'name'        => 'wpinv_company',
132
-                                        'label'       => __( 'Company', 'invoicing' ),
132
+                                        'label'       => __('Company', 'invoicing'),
133 133
                                         'label_type'  => 'vertical',
134 134
                                         'placeholder' => '',
135 135
                                         'class'       => 'form-control-sm',
136
-                                        'value'       => $invoice->get_company( 'edit' ),
136
+                                        'value'       => $invoice->get_company('edit'),
137 137
                                     )
138 138
                                 );
139 139
                             ?>
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
                                         'type'        => 'text',
146 146
                                         'id'          => 'wpinv_vat_number',
147 147
                                         'name'        => 'wpinv_vat_number',
148
-                                        'label'       => __( 'Vat Number', 'invoicing' ),
148
+                                        'label'       => __('Vat Number', 'invoicing'),
149 149
                                         'label_type'  => 'vertical',
150 150
                                         'placeholder' => '',
151 151
                                         'class'       => 'form-control-sm getpaid-recalculate-prices-on-change',
152
-                                        'value'       => $invoice->get_vat_number( 'edit' ),
152
+                                        'value'       => $invoice->get_vat_number('edit'),
153 153
                                     )
154 154
                                 );
155 155
                             ?>
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
                                         'type'        => 'text',
165 165
                                         'id'          => 'wpinv_address',
166 166
                                         'name'        => 'wpinv_address',
167
-                                        'label'       => __( 'Address', 'invoicing' ),
167
+                                        'label'       => __('Address', 'invoicing'),
168 168
                                         'label_type'  => 'vertical',
169 169
                                         'placeholder' => '',
170 170
                                         'class'       => 'form-control-sm',
171
-                                        'value'       => $invoice->get_address( 'edit' ),
171
+                                        'value'       => $invoice->get_address('edit'),
172 172
                                     )
173 173
                                 );
174 174
                             ?>
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
                                         'type'        => 'text',
181 181
                                         'id'          => 'wpinv_city',
182 182
                                         'name'        => 'wpinv_city',
183
-                                        'label'       => __( 'City', 'invoicing' ),
183
+                                        'label'       => __('City', 'invoicing'),
184 184
                                         'label_type'  => 'vertical',
185 185
                                         'placeholder' => '',
186 186
                                         'class'       => 'form-control-sm',
187
-                                        'value'       => $invoice->get_city( 'edit' ),
187
+                                        'value'       => $invoice->get_city('edit'),
188 188
                                     )
189 189
                                 );
190 190
                             ?>
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
                                     array(
199 199
                                         'id'          => 'wpinv_country',
200 200
                                         'name'        => 'wpinv_country',
201
-                                        'label'       => __( 'Country', 'invoicing' ),
201
+                                        'label'       => __('Country', 'invoicing'),
202 202
                                         'label_type'  => 'vertical',
203
-                                        'placeholder' => __( 'Choose a country', 'invoicing' ),
203
+                                        'placeholder' => __('Choose a country', 'invoicing'),
204 204
                                         'class'       => 'form-control-sm getpaid-recalculate-prices-on-change',
205
-                                        'value'       => $invoice->get_country( 'edit' ),
205
+                                        'value'       => $invoice->get_country('edit'),
206 206
                                         'options'     => wpinv_get_country_list(),
207 207
                                         'data-allow-clear' => 'false',
208 208
                                         'select2'          => true,
@@ -213,20 +213,20 @@  discard block
 block discarded – undo
213 213
                         <div class="col-12 col-sm-6">
214 214
                             <?php
215 215
 
216
-                                $states = wpinv_get_country_states( $invoice->get_country( 'edit' ) );
216
+                                $states = wpinv_get_country_states($invoice->get_country('edit'));
217 217
 
218
-                                if ( empty( $states ) ) {
218
+                                if (empty($states)) {
219 219
 
220 220
                                     echo aui()->input(
221 221
                                         array(
222 222
                                             'type'        => 'text',
223 223
                                             'id'          => 'wpinv_state',
224 224
                                             'name'        => 'wpinv_state',
225
-                                            'label'       => __( 'State', 'invoicing' ),
225
+                                            'label'       => __('State', 'invoicing'),
226 226
                                             'label_type'  => 'vertical',
227 227
                                             'placeholder' => '',
228 228
                                             'class'       => 'form-control-sm',
229
-                                            'value'       => $invoice->get_state( 'edit' ),
229
+                                            'value'       => $invoice->get_state('edit'),
230 230
                                         )
231 231
                                     );
232 232
 
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
                                         array(
237 237
                                             'id'          => 'wpinv_state',
238 238
                                             'name'        => 'wpinv_state',
239
-                                            'label'       => __( 'State', 'invoicing' ),
239
+                                            'label'       => __('State', 'invoicing'),
240 240
                                             'label_type'  => 'vertical',
241
-                                            'placeholder' => __( 'Select a state', 'invoicing' ),
241
+                                            'placeholder' => __('Select a state', 'invoicing'),
242 242
                                             'class'       => 'form-control-sm',
243
-                                            'value'       => $invoice->get_state( 'edit' ),
243
+                                            'value'       => $invoice->get_state('edit'),
244 244
                                             'options'     => $states,
245 245
                                             'data-allow-clear' => 'false',
246 246
                                             'select2'          => true,
@@ -261,11 +261,11 @@  discard block
 block discarded – undo
261 261
                                         'type'        => 'text',
262 262
                                         'id'          => 'wpinv_zip',
263 263
                                         'name'        => 'wpinv_zip',
264
-                                        'label'       => __( 'Zip / Postal Code', 'invoicing' ),
264
+                                        'label'       => __('Zip / Postal Code', 'invoicing'),
265 265
                                         'label_type'  => 'vertical',
266 266
                                         'placeholder' => '',
267 267
                                         'class'       => 'form-control-sm',
268
-                                        'value'       => $invoice->get_zip( 'edit' ),
268
+                                        'value'       => $invoice->get_zip('edit'),
269 269
                                     )
270 270
                                 );
271 271
                             ?>
@@ -277,19 +277,19 @@  discard block
 block discarded – undo
277 277
                                         'type'        => 'text',
278 278
                                         'id'          => 'wpinv_phone',
279 279
                                         'name'        => 'wpinv_phone',
280
-                                        'label'       => __( 'Phone', 'invoicing' ),
280
+                                        'label'       => __('Phone', 'invoicing'),
281 281
                                         'label_type'  => 'vertical',
282 282
                                         'placeholder' => '',
283 283
                                         'class'       => 'form-control-sm',
284
-                                        'value'       => $invoice->get_phone( 'edit' ),
284
+                                        'value'       => $invoice->get_phone('edit'),
285 285
                                     )
286 286
                                 );
287 287
                             ?>
288 288
                         </div>
289 289
                     </div>
290 290
 
291
-                    <?php if ( ! apply_filters( 'getpaid_use_new_invoice_items_metabox', false ) ) : ?>
292
-                        <?php do_action( 'wpinv_meta_box_before_invoice_template_row', $invoice->get_id() ); ?>
291
+                    <?php if (!apply_filters('getpaid_use_new_invoice_items_metabox', false)) : ?>
292
+                        <?php do_action('wpinv_meta_box_before_invoice_template_row', $invoice->get_id()); ?>
293 293
 
294 294
                         <div class="row">
295 295
                             <div class="col-12 col-sm-6">
@@ -298,14 +298,14 @@  discard block
 block discarded – undo
298 298
                                         array(
299 299
                                             'id'          => 'wpinv_template',
300 300
                                             'name'        => 'wpinv_template',
301
-                                            'label'       => __( 'Template', 'invoicing' ),
301
+                                            'label'       => __('Template', 'invoicing'),
302 302
                                             'label_type'  => 'vertical',
303
-                                            'placeholder' => __( 'Choose a template', 'invoicing' ),
303
+                                            'placeholder' => __('Choose a template', 'invoicing'),
304 304
                                             'class'       => 'form-control-sm',
305
-                                            'value'       => $invoice->get_template( 'edit' ),
305
+                                            'value'       => $invoice->get_template('edit'),
306 306
                                             'options'     => array(
307
-                                                'quantity' => __( 'Quantity', 'invoicing' ),
308
-                                                'hours'    => __( 'Hours', 'invoicing' ),
307
+                                                'quantity' => __('Quantity', 'invoicing'),
308
+                                                'hours'    => __('Hours', 'invoicing'),
309 309
                                                 //'amount'   => __( 'Amount Only', 'invoicing' ),
310 310
                                             ),
311 311
                                             'data-allow-clear' => 'false',
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
                                         array(
323 323
                                             'id'          => 'wpinv_currency',
324 324
                                             'name'        => 'wpinv_currency',
325
-                                            'label'       => __( 'Currency', 'invoicing' ),
325
+                                            'label'       => __('Currency', 'invoicing'),
326 326
                                             'label_type'  => 'vertical',
327
-                                            'placeholder' => __( 'Select Invoice Currency', 'invoicing' ),
327
+                                            'placeholder' => __('Select Invoice Currency', 'invoicing'),
328 328
                                             'class'       => 'form-control-sm getpaid-recalculate-prices-on-change',
329
-                                            'value'       => $invoice->get_currency( 'edit' ),
329
+                                            'value'       => $invoice->get_currency('edit'),
330 330
                                             'required'    => false,
331 331
                                             'data-allow-clear' => 'false',
332 332
                                             'select2'          => true,
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                             </div>
339 339
                         </div>
340 340
 
341
-                        <?php do_action( 'wpinv_meta_box_invoice_template_row', $invoice->get_id() ); ?>
341
+                        <?php do_action('wpinv_meta_box_invoice_template_row', $invoice->get_id()); ?>
342 342
                     <?php endif; ?>
343 343
 
344 344
                     <div class="row">
@@ -349,18 +349,18 @@  discard block
 block discarded – undo
349 349
                                         'type'        => 'text',
350 350
                                         'id'          => 'wpinv_company_id',
351 351
                                         'name'        => 'wpinv_company_id',
352
-                                        'label'       => __( 'Company ID', 'invoicing' ),
352
+                                        'label'       => __('Company ID', 'invoicing'),
353 353
                                         'label_type'  => 'vertical',
354 354
                                         'placeholder' => '',
355 355
                                         'class'       => 'form-control-sm',
356
-                                        'value'       => $invoice->get_company_id( 'edit' ),
356
+                                        'value'       => $invoice->get_company_id('edit'),
357 357
                                     )
358 358
                                 );
359 359
                             ?>
360 360
                         </div>
361 361
                     </div>
362 362
 
363
-                    <?php do_action( 'getpaid_after_metabox_invoice_address', $invoice ); ?>
363
+                    <?php do_action('getpaid_after_metabox_invoice_address', $invoice); ?>
364 364
             </div>
365 365
         <?php
366 366
     }
@@ -370,51 +370,51 @@  discard block
 block discarded – undo
370 370
 	 *
371 371
 	 * @param int $post_id
372 372
 	 */
373
-	public static function save( $post_id ) {
373
+	public static function save($post_id) {
374 374
 
375 375
         // Prepare the invoice.
376
-        $invoice = new WPInv_Invoice( $post_id );
376
+        $invoice = new WPInv_Invoice($post_id);
377 377
 
378 378
         // Load new data.
379 379
         $invoice->set_props(
380 380
 			array(
381
-                'template'             => isset( $_POST['wpinv_template'] ) ? wpinv_clean( $_POST['wpinv_template'] ) : null,
382
-                'email_cc'             => isset( $_POST['wpinv_cc'] ) ? wpinv_clean( $_POST['wpinv_cc'] ) : null,
383
-                'disable_taxes'        => ! empty( $_POST['disable_taxes'] ),
384
-                'currency'             => isset( $_POST['wpinv_currency'] ) ? wpinv_clean( $_POST['wpinv_currency'] ) : null,
385
-                'gateway'              => ( $invoice->needs_payment() && isset( $_POST['wpinv_gateway'] ) ) ? wpinv_clean( $_POST['wpinv_gateway'] ) : null,
386
-                'address'              => isset( $_POST['wpinv_address'] ) ? wpinv_clean( $_POST['wpinv_address'] ) : null,
387
-                'vat_number'           => isset( $_POST['wpinv_vat_number'] ) ? wpinv_clean( $_POST['wpinv_vat_number'] ) : null,
388
-                'company'              => isset( $_POST['wpinv_company'] ) ? wpinv_clean( $_POST['wpinv_company'] ) : null,
389
-                'company_id'           => isset( $_POST['wpinv_company_id'] ) ? wpinv_clean( $_POST['wpinv_company_id'] ) : null,
390
-                'zip'                  => isset( $_POST['wpinv_zip'] ) ? wpinv_clean( $_POST['wpinv_zip'] ) : null,
391
-                'state'                => isset( $_POST['wpinv_state'] ) ? wpinv_clean( $_POST['wpinv_state'] ) : null,
392
-                'city'                 => isset( $_POST['wpinv_city'] ) ? wpinv_clean( $_POST['wpinv_city'] ) : null,
393
-                'country'              => isset( $_POST['wpinv_country'] ) ? wpinv_clean( $_POST['wpinv_country'] ) : null,
394
-                'phone'                => isset( $_POST['wpinv_phone'] ) ? wpinv_clean( $_POST['wpinv_phone'] ) : null,
395
-                'first_name'           => isset( $_POST['wpinv_first_name'] ) ? wpinv_clean( $_POST['wpinv_first_name'] ) : null,
396
-                'last_name'            => isset( $_POST['wpinv_last_name'] ) ? wpinv_clean( $_POST['wpinv_last_name'] ) : null,
397
-                'author'               => isset( $_POST['post_author_override'] ) ? wpinv_clean( $_POST['post_author_override'] ) : null,
398
-                'date_created'         => isset( $_POST['date_created'] ) ? wpinv_clean( $_POST['date_created'] ) : null,
399
-                'date_completed'       => isset( $_POST['wpinv_date_completed'] ) ? wpinv_clean( $_POST['wpinv_date_completed'] ) : null,
400
-                'due_date'             => isset( $_POST['wpinv_due_date'] ) ? wpinv_clean( $_POST['wpinv_due_date'] ) : null,
401
-                'number'               => isset( $_POST['wpinv_number'] ) ? wpinv_clean( $_POST['wpinv_number'] ) : null,
402
-                'status'               => isset( $_POST['wpinv_status'] ) ? wpinv_clean( $_POST['wpinv_status'] ) : null,
381
+                'template'             => isset($_POST['wpinv_template']) ? wpinv_clean($_POST['wpinv_template']) : null,
382
+                'email_cc'             => isset($_POST['wpinv_cc']) ? wpinv_clean($_POST['wpinv_cc']) : null,
383
+                'disable_taxes'        => !empty($_POST['disable_taxes']),
384
+                'currency'             => isset($_POST['wpinv_currency']) ? wpinv_clean($_POST['wpinv_currency']) : null,
385
+                'gateway'              => ($invoice->needs_payment() && isset($_POST['wpinv_gateway'])) ? wpinv_clean($_POST['wpinv_gateway']) : null,
386
+                'address'              => isset($_POST['wpinv_address']) ? wpinv_clean($_POST['wpinv_address']) : null,
387
+                'vat_number'           => isset($_POST['wpinv_vat_number']) ? wpinv_clean($_POST['wpinv_vat_number']) : null,
388
+                'company'              => isset($_POST['wpinv_company']) ? wpinv_clean($_POST['wpinv_company']) : null,
389
+                'company_id'           => isset($_POST['wpinv_company_id']) ? wpinv_clean($_POST['wpinv_company_id']) : null,
390
+                'zip'                  => isset($_POST['wpinv_zip']) ? wpinv_clean($_POST['wpinv_zip']) : null,
391
+                'state'                => isset($_POST['wpinv_state']) ? wpinv_clean($_POST['wpinv_state']) : null,
392
+                'city'                 => isset($_POST['wpinv_city']) ? wpinv_clean($_POST['wpinv_city']) : null,
393
+                'country'              => isset($_POST['wpinv_country']) ? wpinv_clean($_POST['wpinv_country']) : null,
394
+                'phone'                => isset($_POST['wpinv_phone']) ? wpinv_clean($_POST['wpinv_phone']) : null,
395
+                'first_name'           => isset($_POST['wpinv_first_name']) ? wpinv_clean($_POST['wpinv_first_name']) : null,
396
+                'last_name'            => isset($_POST['wpinv_last_name']) ? wpinv_clean($_POST['wpinv_last_name']) : null,
397
+                'author'               => isset($_POST['post_author_override']) ? wpinv_clean($_POST['post_author_override']) : null,
398
+                'date_created'         => isset($_POST['date_created']) ? wpinv_clean($_POST['date_created']) : null,
399
+                'date_completed'       => isset($_POST['wpinv_date_completed']) ? wpinv_clean($_POST['wpinv_date_completed']) : null,
400
+                'due_date'             => isset($_POST['wpinv_due_date']) ? wpinv_clean($_POST['wpinv_due_date']) : null,
401
+                'number'               => isset($_POST['wpinv_number']) ? wpinv_clean($_POST['wpinv_number']) : null,
402
+                'status'               => isset($_POST['wpinv_status']) ? wpinv_clean($_POST['wpinv_status']) : null,
403 403
 			)
404 404
         );
405 405
 
406 406
         // Discount code.
407
-        if ( ! $invoice->is_paid() && ! $invoice->is_refunded() ) {
407
+        if (!$invoice->is_paid() && !$invoice->is_refunded()) {
408 408
 
409
-            if ( isset( $_POST['wpinv_discount_code'] ) ) {
410
-                $invoice->set_discount_code( wpinv_clean( $_POST['wpinv_discount_code'] ) );
409
+            if (isset($_POST['wpinv_discount_code'])) {
410
+                $invoice->set_discount_code(wpinv_clean($_POST['wpinv_discount_code']));
411 411
             }
412 412
 
413
-            $discount = new WPInv_Discount( $invoice->get_discount_code() );
414
-            if ( $discount->exists() ) {
415
-                $invoice->add_discount( getpaid_calculate_invoice_discount( $invoice, $discount ) );
413
+            $discount = new WPInv_Discount($invoice->get_discount_code());
414
+            if ($discount->exists()) {
415
+                $invoice->add_discount(getpaid_calculate_invoice_discount($invoice, $discount));
416 416
             } else {
417
-                $invoice->remove_discount( 'discount_code' );
417
+                $invoice->remove_discount('discount_code');
418 418
             }
419 419
 
420 420
             // Recalculate totals.
@@ -423,17 +423,17 @@  discard block
 block discarded – undo
423 423
         }
424 424
 
425 425
         // If we're creating a new user...
426
-        if ( ! empty( $_POST['wpinv_new_user'] ) && is_email( stripslashes( $_POST['wpinv_email'] ) ) ) {
426
+        if (!empty($_POST['wpinv_new_user']) && is_email(stripslashes($_POST['wpinv_email']))) {
427 427
 
428 428
             // Attempt to create the user.
429
-            $user = wpinv_create_user( sanitize_email( stripslashes( $_POST['wpinv_email'] ) ) );
429
+            $user = wpinv_create_user(sanitize_email(stripslashes($_POST['wpinv_email'])));
430 430
 
431 431
 
432 432
             // If successful, update the invoice author.
433
-            if ( is_numeric( $user ) ) {
434
-                $invoice->set_author( $user );
433
+            if (is_numeric($user)) {
434
+                $invoice->set_author($user);
435 435
             } else {
436
-                wpinv_error_log( $user->get_error_message(), __( 'Invoice add new user', 'invoicing' ), __FILE__, __LINE__ );
436
+                wpinv_error_log($user->get_error_message(), __('Invoice add new user', 'invoicing'), __FILE__, __LINE__);
437 437
             }
438 438
         }
439 439
 
@@ -447,16 +447,16 @@  discard block
 block discarded – undo
447 447
         $GLOBALS['wpinv_skip_invoice_notification'] = false;
448 448
 
449 449
         // (Maybe) send new user notification.
450
-        $should_send_notification = wpinv_get_option( 'disable_new_user_emails' );
451
-        if ( ! empty( $user ) && is_numeric( $user ) && apply_filters( 'getpaid_send_new_user_notification', empty( $should_send_notification ) ) ) {
452
-            wp_send_new_user_notifications( $user, 'user' );
450
+        $should_send_notification = wpinv_get_option('disable_new_user_emails');
451
+        if (!empty($user) && is_numeric($user) && apply_filters('getpaid_send_new_user_notification', empty($should_send_notification))) {
452
+            wp_send_new_user_notifications($user, 'user');
453 453
         }
454 454
 
455
-        if ( ! empty( $_POST['send_to_customer'] ) && ! $invoice->is_draft() ) {
456
-            getpaid()->get( 'invoice_emails' )->user_invoice( $invoice, true );
455
+        if (!empty($_POST['send_to_customer']) && !$invoice->is_draft()) {
456
+            getpaid()->get('invoice_emails')->user_invoice($invoice, true);
457 457
         }
458 458
 
459 459
         // Fires after an invoice is saved.
460
-		do_action( 'wpinv_invoice_metabox_saved', $invoice );
460
+		do_action('wpinv_invoice_metabox_saved', $invoice);
461 461
 	}
462 462
 }
Please login to merge, or discard this patch.
vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php 1 patch
Spacing   +401 added lines, -401 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
 /**
13 13
  * Bail if we are not in WP.
14 14
  */
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if (!defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
19 19
 /**
20 20
  * Only add if the class does not already exist.
21 21
  */
22
-if ( ! class_exists( 'AyeCode_UI_Settings' ) ) {
22
+if (!class_exists('AyeCode_UI_Settings')) {
23 23
 
24 24
 	/**
25 25
 	 * A Class to be able to change settings for Font Awesome.
@@ -98,23 +98,23 @@  discard block
 block discarded – undo
98 98
 		 * @return AyeCode_UI_Settings - Main instance.
99 99
 		 */
100 100
 		public static function instance() {
101
-			if ( ! isset( self::$instance ) && ! ( self::$instance instanceof AyeCode_UI_Settings ) ) {
101
+			if (!isset(self::$instance) && !(self::$instance instanceof AyeCode_UI_Settings)) {
102 102
 
103 103
 				self::$instance = new AyeCode_UI_Settings;
104 104
 
105
-				add_action( 'init', array( self::$instance, 'init' ) ); // set settings
105
+				add_action('init', array(self::$instance, 'init')); // set settings
106 106
 
107
-				if ( is_admin() ) {
108
-					add_action( 'admin_menu', array( self::$instance, 'menu_item' ) );
109
-					add_action( 'admin_init', array( self::$instance, 'register_settings' ) );
107
+				if (is_admin()) {
108
+					add_action('admin_menu', array(self::$instance, 'menu_item'));
109
+					add_action('admin_init', array(self::$instance, 'register_settings'));
110 110
 
111 111
 					// Maybe show example page
112
-					add_action( 'template_redirect', array( self::$instance,'maybe_show_examples' ) );
112
+					add_action('template_redirect', array(self::$instance, 'maybe_show_examples'));
113 113
 				}
114 114
 
115
-				add_action( 'customize_register', array( self::$instance, 'customizer_settings' ));
115
+				add_action('customize_register', array(self::$instance, 'customizer_settings'));
116 116
 
117
-				do_action( 'ayecode_ui_settings_loaded' );
117
+				do_action('ayecode_ui_settings_loaded');
118 118
 			}
119 119
 
120 120
 			return self::$instance;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 		/**
124 124
 		 * Setup some constants.
125 125
 		 */
126
-		public function constants(){
126
+		public function constants() {
127 127
 			define('AUI_PRIMARY_COLOR_ORIGINAL', "#1e73be");
128 128
 			define('AUI_SECONDARY_COLOR_ORIGINAL', '#6c757d');
129 129
 			if (!defined('AUI_PRIMARY_COLOR')) define('AUI_PRIMARY_COLOR', AUI_PRIMARY_COLOR_ORIGINAL);
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
 		public function init() {
137 137
 
138 138
 			// Maybe fix settings
139
-			if ( ! empty( $_REQUEST['aui-fix-admin'] ) && !empty($_REQUEST['nonce']) && wp_verify_nonce( $_REQUEST['nonce'], "aui-fix-admin" ) ) {
140
-				$db_settings = get_option( 'ayecode-ui-settings' );
141
-				if ( ! empty( $db_settings ) ) {
139
+			if (!empty($_REQUEST['aui-fix-admin']) && !empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], "aui-fix-admin")) {
140
+				$db_settings = get_option('ayecode-ui-settings');
141
+				if (!empty($db_settings)) {
142 142
 					$db_settings['css_backend'] = 'compatibility';
143 143
 					$db_settings['js_backend'] = 'core-popper';
144
-					update_option( 'ayecode-ui-settings', $db_settings );
144
+					update_option('ayecode-ui-settings', $db_settings);
145 145
 					wp_safe_redirect(admin_url("options-general.php?page=ayecode-ui-settings&updated=true"));
146 146
 				}
147 147
 			}
@@ -155,31 +155,31 @@  discard block
 block discarded – undo
155 155
 			 *
156 156
 			 * We load super early in case there is a theme version that might change the colors
157 157
 			 */
158
-			if ( $this->settings['css'] ) {
158
+			if ($this->settings['css']) {
159 159
 				$priority = $this->is_bs3_compat() ? 100 : 1;
160
-				add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ), $priority );
160
+				add_action('wp_enqueue_scripts', array($this, 'enqueue_style'), $priority);
161 161
 			}
162
-			if ( $this->settings['css_backend'] && $this->load_admin_scripts() ) {
163
-				add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_style' ), 1 );
162
+			if ($this->settings['css_backend'] && $this->load_admin_scripts()) {
163
+				add_action('admin_enqueue_scripts', array($this, 'enqueue_style'), 1);
164 164
 			}
165 165
 
166 166
 			// maybe load JS
167
-			if ( $this->settings['js'] ) {
167
+			if ($this->settings['js']) {
168 168
 				$priority = $this->is_bs3_compat() ? 100 : 1;
169
-				add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), $priority );
169
+				add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'), $priority);
170 170
 			}
171
-			if ( $this->settings['js_backend'] && $this->load_admin_scripts() ) {
172
-				add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 1 );
171
+			if ($this->settings['js_backend'] && $this->load_admin_scripts()) {
172
+				add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'), 1);
173 173
 			}
174 174
 
175 175
 			// Maybe set the HTML font size
176
-			if ( $this->settings['html_font_size'] ) {
177
-				add_action( 'wp_footer', array( $this, 'html_font_size' ), 10 );
176
+			if ($this->settings['html_font_size']) {
177
+				add_action('wp_footer', array($this, 'html_font_size'), 10);
178 178
 			}
179 179
 
180 180
 			// Maybe show backend style error
181
-			if( $this->settings['css_backend'] != 'compatibility' || $this->settings['js_backend'] != 'core-popper' ){
182
-				add_action( 'admin_notices', array( $this, 'show_admin_style_notice' ) );
181
+			if ($this->settings['css_backend'] != 'compatibility' || $this->settings['js_backend'] != 'core-popper') {
182
+				add_action('admin_notices', array($this, 'show_admin_style_notice'));
183 183
 			}
184 184
 
185 185
 		}
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 		/**
188 188
 		 * Show admin notice if backend scripts not loaded.
189 189
 		 */
190
-		public function show_admin_style_notice(){
191
-			$fix_url = admin_url("options-general.php?page=ayecode-ui-settings&aui-fix-admin=true&nonce=".wp_create_nonce('aui-fix-admin'));
192
-			$button = '<a href="'.esc_url($fix_url).'" class="button-primary">Fix Now</a>';
193
-			$message = __( '<b>Style Issue:</b> AyeCode UI is disable or set wrong.')." " .$button;
194
-			echo '<div class="notice notice-error aui-settings-error-notice"><p>'.$message.'</p></div>';
190
+		public function show_admin_style_notice() {
191
+			$fix_url = admin_url("options-general.php?page=ayecode-ui-settings&aui-fix-admin=true&nonce=" . wp_create_nonce('aui-fix-admin'));
192
+			$button = '<a href="' . esc_url($fix_url) . '" class="button-primary">Fix Now</a>';
193
+			$message = __('<b>Style Issue:</b> AyeCode UI is disable or set wrong.') . " " . $button;
194
+			echo '<div class="notice notice-error aui-settings-error-notice"><p>' . $message . '</p></div>';
195 195
 		}
196 196
 
197 197
 		/**
@@ -199,14 +199,14 @@  discard block
 block discarded – undo
199 199
 		 *
200 200
 		 * @return bool
201 201
 		 */
202
-		public function load_admin_scripts(){
202
+		public function load_admin_scripts() {
203 203
 			$result = true;
204 204
 
205 205
 			// check if specifically disabled
206
-			if(!empty($this->settings['disable_admin'])){
207
-				$url_parts = explode("\n",$this->settings['disable_admin']);
208
-				foreach($url_parts as $part){
209
-					if( strpos($_SERVER['REQUEST_URI'], trim($part)) !== false ){
206
+			if (!empty($this->settings['disable_admin'])) {
207
+				$url_parts = explode("\n", $this->settings['disable_admin']);
208
+				foreach ($url_parts as $part) {
209
+					if (strpos($_SERVER['REQUEST_URI'], trim($part)) !== false) {
210 210
 						return false; // return early, no point checking further
211 211
 					}
212 212
 				}
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
 		/**
219 219
 		 * Add a html font size to the footer.
220 220
 		 */
221
-		public function html_font_size(){
221
+		public function html_font_size() {
222 222
 			$this->settings = $this->get_settings();
223
-			echo "<style>html{font-size:".absint($this->settings['html_font_size'])."px;}</style>";
223
+			echo "<style>html{font-size:" . absint($this->settings['html_font_size']) . "px;}</style>";
224 224
 		}
225 225
 
226 226
 		/**
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
 		 * 
229 229
 		 * @return bool
230 230
 		 */
231
-		public function is_aui_screen(){
231
+		public function is_aui_screen() {
232 232
 //			echo '###';exit;
233 233
 			$load = false;
234 234
 			// check if we should load or not
235
-			if ( is_admin() ) {
235
+			if (is_admin()) {
236 236
 				// Only enable on set pages
237 237
 				$aui_screens = array(
238 238
 					'page',
@@ -243,24 +243,24 @@  discard block
 block discarded – undo
243 243
 					'ayecode-ui-settings',
244 244
 					'site-editor'
245 245
 				);
246
-				$screen_ids = apply_filters( 'aui_screen_ids', $aui_screens );
246
+				$screen_ids = apply_filters('aui_screen_ids', $aui_screens);
247 247
 
248 248
 				$screen = get_current_screen();
249 249
 
250 250
 //				echo '###'.$screen->id;
251 251
 
252 252
 				// check if we are on a AUI screen
253
-				if ( $screen && in_array( $screen->id, $screen_ids ) ) {
253
+				if ($screen && in_array($screen->id, $screen_ids)) {
254 254
 					$load = true;
255 255
 				}
256 256
 
257 257
 				//load for widget previews in WP 5.8
258
-				if( !empty($_REQUEST['legacy-widget-preview'])){
258
+				if (!empty($_REQUEST['legacy-widget-preview'])) {
259 259
 					$load = true;
260 260
 				}
261 261
 			}
262 262
 
263
-			return apply_filters( 'aui_load_on_admin' , $load );
263
+			return apply_filters('aui_load_on_admin', $load);
264 264
 		}
265 265
 
266 266
 		/**
@@ -269,24 +269,24 @@  discard block
 block discarded – undo
269 269
 		public function enqueue_style() {
270 270
 
271 271
 
272
-			if( is_admin() && !$this->is_aui_screen()){
272
+			if (is_admin() && !$this->is_aui_screen()) {
273 273
 				// don't add wp-admin scripts if not requested to
274
-			}else{
274
+			} else {
275 275
 				$css_setting = current_action() == 'wp_enqueue_scripts' ? 'css' : 'css_backend';
276 276
 
277 277
 				$rtl = is_rtl() ? '-rtl' : '';
278 278
 
279
-				if($this->settings[$css_setting]){
280
-					$compatibility = $this->settings[$css_setting]=='core' ? false : true;
281
-					$url = $this->settings[$css_setting]=='core' ? $this->url.'assets/css/ayecode-ui'.$rtl.'.css' : $this->url.'assets/css/ayecode-ui-compatibility'.$rtl.'.css';
282
-					wp_register_style( 'ayecode-ui', $url, array(), $this->version );
283
-					wp_enqueue_style( 'ayecode-ui' );
279
+				if ($this->settings[$css_setting]) {
280
+					$compatibility = $this->settings[$css_setting] == 'core' ? false : true;
281
+					$url = $this->settings[$css_setting] == 'core' ? $this->url . 'assets/css/ayecode-ui' . $rtl . '.css' : $this->url . 'assets/css/ayecode-ui-compatibility' . $rtl . '.css';
282
+					wp_register_style('ayecode-ui', $url, array(), $this->version);
283
+					wp_enqueue_style('ayecode-ui');
284 284
 
285 285
 					// flatpickr
286
-					wp_register_style( 'flatpickr', $this->url.'assets/css/flatpickr.min.css', array(), $this->version );
286
+					wp_register_style('flatpickr', $this->url . 'assets/css/flatpickr.min.css', array(), $this->version);
287 287
 
288 288
 					// fix some wp-admin issues
289
-					if(is_admin()){
289
+					if (is_admin()) {
290 290
 						$custom_css = "
291 291
                 body{
292 292
                     background-color: #f1f1f1;
@@ -339,11 +339,11 @@  discard block
 block discarded – undo
339 339
 						    padding: 0;
340 340
 						}
341 341
 					";
342
-						wp_add_inline_style( 'ayecode-ui', $custom_css );
342
+						wp_add_inline_style('ayecode-ui', $custom_css);
343 343
 					}
344 344
 
345 345
 					// custom changes
346
-					wp_add_inline_style( 'ayecode-ui', self::custom_css($compatibility) );
346
+					wp_add_inline_style('ayecode-ui', self::custom_css($compatibility));
347 347
 
348 348
 				}
349 349
 			}
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
 				function aui_init_flatpickr(){
604 604
 					if ( typeof jQuery.fn.flatpickr === "function" && !$aui_doing_init_flatpickr) {
605 605
 						$aui_doing_init_flatpickr = true;
606
-						<?php if ( ! empty( $flatpickr_locale ) ) { ?>try{flatpickr.localize(<?php echo $flatpickr_locale; ?>);}catch(err){console.log(err.message);}<?php } ?>
606
+						<?php if (!empty($flatpickr_locale)) { ?>try{flatpickr.localize(<?php echo $flatpickr_locale; ?>);}catch(err){console.log(err.message);}<?php } ?>
607 607
 						jQuery('input[data-aui-init="flatpickr"]:not(.flatpickr-input)').flatpickr();
608 608
 					}
609 609
 					$aui_doing_init_flatpickr = false;
@@ -1203,10 +1203,10 @@  discard block
 block discarded – undo
1203 1203
 			/*
1204 1204
 			 * We only add the <script> tags for code highlighting, so we strip them from the output.
1205 1205
 			 */
1206
-			return str_replace( array(
1206
+			return str_replace(array(
1207 1207
 				'<script>',
1208 1208
 				'</script>'
1209
-			), '', self::minify_js($output) );
1209
+			), '', self::minify_js($output));
1210 1210
 		}
1211 1211
 
1212 1212
 
@@ -1220,13 +1220,13 @@  discard block
 block discarded – undo
1220 1220
 			ob_start();
1221 1221
 			?>
1222 1222
 			<script>
1223
-				<?php if( defined( 'FUSION_BUILDER_VERSION' ) ){ ?>
1223
+				<?php if (defined('FUSION_BUILDER_VERSION')) { ?>
1224 1224
 				/* With Avada builder */
1225 1225
 
1226 1226
 				<?php } ?>
1227 1227
 			</script>
1228 1228
 			<?php
1229
-			return str_replace( array(
1229
+			return str_replace(array(
1230 1230
 				'<script>',
1231 1231
 				'</script>'
1232 1232
 			), '', ob_get_clean());
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
 		 *
1238 1238
 		 * If this remains small then its best to use this than to add another JS file.
1239 1239
 		 */
1240
-		public function inline_script_file_browser(){
1240
+		public function inline_script_file_browser() {
1241 1241
 			ob_start();
1242 1242
 			?>
1243 1243
 			<script>
@@ -1252,10 +1252,10 @@  discard block
 block discarded – undo
1252 1252
 			/*
1253 1253
 			 * We only add the <script> tags for code highlighting, so we strip them from the output.
1254 1254
 			 */
1255
-			return str_replace( array(
1255
+			return str_replace(array(
1256 1256
 				'<script>',
1257 1257
 				'</script>'
1258
-			), '', $output );
1258
+			), '', $output);
1259 1259
 		}
1260 1260
 
1261 1261
 		/**
@@ -1263,53 +1263,53 @@  discard block
 block discarded – undo
1263 1263
 		 */
1264 1264
 		public function enqueue_scripts() {
1265 1265
 
1266
-			if( is_admin() && !$this->is_aui_screen()){
1266
+			if (is_admin() && !$this->is_aui_screen()) {
1267 1267
 				// don't add wp-admin scripts if not requested to
1268
-			}else {
1268
+			} else {
1269 1269
 
1270 1270
 				$js_setting = current_action() == 'wp_enqueue_scripts' ? 'js' : 'js_backend';
1271 1271
 
1272 1272
 				// select2
1273
-				wp_register_script( 'select2', $this->url . 'assets/js/select2.min.js', array( 'jquery' ), $this->select2_version );
1273
+				wp_register_script('select2', $this->url . 'assets/js/select2.min.js', array('jquery'), $this->select2_version);
1274 1274
 
1275 1275
 				// flatpickr
1276
-				wp_register_script( 'flatpickr', $this->url . 'assets/js/flatpickr.min.js', array(), $this->version );
1276
+				wp_register_script('flatpickr', $this->url . 'assets/js/flatpickr.min.js', array(), $this->version);
1277 1277
 
1278 1278
 				// flatpickr
1279
-				wp_register_script( 'iconpicker', $this->url . 'assets/js/fontawesome-iconpicker.min.js', array(), $this->version );
1279
+				wp_register_script('iconpicker', $this->url . 'assets/js/fontawesome-iconpicker.min.js', array(), $this->version);
1280 1280
 				
1281 1281
 				// Bootstrap file browser
1282
-				wp_register_script( 'aui-custom-file-input', $url = $this->url . 'assets/js/bs-custom-file-input.min.js', array( 'jquery' ), $this->select2_version );
1283
-				wp_add_inline_script( 'aui-custom-file-input', $this->inline_script_file_browser() );
1282
+				wp_register_script('aui-custom-file-input', $url = $this->url . 'assets/js/bs-custom-file-input.min.js', array('jquery'), $this->select2_version);
1283
+				wp_add_inline_script('aui-custom-file-input', $this->inline_script_file_browser());
1284 1284
 
1285 1285
 				$load_inline = false;
1286 1286
 
1287
-				if ( $this->settings[ $js_setting ] == 'core-popper' ) {
1287
+				if ($this->settings[$js_setting] == 'core-popper') {
1288 1288
 					// Bootstrap bundle
1289 1289
 					$url = $this->url . 'assets/js/bootstrap.bundle.min.js';
1290
-					wp_register_script( 'bootstrap-js-bundle', $url, array(
1290
+					wp_register_script('bootstrap-js-bundle', $url, array(
1291 1291
 						'select2',
1292 1292
 						'jquery'
1293
-					), $this->version, $this->is_bs3_compat() );
1293
+					), $this->version, $this->is_bs3_compat());
1294 1294
 					// if in admin then add to footer for compatibility.
1295
-					is_admin() ? wp_enqueue_script( 'bootstrap-js-bundle', '', null, null, true ) : wp_enqueue_script( 'bootstrap-js-bundle' );
1295
+					is_admin() ? wp_enqueue_script('bootstrap-js-bundle', '', null, null, true) : wp_enqueue_script('bootstrap-js-bundle');
1296 1296
 					$script = $this->inline_script();
1297
-					wp_add_inline_script( 'bootstrap-js-bundle', $script );
1298
-				} elseif ( $this->settings[ $js_setting ] == 'popper' ) {
1297
+					wp_add_inline_script('bootstrap-js-bundle', $script);
1298
+				} elseif ($this->settings[$js_setting] == 'popper') {
1299 1299
 					$url = $this->url . 'assets/js/popper.min.js';
1300
-					wp_register_script( 'bootstrap-js-popper', $url, array( 'select2', 'jquery' ), $this->version );
1301
-					wp_enqueue_script( 'bootstrap-js-popper' );
1300
+					wp_register_script('bootstrap-js-popper', $url, array('select2', 'jquery'), $this->version);
1301
+					wp_enqueue_script('bootstrap-js-popper');
1302 1302
 					$load_inline = true;
1303 1303
 				} else {
1304 1304
 					$load_inline = true;
1305 1305
 				}
1306 1306
 
1307 1307
 				// Load needed inline scripts by faking the loading of a script if the main script is not being loaded
1308
-				if ( $load_inline ) {
1309
-					wp_register_script( 'bootstrap-dummy', '', array( 'select2', 'jquery' ) );
1310
-					wp_enqueue_script( 'bootstrap-dummy' );
1308
+				if ($load_inline) {
1309
+					wp_register_script('bootstrap-dummy', '', array('select2', 'jquery'));
1310
+					wp_enqueue_script('bootstrap-dummy');
1311 1311
 					$script = $this->inline_script();
1312
-					wp_add_inline_script( 'bootstrap-dummy', $script );
1312
+					wp_add_inline_script('bootstrap-dummy', $script);
1313 1313
 				}
1314 1314
 			}
1315 1315
 
@@ -1318,17 +1318,17 @@  discard block
 block discarded – undo
1318 1318
 		/**
1319 1319
 		 * Enqueue flatpickr if called.
1320 1320
 		 */
1321
-		public function enqueue_flatpickr(){
1322
-			wp_enqueue_style( 'flatpickr' );
1323
-			wp_enqueue_script( 'flatpickr' );
1321
+		public function enqueue_flatpickr() {
1322
+			wp_enqueue_style('flatpickr');
1323
+			wp_enqueue_script('flatpickr');
1324 1324
 		}
1325 1325
 
1326 1326
 		/**
1327 1327
 		 * Enqueue iconpicker if called.
1328 1328
 		 */
1329
-		public function enqueue_iconpicker(){
1330
-			wp_enqueue_style( 'iconpicker' );
1331
-			wp_enqueue_script( 'iconpicker' );
1329
+		public function enqueue_iconpicker() {
1330
+			wp_enqueue_style('iconpicker');
1331
+			wp_enqueue_script('iconpicker');
1332 1332
 		}
1333 1333
 
1334 1334
 		/**
@@ -1340,15 +1340,15 @@  discard block
 block discarded – undo
1340 1340
 
1341 1341
 			$url = '';
1342 1342
 			// check if we are inside a plugin
1343
-			$file_dir = str_replace( "/includes","", wp_normalize_path( dirname( __FILE__ ) ) );
1343
+			$file_dir = str_replace("/includes", "", wp_normalize_path(dirname(__FILE__)));
1344 1344
 
1345 1345
 			// add check in-case user has changed wp-content dir name.
1346 1346
 			$wp_content_folder_name = basename(WP_CONTENT_DIR);
1347
-			$dir_parts = explode("/$wp_content_folder_name/",$file_dir);
1348
-			$url_parts = explode("/$wp_content_folder_name/",plugins_url());
1347
+			$dir_parts = explode("/$wp_content_folder_name/", $file_dir);
1348
+			$url_parts = explode("/$wp_content_folder_name/", plugins_url());
1349 1349
 
1350
-			if(!empty($url_parts[0]) && !empty($dir_parts[1])){
1351
-				$url = trailingslashit( $url_parts[0]."/$wp_content_folder_name/".$dir_parts[1] );
1350
+			if (!empty($url_parts[0]) && !empty($dir_parts[1])) {
1351
+				$url = trailingslashit($url_parts[0] . "/$wp_content_folder_name/" . $dir_parts[1]);
1352 1352
 			}
1353 1353
 
1354 1354
 			return $url;
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
 		 * Register the database settings with WordPress.
1359 1359
 		 */
1360 1360
 		public function register_settings() {
1361
-			register_setting( 'ayecode-ui-settings', 'ayecode-ui-settings' );
1361
+			register_setting('ayecode-ui-settings', 'ayecode-ui-settings');
1362 1362
 		}
1363 1363
 
1364 1364
 		/**
@@ -1367,10 +1367,10 @@  discard block
 block discarded – undo
1367 1367
 		 */
1368 1368
 		public function menu_item() {
1369 1369
 			$menu_function = 'add' . '_' . 'options' . '_' . 'page'; // won't pass theme check if function name present in theme
1370
-			call_user_func( $menu_function, $this->name, $this->name, 'manage_options', 'ayecode-ui-settings', array(
1370
+			call_user_func($menu_function, $this->name, $this->name, 'manage_options', 'ayecode-ui-settings', array(
1371 1371
 				$this,
1372 1372
 				'settings_page'
1373
-			) );
1373
+			));
1374 1374
 		}
1375 1375
 
1376 1376
 		/**
@@ -1378,7 +1378,7 @@  discard block
 block discarded – undo
1378 1378
 		 *
1379 1379
 		 * @return array
1380 1380
 		 */
1381
-		public function theme_js_settings(){
1381
+		public function theme_js_settings() {
1382 1382
 			return array(
1383 1383
 				'ayetheme' => 'popper',
1384 1384
 				'listimia' => 'required',
@@ -1394,17 +1394,17 @@  discard block
 block discarded – undo
1394 1394
 		 */
1395 1395
 		public function get_settings() {
1396 1396
 
1397
-			$db_settings = get_option( 'ayecode-ui-settings' );
1397
+			$db_settings = get_option('ayecode-ui-settings');
1398 1398
 			$js_default = 'core-popper';
1399 1399
 			$js_default_backend = $js_default;
1400 1400
 
1401 1401
 			// maybe set defaults (if no settings set)
1402
-			if(empty($db_settings)){
1403
-				$active_theme = strtolower( get_template() ); // active parent theme.
1402
+			if (empty($db_settings)) {
1403
+				$active_theme = strtolower(get_template()); // active parent theme.
1404 1404
 				$theme_js_settings = self::theme_js_settings();
1405
-				if(isset($theme_js_settings[$active_theme])){
1405
+				if (isset($theme_js_settings[$active_theme])) {
1406 1406
 					$js_default = $theme_js_settings[$active_theme];
1407
-					$js_default_backend = isset($theme_js_settings[$active_theme."_backend"]) ? $theme_js_settings[$active_theme."_backend"] : $js_default;
1407
+					$js_default_backend = isset($theme_js_settings[$active_theme . "_backend"]) ? $theme_js_settings[$active_theme . "_backend"] : $js_default;
1408 1408
 				}
1409 1409
 			}
1410 1410
 
@@ -1417,14 +1417,14 @@  discard block
 block discarded – undo
1417 1417
 				'disable_admin'     =>  '', // URL snippets to disable loading on admin
1418 1418
 			);
1419 1419
 
1420
-			$settings = wp_parse_args( $db_settings, $defaults );
1420
+			$settings = wp_parse_args($db_settings, $defaults);
1421 1421
 
1422 1422
 			/**
1423 1423
 			 * Filter the Bootstrap settings.
1424 1424
 			 *
1425 1425
 			 * @todo if we add this filer people might use it and then it defeates the purpose of this class :/
1426 1426
 			 */
1427
-			return $this->settings = apply_filters( 'ayecode-ui-settings', $settings, $db_settings, $defaults );
1427
+			return $this->settings = apply_filters('ayecode-ui-settings', $settings, $db_settings, $defaults);
1428 1428
 		}
1429 1429
 
1430 1430
 
@@ -1432,90 +1432,90 @@  discard block
 block discarded – undo
1432 1432
 		 * The settings page html output.
1433 1433
 		 */
1434 1434
 		public function settings_page() {
1435
-			if ( ! current_user_can( 'manage_options' ) ) {
1436
-				wp_die( __( 'You do not have sufficient permissions to access this page.', 'aui' ) );
1435
+			if (!current_user_can('manage_options')) {
1436
+				wp_die(__('You do not have sufficient permissions to access this page.', 'aui'));
1437 1437
 			}
1438 1438
 			?>
1439 1439
 			<div class="wrap">
1440 1440
 				<h1><?php echo $this->name; ?></h1>
1441
-				<p><?php _e("Here you can adjust settings if you are having compatibility issues.",'aui');?></p>
1441
+				<p><?php _e("Here you can adjust settings if you are having compatibility issues.", 'aui'); ?></p>
1442 1442
 				<form method="post" action="options.php">
1443 1443
 					<?php
1444
-					settings_fields( 'ayecode-ui-settings' );
1445
-					do_settings_sections( 'ayecode-ui-settings' );
1444
+					settings_fields('ayecode-ui-settings');
1445
+					do_settings_sections('ayecode-ui-settings');
1446 1446
 					?>
1447 1447
 
1448
-					<h2><?php _e( 'Frontend', 'aui' ); ?></h2>
1448
+					<h2><?php _e('Frontend', 'aui'); ?></h2>
1449 1449
 					<table class="form-table wpbs-table-settings">
1450 1450
 						<tr valign="top">
1451 1451
 							<th scope="row"><label
1452
-									for="wpbs-css"><?php _e( 'Load CSS', 'aui' ); ?></label></th>
1452
+									for="wpbs-css"><?php _e('Load CSS', 'aui'); ?></label></th>
1453 1453
 							<td>
1454 1454
 								<select name="ayecode-ui-settings[css]" id="wpbs-css">
1455
-									<option	value="compatibility" <?php selected( $this->settings['css'], 'compatibility' ); ?>><?php _e( 'Compatibility Mode (default)', 'aui' ); ?></option>
1456
-									<option value="core" <?php selected( $this->settings['css'], 'core' ); ?>><?php _e( 'Full Mode', 'aui' ); ?></option>
1457
-									<option	value="" <?php selected( $this->settings['css'], '' ); ?>><?php _e( 'Disabled', 'aui' ); ?></option>
1455
+									<option	value="compatibility" <?php selected($this->settings['css'], 'compatibility'); ?>><?php _e('Compatibility Mode (default)', 'aui'); ?></option>
1456
+									<option value="core" <?php selected($this->settings['css'], 'core'); ?>><?php _e('Full Mode', 'aui'); ?></option>
1457
+									<option	value="" <?php selected($this->settings['css'], ''); ?>><?php _e('Disabled', 'aui'); ?></option>
1458 1458
 								</select>
1459 1459
 							</td>
1460 1460
 						</tr>
1461 1461
 
1462 1462
 						<tr valign="top">
1463 1463
 							<th scope="row"><label
1464
-									for="wpbs-js"><?php _e( 'Load JS', 'aui' ); ?></label></th>
1464
+									for="wpbs-js"><?php _e('Load JS', 'aui'); ?></label></th>
1465 1465
 							<td>
1466 1466
 								<select name="ayecode-ui-settings[js]" id="wpbs-js">
1467
-									<option	value="core-popper" <?php selected( $this->settings['js'], 'core-popper' ); ?>><?php _e( 'Core + Popper (default)', 'aui' ); ?></option>
1468
-									<option value="popper" <?php selected( $this->settings['js'], 'popper' ); ?>><?php _e( 'Popper', 'aui' ); ?></option>
1469
-									<option value="required" <?php selected( $this->settings['js'], 'required' ); ?>><?php _e( 'Required functions only', 'aui' ); ?></option>
1470
-									<option	value="" <?php selected( $this->settings['js'], '' ); ?>><?php _e( 'Disabled (not recommended)', 'aui' ); ?></option>
1467
+									<option	value="core-popper" <?php selected($this->settings['js'], 'core-popper'); ?>><?php _e('Core + Popper (default)', 'aui'); ?></option>
1468
+									<option value="popper" <?php selected($this->settings['js'], 'popper'); ?>><?php _e('Popper', 'aui'); ?></option>
1469
+									<option value="required" <?php selected($this->settings['js'], 'required'); ?>><?php _e('Required functions only', 'aui'); ?></option>
1470
+									<option	value="" <?php selected($this->settings['js'], ''); ?>><?php _e('Disabled (not recommended)', 'aui'); ?></option>
1471 1471
 								</select>
1472 1472
 							</td>
1473 1473
 						</tr>
1474 1474
 
1475 1475
 						<tr valign="top">
1476 1476
 							<th scope="row"><label
1477
-									for="wpbs-font_size"><?php _e( 'HTML Font Size (px)', 'aui' ); ?></label></th>
1477
+									for="wpbs-font_size"><?php _e('HTML Font Size (px)', 'aui'); ?></label></th>
1478 1478
 							<td>
1479
-								<input type="number" name="ayecode-ui-settings[html_font_size]" id="wpbs-font_size" value="<?php echo absint( $this->settings['html_font_size']); ?>" placeholder="16" />
1480
-								<p class="description" ><?php _e("Our font sizing is rem (responsive based) here you can set the html font size in-case your theme is setting it too low.",'aui');?></p>
1479
+								<input type="number" name="ayecode-ui-settings[html_font_size]" id="wpbs-font_size" value="<?php echo absint($this->settings['html_font_size']); ?>" placeholder="16" />
1480
+								<p class="description" ><?php _e("Our font sizing is rem (responsive based) here you can set the html font size in-case your theme is setting it too low.", 'aui'); ?></p>
1481 1481
 							</td>
1482 1482
 						</tr>
1483 1483
 
1484 1484
 					</table>
1485 1485
 
1486
-					<h2><?php _e( 'Backend', 'aui' ); ?> (wp-admin)</h2>
1486
+					<h2><?php _e('Backend', 'aui'); ?> (wp-admin)</h2>
1487 1487
 					<table class="form-table wpbs-table-settings">
1488 1488
 						<tr valign="top">
1489 1489
 							<th scope="row"><label
1490
-									for="wpbs-css-admin"><?php _e( 'Load CSS', 'aui' ); ?></label></th>
1490
+									for="wpbs-css-admin"><?php _e('Load CSS', 'aui'); ?></label></th>
1491 1491
 							<td>
1492 1492
 								<select name="ayecode-ui-settings[css_backend]" id="wpbs-css-admin">
1493
-									<option	value="compatibility" <?php selected( $this->settings['css_backend'], 'compatibility' ); ?>><?php _e( 'Compatibility Mode (default)', 'aui' ); ?></option>
1494
-									<option value="core" <?php selected( $this->settings['css_backend'], 'core' ); ?>><?php _e( 'Full Mode (will cause style issues)', 'aui' ); ?></option>
1495
-									<option	value="" <?php selected( $this->settings['css_backend'], '' ); ?>><?php _e( 'Disabled', 'aui' ); ?></option>
1493
+									<option	value="compatibility" <?php selected($this->settings['css_backend'], 'compatibility'); ?>><?php _e('Compatibility Mode (default)', 'aui'); ?></option>
1494
+									<option value="core" <?php selected($this->settings['css_backend'], 'core'); ?>><?php _e('Full Mode (will cause style issues)', 'aui'); ?></option>
1495
+									<option	value="" <?php selected($this->settings['css_backend'], ''); ?>><?php _e('Disabled', 'aui'); ?></option>
1496 1496
 								</select>
1497 1497
 							</td>
1498 1498
 						</tr>
1499 1499
 
1500 1500
 						<tr valign="top">
1501 1501
 							<th scope="row"><label
1502
-									for="wpbs-js-admin"><?php _e( 'Load JS', 'aui' ); ?></label></th>
1502
+									for="wpbs-js-admin"><?php _e('Load JS', 'aui'); ?></label></th>
1503 1503
 							<td>
1504 1504
 								<select name="ayecode-ui-settings[js_backend]" id="wpbs-js-admin">
1505
-									<option	value="core-popper" <?php selected( $this->settings['js_backend'], 'core-popper' ); ?>><?php _e( 'Core + Popper (default)', 'aui' ); ?></option>
1506
-									<option value="popper" <?php selected( $this->settings['js_backend'], 'popper' ); ?>><?php _e( 'Popper', 'aui' ); ?></option>
1507
-									<option value="required" <?php selected( $this->settings['js_backend'], 'required' ); ?>><?php _e( 'Required functions only', 'aui' ); ?></option>
1508
-									<option	value="" <?php selected( $this->settings['js_backend'], '' ); ?>><?php _e( 'Disabled (not recommended)', 'aui' ); ?></option>
1505
+									<option	value="core-popper" <?php selected($this->settings['js_backend'], 'core-popper'); ?>><?php _e('Core + Popper (default)', 'aui'); ?></option>
1506
+									<option value="popper" <?php selected($this->settings['js_backend'], 'popper'); ?>><?php _e('Popper', 'aui'); ?></option>
1507
+									<option value="required" <?php selected($this->settings['js_backend'], 'required'); ?>><?php _e('Required functions only', 'aui'); ?></option>
1508
+									<option	value="" <?php selected($this->settings['js_backend'], ''); ?>><?php _e('Disabled (not recommended)', 'aui'); ?></option>
1509 1509
 								</select>
1510 1510
 							</td>
1511 1511
 						</tr>
1512 1512
 
1513 1513
 						<tr valign="top">
1514 1514
 							<th scope="row"><label
1515
-									for="wpbs-disable-admin"><?php _e( 'Disable load on URL', 'aui' ); ?></label></th>
1515
+									for="wpbs-disable-admin"><?php _e('Disable load on URL', 'aui'); ?></label></th>
1516 1516
 							<td>
1517
-								<p><?php _e( 'If you have backend conflict you can enter a partial URL argument that will disable the loading of AUI on those pages. Add each argument on a new line.', 'aui' ); ?></p>
1518
-								<textarea name="ayecode-ui-settings[disable_admin]" rows="10" cols="50" id="wpbs-disable-admin" class="large-text code" spellcheck="false" placeholder="myplugin.php &#10;action=go"><?php echo $this->settings['disable_admin'];?></textarea>
1517
+								<p><?php _e('If you have backend conflict you can enter a partial URL argument that will disable the loading of AUI on those pages. Add each argument on a new line.', 'aui'); ?></p>
1518
+								<textarea name="ayecode-ui-settings[disable_admin]" rows="10" cols="50" id="wpbs-disable-admin" class="large-text code" spellcheck="false" placeholder="myplugin.php &#10;action=go"><?php echo $this->settings['disable_admin']; ?></textarea>
1519 1519
 
1520 1520
 							</td>
1521 1521
 						</tr>
@@ -1533,9 +1533,9 @@  discard block
 block discarded – undo
1533 1533
 			<?php
1534 1534
 		}
1535 1535
 
1536
-		public function customizer_settings($wp_customize){
1536
+		public function customizer_settings($wp_customize) {
1537 1537
 			$wp_customize->add_section('aui_settings', array(
1538
-				'title'    => __('AyeCode UI','aui'),
1538
+				'title'    => __('AyeCode UI', 'aui'),
1539 1539
 				'priority' => 120,
1540 1540
 			));
1541 1541
 
@@ -1549,8 +1549,8 @@  discard block
 block discarded – undo
1549 1549
 				'type'              => 'option',
1550 1550
 				'transport'         => 'refresh',
1551 1551
 			));
1552
-			$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'color_primary', array(
1553
-				'label'    => __('Primary Color','aui'),
1552
+			$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'color_primary', array(
1553
+				'label'    => __('Primary Color', 'aui'),
1554 1554
 				'section'  => 'aui_settings',
1555 1555
 				'settings' => 'aui_options[color_primary]',
1556 1556
 			)));
@@ -1562,8 +1562,8 @@  discard block
 block discarded – undo
1562 1562
 				'type'              => 'option',
1563 1563
 				'transport'         => 'refresh',
1564 1564
 			));
1565
-			$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'color_secondary', array(
1566
-				'label'    => __('Secondary Color','aui'),
1565
+			$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'color_secondary', array(
1566
+				'label'    => __('Secondary Color', 'aui'),
1567 1567
 				'section'  => 'aui_settings',
1568 1568
 				'settings' => 'aui_options[color_secondary]',
1569 1569
 			)));
@@ -1589,12 +1589,12 @@  discard block
 block discarded – undo
1589 1589
 			.collapse.show:not(.in){display: inherit;}
1590 1590
 			.fade.show{opacity: 1;}
1591 1591
 
1592
-			<?php if( defined( 'SVQ_THEME_VERSION' ) ){ ?>
1592
+			<?php if (defined('SVQ_THEME_VERSION')) { ?>
1593 1593
 			/* KLEO theme specific */
1594 1594
 			.kleo-main-header .navbar-collapse.collapse.show:not(.in){display: block !important;}
1595 1595
 			<?php } ?>
1596 1596
 
1597
-			<?php if( defined( 'FUSION_BUILDER_VERSION' ) ){ ?>
1597
+			<?php if (defined('FUSION_BUILDER_VERSION')) { ?>
1598 1598
 			/* With Avada builder */
1599 1599
 			body.modal-open .modal.in  {opacity:1;z-index: 99999}
1600 1600
 			body.modal-open .modal.bsui.in .modal-content  {box-shadow: none;}
@@ -1605,10 +1605,10 @@  discard block
 block discarded – undo
1605 1605
 			<?php } ?>
1606 1606
 			</style>
1607 1607
 			<?php
1608
-			return str_replace( array(
1608
+			return str_replace(array(
1609 1609
 				'<style>',
1610 1610
 				'</style>'
1611
-			), '', self::minify_css( ob_get_clean() ) );
1611
+			), '', self::minify_css(ob_get_clean()));
1612 1612
 		}
1613 1613
 
1614 1614
 
@@ -1625,22 +1625,22 @@  discard block
 block discarded – undo
1625 1625
 				<?php
1626 1626
 
1627 1627
 					// BS v3 compat
1628
-					if( self::is_bs3_compat() ){
1628
+					if (self::is_bs3_compat()) {
1629 1629
 					    echo self::bs3_compat_css();
1630 1630
 					}
1631 1631
 
1632
-					if(!is_admin() && $primary_color != AUI_PRIMARY_COLOR_ORIGINAL){
1633
-						echo self::css_primary($primary_color,$compatibility);
1632
+					if (!is_admin() && $primary_color != AUI_PRIMARY_COLOR_ORIGINAL) {
1633
+						echo self::css_primary($primary_color, $compatibility);
1634 1634
 					}
1635 1635
 
1636
-					if(!is_admin() && $secondary_color != AUI_SECONDARY_COLOR_ORIGINAL){
1637
-						echo self::css_secondary($settings['color_secondary'],$compatibility);
1636
+					if (!is_admin() && $secondary_color != AUI_SECONDARY_COLOR_ORIGINAL) {
1637
+						echo self::css_secondary($settings['color_secondary'], $compatibility);
1638 1638
 					}
1639 1639
 
1640 1640
 					// Set admin bar z-index lower when modal is open.
1641 1641
 					echo ' body.modal-open #wpadminbar{z-index:999}.embed-responsive-16by9 .fluid-width-video-wrapper{padding:0 !important;position:initial}';
1642 1642
 
1643
-					if(is_admin()){
1643
+					if (is_admin()) {
1644 1644
 						echo ' body.modal-open #adminmenuwrap{z-index:999} body.modal-open #wpadminbar{z-index:1025}';
1645 1645
 					}
1646 1646
                 ?>
@@ -1651,10 +1651,10 @@  discard block
 block discarded – undo
1651 1651
 			/*
1652 1652
 			 * We only add the <script> tags for code highlighting, so we strip them from the output.
1653 1653
 			 */
1654
-			return str_replace( array(
1654
+			return str_replace(array(
1655 1655
 				'<style>',
1656 1656
 				'</style>'
1657
-			), '', self::minify_css( ob_get_clean() ) );
1657
+			), '', self::minify_css(ob_get_clean()));
1658 1658
 		}
1659 1659
 
1660 1660
 		/**
@@ -1662,48 +1662,48 @@  discard block
 block discarded – undo
1662 1662
 		 *
1663 1663
 		 * @return bool
1664 1664
 		 */
1665
-		public static function is_bs3_compat(){
1665
+		public static function is_bs3_compat() {
1666 1666
 			return defined('AYECODE_UI_BS3_COMPAT') || defined('SVQ_THEME_VERSION') || defined('FUSION_BUILDER_VERSION');
1667 1667
 		}
1668 1668
 
1669
-		public static function css_primary($color_code,$compatibility){;
1669
+		public static function css_primary($color_code, $compatibility) {;
1670 1670
 			$color_code = sanitize_hex_color($color_code);
1671
-			if(!$color_code){return '';}
1671
+			if (!$color_code) {return ''; }
1672 1672
 			/**
1673 1673
 			 * c = color, b = background color, o = border-color, f = fill
1674 1674
 			 */
1675 1675
 			$selectors = array(
1676 1676
 				'a' => array('c'),
1677
-				'.btn-primary' => array('b','o'),
1678
-				'.btn-primary.disabled' => array('b','o'),
1679
-				'.btn-primary:disabled' => array('b','o'),
1680
-				'.btn-outline-primary' => array('c','o'),
1681
-				'.btn-outline-primary:hover' => array('b','o'),
1682
-				'.btn-outline-primary:not(:disabled):not(.disabled).active' => array('b','o'),
1683
-				'.btn-outline-primary:not(:disabled):not(.disabled):active' => array('b','o'),
1684
-				'.show>.btn-outline-primary.dropdown-toggle' => array('b','o'),
1677
+				'.btn-primary' => array('b', 'o'),
1678
+				'.btn-primary.disabled' => array('b', 'o'),
1679
+				'.btn-primary:disabled' => array('b', 'o'),
1680
+				'.btn-outline-primary' => array('c', 'o'),
1681
+				'.btn-outline-primary:hover' => array('b', 'o'),
1682
+				'.btn-outline-primary:not(:disabled):not(.disabled).active' => array('b', 'o'),
1683
+				'.btn-outline-primary:not(:disabled):not(.disabled):active' => array('b', 'o'),
1684
+				'.show>.btn-outline-primary.dropdown-toggle' => array('b', 'o'),
1685 1685
 				'.btn-link' => array('c'),
1686 1686
 				'.dropdown-item.active' => array('b'),
1687
-				'.custom-control-input:checked~.custom-control-label::before' => array('b','o'),
1688
-				'.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before' => array('b','o'),
1687
+				'.custom-control-input:checked~.custom-control-label::before' => array('b', 'o'),
1688
+				'.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before' => array('b', 'o'),
1689 1689
 //				'.custom-range::-webkit-slider-thumb' => array('b'), // these break the inline rules...
1690 1690
 //				'.custom-range::-moz-range-thumb' => array('b'),
1691 1691
 //				'.custom-range::-ms-thumb' => array('b'),
1692 1692
 				'.nav-pills .nav-link.active' => array('b'),
1693 1693
 				'.nav-pills .show>.nav-link' => array('b'),
1694 1694
 				'.page-link' => array('c'),
1695
-				'.page-item.active .page-link' => array('b','o'),
1695
+				'.page-item.active .page-link' => array('b', 'o'),
1696 1696
 				'.badge-primary' => array('b'),
1697
-				'.alert-primary' => array('b','o'),
1697
+				'.alert-primary' => array('b', 'o'),
1698 1698
 				'.progress-bar' => array('b'),
1699
-				'.list-group-item.active' => array('b','o'),
1700
-				'.bg-primary' => array('b','f'),
1699
+				'.list-group-item.active' => array('b', 'o'),
1700
+				'.bg-primary' => array('b', 'f'),
1701 1701
 				'.btn-link.btn-primary' => array('c'),
1702 1702
 				'.select2-container .select2-results__option--highlighted.select2-results__option[aria-selected=true]' => array('b'),
1703 1703
 			);
1704 1704
 
1705 1705
 			$important_selectors = array(
1706
-				'.bg-primary' => array('b','f'),
1706
+				'.bg-primary' => array('b', 'f'),
1707 1707
 				'.border-primary' => array('o'),
1708 1708
 				'.text-primary' => array('c'),
1709 1709
 			);
@@ -1720,116 +1720,116 @@  discard block
 block discarded – undo
1720 1720
 			$output = '';
1721 1721
 
1722 1722
 			// build rules into each type
1723
-			foreach($selectors as $selector => $types){
1724
-				$selector = $compatibility ? ".bsui ".$selector : $selector;
1725
-				$types = array_combine($types,$types);
1726
-				if(isset($types['c'])){$color[] = $selector;}
1727
-				if(isset($types['b'])){$background[] = $selector;}
1728
-				if(isset($types['o'])){$border[] = $selector;}
1729
-				if(isset($types['f'])){$fill[] = $selector;}
1723
+			foreach ($selectors as $selector => $types) {
1724
+				$selector = $compatibility ? ".bsui " . $selector : $selector;
1725
+				$types = array_combine($types, $types);
1726
+				if (isset($types['c'])) {$color[] = $selector; }
1727
+				if (isset($types['b'])) {$background[] = $selector; }
1728
+				if (isset($types['o'])) {$border[] = $selector; }
1729
+				if (isset($types['f'])) {$fill[] = $selector; }
1730 1730
 			}
1731 1731
 
1732 1732
 			// build rules into each type
1733
-			foreach($important_selectors as $selector => $types){
1734
-				$selector = $compatibility ? ".bsui ".$selector : $selector;
1735
-				$types = array_combine($types,$types);
1736
-				if(isset($types['c'])){$color_i[] = $selector;}
1737
-				if(isset($types['b'])){$background_i[] = $selector;}
1738
-				if(isset($types['o'])){$border_i[] = $selector;}
1739
-				if(isset($types['f'])){$fill_i[] = $selector;}
1733
+			foreach ($important_selectors as $selector => $types) {
1734
+				$selector = $compatibility ? ".bsui " . $selector : $selector;
1735
+				$types = array_combine($types, $types);
1736
+				if (isset($types['c'])) {$color_i[] = $selector; }
1737
+				if (isset($types['b'])) {$background_i[] = $selector; }
1738
+				if (isset($types['o'])) {$border_i[] = $selector; }
1739
+				if (isset($types['f'])) {$fill_i[] = $selector; }
1740 1740
 			}
1741 1741
 
1742 1742
 			// add any color rules
1743
-			if(!empty($color)){
1744
-				$output .= implode(",",$color) . "{color: $color_code;} ";
1743
+			if (!empty($color)) {
1744
+				$output .= implode(",", $color) . "{color: $color_code;} ";
1745 1745
 			}
1746
-			if(!empty($color_i)){
1747
-				$output .= implode(",",$color_i) . "{color: $color_code !important;} ";
1746
+			if (!empty($color_i)) {
1747
+				$output .= implode(",", $color_i) . "{color: $color_code !important;} ";
1748 1748
 			}
1749 1749
 
1750 1750
 			// add any background color rules
1751
-			if(!empty($background)){
1752
-				$output .= implode(",",$background) . "{background-color: $color_code;} ";
1751
+			if (!empty($background)) {
1752
+				$output .= implode(",", $background) . "{background-color: $color_code;} ";
1753 1753
 			}
1754
-			if(!empty($background_i)){
1755
-				$output .= implode(",",$background_i) . "{background-color: $color_code !important;} ";
1754
+			if (!empty($background_i)) {
1755
+				$output .= implode(",", $background_i) . "{background-color: $color_code !important;} ";
1756 1756
 			}
1757 1757
 
1758 1758
 			// add any border color rules
1759
-			if(!empty($border)){
1760
-				$output .= implode(",",$border) . "{border-color: $color_code;} ";
1759
+			if (!empty($border)) {
1760
+				$output .= implode(",", $border) . "{border-color: $color_code;} ";
1761 1761
 			}
1762
-			if(!empty($border_i)){
1763
-				$output .= implode(",",$border_i) . "{border-color: $color_code !important;} ";
1762
+			if (!empty($border_i)) {
1763
+				$output .= implode(",", $border_i) . "{border-color: $color_code !important;} ";
1764 1764
 			}
1765 1765
 
1766 1766
 			// add any fill color rules
1767
-			if(!empty($fill)){
1768
-				$output .= implode(",",$fill) . "{fill: $color_code;} ";
1767
+			if (!empty($fill)) {
1768
+				$output .= implode(",", $fill) . "{fill: $color_code;} ";
1769 1769
 			}
1770
-			if(!empty($fill_i)){
1771
-				$output .= implode(",",$fill_i) . "{fill: $color_code !important;} ";
1770
+			if (!empty($fill_i)) {
1771
+				$output .= implode(",", $fill_i) . "{fill: $color_code !important;} ";
1772 1772
 			}
1773 1773
 
1774 1774
 
1775 1775
 			$prefix = $compatibility ? ".bsui " : "";
1776 1776
 
1777 1777
 			// darken
1778
-			$darker_075 = self::css_hex_lighten_darken($color_code,"-0.075");
1779
-			$darker_10 = self::css_hex_lighten_darken($color_code,"-0.10");
1780
-			$darker_125 = self::css_hex_lighten_darken($color_code,"-0.125");
1778
+			$darker_075 = self::css_hex_lighten_darken($color_code, "-0.075");
1779
+			$darker_10 = self::css_hex_lighten_darken($color_code, "-0.10");
1780
+			$darker_125 = self::css_hex_lighten_darken($color_code, "-0.125");
1781 1781
 
1782 1782
 			// lighten
1783
-			$lighten_25 = self::css_hex_lighten_darken($color_code,"0.25");
1783
+			$lighten_25 = self::css_hex_lighten_darken($color_code, "0.25");
1784 1784
 
1785 1785
 			// opacity see https://css-tricks.com/8-digit-hex-codes/
1786
-			$op_25 = $color_code."40"; // 25% opacity
1786
+			$op_25 = $color_code . "40"; // 25% opacity
1787 1787
 
1788 1788
 
1789 1789
 			// button states
1790
-			$output .= $prefix ." .btn-primary:hover, $prefix .btn-primary:focus, $prefix .btn-primary.focus{background-color: ".$darker_075.";    border-color: ".$darker_10.";} ";
1791
-			$output .= $prefix ." .btn-outline-primary:not(:disabled):not(.disabled):active:focus, $prefix .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show>$prefix .btn-outline-primary.dropdown-toggle:focus{box-shadow: 0 0 0 0.2rem $op_25;} ";
1792
-			$output .= $prefix ." .btn-primary:not(:disabled):not(.disabled):active, $prefix .btn-primary:not(:disabled):not(.disabled).active, .show>$prefix .btn-primary.dropdown-toggle{background-color: ".$darker_10.";    border-color: ".$darker_125.";} ";
1793
-			$output .= $prefix ." .btn-primary:not(:disabled):not(.disabled):active:focus, $prefix .btn-primary:not(:disabled):not(.disabled).active:focus, .show>$prefix .btn-primary.dropdown-toggle:focus {box-shadow: 0 0 0 0.2rem $op_25;} ";
1790
+			$output .= $prefix . " .btn-primary:hover, $prefix .btn-primary:focus, $prefix .btn-primary.focus{background-color: " . $darker_075 . ";    border-color: " . $darker_10 . ";} ";
1791
+			$output .= $prefix . " .btn-outline-primary:not(:disabled):not(.disabled):active:focus, $prefix .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show>$prefix .btn-outline-primary.dropdown-toggle:focus{box-shadow: 0 0 0 0.2rem $op_25;} ";
1792
+			$output .= $prefix . " .btn-primary:not(:disabled):not(.disabled):active, $prefix .btn-primary:not(:disabled):not(.disabled).active, .show>$prefix .btn-primary.dropdown-toggle{background-color: " . $darker_10 . ";    border-color: " . $darker_125 . ";} ";
1793
+			$output .= $prefix . " .btn-primary:not(:disabled):not(.disabled):active:focus, $prefix .btn-primary:not(:disabled):not(.disabled).active:focus, .show>$prefix .btn-primary.dropdown-toggle:focus {box-shadow: 0 0 0 0.2rem $op_25;} ";
1794 1794
 
1795 1795
 
1796 1796
 			// dropdown's
1797
-			$output .= $prefix ." .dropdown-item.active, $prefix .dropdown-item:active{background-color: $color_code;} ";
1797
+			$output .= $prefix . " .dropdown-item.active, $prefix .dropdown-item:active{background-color: $color_code;} ";
1798 1798
 
1799 1799
 
1800 1800
 			// input states
1801
-			$output .= $prefix ." .form-control:focus{border-color: ".$lighten_25.";box-shadow: 0 0 0 0.2rem $op_25;} ";
1801
+			$output .= $prefix . " .form-control:focus{border-color: " . $lighten_25 . ";box-shadow: 0 0 0 0.2rem $op_25;} ";
1802 1802
 
1803 1803
 			// page link
1804
-			$output .= $prefix ." .page-link:focus{box-shadow: 0 0 0 0.2rem $op_25;} ";
1804
+			$output .= $prefix . " .page-link:focus{box-shadow: 0 0 0 0.2rem $op_25;} ";
1805 1805
 
1806 1806
 			return $output;
1807 1807
 		}
1808 1808
 
1809
-		public static function css_secondary($color_code,$compatibility){;
1809
+		public static function css_secondary($color_code, $compatibility) {;
1810 1810
 			$color_code = sanitize_hex_color($color_code);
1811
-			if(!$color_code){return '';}
1811
+			if (!$color_code) {return ''; }
1812 1812
 			/**
1813 1813
 			 * c = color, b = background color, o = border-color, f = fill
1814 1814
 			 */
1815 1815
 			$selectors = array(
1816
-				'.btn-secondary' => array('b','o'),
1817
-				'.btn-secondary.disabled' => array('b','o'),
1818
-				'.btn-secondary:disabled' => array('b','o'),
1819
-				'.btn-outline-secondary' => array('c','o'),
1820
-				'.btn-outline-secondary:hover' => array('b','o'),
1816
+				'.btn-secondary' => array('b', 'o'),
1817
+				'.btn-secondary.disabled' => array('b', 'o'),
1818
+				'.btn-secondary:disabled' => array('b', 'o'),
1819
+				'.btn-outline-secondary' => array('c', 'o'),
1820
+				'.btn-outline-secondary:hover' => array('b', 'o'),
1821 1821
 				'.btn-outline-secondary.disabled' => array('c'),
1822 1822
 				'.btn-outline-secondary:disabled' => array('c'),
1823
-				'.btn-outline-secondary:not(:disabled):not(.disabled):active' => array('b','o'),
1824
-				'.btn-outline-secondary:not(:disabled):not(.disabled).active' => array('b','o'),
1825
-				'.btn-outline-secondary.dropdown-toggle' => array('b','o'),
1823
+				'.btn-outline-secondary:not(:disabled):not(.disabled):active' => array('b', 'o'),
1824
+				'.btn-outline-secondary:not(:disabled):not(.disabled).active' => array('b', 'o'),
1825
+				'.btn-outline-secondary.dropdown-toggle' => array('b', 'o'),
1826 1826
 				'.badge-secondary' => array('b'),
1827
-				'.alert-secondary' => array('b','o'),
1827
+				'.alert-secondary' => array('b', 'o'),
1828 1828
 				'.btn-link.btn-secondary' => array('c'),
1829 1829
 			);
1830 1830
 
1831 1831
 			$important_selectors = array(
1832
-				'.bg-secondary' => array('b','f'),
1832
+				'.bg-secondary' => array('b', 'f'),
1833 1833
 				'.border-secondary' => array('o'),
1834 1834
 				'.text-secondary' => array('c'),
1835 1835
 			);
@@ -1846,77 +1846,77 @@  discard block
 block discarded – undo
1846 1846
 			$output = '';
1847 1847
 
1848 1848
 			// build rules into each type
1849
-			foreach($selectors as $selector => $types){
1850
-				$selector = $compatibility ? ".bsui ".$selector : $selector;
1851
-				$types = array_combine($types,$types);
1852
-				if(isset($types['c'])){$color[] = $selector;}
1853
-				if(isset($types['b'])){$background[] = $selector;}
1854
-				if(isset($types['o'])){$border[] = $selector;}
1855
-				if(isset($types['f'])){$fill[] = $selector;}
1849
+			foreach ($selectors as $selector => $types) {
1850
+				$selector = $compatibility ? ".bsui " . $selector : $selector;
1851
+				$types = array_combine($types, $types);
1852
+				if (isset($types['c'])) {$color[] = $selector; }
1853
+				if (isset($types['b'])) {$background[] = $selector; }
1854
+				if (isset($types['o'])) {$border[] = $selector; }
1855
+				if (isset($types['f'])) {$fill[] = $selector; }
1856 1856
 			}
1857 1857
 
1858 1858
 			// build rules into each type
1859
-			foreach($important_selectors as $selector => $types){
1860
-				$selector = $compatibility ? ".bsui ".$selector : $selector;
1861
-				$types = array_combine($types,$types);
1862
-				if(isset($types['c'])){$color_i[] = $selector;}
1863
-				if(isset($types['b'])){$background_i[] = $selector;}
1864
-				if(isset($types['o'])){$border_i[] = $selector;}
1865
-				if(isset($types['f'])){$fill_i[] = $selector;}
1859
+			foreach ($important_selectors as $selector => $types) {
1860
+				$selector = $compatibility ? ".bsui " . $selector : $selector;
1861
+				$types = array_combine($types, $types);
1862
+				if (isset($types['c'])) {$color_i[] = $selector; }
1863
+				if (isset($types['b'])) {$background_i[] = $selector; }
1864
+				if (isset($types['o'])) {$border_i[] = $selector; }
1865
+				if (isset($types['f'])) {$fill_i[] = $selector; }
1866 1866
 			}
1867 1867
 
1868 1868
 			// add any color rules
1869
-			if(!empty($color)){
1870
-				$output .= implode(",",$color) . "{color: $color_code;} ";
1869
+			if (!empty($color)) {
1870
+				$output .= implode(",", $color) . "{color: $color_code;} ";
1871 1871
 			}
1872
-			if(!empty($color_i)){
1873
-				$output .= implode(",",$color_i) . "{color: $color_code !important;} ";
1872
+			if (!empty($color_i)) {
1873
+				$output .= implode(",", $color_i) . "{color: $color_code !important;} ";
1874 1874
 			}
1875 1875
 
1876 1876
 			// add any background color rules
1877
-			if(!empty($background)){
1878
-				$output .= implode(",",$background) . "{background-color: $color_code;} ";
1877
+			if (!empty($background)) {
1878
+				$output .= implode(",", $background) . "{background-color: $color_code;} ";
1879 1879
 			}
1880
-			if(!empty($background_i)){
1881
-				$output .= implode(",",$background_i) . "{background-color: $color_code !important;} ";
1880
+			if (!empty($background_i)) {
1881
+				$output .= implode(",", $background_i) . "{background-color: $color_code !important;} ";
1882 1882
 			}
1883 1883
 
1884 1884
 			// add any border color rules
1885
-			if(!empty($border)){
1886
-				$output .= implode(",",$border) . "{border-color: $color_code;} ";
1885
+			if (!empty($border)) {
1886
+				$output .= implode(",", $border) . "{border-color: $color_code;} ";
1887 1887
 			}
1888
-			if(!empty($border_i)){
1889
-				$output .= implode(",",$border_i) . "{border-color: $color_code !important;} ";
1888
+			if (!empty($border_i)) {
1889
+				$output .= implode(",", $border_i) . "{border-color: $color_code !important;} ";
1890 1890
 			}
1891 1891
 
1892 1892
 			// add any fill color rules
1893
-			if(!empty($fill)){
1894
-				$output .= implode(",",$fill) . "{fill: $color_code;} ";
1893
+			if (!empty($fill)) {
1894
+				$output .= implode(",", $fill) . "{fill: $color_code;} ";
1895 1895
 			}
1896
-			if(!empty($fill_i)){
1897
-				$output .= implode(",",$fill_i) . "{fill: $color_code !important;} ";
1896
+			if (!empty($fill_i)) {
1897
+				$output .= implode(",", $fill_i) . "{fill: $color_code !important;} ";
1898 1898
 			}
1899 1899
 
1900 1900
 
1901 1901
 			$prefix = $compatibility ? ".bsui " : "";
1902 1902
 
1903 1903
 			// darken
1904
-			$darker_075 = self::css_hex_lighten_darken($color_code,"-0.075");
1905
-			$darker_10 = self::css_hex_lighten_darken($color_code,"-0.10");
1906
-			$darker_125 = self::css_hex_lighten_darken($color_code,"-0.125");
1904
+			$darker_075 = self::css_hex_lighten_darken($color_code, "-0.075");
1905
+			$darker_10 = self::css_hex_lighten_darken($color_code, "-0.10");
1906
+			$darker_125 = self::css_hex_lighten_darken($color_code, "-0.125");
1907 1907
 
1908 1908
 			// lighten
1909
-			$lighten_25 = self::css_hex_lighten_darken($color_code,"0.25");
1909
+			$lighten_25 = self::css_hex_lighten_darken($color_code, "0.25");
1910 1910
 
1911 1911
 			// opacity see https://css-tricks.com/8-digit-hex-codes/
1912
-			$op_25 = $color_code."40"; // 25% opacity
1912
+			$op_25 = $color_code . "40"; // 25% opacity
1913 1913
 
1914 1914
 
1915 1915
 			// button states
1916
-			$output .= $prefix ." .btn-secondary:hover{background-color: ".$darker_075.";    border-color: ".$darker_10.";} ";
1917
-			$output .= $prefix ." .btn-outline-secondary:not(:disabled):not(.disabled):active:focus, $prefix .btn-outline-secondary:not(:disabled):not(.disabled).active:focus, .show>$prefix .btn-outline-secondary.dropdown-toggle:focus{box-shadow: 0 0 0 0.2rem $op_25;} ";
1918
-			$output .= $prefix ." .btn-secondary:not(:disabled):not(.disabled):active, $prefix .btn-secondary:not(:disabled):not(.disabled).active, .show>$prefix .btn-secondary.dropdown-toggle{background-color: ".$darker_10.";    border-color: ".$darker_125.";} ";
1919
-			$output .= $prefix ." .btn-secondary:not(:disabled):not(.disabled):active:focus, $prefix .btn-secondary:not(:disabled):not(.disabled).active:focus, .show>$prefix .btn-secondary.dropdown-toggle:focus {box-shadow: 0 0 0 0.2rem $op_25;} ";
1916
+			$output .= $prefix . " .btn-secondary:hover{background-color: " . $darker_075 . ";    border-color: " . $darker_10 . ";} ";
1917
+			$output .= $prefix . " .btn-outline-secondary:not(:disabled):not(.disabled):active:focus, $prefix .btn-outline-secondary:not(:disabled):not(.disabled).active:focus, .show>$prefix .btn-outline-secondary.dropdown-toggle:focus{box-shadow: 0 0 0 0.2rem $op_25;} ";
1918
+			$output .= $prefix . " .btn-secondary:not(:disabled):not(.disabled):active, $prefix .btn-secondary:not(:disabled):not(.disabled).active, .show>$prefix .btn-secondary.dropdown-toggle{background-color: " . $darker_10 . ";    border-color: " . $darker_125 . ";} ";
1919
+			$output .= $prefix . " .btn-secondary:not(:disabled):not(.disabled):active:focus, $prefix .btn-secondary:not(:disabled):not(.disabled).active:focus, .show>$prefix .btn-secondary.dropdown-toggle:focus {box-shadow: 0 0 0 0.2rem $op_25;} ";
1920 1920
 
1921 1921
 
1922 1922
 			return $output;
@@ -1952,8 +1952,8 @@  discard block
 block discarded – undo
1952 1952
 		/**
1953 1953
 		 * Check if we should display examples.
1954 1954
 		 */
1955
-		public function maybe_show_examples(){
1956
-			if(current_user_can('manage_options') && isset($_REQUEST['preview-aui'])){
1955
+		public function maybe_show_examples() {
1956
+			if (current_user_can('manage_options') && isset($_REQUEST['preview-aui'])) {
1957 1957
 				echo "<head>";
1958 1958
 				wp_head();
1959 1959
 				echo "</head>";
@@ -1969,7 +1969,7 @@  discard block
 block discarded – undo
1969 1969
 		 *
1970 1970
 		 * @return string
1971 1971
 		 */
1972
-		public function get_examples(){
1972
+		public function get_examples() {
1973 1973
 			$output = '';
1974 1974
 
1975 1975
 
@@ -2075,74 +2075,74 @@  discard block
 block discarded – undo
2075 2075
 		 */
2076 2076
 		public static function calendar_params() {
2077 2077
 			$params = array(
2078
-				'month_long_1' => __( 'January', 'aui' ),
2079
-				'month_long_2' => __( 'February', 'aui' ),
2080
-				'month_long_3' => __( 'March', 'aui' ),
2081
-				'month_long_4' => __( 'April', 'aui' ),
2082
-				'month_long_5' => __( 'May', 'aui' ),
2083
-				'month_long_6' => __( 'June', 'aui' ),
2084
-				'month_long_7' => __( 'July', 'aui' ),
2085
-				'month_long_8' => __( 'August', 'aui' ),
2086
-				'month_long_9' => __( 'September', 'aui' ),
2087
-				'month_long_10' => __( 'October', 'aui' ),
2088
-				'month_long_11' => __( 'November', 'aui' ),
2089
-				'month_long_12' => __( 'December', 'aui' ),
2090
-				'month_s_1' => _x( 'Jan', 'January abbreviation', 'aui' ),
2091
-				'month_s_2' => _x( 'Feb', 'February abbreviation', 'aui' ),
2092
-				'month_s_3' => _x( 'Mar', 'March abbreviation', 'aui' ),
2093
-				'month_s_4' => _x( 'Apr', 'April abbreviation', 'aui' ),
2094
-				'month_s_5' => _x( 'May', 'May abbreviation', 'aui' ),
2095
-				'month_s_6' => _x( 'Jun', 'June abbreviation', 'aui' ),
2096
-				'month_s_7' => _x( 'Jul', 'July abbreviation', 'aui' ),
2097
-				'month_s_8' => _x( 'Aug', 'August abbreviation', 'aui' ),
2098
-				'month_s_9' => _x( 'Sep', 'September abbreviation', 'aui' ),
2099
-				'month_s_10' => _x( 'Oct', 'October abbreviation', 'aui' ),
2100
-				'month_s_11' => _x( 'Nov', 'November abbreviation', 'aui' ),
2101
-				'month_s_12' => _x( 'Dec', 'December abbreviation', 'aui' ),
2102
-				'day_s1_1' => _x( 'S', 'Sunday initial', 'aui' ),
2103
-				'day_s1_2' => _x( 'M', 'Monday initial', 'aui' ),
2104
-				'day_s1_3' => _x( 'T', 'Tuesday initial', 'aui' ),
2105
-				'day_s1_4' => _x( 'W', 'Wednesday initial', 'aui' ),
2106
-				'day_s1_5' => _x( 'T', 'Friday initial', 'aui' ),
2107
-				'day_s1_6' => _x( 'F', 'Thursday initial', 'aui' ),
2108
-				'day_s1_7' => _x( 'S', 'Saturday initial', 'aui' ),
2109
-				'day_s2_1' => __( 'Su', 'aui' ),
2110
-				'day_s2_2' => __( 'Mo', 'aui' ),
2111
-				'day_s2_3' => __( 'Tu', 'aui' ),
2112
-				'day_s2_4' => __( 'We', 'aui' ),
2113
-				'day_s2_5' => __( 'Th', 'aui' ),
2114
-				'day_s2_6' => __( 'Fr', 'aui' ),
2115
-				'day_s2_7' => __( 'Sa', 'aui' ),
2116
-				'day_s3_1' => __( 'Sun', 'aui' ),
2117
-				'day_s3_2' => __( 'Mon', 'aui' ),
2118
-				'day_s3_3' => __( 'Tue', 'aui' ),
2119
-				'day_s3_4' => __( 'Wed', 'aui' ),
2120
-				'day_s3_5' => __( 'Thu', 'aui' ),
2121
-				'day_s3_6' => __( 'Fri', 'aui' ),
2122
-				'day_s3_7' => __( 'Sat', 'aui' ),
2123
-				'day_s5_1' => __( 'Sunday', 'aui' ),
2124
-				'day_s5_2' => __( 'Monday', 'aui' ),
2125
-				'day_s5_3' => __( 'Tuesday', 'aui' ),
2126
-				'day_s5_4' => __( 'Wednesday', 'aui' ),
2127
-				'day_s5_5' => __( 'Thursday', 'aui' ),
2128
-				'day_s5_6' => __( 'Friday', 'aui' ),
2129
-				'day_s5_7' => __( 'Saturday', 'aui' ),
2130
-				'am_lower' => __( 'am', 'aui' ),
2131
-				'pm_lower' => __( 'pm', 'aui' ),
2132
-				'am_upper' => __( 'AM', 'aui' ),
2133
-				'pm_upper' => __( 'PM', 'aui' ),
2134
-				'firstDayOfWeek' => (int) get_option( 'start_of_week' ),
2078
+				'month_long_1' => __('January', 'aui'),
2079
+				'month_long_2' => __('February', 'aui'),
2080
+				'month_long_3' => __('March', 'aui'),
2081
+				'month_long_4' => __('April', 'aui'),
2082
+				'month_long_5' => __('May', 'aui'),
2083
+				'month_long_6' => __('June', 'aui'),
2084
+				'month_long_7' => __('July', 'aui'),
2085
+				'month_long_8' => __('August', 'aui'),
2086
+				'month_long_9' => __('September', 'aui'),
2087
+				'month_long_10' => __('October', 'aui'),
2088
+				'month_long_11' => __('November', 'aui'),
2089
+				'month_long_12' => __('December', 'aui'),
2090
+				'month_s_1' => _x('Jan', 'January abbreviation', 'aui'),
2091
+				'month_s_2' => _x('Feb', 'February abbreviation', 'aui'),
2092
+				'month_s_3' => _x('Mar', 'March abbreviation', 'aui'),
2093
+				'month_s_4' => _x('Apr', 'April abbreviation', 'aui'),
2094
+				'month_s_5' => _x('May', 'May abbreviation', 'aui'),
2095
+				'month_s_6' => _x('Jun', 'June abbreviation', 'aui'),
2096
+				'month_s_7' => _x('Jul', 'July abbreviation', 'aui'),
2097
+				'month_s_8' => _x('Aug', 'August abbreviation', 'aui'),
2098
+				'month_s_9' => _x('Sep', 'September abbreviation', 'aui'),
2099
+				'month_s_10' => _x('Oct', 'October abbreviation', 'aui'),
2100
+				'month_s_11' => _x('Nov', 'November abbreviation', 'aui'),
2101
+				'month_s_12' => _x('Dec', 'December abbreviation', 'aui'),
2102
+				'day_s1_1' => _x('S', 'Sunday initial', 'aui'),
2103
+				'day_s1_2' => _x('M', 'Monday initial', 'aui'),
2104
+				'day_s1_3' => _x('T', 'Tuesday initial', 'aui'),
2105
+				'day_s1_4' => _x('W', 'Wednesday initial', 'aui'),
2106
+				'day_s1_5' => _x('T', 'Friday initial', 'aui'),
2107
+				'day_s1_6' => _x('F', 'Thursday initial', 'aui'),
2108
+				'day_s1_7' => _x('S', 'Saturday initial', 'aui'),
2109
+				'day_s2_1' => __('Su', 'aui'),
2110
+				'day_s2_2' => __('Mo', 'aui'),
2111
+				'day_s2_3' => __('Tu', 'aui'),
2112
+				'day_s2_4' => __('We', 'aui'),
2113
+				'day_s2_5' => __('Th', 'aui'),
2114
+				'day_s2_6' => __('Fr', 'aui'),
2115
+				'day_s2_7' => __('Sa', 'aui'),
2116
+				'day_s3_1' => __('Sun', 'aui'),
2117
+				'day_s3_2' => __('Mon', 'aui'),
2118
+				'day_s3_3' => __('Tue', 'aui'),
2119
+				'day_s3_4' => __('Wed', 'aui'),
2120
+				'day_s3_5' => __('Thu', 'aui'),
2121
+				'day_s3_6' => __('Fri', 'aui'),
2122
+				'day_s3_7' => __('Sat', 'aui'),
2123
+				'day_s5_1' => __('Sunday', 'aui'),
2124
+				'day_s5_2' => __('Monday', 'aui'),
2125
+				'day_s5_3' => __('Tuesday', 'aui'),
2126
+				'day_s5_4' => __('Wednesday', 'aui'),
2127
+				'day_s5_5' => __('Thursday', 'aui'),
2128
+				'day_s5_6' => __('Friday', 'aui'),
2129
+				'day_s5_7' => __('Saturday', 'aui'),
2130
+				'am_lower' => __('am', 'aui'),
2131
+				'pm_lower' => __('pm', 'aui'),
2132
+				'am_upper' => __('AM', 'aui'),
2133
+				'pm_upper' => __('PM', 'aui'),
2134
+				'firstDayOfWeek' => (int) get_option('start_of_week'),
2135 2135
 				'time_24hr' => false,
2136
-				'year' => __( 'Year', 'aui' ),
2137
-				'hour' => __( 'Hour', 'aui' ),
2138
-				'minute' => __( 'Minute', 'aui' ),
2139
-				'weekAbbreviation' => __( 'Wk', 'aui' ),
2140
-				'rangeSeparator' => __( ' to ', 'aui' ),
2141
-				'scrollTitle' => __( 'Scroll to increment', 'aui' ),
2142
-				'toggleTitle' => __( 'Click to toggle', 'aui' )
2136
+				'year' => __('Year', 'aui'),
2137
+				'hour' => __('Hour', 'aui'),
2138
+				'minute' => __('Minute', 'aui'),
2139
+				'weekAbbreviation' => __('Wk', 'aui'),
2140
+				'rangeSeparator' => __(' to ', 'aui'),
2141
+				'scrollTitle' => __('Scroll to increment', 'aui'),
2142
+				'toggleTitle' => __('Click to toggle', 'aui')
2143 2143
 			);
2144 2144
 
2145
-			return apply_filters( 'ayecode_ui_calendar_params', $params );
2145
+			return apply_filters('ayecode_ui_calendar_params', $params);
2146 2146
 		}
2147 2147
 
2148 2148
 		/**
@@ -2155,47 +2155,47 @@  discard block
 block discarded – undo
2155 2155
 		public static function flatpickr_locale() {
2156 2156
 			$params = self::calendar_params();
2157 2157
 
2158
-			if ( is_string( $params ) ) {
2159
-				$params = html_entity_decode( $params, ENT_QUOTES, 'UTF-8' );
2158
+			if (is_string($params)) {
2159
+				$params = html_entity_decode($params, ENT_QUOTES, 'UTF-8');
2160 2160
 			} else {
2161
-				foreach ( (array) $params as $key => $value ) {
2162
-					if ( ! is_scalar( $value ) ) {
2161
+				foreach ((array) $params as $key => $value) {
2162
+					if (!is_scalar($value)) {
2163 2163
 						continue;
2164 2164
 					}
2165 2165
 
2166
-					$params[ $key ] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8' );
2166
+					$params[$key] = html_entity_decode((string) $value, ENT_QUOTES, 'UTF-8');
2167 2167
 				}
2168 2168
 			}
2169 2169
 
2170 2170
 			$day_s3 = array();
2171 2171
 			$day_s5 = array();
2172 2172
 
2173
-			for ( $i = 1; $i <= 7; $i ++ ) {
2174
-				$day_s3[] = addslashes( $params[ 'day_s3_' . $i ] );
2175
-				$day_s5[] = addslashes( $params[ 'day_s3_' . $i ] );
2173
+			for ($i = 1; $i <= 7; $i++) {
2174
+				$day_s3[] = addslashes($params['day_s3_' . $i]);
2175
+				$day_s5[] = addslashes($params['day_s3_' . $i]);
2176 2176
 			}
2177 2177
 
2178 2178
 			$month_s = array();
2179 2179
 			$month_long = array();
2180 2180
 
2181
-			for ( $i = 1; $i <= 12; $i ++ ) {
2182
-				$month_s[] = addslashes( $params[ 'month_s_' . $i ] );
2183
-				$month_long[] = addslashes( $params[ 'month_long_' . $i ] );
2181
+			for ($i = 1; $i <= 12; $i++) {
2182
+				$month_s[] = addslashes($params['month_s_' . $i]);
2183
+				$month_long[] = addslashes($params['month_long_' . $i]);
2184 2184
 			}
2185 2185
 
2186 2186
 ob_start();
2187
-if ( 0 ) { ?><script><?php } ?>
2187
+if (0) { ?><script><?php } ?>
2188 2188
 {
2189 2189
 	weekdays: {
2190
-		shorthand: ['<?php echo implode( "','", $day_s3 ); ?>'],
2191
-		longhand: ['<?php echo implode( "','", $day_s5 ); ?>'],
2190
+		shorthand: ['<?php echo implode("','", $day_s3); ?>'],
2191
+		longhand: ['<?php echo implode("','", $day_s5); ?>'],
2192 2192
 	},
2193 2193
 	months: {
2194
-		shorthand: ['<?php echo implode( "','", $month_s ); ?>'],
2195
-		longhand: ['<?php echo implode( "','", $month_long ); ?>'],
2194
+		shorthand: ['<?php echo implode("','", $month_s); ?>'],
2195
+		longhand: ['<?php echo implode("','", $month_long); ?>'],
2196 2196
 	},
2197 2197
 	daysInMonth: [31,28,31,30,31,30,31,31,30,31,30,31],
2198
-	firstDayOfWeek: <?php echo (int) $params[ 'firstDayOfWeek' ]; ?>,
2198
+	firstDayOfWeek: <?php echo (int) $params['firstDayOfWeek']; ?>,
2199 2199
 	ordinal: function (nth) {
2200 2200
 		var s = nth % 100;
2201 2201
 		if (s > 3 && s < 21)
@@ -2211,21 +2211,21 @@  discard block
 block discarded – undo
2211 2211
 				return "th";
2212 2212
 		}
2213 2213
 	},
2214
-	rangeSeparator: '<?php echo addslashes( $params[ 'rangeSeparator' ] ); ?>',
2215
-	weekAbbreviation: '<?php echo addslashes( $params[ 'weekAbbreviation' ] ); ?>',
2216
-	scrollTitle: '<?php echo addslashes( $params[ 'scrollTitle' ] ); ?>',
2217
-	toggleTitle: '<?php echo addslashes( $params[ 'toggleTitle' ] ); ?>',
2218
-	amPM: ['<?php echo addslashes( $params[ 'am_upper' ] ); ?>','<?php echo addslashes( $params[ 'pm_upper' ] ); ?>'],
2219
-	yearAriaLabel: '<?php echo addslashes( $params[ 'year' ] ); ?>',
2220
-	hourAriaLabel: '<?php echo addslashes( $params[ 'hour' ] ); ?>',
2221
-	minuteAriaLabel: '<?php echo addslashes( $params[ 'minute' ] ); ?>',
2222
-	time_24hr: <?php echo ( $params[ 'time_24hr' ] ? 'true' : 'false' ) ; ?>
2214
+	rangeSeparator: '<?php echo addslashes($params['rangeSeparator']); ?>',
2215
+	weekAbbreviation: '<?php echo addslashes($params['weekAbbreviation']); ?>',
2216
+	scrollTitle: '<?php echo addslashes($params['scrollTitle']); ?>',
2217
+	toggleTitle: '<?php echo addslashes($params['toggleTitle']); ?>',
2218
+	amPM: ['<?php echo addslashes($params['am_upper']); ?>','<?php echo addslashes($params['pm_upper']); ?>'],
2219
+	yearAriaLabel: '<?php echo addslashes($params['year']); ?>',
2220
+	hourAriaLabel: '<?php echo addslashes($params['hour']); ?>',
2221
+	minuteAriaLabel: '<?php echo addslashes($params['minute']); ?>',
2222
+	time_24hr: <?php echo ($params['time_24hr'] ? 'true' : 'false'); ?>
2223 2223
 }
2224
-<?php if ( 0 ) { ?></script><?php } ?>
2224
+<?php if (0) { ?></script><?php } ?>
2225 2225
 <?php
2226 2226
 			$locale = ob_get_clean();
2227 2227
 
2228
-			return apply_filters( 'ayecode_ui_flatpickr_locale', trim( $locale ) );
2228
+			return apply_filters('ayecode_ui_flatpickr_locale', trim($locale));
2229 2229
 		}
2230 2230
 
2231 2231
 		/**
@@ -2237,20 +2237,20 @@  discard block
 block discarded – undo
2237 2237
 		 */
2238 2238
 		public static function select2_params() {
2239 2239
 			$params = array(
2240
-				'i18n_select_state_text'    => esc_attr__( 'Select an option&hellip;', 'aui' ),
2241
-				'i18n_no_matches'           => _x( 'No matches found', 'enhanced select', 'aui' ),
2242
-				'i18n_ajax_error'           => _x( 'Loading failed', 'enhanced select', 'aui' ),
2243
-				'i18n_input_too_short_1'    => _x( 'Please enter 1 or more characters', 'enhanced select', 'aui' ),
2244
-				'i18n_input_too_short_n'    => _x( 'Please enter %item% or more characters', 'enhanced select', 'aui' ),
2245
-				'i18n_input_too_long_1'     => _x( 'Please delete 1 character', 'enhanced select', 'aui' ),
2246
-				'i18n_input_too_long_n'     => _x( 'Please delete %item% characters', 'enhanced select', 'aui' ),
2247
-				'i18n_selection_too_long_1' => _x( 'You can only select 1 item', 'enhanced select', 'aui' ),
2248
-				'i18n_selection_too_long_n' => _x( 'You can only select %item% items', 'enhanced select', 'aui' ),
2249
-				'i18n_load_more'            => _x( 'Loading more results&hellip;', 'enhanced select', 'aui' ),
2250
-				'i18n_searching'            => _x( 'Searching&hellip;', 'enhanced select', 'aui' )
2240
+				'i18n_select_state_text'    => esc_attr__('Select an option&hellip;', 'aui'),
2241
+				'i18n_no_matches'           => _x('No matches found', 'enhanced select', 'aui'),
2242
+				'i18n_ajax_error'           => _x('Loading failed', 'enhanced select', 'aui'),
2243
+				'i18n_input_too_short_1'    => _x('Please enter 1 or more characters', 'enhanced select', 'aui'),
2244
+				'i18n_input_too_short_n'    => _x('Please enter %item% or more characters', 'enhanced select', 'aui'),
2245
+				'i18n_input_too_long_1'     => _x('Please delete 1 character', 'enhanced select', 'aui'),
2246
+				'i18n_input_too_long_n'     => _x('Please delete %item% characters', 'enhanced select', 'aui'),
2247
+				'i18n_selection_too_long_1' => _x('You can only select 1 item', 'enhanced select', 'aui'),
2248
+				'i18n_selection_too_long_n' => _x('You can only select %item% items', 'enhanced select', 'aui'),
2249
+				'i18n_load_more'            => _x('Loading more results&hellip;', 'enhanced select', 'aui'),
2250
+				'i18n_searching'            => _x('Searching&hellip;', 'enhanced select', 'aui')
2251 2251
 			);
2252 2252
 
2253
-			return apply_filters( 'ayecode_ui_select2_params', $params );
2253
+			return apply_filters('ayecode_ui_select2_params', $params);
2254 2254
 		}
2255 2255
 
2256 2256
 		/**
@@ -2263,17 +2263,17 @@  discard block
 block discarded – undo
2263 2263
 		public static function select2_locale() {
2264 2264
 			$params = self::select2_params();
2265 2265
 
2266
-			foreach ( (array) $params as $key => $value ) {
2267
-				if ( ! is_scalar( $value ) ) {
2266
+			foreach ((array) $params as $key => $value) {
2267
+				if (!is_scalar($value)) {
2268 2268
 					continue;
2269 2269
 				}
2270 2270
 
2271
-				$params[ $key ] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8' );
2271
+				$params[$key] = html_entity_decode((string) $value, ENT_QUOTES, 'UTF-8');
2272 2272
 			}
2273 2273
 
2274
-			$locale = json_encode( $params );
2274
+			$locale = json_encode($params);
2275 2275
 
2276
-			return apply_filters( 'ayecode_ui_select2_locale', trim( $locale ) );
2276
+			return apply_filters('ayecode_ui_select2_locale', trim($locale));
2277 2277
 		}
2278 2278
 
2279 2279
 		/**
@@ -2286,35 +2286,35 @@  discard block
 block discarded – undo
2286 2286
 		public static function timeago_locale() {
2287 2287
 			$params = array(
2288 2288
 				'prefix_ago' => '',
2289
-				'suffix_ago' => ' ' . _x( 'ago', 'time ago', 'aui' ),
2290
-				'prefix_after' => _x( 'after', 'time ago', 'aui' ) . ' ',
2289
+				'suffix_ago' => ' ' . _x('ago', 'time ago', 'aui'),
2290
+				'prefix_after' => _x('after', 'time ago', 'aui') . ' ',
2291 2291
 				'suffix_after' => '',
2292
-				'seconds' => _x( 'less than a minute', 'time ago', 'aui' ),
2293
-				'minute' => _x( 'about a minute', 'time ago', 'aui' ),
2294
-				'minutes' => _x( '%d minutes', 'time ago', 'aui' ),
2295
-				'hour' => _x( 'about an hour', 'time ago', 'aui' ),
2296
-				'hours' => _x( 'about %d hours', 'time ago', 'aui' ),
2297
-				'day' => _x( 'a day', 'time ago', 'aui' ),
2298
-				'days' => _x( '%d days', 'time ago', 'aui' ),
2299
-				'month' => _x( 'about a month', 'time ago', 'aui' ),
2300
-				'months' => _x( '%d months', 'time ago', 'aui' ),
2301
-				'year' => _x( 'about a year', 'time ago', 'aui' ),
2302
-				'years' => _x( '%d years', 'time ago', 'aui' ),
2292
+				'seconds' => _x('less than a minute', 'time ago', 'aui'),
2293
+				'minute' => _x('about a minute', 'time ago', 'aui'),
2294
+				'minutes' => _x('%d minutes', 'time ago', 'aui'),
2295
+				'hour' => _x('about an hour', 'time ago', 'aui'),
2296
+				'hours' => _x('about %d hours', 'time ago', 'aui'),
2297
+				'day' => _x('a day', 'time ago', 'aui'),
2298
+				'days' => _x('%d days', 'time ago', 'aui'),
2299
+				'month' => _x('about a month', 'time ago', 'aui'),
2300
+				'months' => _x('%d months', 'time ago', 'aui'),
2301
+				'year' => _x('about a year', 'time ago', 'aui'),
2302
+				'years' => _x('%d years', 'time ago', 'aui'),
2303 2303
 			);
2304 2304
 
2305
-			$params = apply_filters( 'ayecode_ui_timeago_params', $params );
2305
+			$params = apply_filters('ayecode_ui_timeago_params', $params);
2306 2306
 
2307
-			foreach ( (array) $params as $key => $value ) {
2308
-				if ( ! is_scalar( $value ) ) {
2307
+			foreach ((array) $params as $key => $value) {
2308
+				if (!is_scalar($value)) {
2309 2309
 					continue;
2310 2310
 				}
2311 2311
 
2312
-				$params[ $key ] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8' );
2312
+				$params[$key] = html_entity_decode((string) $value, ENT_QUOTES, 'UTF-8');
2313 2313
 			}
2314 2314
 
2315
-			$locale = json_encode( $params );
2315
+			$locale = json_encode($params);
2316 2316
 
2317
-			return apply_filters( 'ayecode_ui_timeago_locale', trim( $locale ) );
2317
+			return apply_filters('ayecode_ui_timeago_locale', trim($locale));
2318 2318
 		}
2319 2319
 
2320 2320
 		/**
@@ -2325,7 +2325,7 @@  discard block
 block discarded – undo
2325 2325
 		 * @return mixed
2326 2326
 		 */
2327 2327
 		public static function minify_js($input) {
2328
-			if(trim($input) === "") return $input;
2328
+			if (trim($input) === "") return $input;
2329 2329
 			return preg_replace(
2330 2330
 				array(
2331 2331
 					// Remove comment(s)
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
 		 * @return mixed
2358 2358
 		 */
2359 2359
 		public static function minify_css($input) {
2360
-			if(trim($input) === "") return $input;
2360
+			if (trim($input) === "") return $input;
2361 2361
 			return preg_replace(
2362 2362
 				array(
2363 2363
 					// Remove comment(s)
@@ -2906,12 +2906,12 @@  discard block
 block discarded – undo
2906 2906
         });
2907 2907
     }
2908 2908
 }
2909
-<?php do_action( 'aui_conditional_fields_js', $this ); ?>
2909
+<?php do_action('aui_conditional_fields_js', $this); ?>
2910 2910
 </script>
2911 2911
 			<?php
2912 2912
 			$output = ob_get_clean();
2913 2913
 
2914
-			return str_replace( array( '<script>', '</script>' ), '', self::minify_js( $output ) );
2914
+			return str_replace(array('<script>', '</script>'), '', self::minify_js($output));
2915 2915
 		}
2916 2916
 	}
2917 2917
 
Please login to merge, or discard this patch.
templates/payment-forms/cart.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,34 +7,34 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Cart table columns.
13 13
 $columns = array(
14
-    'name'     => __( 'Item', 'invoicing' ),
15
-    'price'    => __( 'Price', 'invoicing' ),
16
-    'quantity' => __( 'Qty', 'invoicing' ),
17
-    'subtotal' => __( 'Subtotal', 'invoicing' ),
14
+    'name'     => __('Item', 'invoicing'),
15
+    'price'    => __('Price', 'invoicing'),
16
+    'quantity' => __('Qty', 'invoicing'),
17
+    'subtotal' => __('Subtotal', 'invoicing'),
18 18
 );
19 19
 
20
-if ( ! empty( $form->invoice ) ) {
21
-    $columns = getpaid_invoice_item_columns( $form->invoice );
20
+if (!empty($form->invoice)) {
21
+    $columns = getpaid_invoice_item_columns($form->invoice);
22 22
 }
23 23
 
24
-if ( isset( $columns['tax_rate'] ) ) {
25
-    unset( $columns['tax_rate'] );
24
+if (isset($columns['tax_rate'])) {
25
+    unset($columns['tax_rate']);
26 26
 }
27 27
 
28
-$columns = apply_filters( 'getpaid_payment_form_cart_table_columns', $columns, $form );
28
+$columns = apply_filters('getpaid_payment_form_cart_table_columns', $columns, $form);
29 29
 
30 30
 ?>
31 31
     <div class="getpaid-payment-form-items-cart border form-group">
32 32
 
33 33
         <div class="getpaid-payment-form-items-cart-header font-weight-bold bg-light border-bottom py-2 px-3">
34 34
             <div class="form-row">
35
-                <?php foreach ( $columns as $key => $label ) : ?>
36
-                    <div class="<?php echo 'name' == $key ? 'col-6' : 'col' ?> <?php echo ( in_array( $key, array( 'subtotal', 'quantity', 'tax_rate' ) ) ) ? 'd-none d-sm-block' : '' ?> getpaid-form-cart-item-<?php echo sanitize_html_class( $key ); ?>">
37
-                        <span><?php echo esc_html( $label ); ?></span>
35
+                <?php foreach ($columns as $key => $label) : ?>
36
+                    <div class="<?php echo 'name' == $key ? 'col-6' : 'col' ?> <?php echo (in_array($key, array('subtotal', 'quantity', 'tax_rate'))) ? 'd-none d-sm-block' : '' ?> getpaid-form-cart-item-<?php echo sanitize_html_class($key); ?>">
37
+                        <span><?php echo esc_html($label); ?></span>
38 38
                     </div>
39 39
                 <?php endforeach; ?>
40 40
             </div>
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
         <?php
44 44
 
45 45
             // Display the item totals.
46
-            foreach ( $form->get_items() as $item ) {
47
-                wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) );
46
+            foreach ($form->get_items() as $item) {
47
+                wpinv_get_template('payment-forms/cart-item.php', compact('form', 'item', 'columns'));
48 48
             }
49 49
 
50 50
             // Display the cart totals.
51
-            wpinv_get_template( 'payment-forms/cart-totals.php', compact( 'form' ) );
51
+            wpinv_get_template('payment-forms/cart-totals.php', compact('form'));
52 52
 
53 53
         ?>
54 54
     </div>
55 55
 
56 56
 <?php 
57 57
 
58
-do_action( 'getpaid_after_payment_form_cart', $form );
58
+do_action('getpaid_after_payment_form_cart', $form);
Please login to merge, or discard this patch.
templates/payment-forms/elements/items.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,44 +7,44 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-if ( empty( $form->get_items() ) ) {
12
+if (empty($form->get_items())) {
13 13
     return;
14 14
 }
15 15
 
16
-if ( ! empty( $GLOBALS['getpaid_force_checkbox'] ) ) {
16
+if (!empty($GLOBALS['getpaid_force_checkbox'])) {
17 17
     $items_type = 'checkbox';
18 18
 }
19 19
 
20
-if ( empty( $items_type ) ) {
20
+if (empty($items_type)) {
21 21
     $items_type = 'total';
22 22
 }
23 23
 
24
-do_action( 'getpaid_before_payment_form_items', $form );
24
+do_action('getpaid_before_payment_form_items', $form);
25 25
 
26
-switch( $items_type ) {
26
+switch ($items_type) {
27 27
     case 'radio':
28
-        wpinv_get_template( 'payment-forms/variations/radio.php', compact( 'form', 'items_type' ) );
28
+        wpinv_get_template('payment-forms/variations/radio.php', compact('form', 'items_type'));
29 29
         break;
30 30
     case 'checkbox':
31
-        wpinv_get_template( 'payment-forms/variations/checkbox.php', compact( 'form', 'items_type' ) );
31
+        wpinv_get_template('payment-forms/variations/checkbox.php', compact('form', 'items_type'));
32 32
         break;
33 33
     case 'select':
34
-        wpinv_get_template( 'payment-forms/variations/select.php', compact( 'form', 'items_type' ) );
34
+        wpinv_get_template('payment-forms/variations/select.php', compact('form', 'items_type'));
35 35
         break;
36 36
 }
37 37
 
38
-do_action( 'getpaid_before_payment_form_cart', $form );
38
+do_action('getpaid_before_payment_form_cart', $form);
39 39
 
40 40
 // Display the cart totals.
41
-if ( ! empty( $hide_cart ) ) {
41
+if (!empty($hide_cart)) {
42 42
     echo '<div class="d-none">';
43 43
 }
44 44
 
45 45
 // Display the cart totals.
46
-wpinv_get_template( 'payment-forms/cart.php', compact( 'form', 'items_type' ) );
46
+wpinv_get_template('payment-forms/cart.php', compact('form', 'items_type'));
47 47
 
48
-if ( ! empty( $hide_cart ) ) {
48
+if (!empty($hide_cart)) {
49 49
     echo '</div>';
50 50
 }
Please login to merge, or discard this patch.
includes/class-getpaid-subscription-notification-emails.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  */
6 6
 
7
-defined( 'ABSPATH' ) || exit;
7
+defined('ABSPATH') || exit;
8 8
 
9 9
 /**
10 10
  * This class handles subscription notificaiton emails.
@@ -45,21 +45,21 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function init_hooks() {
47 47
 
48
-		add_filter( 'getpaid_get_email_merge_tags', array( $this, 'subscription_merge_tags' ), 10, 2 );
49
-		foreach ( $this->subscription_actions as $hook => $email_type ) {
48
+		add_filter('getpaid_get_email_merge_tags', array($this, 'subscription_merge_tags'), 10, 2);
49
+		foreach ($this->subscription_actions as $hook => $email_type) {
50 50
 
51
-			$email = new GetPaid_Notification_Email( $email_type );
51
+			$email = new GetPaid_Notification_Email($email_type);
52 52
 
53
-			if ( ! $email->is_active() ) {
53
+			if (!$email->is_active()) {
54 54
 				continue;
55 55
 			}
56 56
 
57
-			if ( method_exists( $this, $email_type ) ) {
58
-				add_action( $hook, array( $this, $email_type ), 100, 2 );
57
+			if (method_exists($this, $email_type)) {
58
+				add_action($hook, array($this, $email_type), 100, 2);
59 59
 				continue;
60 60
 			}
61 61
 
62
-			do_action( 'getpaid_subscription_notification_email_register_hook', $email_type, $hook );
62
+			do_action('getpaid_subscription_notification_email_register_hook', $email_type, $hook);
63 63
 
64 64
 		}
65 65
 
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 	 * @param array $merge_tags
72 72
 	 * @param mixed|WPInv_Invoice|WPInv_Subscription $object
73 73
 	 */
74
-	public function subscription_merge_tags( $merge_tags, $object ) {
74
+	public function subscription_merge_tags($merge_tags, $object) {
75 75
 
76
-		if ( is_a( $object, 'WPInv_Subscription' ) ) {
76
+		if (is_a($object, 'WPInv_Subscription')) {
77 77
 			$merge_tags = array_merge(
78 78
 				$merge_tags,
79
-				$this->get_subscription_merge_tags( $object )
79
+				$this->get_subscription_merge_tags($object)
80 80
 			);
81 81
 		}
82 82
 
@@ -90,25 +90,25 @@  discard block
 block discarded – undo
90 90
 	 * @param WPInv_Subscription $subscription
91 91
 	 * @return array
92 92
 	 */
93
-	public function get_subscription_merge_tags( $subscription ) {
93
+	public function get_subscription_merge_tags($subscription) {
94 94
 
95 95
 		// Abort if it does not exist.
96
-		if ( ! $subscription->get_id() ) {
96
+		if (!$subscription->get_id()) {
97 97
 			return array();
98 98
 		}
99 99
 
100
-		$invoice    = $subscription->get_parent_invoice();
100
+		$invoice = $subscription->get_parent_invoice();
101 101
 		return array(
102
-			'{subscription_renewal_date}'     => getpaid_format_date_value( $subscription->get_next_renewal_date(), __( 'Never', 'invoicing' ) ),
103
-			'{subscription_created}'          => getpaid_format_date_value( $subscription->get_date_created() ),
104
-			'{subscription_status}'           => sanitize_text_field( $subscription->get_status_label() ),
105
-			'{subscription_profile_id}'       => sanitize_text_field( $subscription->get_profile_id() ),
106
-			'{subscription_id}'               => absint( $subscription->get_id() ),
107
-			'{subscription_recurring_amount}' => sanitize_text_field( wpinv_price( $subscription->get_recurring_amount(), $invoice->get_currency() ) ),
108
-			'{subscription_initial_amount}'   => sanitize_text_field( wpinv_price( $subscription->get_initial_amount(), $invoice->get_currency() ) ),
109
-			'{subscription_recurring_period}' => getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' ),
102
+			'{subscription_renewal_date}'     => getpaid_format_date_value($subscription->get_next_renewal_date(), __('Never', 'invoicing')),
103
+			'{subscription_created}'          => getpaid_format_date_value($subscription->get_date_created()),
104
+			'{subscription_status}'           => sanitize_text_field($subscription->get_status_label()),
105
+			'{subscription_profile_id}'       => sanitize_text_field($subscription->get_profile_id()),
106
+			'{subscription_id}'               => absint($subscription->get_id()),
107
+			'{subscription_recurring_amount}' => sanitize_text_field(wpinv_price($subscription->get_recurring_amount(), $invoice->get_currency())),
108
+			'{subscription_initial_amount}'   => sanitize_text_field(wpinv_price($subscription->get_initial_amount(), $invoice->get_currency())),
109
+			'{subscription_recurring_period}' => getpaid_get_subscription_period_label($subscription->get_period(), $subscription->get_frequency(), ''),
110 110
 			'{subscription_bill_times}'       => $subscription->get_bill_times(),
111
-			'{subscription_url}'              => esc_url( $subscription->get_view_url() ),
111
+			'{subscription_url}'              => esc_url($subscription->get_view_url()),
112 112
 		);
113 113
 
114 114
 	}
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * @param WPInv_Invoice $invoice
120 120
 	 * @return bool
121 121
 	 */
122
-	public function should_send_notification( $invoice ) {
122
+	public function should_send_notification($invoice) {
123 123
 		return 0 != $invoice->get_id();
124 124
 	}
125 125
 
@@ -129,14 +129,14 @@  discard block
 block discarded – undo
129 129
 	 * @param WPInv_Invoice $invoice
130 130
 	 * @return array
131 131
 	 */
132
-	public function get_recipients( $invoice ) {
133
-		$recipients = array( $invoice->get_email() );
132
+	public function get_recipients($invoice) {
133
+		$recipients = array($invoice->get_email());
134 134
 
135 135
 		$cc = $invoice->get_email_cc();
136 136
 
137
-		if ( ! empty( $cc ) ) {
138
-			$cc = array_map( 'sanitize_email', wpinv_parse_list( $cc ) );
139
-			$recipients = array_filter( array_unique( array_merge( $recipients, $cc ) ) );
137
+		if (!empty($cc)) {
138
+			$cc = array_map('sanitize_email', wpinv_parse_list($cc));
139
+			$recipients = array_filter(array_unique(array_merge($recipients, $cc)));
140 140
 		}
141 141
 
142 142
 		return $recipients;
@@ -150,63 +150,63 @@  discard block
 block discarded – undo
150 150
 	 * @param string $type
151 151
 	 * @param array $extra_args Extra template args.
152 152
 	 */
153
-	public function send_email( $subscription, $email, $type, $extra_args = array() ) {
153
+	public function send_email($subscription, $email, $type, $extra_args = array()) {
154 154
 
155 155
 		// Abort in case the parent invoice does not exist.
156 156
 		$invoice = $subscription->get_parent_invoice();
157
-		if ( ! $this->should_send_notification( $invoice ) ) {
157
+		if (!$this->should_send_notification($invoice)) {
158 158
 			return;
159 159
 		}
160 160
 
161
-		if ( apply_filters( 'getpaid_skip_subscription_email', false, $type, $subscription ) ) {
161
+		if (apply_filters('getpaid_skip_subscription_email', false, $type, $subscription)) {
162 162
 			return;
163 163
 		}
164 164
 
165
-		do_action( 'getpaid_before_send_subscription_notification', $type, $subscription, $email );
165
+		do_action('getpaid_before_send_subscription_notification', $type, $subscription, $email);
166 166
 
167
-		$recipients  = $this->get_recipients( $invoice );
167
+		$recipients  = $this->get_recipients($invoice);
168 168
 		$mailer      = new GetPaid_Notification_Email_Sender();
169 169
 		$merge_tags  = $email->get_merge_tags();
170
-		$content     = $email->get_content( $merge_tags, $extra_args );
171
-		$subject     = $email->add_merge_tags( $email->get_subject(), $merge_tags );
170
+		$content     = $email->get_content($merge_tags, $extra_args);
171
+		$subject     = $email->add_merge_tags($email->get_subject(), $merge_tags);
172 172
 		$attachments = $email->get_attachments();
173 173
 
174 174
 		$result = $mailer->send(
175
-			apply_filters( 'getpaid_subscription_email_recipients', wpinv_parse_list( $recipients ), $email ),
175
+			apply_filters('getpaid_subscription_email_recipients', wpinv_parse_list($recipients), $email),
176 176
 			$subject,
177 177
 			$content,
178 178
 			$attachments
179 179
 		);
180 180
 
181 181
 		// Maybe send a copy to the admin.
182
-		if ( $email->include_admin_bcc() ) {
182
+		if ($email->include_admin_bcc()) {
183 183
 			$mailer->send(
184 184
 				wpinv_get_admin_email(),
185
-				$subject . __( ' - ADMIN BCC COPY', 'invoicing' ),
185
+				$subject . __(' - ADMIN BCC COPY', 'invoicing'),
186 186
 				$content,
187 187
 				$attachments
188 188
 			);
189 189
 		}
190 190
 
191
-		if ( $result ) {
191
+		if ($result) {
192 192
 			$invoice->add_system_note(
193 193
 				sprintf(
194
-					__( 'Successfully sent %s notification email to %s.', 'invoicing' ),
195
-					sanitize_key( $type ),
196
-					$email->is_admin_email() ? __( 'admin' ) : __( 'the customer' )
194
+					__('Successfully sent %s notification email to %s.', 'invoicing'),
195
+					sanitize_key($type),
196
+					$email->is_admin_email() ? __('admin') : __('the customer')
197 197
 				)
198 198
 			);
199 199
 		} else {
200 200
 			$invoice->add_system_note(
201 201
 				sprintf(
202
-					__( 'Failed sending %s notification email to %s.', 'invoicing' ),
203
-					sanitize_key( $type ),
204
-					$email->is_admin_email() ? __( 'admin' ) : __( 'the customer' )
202
+					__('Failed sending %s notification email to %s.', 'invoicing'),
203
+					sanitize_key($type),
204
+					$email->is_admin_email() ? __('admin') : __('the customer')
205 205
 				)
206 206
 			);	
207 207
 		}
208 208
 
209
-		do_action( 'getpaid_after_send_subscription_notification', $type, $subscription, $email );
209
+		do_action('getpaid_after_send_subscription_notification', $type, $subscription, $email);
210 210
 
211 211
 	}
212 212
 
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
 	 *
216 216
 	 * @param WPInv_Subscription $subscription
217 217
 	 */
218
-	public function subscription_trial( $subscription ) {
218
+	public function subscription_trial($subscription) {
219 219
 
220
-		$email     = new GetPaid_Notification_Email( __FUNCTION__, $subscription );
221
-		$this->send_email( $subscription, $email, __FUNCTION__ );
220
+		$email = new GetPaid_Notification_Email(__FUNCTION__, $subscription);
221
+		$this->send_email($subscription, $email, __FUNCTION__);
222 222
 
223 223
 	}
224 224
 
@@ -227,10 +227,10 @@  discard block
 block discarded – undo
227 227
 	 *
228 228
 	 * @param WPInv_Subscription $subscription
229 229
 	 */
230
-	public function subscription_cancelled( $subscription ) {
230
+	public function subscription_cancelled($subscription) {
231 231
 
232
-		$email     = new GetPaid_Notification_Email( __FUNCTION__, $subscription );
233
-		$this->send_email( $subscription, $email, __FUNCTION__ );
232
+		$email = new GetPaid_Notification_Email(__FUNCTION__, $subscription);
233
+		$this->send_email($subscription, $email, __FUNCTION__);
234 234
 
235 235
 	}
236 236
 
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
 	 *
240 240
 	 * @param WPInv_Subscription $subscription
241 241
 	 */
242
-	public function subscription_expired( $subscription ) {
242
+	public function subscription_expired($subscription) {
243 243
 
244
-		$email     = new GetPaid_Notification_Email( __FUNCTION__, $subscription );
245
-		$this->send_email( $subscription, $email, __FUNCTION__ );
244
+		$email = new GetPaid_Notification_Email(__FUNCTION__, $subscription);
245
+		$this->send_email($subscription, $email, __FUNCTION__);
246 246
 
247 247
 	}
248 248
 
@@ -251,10 +251,10 @@  discard block
 block discarded – undo
251 251
 	 *
252 252
 	 * @param WPInv_Subscription $subscription
253 253
 	 */
254
-	public function subscription_complete( $subscription ) {
254
+	public function subscription_complete($subscription) {
255 255
 
256
-		$email     = new GetPaid_Notification_Email( __FUNCTION__, $subscription );
257
-		$this->send_email( $subscription, $email, __FUNCTION__ );
256
+		$email = new GetPaid_Notification_Email(__FUNCTION__, $subscription);
257
+		$this->send_email($subscription, $email, __FUNCTION__);
258 258
 
259 259
 	}
260 260
 
@@ -264,18 +264,18 @@  discard block
 block discarded – undo
264 264
 	 */
265 265
 	public function renewal_reminder() {
266 266
 
267
-		$email = new GetPaid_Notification_Email( __FUNCTION__ );
267
+		$email = new GetPaid_Notification_Email(__FUNCTION__);
268 268
 
269 269
 		// Fetch reminder days.
270
-		$reminder_days = array_unique( wp_parse_id_list( $email->get_option( 'days' ) ) );
270
+		$reminder_days = array_unique(wp_parse_id_list($email->get_option('days')));
271 271
 
272 272
 		// Abort if non is set.
273
-		if ( empty( $reminder_days ) ) {
273
+		if (empty($reminder_days)) {
274 274
 			return;
275 275
 		}
276 276
 
277 277
 		// Fetch matching subscriptions.
278
-        $args  = array(
278
+        $args = array(
279 279
             'number'             => -1,
280 280
 			'count_total'        => false,
281 281
 			'status'             => 'trialling active',
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
             ),
285 285
 		);
286 286
 
287
-		foreach ( $reminder_days as $days ) {
288
-			$date = date_parse( date( 'Y-m-d', strtotime( "+$days days", current_time( 'timestamp' ) ) ) );
287
+		foreach ($reminder_days as $days) {
288
+			$date = date_parse(date('Y-m-d', strtotime("+$days days", current_time('timestamp'))));
289 289
 
290 290
 			$args['date_expires_query'][] = array(
291 291
 				'year'  => $date['year'],
@@ -295,14 +295,14 @@  discard block
 block discarded – undo
295 295
 
296 296
 		}
297 297
 
298
-		$subscriptions = new GetPaid_Subscriptions_Query( $args );
298
+		$subscriptions = new GetPaid_Subscriptions_Query($args);
299 299
 
300
-        foreach ( $subscriptions as $subscription ) {
300
+        foreach ($subscriptions as $subscription) {
301 301
 
302 302
 			// Skip packages.
303
-			if ( apply_filters( 'getpaid_send_subscription_renewal_reminder_email', true ) ) {
303
+			if (apply_filters('getpaid_send_subscription_renewal_reminder_email', true)) {
304 304
 				$email->object = $subscription;
305
-            	$this->send_email( $subscription, $email, __FUNCTION__ );
305
+            	$this->send_email($subscription, $email, __FUNCTION__);
306 306
 			}
307 307
 
308 308
 		}
Please login to merge, or discard this patch.
includes/data/email-settings.php 1 patch
Spacing   +228 added lines, -228 removed lines patch added patch discarded remove patch
@@ -8,24 +8,24 @@  discard block
 block discarded – undo
8 8
  * @version 1.0.19
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 // Prepare the due date reminder options.
14 14
 $overdue_days_options       = array();
15
-$overdue_days_options['0']  = __( 'On the Due Date', 'invoicing' );
16
-$overdue_days_options['1']  = __( '1 day after Due Date', 'invoicing' );
15
+$overdue_days_options['0']  = __('On the Due Date', 'invoicing');
16
+$overdue_days_options['1']  = __('1 day after Due Date', 'invoicing');
17 17
 
18
-for ( $i = 2; $i <= 10; $i++ ) {
19
-    $overdue_days_options["$i"] = wp_sprintf( __( '%d days after Due Date', 'invoicing' ), $i );
18
+for ($i = 2; $i <= 10; $i++) {
19
+    $overdue_days_options["$i"] = wp_sprintf(__('%d days after Due Date', 'invoicing'), $i);
20 20
 }
21 21
 
22 22
 // Prepare up coming renewal reminder options.
23 23
 $renewal_days_options       = array();
24
-$renewal_days_options['0']  = __( 'On the renewal date', 'invoicing' );
25
-$renewal_days_options['1']  = __( '1 day before the renewal date', 'invoicing' );
24
+$renewal_days_options['0']  = __('On the renewal date', 'invoicing');
25
+$renewal_days_options['1']  = __('1 day before the renewal date', 'invoicing');
26 26
 
27
-for ( $i = 2; $i <= 10; $i++ ) {
28
-    $renewal_days_options["$i"]   = wp_sprintf( __( '%d days before the renewal date', 'invoicing' ), $i );
27
+for ($i = 2; $i <= 10; $i++) {
28
+    $renewal_days_options["$i"] = wp_sprintf(__('%d days before the renewal date', 'invoicing'), $i);
29 29
 }
30 30
 
31 31
 // Default, built-in gateways
@@ -34,45 +34,45 @@  discard block
 block discarded – undo
34 34
 
35 35
         'email_new_invoice_header' => array(
36 36
             'id'       => 'email_new_invoice_header',
37
-            'name'     => '<h3>' . __( 'New Invoice', 'invoicing' ) . '</h3>',
38
-            'desc'     => __( 'These emails are sent to the site admin whenever there is a new invoice.', 'invoicing' ),
37
+            'name'     => '<h3>' . __('New Invoice', 'invoicing') . '</h3>',
38
+            'desc'     => __('These emails are sent to the site admin whenever there is a new invoice.', 'invoicing'),
39 39
             'type'     => 'header',
40 40
         ),
41 41
 
42 42
         'email_new_invoice_active' => array(
43 43
             'id'       => 'email_new_invoice_active',
44
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
45
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
44
+            'name'     => __('Enable/Disable', 'invoicing'),
45
+            'desc'     => __('Enable this email notification', 'invoicing'),
46 46
             'type'     => 'checkbox',
47 47
             'std'      => 1
48 48
         ),
49 49
 
50 50
         'email_new_invoice_subject' => array(
51 51
             'id'       => 'email_new_invoice_subject',
52
-            'name'     => __( 'Subject', 'invoicing' ),
53
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
52
+            'name'     => __('Subject', 'invoicing'),
53
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
54 54
             'help-tip' => true,
55 55
             'type'     => 'text',
56
-            'std'      => __( '[{site_title}] New invoice ({invoice_number}) for {invoice_total} {invoice_currency}', 'invoicing' ),
56
+            'std'      => __('[{site_title}] New invoice ({invoice_number}) for {invoice_total} {invoice_currency}', 'invoicing'),
57 57
             'size'     => 'large'
58 58
         ),
59 59
 
60 60
         'email_new_invoice_heading' => array(
61 61
             'id'       => 'email_new_invoice_heading',
62
-            'name'     => __( 'Email Heading', 'invoicing' ),
63
-            'desc'     => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ),
62
+            'name'     => __('Email Heading', 'invoicing'),
63
+            'desc'     => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'),
64 64
             'help-tip' => true,
65 65
             'type'     => 'text',
66
-            'std'      => __( 'New invoice', 'invoicing' ),
66
+            'std'      => __('New invoice', 'invoicing'),
67 67
             'size'     => 'large'
68 68
         ),
69 69
 
70 70
         'email_new_invoice_body' => array(
71 71
             'id'       => 'email_new_invoice_body',
72
-            'name'     => __( 'Email Content', 'invoicing' ),
72
+            'name'     => __('Email Content', 'invoicing'),
73 73
             'desc'     => wpinv_get_merge_tags_help_text(),
74 74
             'type'     => 'rich_editor',
75
-            'std'      => __( '<p>A new invoice <a href="{invoice_link}">({invoice_number})</a> to {name} for {invoice_total} {invoice_currency} has been created on your site. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing' ),
75
+            'std'      => __('<p>A new invoice <a href="{invoice_link}">({invoice_number})</a> to {name} for {invoice_total} {invoice_currency} has been created on your site. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing'),
76 76
             'class'    => 'large',
77 77
             'size'     => '10'
78 78
         ),
@@ -82,53 +82,53 @@  discard block
 block discarded – undo
82 82
 
83 83
         'email_cancelled_invoice_header' => array(
84 84
             'id'       => 'email_cancelled_invoice_header',
85
-            'name'     => '<h3>' . __( 'Cancelled Invoice', 'invoicing' ) . '</h3>',
86
-            'desc'     => __( 'These emails are sent to customers whenever invoices are cancelled.', 'invoicing' ),
85
+            'name'     => '<h3>' . __('Cancelled Invoice', 'invoicing') . '</h3>',
86
+            'desc'     => __('These emails are sent to customers whenever invoices are cancelled.', 'invoicing'),
87 87
             'type'     => 'header',
88 88
         ),
89 89
 
90 90
         'email_cancelled_invoice_active' => array(
91 91
             'id'       => 'email_cancelled_invoice_active',
92
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
93
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
92
+            'name'     => __('Enable/Disable', 'invoicing'),
93
+            'desc'     => __('Enable this email notification', 'invoicing'),
94 94
             'type'     => 'checkbox',
95 95
             'std'      => 1
96 96
         ),
97 97
 
98 98
         'email_cancelled_invoice_admin_bcc' => array(
99 99
             'id'       => 'email_cancelled_invoice_admin_bcc',
100
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
101
-            'desc'     => __( 'Check if you want to send this notification email to site Admin.', 'invoicing' ),
100
+            'name'     => __('Enable Admin BCC', 'invoicing'),
101
+            'desc'     => __('Check if you want to send this notification email to site Admin.', 'invoicing'),
102 102
             'type'     => 'checkbox',
103 103
             'std'      => 1
104 104
         ),
105 105
 
106 106
         'email_cancelled_invoice_subject' => array(
107 107
             'id'       => 'email_cancelled_invoice_subject',
108
-            'name'     => __( 'Subject', 'invoicing' ),
109
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
108
+            'name'     => __('Subject', 'invoicing'),
109
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
110 110
             'help-tip' => true,
111 111
             'type'     => 'text',
112
-            'std'      => __( '[{site_title}] Invoice ({invoice_number}) Cancelled', 'invoicing' ),
112
+            'std'      => __('[{site_title}] Invoice ({invoice_number}) Cancelled', 'invoicing'),
113 113
             'size'     => 'large'
114 114
         ),
115 115
 
116 116
         'email_cancelled_invoice_heading' => array(
117 117
             'id'       => 'email_cancelled_invoice_heading',
118
-            'name'     => __( 'Email Heading', 'invoicing' ),
119
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
118
+            'name'     => __('Email Heading', 'invoicing'),
119
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
120 120
             'help-tip' => true,
121 121
             'type'     => 'text',
122
-            'std'      => __( 'Invoice Cancelled', 'invoicing' ),
122
+            'std'      => __('Invoice Cancelled', 'invoicing'),
123 123
             'size'     => 'large'
124 124
         ),
125 125
 
126 126
         'email_cancelled_invoice_body' => array(
127 127
             'id'       => 'email_cancelled_invoice_body',
128
-            'name'     => __( 'Email Content', 'invoicing' ),
128
+            'name'     => __('Email Content', 'invoicing'),
129 129
             'desc'     => wpinv_get_merge_tags_help_text(),
130 130
             'type'     => 'rich_editor',
131
-            'std'      => __( '<p>The invoice <a href="{invoice_link}">#{invoice_number}</a> created for {name} on {site_title} has been cancelled. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing' ),
131
+            'std'      => __('<p>The invoice <a href="{invoice_link}">#{invoice_number}</a> created for {name} on {site_title} has been cancelled. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing'),
132 132
             'class'    => 'large',
133 133
             'size'     => '10'
134 134
         ),
@@ -139,45 +139,45 @@  discard block
 block discarded – undo
139 139
 
140 140
         'email_failed_invoice_header' => array(
141 141
             'id'       => 'email_failed_invoice_header',
142
-            'name'     => '<h3>' . __( 'Failed Invoice', 'invoicing' ) . '</h3>',
143
-            'desc'     => __( 'Failed invoice emails are sent to the site admin when invoice payments fail.', 'invoicing' ),
142
+            'name'     => '<h3>' . __('Failed Invoice', 'invoicing') . '</h3>',
143
+            'desc'     => __('Failed invoice emails are sent to the site admin when invoice payments fail.', 'invoicing'),
144 144
             'type'     => 'header',
145 145
         ),
146 146
 
147 147
         'email_failed_invoice_active' => array(
148 148
             'id'       => 'email_failed_invoice_active',
149
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
150
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
149
+            'name'     => __('Enable/Disable', 'invoicing'),
150
+            'desc'     => __('Enable this email notification', 'invoicing'),
151 151
             'type'     => 'checkbox',
152 152
             'std'      => 1
153 153
         ),
154 154
 
155 155
         'email_failed_invoice_subject' => array(
156 156
             'id'       => 'email_failed_invoice_subject',
157
-            'name'     => __( 'Subject', 'invoicing' ),
158
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
157
+            'name'     => __('Subject', 'invoicing'),
158
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
159 159
             'help-tip' => true,
160 160
             'type'     => 'text',
161
-            'std'      => __( '[{site_title}] Invoice ({invoice_number}) Payment Failed', 'invoicing' ),
161
+            'std'      => __('[{site_title}] Invoice ({invoice_number}) Payment Failed', 'invoicing'),
162 162
             'size'     => 'large'
163 163
         ),
164 164
 
165 165
         'email_failed_invoice_heading' => array(
166 166
             'id'       => 'email_failed_invoice_heading',
167
-            'name'     => __( 'Email Heading', 'invoicing' ),
168
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
167
+            'name'     => __('Email Heading', 'invoicing'),
168
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
169 169
             'help-tip' => true,
170 170
             'type'     => 'text',
171
-            'std'      => __( 'Invoice Payment Failed', 'invoicing' ),
171
+            'std'      => __('Invoice Payment Failed', 'invoicing'),
172 172
             'size'     => 'large'
173 173
         ),
174 174
 
175 175
         'email_failed_invoice_body' => array(
176 176
             'id'       => 'email_failed_invoice_body',
177
-            'name'     => __( 'Email Content', 'invoicing' ),
177
+            'name'     => __('Email Content', 'invoicing'),
178 178
             'desc'     => wpinv_get_merge_tags_help_text(),
179 179
             'type'     => 'rich_editor',
180
-            'std'      => __( '<p>Payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title} has failed to go through. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing' ),
180
+            'std'      => __('<p>Payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title} has failed to go through. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing'),
181 181
             'class'    => 'large',
182 182
             'size'     => '10'
183 183
         ),
@@ -187,53 +187,53 @@  discard block
 block discarded – undo
187 187
 
188 188
         'email_onhold_invoice_header' => array(
189 189
             'id'       => 'email_onhold_invoice_header',
190
-            'name'     => '<h3>' . __( 'On Hold Invoice', 'invoicing' ) . '</h3>',
191
-            'desc'     => __( 'These emails are sent to customers whenever their invoices are held.', 'invoicing' ),
190
+            'name'     => '<h3>' . __('On Hold Invoice', 'invoicing') . '</h3>',
191
+            'desc'     => __('These emails are sent to customers whenever their invoices are held.', 'invoicing'),
192 192
             'type'     => 'header',
193 193
         ),
194 194
 
195 195
         'email_onhold_invoice_active' => array(
196 196
             'id'       => 'email_onhold_invoice_active',
197
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
198
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
197
+            'name'     => __('Enable/Disable', 'invoicing'),
198
+            'desc'     => __('Enable this email notification', 'invoicing'),
199 199
             'type'     => 'checkbox',
200 200
             'std'      => 1
201 201
         ),
202 202
 
203 203
         'email_onhold_invoice_admin_bcc' => array(
204 204
             'id'       => 'email_onhold_invoice_admin_bcc',
205
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
206
-            'desc'     => __( 'Check if you want to send this notification email to site Admin.', 'invoicing' ),
205
+            'name'     => __('Enable Admin BCC', 'invoicing'),
206
+            'desc'     => __('Check if you want to send this notification email to site Admin.', 'invoicing'),
207 207
             'type'     => 'checkbox',
208 208
             'std'      => 1
209 209
         ),
210 210
 
211 211
         'email_onhold_invoice_subject' => array(
212 212
             'id'       => 'email_onhold_invoice_subject',
213
-            'name'     => __( 'Subject', 'invoicing' ),
214
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
213
+            'name'     => __('Subject', 'invoicing'),
214
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
215 215
             'help-tip' => true,
216 216
             'type'     => 'text',
217
-            'std'      => __( '[{site_title}] Your invoice is on hold', 'invoicing' ),
217
+            'std'      => __('[{site_title}] Your invoice is on hold', 'invoicing'),
218 218
             'size'     => 'large'
219 219
         ),
220 220
 
221 221
         'email_onhold_invoice_heading' => array(
222 222
             'id'       => 'email_onhold_invoice_heading',
223
-            'name'     => __( 'Email Heading', 'invoicing' ),
224
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
223
+            'name'     => __('Email Heading', 'invoicing'),
224
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
225 225
             'help-tip' => true,
226 226
             'type'     => 'text',
227
-            'std'      => __( 'Your invoice is on hold', 'invoicing' ),
227
+            'std'      => __('Your invoice is on hold', 'invoicing'),
228 228
             'size'     => 'large'
229 229
         ),
230 230
 
231 231
         'email_onhold_invoice_body' => array(
232 232
             'id'       => 'email_onhold_invoice_body',
233
-            'name'     => __( 'Email Content', 'invoicing' ),
233
+            'name'     => __('Email Content', 'invoicing'),
234 234
             'desc'     => wpinv_get_merge_tags_help_text(),
235 235
             'type'     => 'rich_editor',
236
-            'std'      => __( '<p>Hi {name},</p><p>Your invoice is on-hold and will be processed when we receive your payment. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing' ),
236
+            'std'      => __('<p>Hi {name},</p><p>Your invoice is on-hold and will be processed when we receive your payment. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing'),
237 237
             'class'    => 'large',
238 238
             'size'     => '10'
239 239
         ),
@@ -244,53 +244,53 @@  discard block
 block discarded – undo
244 244
 
245 245
         'email_processing_invoice_header' => array(
246 246
             'id'       => 'email_processing_invoice_header',
247
-            'name'     => '<h3>' . __( 'Processing Invoice', 'invoicing' ) . '</h3>',
248
-            'desc'     => __( 'These emails are sent to users whenever payments for their invoices are processing.', 'invoicing' ),
247
+            'name'     => '<h3>' . __('Processing Invoice', 'invoicing') . '</h3>',
248
+            'desc'     => __('These emails are sent to users whenever payments for their invoices are processing.', 'invoicing'),
249 249
             'type'     => 'header',
250 250
         ),
251 251
 
252 252
         'email_processing_invoice_active' => array(
253 253
             'id'       => 'email_processing_invoice_active',
254
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
255
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
254
+            'name'     => __('Enable/Disable', 'invoicing'),
255
+            'desc'     => __('Enable this email notification', 'invoicing'),
256 256
             'type'     => 'checkbox',
257 257
             'std'      => 1
258 258
         ),
259 259
 
260 260
         'email_processing_invoice_admin_bcc' => array(
261 261
             'id'       => 'email_processing_invoice_admin_bcc',
262
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
263
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
262
+            'name'     => __('Enable Admin BCC', 'invoicing'),
263
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
264 264
             'type'     => 'checkbox',
265 265
             'std'      => 1
266 266
         ),
267 267
 
268 268
         'email_processing_invoice_subject' => array(
269 269
             'id'       => 'email_processing_invoice_subject',
270
-            'name'     => __( 'Subject', 'invoicing' ),
271
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
270
+            'name'     => __('Subject', 'invoicing'),
271
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
272 272
             'help-tip' => true,
273 273
             'type'     => 'text',
274
-            'std'      => __( '[{site_title}] Your payment is being processed', 'invoicing' ),
274
+            'std'      => __('[{site_title}] Your payment is being processed', 'invoicing'),
275 275
             'size'     => 'large'
276 276
         ),
277 277
 
278 278
         'email_processing_invoice_heading' => array(
279 279
             'id'       => 'email_processing_invoice_heading',
280
-            'name'     => __( 'Email Heading', 'invoicing' ),
281
-            'desc'     => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ),
280
+            'name'     => __('Email Heading', 'invoicing'),
281
+            'desc'     => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'),
282 282
             'help-tip' => true,
283 283
             'type'     => 'text',
284
-            'std'      => __( 'Your payment is being processed', 'invoicing' ),
284
+            'std'      => __('Your payment is being processed', 'invoicing'),
285 285
             'size'     => 'large'
286 286
         ),
287 287
 
288 288
         'email_processing_invoice_body' => array(
289 289
             'id'       => 'email_processing_invoice_body',
290
-            'name'     => __( 'Email Content', 'invoicing' ),
290
+            'name'     => __('Email Content', 'invoicing'),
291 291
             'desc'     => wpinv_get_merge_tags_help_text(),
292 292
             'type'     => 'rich_editor',
293
-            'std'      => __( '<p>Hi {name},</p><p>I would like to let you know that we have received and are currently processing your payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title}. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing' ),
293
+            'std'      => __('<p>Hi {name},</p><p>I would like to let you know that we have received and are currently processing your payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title}. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing'),
294 294
             'class'    => 'large',
295 295
             'size'     => '10'
296 296
         ),
@@ -301,61 +301,61 @@  discard block
 block discarded – undo
301 301
 
302 302
         'email_completed_invoice_header' => array(
303 303
             'id'       => 'email_completed_invoice_header',
304
-            'name'     => '<h3>' . __( 'Paid Invoice', 'invoicing' ) . '</h3>',
305
-            'desc'     => __( 'These emails are sent to customers when their invoices are marked as paid.', 'invoicing' ),
304
+            'name'     => '<h3>' . __('Paid Invoice', 'invoicing') . '</h3>',
305
+            'desc'     => __('These emails are sent to customers when their invoices are marked as paid.', 'invoicing'),
306 306
             'type'     => 'header',
307 307
         ),
308 308
 
309 309
         'email_completed_invoice_active' => array(
310 310
             'id'       => 'email_completed_invoice_active',
311
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
312
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
311
+            'name'     => __('Enable/Disable', 'invoicing'),
312
+            'desc'     => __('Enable this email notification', 'invoicing'),
313 313
             'type'     => 'checkbox',
314 314
             'std'      => 1
315 315
         ),
316 316
 
317 317
         'email_completed_invoice_renewal_active' => array(
318 318
             'id'       => 'email_completed_invoice_renewal_active',
319
-            'name'     => __( 'Enable renewal notification', 'invoicing' ),
320
-            'desc'     => __( 'Should this email be sent for renewals too?', 'invoicing' ),
319
+            'name'     => __('Enable renewal notification', 'invoicing'),
320
+            'desc'     => __('Should this email be sent for renewals too?', 'invoicing'),
321 321
             'type'     => 'checkbox',
322 322
             'std'      => 1
323 323
         ),
324 324
 
325 325
         'email_completed_invoice_admin_bcc' => array(
326 326
             'id'       => 'email_completed_invoice_admin_bcc',
327
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
328
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
327
+            'name'     => __('Enable Admin BCC', 'invoicing'),
328
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
329 329
             'type'     => 'checkbox',
330 330
             'std'      => 1,
331 331
         ),
332 332
 
333 333
         'email_completed_invoice_subject' => array(
334 334
             'id'       => 'email_completed_invoice_subject',
335
-            'name'     => __( 'Subject', 'invoicing' ),
336
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
335
+            'name'     => __('Subject', 'invoicing'),
336
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
337 337
             'help-tip' => true,
338 338
             'type'     => 'text',
339
-            'std'      => __( '[{site_title}] Your invoice from {invoice_date} has been paid', 'invoicing' ),
339
+            'std'      => __('[{site_title}] Your invoice from {invoice_date} has been paid', 'invoicing'),
340 340
             'size'     => 'large'
341 341
         ),
342 342
 
343 343
         'email_completed_invoice_heading' => array(
344 344
             'id'       => 'email_completed_invoice_heading',
345
-            'name'     => __( 'Email Heading', 'invoicing' ),
346
-            'desc'     => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ),
345
+            'name'     => __('Email Heading', 'invoicing'),
346
+            'desc'     => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'),
347 347
             'help-tip' => true,
348 348
             'type'     => 'text',
349
-            'std'      => __( 'Your invoice has been paid', 'invoicing' ),
349
+            'std'      => __('Your invoice has been paid', 'invoicing'),
350 350
             'size'     => 'large'
351 351
         ),
352 352
 
353 353
         'email_completed_invoice_body' => array(
354 354
             'id'       => 'email_completed_invoice_body',
355
-            'name'     => __( 'Email Content', 'invoicing' ),
355
+            'name'     => __('Email Content', 'invoicing'),
356 356
             'desc'     => wpinv_get_merge_tags_help_text(),
357 357
             'type'     => 'rich_editor',
358
-            'std'      => __( '<p>Hi {name},</p><p>Your recent invoice on {site_title} has been paid. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing' ),
358
+            'std'      => __('<p>Hi {name},</p><p>Your recent invoice on {site_title} has been paid. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing'),
359 359
             'class'    => 'large',
360 360
             'size'     => '10'
361 361
         ),
@@ -366,53 +366,53 @@  discard block
 block discarded – undo
366 366
 
367 367
         'email_refunded_invoice_header' => array(
368 368
             'id'       => 'email_refunded_invoice_header',
369
-            'name'     => '<h3>' . __( 'Refunded Invoice', 'invoicing' ) . '</h3>',
370
-            'desc'     => __( 'These emails are sent to users when their invoices are marked as refunded.', 'invoicing' ),
369
+            'name'     => '<h3>' . __('Refunded Invoice', 'invoicing') . '</h3>',
370
+            'desc'     => __('These emails are sent to users when their invoices are marked as refunded.', 'invoicing'),
371 371
             'type'     => 'header',
372 372
         ),
373 373
 
374 374
         'email_refunded_invoice_active' => array(
375 375
             'id'       => 'email_refunded_invoice_active',
376
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
377
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
376
+            'name'     => __('Enable/Disable', 'invoicing'),
377
+            'desc'     => __('Enable this email notification', 'invoicing'),
378 378
             'type'     => 'checkbox',
379 379
             'std'      => 1
380 380
         ),
381 381
 
382 382
         'email_refunded_invoice_admin_bcc' => array(
383 383
             'id'       => 'email_refunded_invoice_admin_bcc',
384
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
385
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
384
+            'name'     => __('Enable Admin BCC', 'invoicing'),
385
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
386 386
             'type'     => 'checkbox',
387 387
             'std'      => 1
388 388
         ),
389 389
 
390 390
         'email_refunded_invoice_subject' => array(
391 391
             'id'       => 'email_refunded_invoice_subject',
392
-            'name'     => __( 'Subject', 'invoicing' ),
393
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
392
+            'name'     => __('Subject', 'invoicing'),
393
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
394 394
             'help-tip' => true,
395 395
             'type'     => 'text',
396
-            'std'      => __( '[{site_title}] Your invoice from {invoice_date} has been refunded', 'invoicing' ),
396
+            'std'      => __('[{site_title}] Your invoice from {invoice_date} has been refunded', 'invoicing'),
397 397
             'size'     => 'large'
398 398
         ),
399 399
 
400 400
         'email_refunded_invoice_heading' => array(
401 401
             'id'       => 'email_refunded_invoice_heading',
402
-            'name'     => __( 'Email Heading', 'invoicing' ),
403
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
402
+            'name'     => __('Email Heading', 'invoicing'),
403
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
404 404
             'help-tip' => true,
405 405
             'type'     => 'text',
406
-            'std'      => __( 'Your invoice has been refunded', 'invoicing' ),
406
+            'std'      => __('Your invoice has been refunded', 'invoicing'),
407 407
             'size'     => 'large'
408 408
         ),
409 409
 
410 410
         'email_refunded_invoice_body' => array(
411 411
             'id'       => 'email_refunded_invoice_body',
412
-            'name'     => __( 'Email Content', 'invoicing' ),
412
+            'name'     => __('Email Content', 'invoicing'),
413 413
             'desc'     => wpinv_get_merge_tags_help_text(),
414 414
             'type'     => 'rich_editor',
415
-            'std'      => __( '<p>Hi {name},</p><p>Your invoice on {site_title} has been refunded. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing' ),
415
+            'std'      => __('<p>Hi {name},</p><p>Your invoice on {site_title} has been refunded. <a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a></p>', 'invoicing'),
416 416
             'class'    => 'large',
417 417
             'size'     => '10'
418 418
         ),
@@ -423,53 +423,53 @@  discard block
 block discarded – undo
423 423
 
424 424
         'email_user_invoice_header' => array(
425 425
             'id'       => 'email_user_invoice_header',
426
-            'name'     => '<h3>' . __( 'Customer Invoice', 'invoicing' ) . '</h3>',
427
-            'desc'     => __( 'These emails are sent to customers containing their invoice information and payment links.', 'invoicing' ),
426
+            'name'     => '<h3>' . __('Customer Invoice', 'invoicing') . '</h3>',
427
+            'desc'     => __('These emails are sent to customers containing their invoice information and payment links.', 'invoicing'),
428 428
             'type'     => 'header',
429 429
         ),
430 430
 
431 431
         'email_user_invoice_active' => array(
432 432
             'id'       => 'email_user_invoice_active',
433
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
434
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
433
+            'name'     => __('Enable/Disable', 'invoicing'),
434
+            'desc'     => __('Enable this email notification', 'invoicing'),
435 435
             'type'     => 'checkbox',
436 436
             'std'      => 1
437 437
         ),
438 438
 
439 439
         'email_user_invoice_admin_bcc' => array(
440 440
             'id'       => 'email_user_invoice_admin_bcc',
441
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
442
-            'desc'     => __( 'Check if you want to send a copy of this notification email to to the site admin.', 'invoicing' ),
441
+            'name'     => __('Enable Admin BCC', 'invoicing'),
442
+            'desc'     => __('Check if you want to send a copy of this notification email to to the site admin.', 'invoicing'),
443 443
             'type'     => 'checkbox',
444 444
             'std'      => 0
445 445
         ),
446 446
 
447 447
         'email_user_invoice_subject' => array(
448 448
             'id'       => 'email_user_invoice_subject',
449
-            'name'     => __( 'Subject', 'invoicing' ),
450
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
449
+            'name'     => __('Subject', 'invoicing'),
450
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
451 451
             'help-tip' => true,
452 452
             'type'     => 'text',
453
-            'std'      => __( '[{site_title}] Your invoice from {invoice_date}', 'invoicing' ),
453
+            'std'      => __('[{site_title}] Your invoice from {invoice_date}', 'invoicing'),
454 454
             'size'     => 'large'
455 455
         ),
456 456
 
457 457
         'email_user_invoice_heading' => array(
458 458
             'id'       => 'email_user_invoice_heading',
459
-            'name'     => __( 'Email Heading', 'invoicing' ),
460
-            'desc'     => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ),
459
+            'name'     => __('Email Heading', 'invoicing'),
460
+            'desc'     => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'),
461 461
             'help-tip' => true,
462 462
             'type'     => 'text',
463
-            'std'      => __( 'Your invoice {invoice_number} details', 'invoicing' ),
463
+            'std'      => __('Your invoice {invoice_number} details', 'invoicing'),
464 464
             'size'     => 'large'
465 465
         ),
466 466
 
467 467
         'email_user_invoice_body' => array(
468 468
             'id'       => 'email_user_invoice_body',
469
-            'name'     => __( 'Email Content', 'invoicing' ),
469
+            'name'     => __('Email Content', 'invoicing'),
470 470
             'desc'     => wpinv_get_merge_tags_help_text(),
471 471
             'type'     => 'rich_editor',
472
-            'std'      => __( '<p>Hi {name},</p><p>An invoice of {invoice_total} has been created for you on {site_title}. You can <a href="{invoice_link}">view</a> or <a href="{invoice_pay_link}">pay</a> the invoice. Please reply to this email if you have any questions about the invoice.', 'invoicing' ),
472
+            'std'      => __('<p>Hi {name},</p><p>An invoice of {invoice_total} has been created for you on {site_title}. You can <a href="{invoice_link}">view</a> or <a href="{invoice_pay_link}">pay</a> the invoice. Please reply to this email if you have any questions about the invoice.', 'invoicing'),
473 473
             'class'    => 'large',
474 474
             'size'     => '10'
475 475
         ),
@@ -479,53 +479,53 @@  discard block
 block discarded – undo
479 479
 
480 480
         'email_user_note_header' => array(
481 481
             'id'       => 'email_user_note_header',
482
-            'name'     => '<h3>' . __( 'Customer Note', 'invoicing' ) . '</h3>',
483
-            'desc'     => __( 'These emails are sent when you add a customer note to an invoice/quote.', 'invoicing' ),
482
+            'name'     => '<h3>' . __('Customer Note', 'invoicing') . '</h3>',
483
+            'desc'     => __('These emails are sent when you add a customer note to an invoice/quote.', 'invoicing'),
484 484
             'type'     => 'header',
485 485
         ),
486 486
 
487 487
         'email_user_note_active' => array(
488 488
             'id'       => 'email_user_note_active',
489
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
490
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
489
+            'name'     => __('Enable/Disable', 'invoicing'),
490
+            'desc'     => __('Enable this email notification', 'invoicing'),
491 491
             'type'     => 'checkbox',
492 492
             'std'      => 1
493 493
         ),
494 494
 
495 495
         'email_user_note_admin_bcc' => array(
496 496
             'id'       => 'email_user_note_admin_bcc',
497
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
498
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
497
+            'name'     => __('Enable Admin BCC', 'invoicing'),
498
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
499 499
             'type'     => 'checkbox',
500 500
             'std'      => 0
501 501
         ),
502 502
 
503 503
         'email_user_note_subject' => array(
504 504
             'id'       => 'email_user_note_subject',
505
-            'name'     => __( 'Subject', 'invoicing' ),
506
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
505
+            'name'     => __('Subject', 'invoicing'),
506
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
507 507
             'help-tip' => true,
508 508
             'type'     => 'text',
509
-            'std'      => __( '[{site_title}] Note added to your {invoice_label} #{invoice_number} from {invoice_date}', 'invoicing' ),
509
+            'std'      => __('[{site_title}] Note added to your {invoice_label} #{invoice_number} from {invoice_date}', 'invoicing'),
510 510
             'size'     => 'large'
511 511
         ),
512 512
 
513 513
         'email_user_note_heading' => array(
514 514
             'id'       => 'email_user_note_heading',
515
-            'name'     => __( 'Email Heading', 'invoicing' ),
516
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
515
+            'name'     => __('Email Heading', 'invoicing'),
516
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
517 517
             'help-tip' => true,
518 518
             'type'     => 'text',
519
-            'std'      => __( 'A note has been added to your {invoice_label}', 'invoicing' ),
519
+            'std'      => __('A note has been added to your {invoice_label}', 'invoicing'),
520 520
             'size'     => 'large'
521 521
         ),
522 522
 
523 523
         'email_user_note_body' => array(
524 524
             'id'       => 'email_user_note_body',
525
-            'name'     => __( 'Email Content', 'invoicing' ),
525
+            'name'     => __('Email Content', 'invoicing'),
526 526
             'desc'     => wpinv_get_merge_tags_help_text(),
527 527
             'type'     => 'rich_editor',
528
-            'std'      => __( '<p>Hi {name},</p><p>The following note has been added to your {invoice_label} <a href="{invoice_link}">#{invoice_number}</a>:</p><blockquote class="wpinv-note">{customer_note}</blockquote><a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a>', 'invoicing' ),
528
+            'std'      => __('<p>Hi {name},</p><p>The following note has been added to your {invoice_label} <a href="{invoice_link}">#{invoice_number}</a>:</p><blockquote class="wpinv-note">{customer_note}</blockquote><a class="btn btn-success" href="{invoice_link}">View / Print Invoice</a>', 'invoicing'),
529 529
             'class'    => 'large',
530 530
             'size'     => '10'
531 531
         ),
@@ -535,63 +535,63 @@  discard block
 block discarded – undo
535 535
 
536 536
         'email_overdue_header' => array(
537 537
             'id'       => 'email_overdue_header',
538
-            'name'     => '<h3>' . __( 'Payment Reminder', 'invoicing' ) . '</h3>',
539
-            'desc'     => __( 'Payment reminder emails are sent to customers whenever their invoices are due.', 'invoicing' ),
538
+            'name'     => '<h3>' . __('Payment Reminder', 'invoicing') . '</h3>',
539
+            'desc'     => __('Payment reminder emails are sent to customers whenever their invoices are due.', 'invoicing'),
540 540
             'type'     => 'header',
541 541
         ),
542 542
 
543 543
         'email_overdue_active' => array(
544 544
             'id'       => 'email_overdue_active',
545
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
546
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
545
+            'name'     => __('Enable/Disable', 'invoicing'),
546
+            'desc'     => __('Enable this email notification', 'invoicing'),
547 547
             'type'     => 'checkbox',
548 548
             'std'      => 1
549 549
         ),
550 550
 
551 551
         'email_overdue_admin_bcc' => array(
552 552
             'id'       => 'email_overdue_admin_bcc',
553
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
554
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
553
+            'name'     => __('Enable Admin BCC', 'invoicing'),
554
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
555 555
             'type'     => 'checkbox',
556 556
             'std'      => 0
557 557
         ),
558 558
 
559 559
         'email_overdue_days' => array(
560 560
             'id'       => 'email_overdue_days',
561
-            'name'     => __( 'When to Send', 'invoicing' ),
562
-            'desc'     => __( 'Check when you would like payment reminders sent out.', 'invoicing' ),
561
+            'name'     => __('When to Send', 'invoicing'),
562
+            'desc'     => __('Check when you would like payment reminders sent out.', 'invoicing'),
563 563
             'help-tip' => true,
564
-            'std'      => array( '1' ),
564
+            'std'      => array('1'),
565 565
             'type'     => 'multicheck',
566 566
             'options'  => $overdue_days_options,
567 567
         ),
568 568
 
569 569
         'email_overdue_subject' => array(
570 570
             'id'       => 'email_overdue_subject',
571
-            'name'     => __( 'Subject', 'invoicing' ),
572
-            'desc'     => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ),
571
+            'name'     => __('Subject', 'invoicing'),
572
+            'desc'     => __('Enter the subject line for the invoice receipt email.', 'invoicing'),
573 573
             'help-tip' => true,
574 574
             'type'     => 'text',
575
-            'std'      => __( '[{site_title}] Payment Reminder', 'invoicing' ),
575
+            'std'      => __('[{site_title}] Payment Reminder', 'invoicing'),
576 576
             'size'     => 'large'
577 577
         ),
578 578
 
579 579
         'email_overdue_heading' => array(
580 580
             'id'       => 'email_overdue_heading',
581
-            'name'     => __( 'Email Heading', 'invoicing' ),
582
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
581
+            'name'     => __('Email Heading', 'invoicing'),
582
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
583 583
             'help-tip' => true,
584 584
             'type'     => 'text',
585
-            'std'      => __( 'Payment reminder for your invoice', 'invoicing' ),
585
+            'std'      => __('Payment reminder for your invoice', 'invoicing'),
586 586
             'size'     => 'large'
587 587
         ),
588 588
 
589 589
         'email_overdue_body' => array(
590 590
             'id'       => 'email_overdue_body',
591
-            'name'     => __( 'Email Content', 'invoicing' ),
591
+            'name'     => __('Email Content', 'invoicing'),
592 592
             'desc'     => wpinv_get_merge_tags_help_text(),
593 593
             'type'     => 'rich_editor',
594
-            'std'      => __( '<p>Hi {full_name},</p><p>This is just a friendly reminder that your invoice <a href="{invoice_link}">#{invoice_number}</a> {is_was} due on {invoice_due_date}.</p><p>The total of this invoice is {invoice_total}</p><p>To view / pay now for this invoice please use the following link: <a class="btn btn-success" href="{invoice_link}">View / Pay</a></p>', 'invoicing' ),
594
+            'std'      => __('<p>Hi {full_name},</p><p>This is just a friendly reminder that your invoice <a href="{invoice_link}">#{invoice_number}</a> {is_was} due on {invoice_due_date}.</p><p>The total of this invoice is {invoice_total}</p><p>To view / pay now for this invoice please use the following link: <a class="btn btn-success" href="{invoice_link}">View / Pay</a></p>', 'invoicing'),
595 595
             'class'    => 'large',
596 596
             'size'     => 10,
597 597
         ),
@@ -602,63 +602,63 @@  discard block
 block discarded – undo
602 602
 
603 603
         'email_renewal_reminder_header' => array(
604 604
             'id'       => 'email_renewal_reminder_header',
605
-            'name'     => '<h3>' . __( 'Renewal Reminder', 'invoicing' ) . '</h3>',
606
-            'desc'     => __( 'These emails are sent to customers whenever their subscription is about to renew.', 'invoicing' ),
605
+            'name'     => '<h3>' . __('Renewal Reminder', 'invoicing') . '</h3>',
606
+            'desc'     => __('These emails are sent to customers whenever their subscription is about to renew.', 'invoicing'),
607 607
             'type'     => 'header',
608 608
         ),
609 609
 
610 610
         'email_renewal_reminder_active' => array(
611 611
             'id'       => 'email_renewal_reminder_active',
612
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
613
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
612
+            'name'     => __('Enable/Disable', 'invoicing'),
613
+            'desc'     => __('Enable this email notification', 'invoicing'),
614 614
             'type'     => 'checkbox',
615 615
             'std'      => 0
616 616
         ),
617 617
 
618 618
         'email_renewal_reminder_admin_bcc' => array(
619 619
             'id'       => 'email_renewal_reminder_admin_bcc',
620
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
621
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
620
+            'name'     => __('Enable Admin BCC', 'invoicing'),
621
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
622 622
             'type'     => 'checkbox',
623 623
             'std'      => 0
624 624
         ),
625 625
 
626 626
         'email_renewal_reminder_days' => array(
627 627
             'id'       => 'email_renewal_reminder_days',
628
-            'name'     => __( 'When to Send', 'invoicing' ),
629
-            'desc'     => __( 'Check when you would like renewal reminders sent out.', 'invoicing' ),
628
+            'name'     => __('When to Send', 'invoicing'),
629
+            'desc'     => __('Check when you would like renewal reminders sent out.', 'invoicing'),
630 630
             'help-tip' => true,
631
-            'std'      => array( '1', '5', '10' ),
631
+            'std'      => array('1', '5', '10'),
632 632
             'type'     => 'multicheck',
633 633
             'options'  => $renewal_days_options,
634 634
         ),
635 635
 
636 636
         'email_renewal_reminder_subject' => array(
637 637
             'id'       => 'email_renewal_reminder_subject',
638
-            'name'     => __( 'Subject', 'invoicing' ),
639
-            'desc'     => __( 'Enter the subject line for the email.', 'invoicing' ),
638
+            'name'     => __('Subject', 'invoicing'),
639
+            'desc'     => __('Enter the subject line for the email.', 'invoicing'),
640 640
             'help-tip' => true,
641 641
             'type'     => 'text',
642
-            'std'      => __( '[{site_title}] Renewal Reminder', 'invoicing' ),
642
+            'std'      => __('[{site_title}] Renewal Reminder', 'invoicing'),
643 643
             'size'     => 'large'
644 644
         ),
645 645
 
646 646
         'email_renewal_reminder_heading' => array(
647 647
             'id'       => 'email_renewal_reminder_heading',
648
-            'name'     => __( 'Email Heading', 'invoicing' ),
649
-            'desc'     => __( 'Enter the main heading contained within the email notification.', 'invoicing' ),
648
+            'name'     => __('Email Heading', 'invoicing'),
649
+            'desc'     => __('Enter the main heading contained within the email notification.', 'invoicing'),
650 650
             'help-tip' => true,
651 651
             'type'     => 'text',
652
-            'std'      => __( 'Upcoming renewal reminder', 'invoicing' ),
652
+            'std'      => __('Upcoming renewal reminder', 'invoicing'),
653 653
             'size'     => 'large'
654 654
         ),
655 655
 
656 656
         'email_renewal_reminder_body' => array(
657 657
             'id'       => 'email_renewal_reminder_body',
658
-            'name'     => __( 'Email Content', 'invoicing' ),
659
-            'desc'     => wpinv_get_merge_tags_help_text( true ),
658
+            'name'     => __('Email Content', 'invoicing'),
659
+            'desc'     => wpinv_get_merge_tags_help_text(true),
660 660
             'type'     => 'rich_editor',
661
-            'std'      => __( '<p>Hi {full_name},</p><p>This is just a friendly reminder that your subscription for invoice <a href="{invoice_link}">#{invoice_number}</a> will renew on {subscription_renewal_date}.</p>', 'invoicing' ),
661
+            'std'      => __('<p>Hi {full_name},</p><p>This is just a friendly reminder that your subscription for invoice <a href="{invoice_link}">#{invoice_number}</a> will renew on {subscription_renewal_date}.</p>', 'invoicing'),
662 662
             'class'    => 'large',
663 663
             'size'     => 10,
664 664
         ),
@@ -669,53 +669,53 @@  discard block
 block discarded – undo
669 669
 
670 670
         'email_subscription_trial_header' => array(
671 671
             'id'       => 'email_subscription_trial_header',
672
-            'name'     => '<h3>' . __( 'Trial Started', 'invoicing' ) . '</h3>',
673
-            'desc'     => __( 'These emails are sent when a customer starts a subscription trial.', 'invoicing' ),
672
+            'name'     => '<h3>' . __('Trial Started', 'invoicing') . '</h3>',
673
+            'desc'     => __('These emails are sent when a customer starts a subscription trial.', 'invoicing'),
674 674
             'type'     => 'header',
675 675
         ),
676 676
 
677 677
         'email_subscription_trial_active' => array(
678 678
             'id'       => 'email_subscription_trial_active',
679
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
680
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
679
+            'name'     => __('Enable/Disable', 'invoicing'),
680
+            'desc'     => __('Enable this email notification', 'invoicing'),
681 681
             'type'     => 'checkbox',
682 682
             'std'      => 0
683 683
         ),
684 684
 
685 685
         'email_subscription_trial_admin_bcc' => array(
686 686
             'id'       => 'email_subscription_trial_admin_bcc',
687
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
688
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
687
+            'name'     => __('Enable Admin BCC', 'invoicing'),
688
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
689 689
             'type'     => 'checkbox',
690 690
             'std'      => 0
691 691
         ),
692 692
 
693 693
         'email_subscription_trial_subject' => array(
694 694
             'id'       => 'email_subscription_trial_subject',
695
-            'name'     => __( 'Subject', 'invoicing' ),
696
-            'desc'     => __( 'Enter the subject line for the subscription trial email.', 'invoicing' ),
695
+            'name'     => __('Subject', 'invoicing'),
696
+            'desc'     => __('Enter the subject line for the subscription trial email.', 'invoicing'),
697 697
             'help-tip' => true,
698 698
             'type'     => 'text',
699
-            'std'      => __( '[{site_title}] Trial Started', 'invoicing' ),
699
+            'std'      => __('[{site_title}] Trial Started', 'invoicing'),
700 700
             'size'     => 'large'
701 701
         ),
702 702
 
703 703
         'email_subscription_trial_heading' => array(
704 704
             'id'       => 'email_subscription_trial_heading',
705
-            'name'     => __( 'Email Heading', 'invoicing' ),
706
-            'desc'     => __( 'Enter the main heading of this email.', 'invoicing' ),
705
+            'name'     => __('Email Heading', 'invoicing'),
706
+            'desc'     => __('Enter the main heading of this email.', 'invoicing'),
707 707
             'help-tip' => true,
708 708
             'type'     => 'text',
709
-            'std'      => __( 'Trial Started', 'invoicing' ),
709
+            'std'      => __('Trial Started', 'invoicing'),
710 710
             'size'     => 'large'
711 711
         ),
712 712
 
713 713
         'email_subscription_trial_body' => array(
714 714
             'id'       => 'email_subscription_trial_body',
715
-            'name'     => __( 'Email Content', 'invoicing' ),
716
-            'desc'     => wpinv_get_merge_tags_help_text( true ),
715
+            'name'     => __('Email Content', 'invoicing'),
716
+            'desc'     => wpinv_get_merge_tags_help_text(true),
717 717
             'type'     => 'rich_editor',
718
-            'std'      => __( '<p>Hi {first_name},</p><p>Your trial for {subscription_name} is now active and will renew on {subscription_renewal_date}.</p>', 'invoicing' ),
718
+            'std'      => __('<p>Hi {first_name},</p><p>Your trial for {subscription_name} is now active and will renew on {subscription_renewal_date}.</p>', 'invoicing'),
719 719
             'class'    => 'large',
720 720
             'size'     => 10,
721 721
         ),
@@ -725,53 +725,53 @@  discard block
 block discarded – undo
725 725
 
726 726
         'email_subscription_cancelled_header' => array(
727 727
             'id'       => 'email_subscription_cancelled_header',
728
-            'name'     => '<h3>' . __( 'Subscription Cancelled', 'invoicing' ) . '</h3>',
729
-            'desc'     => __( 'These emails are sent when a customer cancels their subscription.', 'invoicing' ),
728
+            'name'     => '<h3>' . __('Subscription Cancelled', 'invoicing') . '</h3>',
729
+            'desc'     => __('These emails are sent when a customer cancels their subscription.', 'invoicing'),
730 730
             'type'     => 'header',
731 731
         ),
732 732
 
733 733
         'email_subscription_cancelled_active' => array(
734 734
             'id'       => 'email_subscription_cancelled_active',
735
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
736
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
735
+            'name'     => __('Enable/Disable', 'invoicing'),
736
+            'desc'     => __('Enable this email notification', 'invoicing'),
737 737
             'type'     => 'checkbox',
738 738
             'std'      => 1
739 739
         ),
740 740
 
741 741
         'email_subscription_cancelled_admin_bcc' => array(
742 742
             'id'       => 'email_subscription_cancelled_admin_bcc',
743
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
744
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
743
+            'name'     => __('Enable Admin BCC', 'invoicing'),
744
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
745 745
             'type'     => 'checkbox',
746 746
             'std'      => 1
747 747
         ),
748 748
 
749 749
         'email_subscription_cancelled_subject' => array(
750 750
             'id'       => 'email_subscription_cancelled_subject',
751
-            'name'     => __( 'Subject', 'invoicing' ),
752
-            'desc'     => __( 'Enter the subject line for the subscription cancelled email.', 'invoicing' ),
751
+            'name'     => __('Subject', 'invoicing'),
752
+            'desc'     => __('Enter the subject line for the subscription cancelled email.', 'invoicing'),
753 753
             'help-tip' => true,
754 754
             'type'     => 'text',
755
-            'std'      => __( '[{site_title}] Subscription Cancelled', 'invoicing' ),
755
+            'std'      => __('[{site_title}] Subscription Cancelled', 'invoicing'),
756 756
             'size'     => 'large'
757 757
         ),
758 758
 
759 759
         'email_subscription_cancelled_heading' => array(
760 760
             'id'       => 'email_subscription_cancelled_heading',
761
-            'name'     => __( 'Email Heading', 'invoicing' ),
762
-            'desc'     => __( 'Enter the main heading of this email.', 'invoicing' ),
761
+            'name'     => __('Email Heading', 'invoicing'),
762
+            'desc'     => __('Enter the main heading of this email.', 'invoicing'),
763 763
             'help-tip' => true,
764 764
             'type'     => 'text',
765
-            'std'      => __( 'Subscription Cancelled', 'invoicing' ),
765
+            'std'      => __('Subscription Cancelled', 'invoicing'),
766 766
             'size'     => 'large'
767 767
         ),
768 768
 
769 769
         'email_subscription_cancelled_body' => array(
770 770
             'id'       => 'email_subscription_cancelled_body',
771
-            'name'     => __( 'Email Content', 'invoicing' ),
772
-            'desc'     => wpinv_get_merge_tags_help_text( true ),
771
+            'name'     => __('Email Content', 'invoicing'),
772
+            'desc'     => wpinv_get_merge_tags_help_text(true),
773 773
             'type'     => 'rich_editor',
774
-            'std'      => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has been cancelled and will no longer renew.</p>', 'invoicing' ),
774
+            'std'      => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has been cancelled and will no longer renew.</p>', 'invoicing'),
775 775
             'class'    => 'large',
776 776
             'size'     => 10,
777 777
         ),
@@ -781,53 +781,53 @@  discard block
 block discarded – undo
781 781
 
782 782
         'email_subscription_expired_header' => array(
783 783
             'id'       => 'email_subscription_expired_header',
784
-            'name'     => '<h3>' . __( 'Subscription Expired', 'invoicing' ) . '</h3>',
785
-            'desc'     => __( "These emails are sent when a customer's subscription expires and automatic renewal fails.", 'invoicing' ),
784
+            'name'     => '<h3>' . __('Subscription Expired', 'invoicing') . '</h3>',
785
+            'desc'     => __("These emails are sent when a customer's subscription expires and automatic renewal fails.", 'invoicing'),
786 786
             'type'     => 'header',
787 787
         ),
788 788
 
789 789
         'email_subscription_expired_active' => array(
790 790
             'id'       => 'email_subscription_expired_active',
791
-            'name'     => __( 'Enable/Disable', 'invoicing' ),
792
-            'desc'     => __( 'Enable this email notification', 'invoicing' ),
791
+            'name'     => __('Enable/Disable', 'invoicing'),
792
+            'desc'     => __('Enable this email notification', 'invoicing'),
793 793
             'type'     => 'checkbox',
794 794
             'std'      => 1
795 795
         ),
796 796
 
797 797
         'email_subscription_expired_admin_bcc' => array(
798 798
             'id'       => 'email_subscription_expired_admin_bcc',
799
-            'name'     => __( 'Enable Admin BCC', 'invoicing' ),
800
-            'desc'     => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
799
+            'name'     => __('Enable Admin BCC', 'invoicing'),
800
+            'desc'     => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
801 801
             'type'     => 'checkbox',
802 802
             'std'      => 1
803 803
         ),
804 804
 
805 805
         'email_subscription_expired_subject' => array(
806 806
             'id'       => 'email_subscription_expired_subject',
807
-            'name'     => __( 'Subject', 'invoicing' ),
808
-            'desc'     => __( 'Enter the subject line for the subscription expired email.', 'invoicing' ),
807
+            'name'     => __('Subject', 'invoicing'),
808
+            'desc'     => __('Enter the subject line for the subscription expired email.', 'invoicing'),
809 809
             'help-tip' => true,
810 810
             'type'     => 'text',
811
-            'std'      => __( '[{site_title}] Subscription Expired', 'invoicing' ),
811
+            'std'      => __('[{site_title}] Subscription Expired', 'invoicing'),
812 812
             'size'     => 'large'
813 813
         ),
814 814
 
815 815
         'email_subscription_expired_heading' => array(
816 816
             'id'       => 'email_subscription_expired_heading',
817
-            'name'     => __( 'Email Heading', 'invoicing' ),
818
-            'desc'     => __( 'Enter the main heading of this email.', 'invoicing' ),
817
+            'name'     => __('Email Heading', 'invoicing'),
818
+            'desc'     => __('Enter the main heading of this email.', 'invoicing'),
819 819
             'type'     => 'text',
820
-            'std'      => __( 'Subscription Expired', 'invoicing' ),
820
+            'std'      => __('Subscription Expired', 'invoicing'),
821 821
             'help-tip' => true,
822 822
             'size'     => 'large'
823 823
         ),
824 824
 
825 825
         'email_subscription_expired_body' => array(
826 826
             'id'       => 'email_subscription_expired_body',
827
-            'name'     => __( 'Email Content', 'invoicing' ),
828
-            'desc'     => wpinv_get_merge_tags_help_text( true ),
827
+            'name'     => __('Email Content', 'invoicing'),
828
+            'desc'     => wpinv_get_merge_tags_help_text(true),
829 829
             'type'     => 'rich_editor',
830
-            'std'      => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has expired.</p>', 'invoicing' ),
830
+            'std'      => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has expired.</p>', 'invoicing'),
831 831
             'class'    => 'large',
832 832
             'size'     => 10,
833 833
         ),
@@ -837,53 +837,53 @@  discard block
 block discarded – undo
837 837
 
838 838
         'email_subscription_complete_header' => array(
839 839
             'id'     => 'email_subscription_complete_header',
840
-            'name'   => '<h3>' . __( 'Subscription Complete', 'invoicing' ) . '</h3>',
841
-            'desc'   => __( 'These emails are sent when a customer completes their subscription.', 'invoicing' ),
840
+            'name'   => '<h3>' . __('Subscription Complete', 'invoicing') . '</h3>',
841
+            'desc'   => __('These emails are sent when a customer completes their subscription.', 'invoicing'),
842 842
             'type'   => 'header',
843 843
         ),
844 844
 
845 845
         'email_subscription_complete_active' => array(
846 846
             'id'      => 'email_subscription_complete_active',
847
-            'name'    => __( 'Enable/Disable', 'invoicing' ),
848
-            'desc'    => __( 'Enable this email notification', 'invoicing' ),
847
+            'name'    => __('Enable/Disable', 'invoicing'),
848
+            'desc'    => __('Enable this email notification', 'invoicing'),
849 849
             'type'    => 'checkbox',
850 850
             'std'     => 1
851 851
         ),
852 852
 
853 853
         'email_subscription_complete_admin_bcc' => array(
854 854
             'id'      => 'email_subscription_complete_admin_bcc',
855
-            'name'    => __( 'Enable Admin BCC', 'invoicing' ),
856
-            'desc'    => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ),
855
+            'name'    => __('Enable Admin BCC', 'invoicing'),
856
+            'desc'    => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'),
857 857
             'type'    => 'checkbox',
858 858
             'std'     => 1
859 859
         ),
860 860
 
861 861
         'email_subscription_complete_subject' => array(
862 862
             'id'       => 'email_subscription_complete_subject',
863
-            'name'     => __( 'Subject', 'invoicing' ),
864
-            'desc'     => __( 'Enter the subject line for the subscription complete email.', 'invoicing' ),
863
+            'name'     => __('Subject', 'invoicing'),
864
+            'desc'     => __('Enter the subject line for the subscription complete email.', 'invoicing'),
865 865
             'help-tip' => true,
866 866
             'type'     => 'text',
867
-            'std'      => __( '[{site_title}] Subscription Complete', 'invoicing' ),
867
+            'std'      => __('[{site_title}] Subscription Complete', 'invoicing'),
868 868
             'size'     => 'large'
869 869
         ),
870 870
 
871 871
         'email_subscription_complete_heading' => array(
872 872
             'id'       => 'email_subscription_complete_heading',
873
-            'name'     => __( 'Email Heading', 'invoicing' ),
874
-            'desc'     => __( 'Enter the main heading of this email.', 'invoicing' ),
873
+            'name'     => __('Email Heading', 'invoicing'),
874
+            'desc'     => __('Enter the main heading of this email.', 'invoicing'),
875 875
             'help-tip' => true,
876 876
             'type'     => 'text',
877
-            'std'      => __( 'Subscription Complete', 'invoicing' ),
877
+            'std'      => __('Subscription Complete', 'invoicing'),
878 878
             'size'     => 'large'
879 879
         ),
880 880
 
881 881
         'email_subscription_complete_body' => array(
882 882
             'id'       => 'email_subscription_complete_body',
883
-            'name'     => __( 'Email Content', 'invoicing' ),
884
-            'desc'     => wpinv_get_merge_tags_help_text( true ),
883
+            'name'     => __('Email Content', 'invoicing'),
884
+            'desc'     => wpinv_get_merge_tags_help_text(true),
885 885
             'type'     => 'rich_editor',
886
-            'std'      => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} is now complete.</p>', 'invoicing' ),
886
+            'std'      => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} is now complete.</p>', 'invoicing'),
887 887
             'class'    => 'large',
888 888
             'size'     => 10,
889 889
         ),
Please login to merge, or discard this patch.