@@ -159,8 +159,9 @@ discard block |
||
159 | 159 | |
160 | 160 | // Setup possible parts |
161 | 161 | $templates = array(); |
162 | - if ( isset( $name ) ) |
|
163 | - $templates[] = $slug . '-' . $name . '.php'; |
|
162 | + if ( isset( $name ) ) { |
|
163 | + $templates[] = $slug . '-' . $name . '.php'; |
|
164 | + } |
|
164 | 165 | $templates[] = $slug . '.php'; |
165 | 166 | |
166 | 167 | // Allow template parts to be filtered |
@@ -178,8 +179,9 @@ discard block |
||
178 | 179 | foreach ( (array)$template_names as $template_name ) { |
179 | 180 | |
180 | 181 | // Continue if template is empty |
181 | - if ( empty( $template_name ) ) |
|
182 | - continue; |
|
182 | + if ( empty( $template_name ) ) { |
|
183 | + continue; |
|
184 | + } |
|
183 | 185 | |
184 | 186 | // Trim off any slashes from the template name |
185 | 187 | $template_name = ltrim( $template_name, '/' ); |
@@ -198,8 +200,9 @@ discard block |
||
198 | 200 | } |
199 | 201 | } |
200 | 202 | |
201 | - if ( ( true == $load ) && ! empty( $located ) ) |
|
202 | - load_template( $located, $require_once ); |
|
203 | + if ( ( true == $load ) && ! empty( $located ) ) { |
|
204 | + load_template( $located, $require_once ); |
|
205 | + } |
|
203 | 206 | |
204 | 207 | return $located; |
205 | 208 | } |
@@ -281,8 +284,9 @@ discard block |
||
281 | 284 | function wpinv_html_dropdown( $name = 'wpinv_discounts', $selected = 0, $status = '' ) { |
282 | 285 | $args = array( 'nopaging' => true ); |
283 | 286 | |
284 | - if ( ! empty( $status ) ) |
|
285 | - $args['post_status'] = $status; |
|
287 | + if ( ! empty( $status ) ) { |
|
288 | + $args['post_status'] = $status; |
|
289 | + } |
|
286 | 290 | |
287 | 291 | $discounts = wpinv_get_discounts( $args ); |
288 | 292 | $options = array(); |
@@ -1424,9 +1428,10 @@ discard block |
||
1424 | 1428 | add_action( 'wpinv_cart_empty', 'wpinv_empty_checkout_cart' ); |
1425 | 1429 | |
1426 | 1430 | function wpinv_update_cart_button() { |
1427 | - if ( !wpinv_item_quantities_enabled() ) |
|
1428 | - return; |
|
1429 | -?> |
|
1431 | + if ( !wpinv_item_quantities_enabled() ) { |
|
1432 | + return; |
|
1433 | + } |
|
1434 | + ?> |
|
1430 | 1435 | <input type="submit" name="wpinv_update_cart_submit" class="wpinv-submit wpinv-no-js button" value="<?php _e( 'Update Cart', 'invoicing' ); ?>"/> |
1431 | 1436 | <input type="hidden" name="wpi_action" value="update_cart"/> |
1432 | 1437 | <?php |