@@ -1,7 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | // don't load directly |
3 | -if ( !defined('ABSPATH') ) |
|
3 | +if ( !defined('ABSPATH') ) { |
|
4 | 4 | die('-1'); |
5 | +} |
|
5 | 6 | |
6 | 7 | if ( !isset( $email_heading ) ) { |
7 | 8 | global $email_heading; |
@@ -1,7 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | // don't load directly |
3 | -if ( !defined('ABSPATH') ) |
|
3 | +if ( !defined('ABSPATH') ) { |
|
4 | 4 | die('-1'); |
5 | +} |
|
5 | 6 | |
6 | 7 | do_action( 'wpinv_email_before_billing_details', $invoice ); ?> |
7 | 8 | <div id="wpinv-email-billing"> |
@@ -196,8 +196,9 @@ |
||
196 | 196 | foreach ( $types as $name => $type ) { |
197 | 197 | echo '<option value="' . esc_attr( $name ) . '"'; |
198 | 198 | |
199 | - if ( isset( $_GET['discount_type'] ) ) |
|
200 | - selected( $name, $_GET['discount_type'] ); |
|
199 | + if ( isset( $_GET['discount_type'] ) ) { |
|
200 | + selected( $name, $_GET['discount_type'] ); |
|
201 | + } |
|
201 | 202 | |
202 | 203 | echo '>' . esc_html__( $type, 'invoicing' ) . '</option>'; |
203 | 204 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | if ( !wpinv_is_gateway_active( $enabled_gateway ) && !empty( $gateways ) ) { |
311 | 311 | if(wpinv_is_gateway_active( wpinv_get_default_gateway()) ){ |
312 | 312 | $enabled_gateway = wpinv_get_default_gateway(); |
313 | - }else{ |
|
313 | + } else{ |
|
314 | 314 | $enabled_gateway = $gateways[0]; |
315 | 315 | } |
316 | 316 | |
@@ -336,8 +336,9 @@ discard block |
||
336 | 336 | |
337 | 337 | $payments = new WP_Query( $args ); |
338 | 338 | |
339 | - if( $payments ) |
|
340 | - $ret = $payments->post_count; |
|
339 | + if( $payments ) { |
|
340 | + $ret = $payments->post_count; |
|
341 | + } |
|
341 | 342 | return $ret; |
342 | 343 | } |
343 | 344 |
@@ -1,7 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Exit if accessed directly |
4 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
4 | +if ( ! defined( 'ABSPATH' ) ) { |
|
5 | + exit; |
|
6 | +} |
|
5 | 7 | |
6 | 8 | abstract class Wpinv_DB { |
7 | 9 |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | if(empty($count)){ |
81 | 81 | $output .= __('No Invoice(s)','invoicing'); |
82 | - }else{ |
|
82 | + } else{ |
|
83 | 83 | $link_url = admin_url( "edit.php?post_type=wpi_invoice&author=".absint($user_id) ); |
84 | 84 | $link_text = sprintf( __('Invoices ( %d )', 'invoicing'), $count ); |
85 | 85 | $output .= "<a href='$link_url' >$link_text</a>"; |
@@ -227,7 +227,7 @@ |
||
227 | 227 | |
228 | 228 | if($args['type']=='image'){ |
229 | 229 | $output .= "<img src='https://maps.googleapis.com/maps/api/staticmap?center=".esc_attr($args['location'])."&maptype=".esc_attr($args['maptype'])."&zoom=".esc_attr($args['zoom'])."&size=".esc_attr($args['static_width'])."x".esc_attr($args['static_height'])."&key=".esc_attr($args['api_key'])."' />"; |
230 | - }else{ |
|
230 | + } else{ |
|
231 | 231 | $output .= "<iframe width='".esc_attr($args['width'])."' height='".esc_attr($args['height'])."' frameborder='0' allowfullscreen style='border:0;' src='https://www.google.com/maps/embed/v1/".esc_attr($args['type'])."?q=".esc_attr($args['location'])."&maptype=".esc_attr($args['maptype'])."&zoom=".esc_attr($args['zoom'])."&key=".esc_attr($args['api_key'])."' ></iframe> "; |
232 | 232 | } |
233 | 233 |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | // Exit if accessed directly |
3 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
3 | +if ( ! defined( 'ABSPATH' ) ) { |
|
4 | + exit; |
|
5 | +} |
|
4 | 6 | if(!class_exists('Ayecode_Addons')) { |
5 | 7 | |
6 | 8 | abstract class Ayecode_Addons |
@@ -132,11 +132,13 @@ |
||
132 | 132 | if ( 'id' == strtolower( $field ) ) { |
133 | 133 | // Make sure the value is numeric to avoid casting objects, for example, |
134 | 134 | // to int 1. |
135 | - if ( ! is_numeric( $value ) ) |
|
136 | - return false; |
|
135 | + if ( ! is_numeric( $value ) ) { |
|
136 | + return false; |
|
137 | + } |
|
137 | 138 | $value = intval( $value ); |
138 | - if ( $value < 1 ) |
|
139 | - return false; |
|
139 | + if ( $value < 1 ) { |
|
140 | + return false; |
|
141 | + } |
|
140 | 142 | } |
141 | 143 | |
142 | 144 | if ( ! $value || ! is_string( $field ) ) { |