@@ -1100,10 +1100,11 @@ discard block |
||
1100 | 1100 | |
1101 | 1101 | $checked = false; |
1102 | 1102 | |
1103 | - if ( isset( $wpinv_options[ $args['id'] ] ) && $wpinv_options[ $args['id'] ] == $key ) |
|
1104 | - $checked = true; |
|
1105 | - elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $wpinv_options[ $args['id'] ] ) ) |
|
1106 | - $checked = true; |
|
1103 | + if ( isset( $wpinv_options[ $args['id'] ] ) && $wpinv_options[ $args['id'] ] == $key ) { |
|
1104 | + $checked = true; |
|
1105 | + } elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $wpinv_options[ $args['id'] ] ) ) { |
|
1106 | + $checked = true; |
|
1107 | + } |
|
1107 | 1108 | |
1108 | 1109 | echo '<input name="wpinv_settings[' . $sanitize_id . ']" id="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" type="radio" value="' . $sanitize_key . '" ' . checked(true, $checked, false) . '/> '; |
1109 | 1110 | echo '<label for="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']">' . esc_html( $option ) . '</label><br/>'; |
@@ -1120,10 +1121,11 @@ discard block |
||
1120 | 1121 | foreach ( $args['options'] as $key => $option ) : |
1121 | 1122 | $sanitize_key = wpinv_sanitize_key( $key ); |
1122 | 1123 | |
1123 | - if ( isset( $wpinv_options['gateways'][ $key ] ) ) |
|
1124 | - $enabled = '1'; |
|
1125 | - else |
|
1126 | - $enabled = null; |
|
1124 | + if ( isset( $wpinv_options['gateways'][ $key ] ) ) { |
|
1125 | + $enabled = '1'; |
|
1126 | + } else { |
|
1127 | + $enabled = null; |
|
1128 | + } |
|
1127 | 1129 | |
1128 | 1130 | echo '<input name="wpinv_settings[' . esc_attr( $args['id'] ) . '][' . $sanitize_key . ']" id="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" type="checkbox" value="1" ' . checked('1', $enabled, false) . '/> '; |
1129 | 1131 | echo '<label for="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']">' . esc_html( $option['admin_label'] ) . '</label><br/>'; |
@@ -1487,7 +1489,8 @@ discard block |
||
1487 | 1489 | <td class="wpinv_tax_action"><span class="wpinv_remove_tax_rate button-secondary"><?php _e( 'Remove Rate', 'invoicing' ); ?></span></td> |
1488 | 1490 | </tr> |
1489 | 1491 | <?php endforeach; ?> |
1490 | - <?php else : ?> |
|
1492 | + <?php else { |
|
1493 | + : ?> |
|
1491 | 1494 | <tr> |
1492 | 1495 | <td class="wpinv_tax_country"> |
1493 | 1496 | <?php |
@@ -1498,7 +1501,9 @@ discard block |
||
1498 | 1501 | 'show_option_none' => false, |
1499 | 1502 | 'class' => 'wpinv-tax-country wpi_select2', |
1500 | 1503 | 'placeholder' => __( 'Choose a country', 'invoicing' ) |
1501 | - ) ); ?> |
|
1504 | + ) ); |
|
1505 | +} |
|
1506 | +?> |
|
1502 | 1507 | </td> |
1503 | 1508 | <td class="wpinv_tax_state"> |
1504 | 1509 | <?php echo wpinv_html_text( array( |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | <?php |
537 | 537 | if(! empty( $insert_shortcode_function )){ |
538 | 538 | echo $insert_shortcode_function; |
539 | - }else{ |
|
539 | + } else{ |
|
540 | 540 | |
541 | 541 | /** |
542 | 542 | * Function for super duper insert shortcode. |
@@ -1275,8 +1275,7 @@ discard block |
||
1275 | 1275 | $argument_values[ $key ] = isset( $instance[ $key ] ) ? $instance[ $key ] : ''; |
1276 | 1276 | if($args['type']=='checkbox' && $argument_values[ $key ] == ''){ |
1277 | 1277 | // don't set default for an empty checkbox |
1278 | - } |
|
1279 | - elseif ( $argument_values[ $key ] == '' && isset( $args['default'] ) ) { |
|
1278 | + } elseif ( $argument_values[ $key ] == '' && isset( $args['default'] ) ) { |
|
1280 | 1279 | $argument_values[ $key ] = $args['default']; |
1281 | 1280 | } |
1282 | 1281 | } |
@@ -1649,7 +1648,7 @@ discard block |
||
1649 | 1648 | // If the user sets block-output array then build it |
1650 | 1649 | if ( ! empty( $this->options['block-output'] ) ) { |
1651 | 1650 | $this->block_element( $this->options['block-output'] ); |
1652 | - }else{ |
|
1651 | + } else{ |
|
1653 | 1652 | // if no block-output is set then we try and get the shortcode html output via ajax. |
1654 | 1653 | ?> |
1655 | 1654 | el('div', { |