@@ -179,8 +179,9 @@ discard block |
||
179 | 179 | |
180 | 180 | // Setup possible parts |
181 | 181 | $templates = array(); |
182 | - if ( isset( $name ) ) |
|
183 | - $templates[] = $slug . '-' . $name . '.php'; |
|
182 | + if ( isset( $name ) ) { |
|
183 | + $templates[] = $slug . '-' . $name . '.php'; |
|
184 | + } |
|
184 | 185 | $templates[] = $slug . '.php'; |
185 | 186 | |
186 | 187 | // Allow template parts to be filtered |
@@ -198,8 +199,9 @@ discard block |
||
198 | 199 | foreach ( (array)$template_names as $template_name ) { |
199 | 200 | |
200 | 201 | // Continue if template is empty |
201 | - if ( empty( $template_name ) ) |
|
202 | - continue; |
|
202 | + if ( empty( $template_name ) ) { |
|
203 | + continue; |
|
204 | + } |
|
203 | 205 | |
204 | 206 | // Trim off any slashes from the template name |
205 | 207 | $template_name = ltrim( $template_name, '/' ); |
@@ -218,8 +220,9 @@ discard block |
||
218 | 220 | } |
219 | 221 | } |
220 | 222 | |
221 | - if ( ( true == $load ) && ! empty( $located ) ) |
|
222 | - load_template( $located, $require_once ); |
|
223 | + if ( ( true == $load ) && ! empty( $located ) ) { |
|
224 | + load_template( $located, $require_once ); |
|
225 | + } |
|
223 | 226 | |
224 | 227 | return $located; |
225 | 228 | } |
@@ -1210,16 +1210,18 @@ |
||
1210 | 1210 | |
1211 | 1211 | if ( !empty( $tax_rates ) ) { |
1212 | 1212 | foreach ( $tax_rates as $key => $tax_rate ) { |
1213 | - if ( $country != $tax_rate['country'] ) |
|
1214 | - continue; |
|
1213 | + if ( $country != $tax_rate['country'] ) { |
|
1214 | + continue; |
|
1215 | + } |
|
1215 | 1216 | |
1216 | 1217 | if ( !empty( $tax_rate['global'] ) ) { |
1217 | 1218 | if ( 0 !== $tax_rate['rate'] || !empty( $tax_rate['rate'] ) ) { |
1218 | 1219 | $rate = number_format( $tax_rate['rate'], 4 ); |
1219 | 1220 | } |
1220 | 1221 | } else { |
1221 | - if ( empty( $tax_rate['state'] ) || strtolower( $state ) != strtolower( $tax_rate['state'] ) ) |
|
1222 | - continue; |
|
1222 | + if ( empty( $tax_rate['state'] ) || strtolower( $state ) != strtolower( $tax_rate['state'] ) ) { |
|
1223 | + continue; |
|
1224 | + } |
|
1223 | 1225 | |
1224 | 1226 | $state_rate = $tax_rate['rate']; |
1225 | 1227 | if ( 0 !== $state_rate || !empty( $state_rate ) ) { |