@@ -2,12 +2,12 @@ discard block |
||
2 | 2 | global $wpi_invoice; |
3 | 3 | |
4 | 4 | // Backwards compatibility. |
5 | -if ( empty( $invoice ) ) { |
|
5 | +if (empty($invoice)) { |
|
6 | 6 | $invoice = $wpi_invoice; |
7 | 7 | } |
8 | 8 | |
9 | 9 | $success_page_uri = wpinv_get_success_page_uri(); |
10 | -if ( !empty( $wpi_invoice ) ) { |
|
10 | +if (!empty($wpi_invoice)) { |
|
11 | 11 | $success_page_uri = $invoice->get_receipt_url(); |
12 | 12 | } |
13 | 13 | ?> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <?php |
18 | 18 | echo |
19 | 19 | wp_sprintf( |
20 | - __( 'Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing' ), |
|
20 | + __('Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing'), |
|
21 | 21 | $success_page_uri |
22 | 22 | ); |
23 | 23 | ?> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <script type="text/javascript"> |
28 | 28 | setTimeout( |
29 | 29 | function(){ |
30 | - window.location = '<?php echo esc_url( $success_page_uri ); ?>'; |
|
30 | + window.location = '<?php echo esc_url($success_page_uri); ?>'; |
|
31 | 31 | }, |
32 | 32 | 10000 |
33 | 33 | ); |
@@ -8,26 +8,26 @@ discard block |
||
8 | 8 | * @version 1.0.19 |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | // Totals rows. |
14 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
14 | +$totals = getpaid_invoice_totals_rows($invoice); |
|
15 | 15 | |
16 | -do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals ); |
|
16 | +do_action('getpaid_before_invoice_line_totals', $invoice, $totals); |
|
17 | 17 | |
18 | 18 | ?> |
19 | 19 | <div class='border-top getpaid-invoice-line-totals'> |
20 | 20 | <div class="row"> |
21 | 21 | <div class="col-12 offset-sm-6 col-sm-6 border-left pl-0"> |
22 | 22 | |
23 | - <?php foreach ( $totals as $key => $label ) : ?> |
|
23 | + <?php foreach ($totals as $key => $label) : ?> |
|
24 | 24 | |
25 | - <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class( $key ); ?>"> |
|
25 | + <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class($key); ?>"> |
|
26 | 26 | |
27 | 27 | <div class="row"> |
28 | 28 | |
29 | 29 | <div class="col-12 col-sm-8 getpaid-invoice-line-totals-label"> |
30 | - <?php echo sanitize_text_field( $label ); ?> |
|
30 | + <?php echo sanitize_text_field($label); ?> |
|
31 | 31 | </div> |
32 | 32 | |
33 | 33 | <div class="col-12 col-sm-2 getpaid-invoice-line-totals-value"> |
@@ -35,27 +35,27 @@ discard block |
||
35 | 35 | <?php |
36 | 36 | |
37 | 37 | // Total tax. |
38 | - if ( 'tax' == $key ) { |
|
39 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_tax() ), $invoice->get_currency() ); |
|
38 | + if ('tax' == $key) { |
|
39 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_tax()), $invoice->get_currency()); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | // Total discount. |
43 | - if ( 'discount' == $key ) { |
|
44 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_discount() ), $invoice->get_currency() ); |
|
43 | + if ('discount' == $key) { |
|
44 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_discount()), $invoice->get_currency()); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | // Sub total. |
48 | - if ( 'subtotal' == $key ) { |
|
49 | - echo wpinv_price( wpinv_format_amount( $invoice->get_subtotal() ), $invoice->get_currency() ); |
|
48 | + if ('subtotal' == $key) { |
|
49 | + echo wpinv_price(wpinv_format_amount($invoice->get_subtotal()), $invoice->get_currency()); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | // Total. |
53 | - if ( 'total' == $key ) { |
|
54 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total() ), $invoice->get_currency() ); |
|
53 | + if ('total' == $key) { |
|
54 | + echo wpinv_price(wpinv_format_amount($invoice->get_total()), $invoice->get_currency()); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | // Fires when printing a cart total. |
58 | - do_action( "getpaid_invoice_cart_totals_$key", $invoice ); |
|
58 | + do_action("getpaid_invoice_cart_totals_$key", $invoice); |
|
59 | 59 | |
60 | 60 | ?> |
61 | 61 | |
@@ -69,4 +69,4 @@ discard block |
||
69 | 69 | </div> |
70 | 70 | </div> <!-- end .getpaid-invoice-line-totals --> |
71 | 71 | |
72 | -<?php do_action( 'getpaid_after_invoice_line_totals', $invoice, $totals ); ?> |
|
72 | +<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?> |
@@ -7,35 +7,35 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div class="getpaid-header-right-actions"> |
15 | 15 | |
16 | - <?php if ( $invoice->is_type( 'invoice' ) ) : ?> |
|
16 | + <?php if ($invoice->is_type('invoice')) : ?> |
|
17 | 17 | |
18 | 18 | <a class="btn btn-secondary invoice-action-print" onclick="window.print();" href="javascript:void(0)"> |
19 | - <?php _e( 'Print Invoice', 'invoicing' ); ?> |
|
19 | + <?php _e('Print Invoice', 'invoicing'); ?> |
|
20 | 20 | </a> |
21 | 21 | |
22 | - <?php if ( is_user_logged_in() ) : ?> |
|
22 | + <?php if (is_user_logged_in()) : ?> |
|
23 | 23 | |
24 | - <a class="btn btn-secondary invoice-action-history" href="<?php echo esc_url( wpinv_get_history_page_uri() ); ?>"> |
|
25 | - <?php _e( 'Invoice History', 'invoicing' ); ?> |
|
24 | + <a class="btn btn-secondary invoice-action-history" href="<?php echo esc_url(wpinv_get_history_page_uri()); ?>"> |
|
25 | + <?php _e('Invoice History', 'invoicing'); ?> |
|
26 | 26 | </a> |
27 | 27 | <?php endif; ?> |
28 | 28 | |
29 | - <?php if ( wpinv_current_user_can_manage_invoicing() ) : ?> |
|
29 | + <?php if (wpinv_current_user_can_manage_invoicing()) : ?> |
|
30 | 30 | |
31 | - <a class="btn btn-secondary invoice-action-edit" href="<?php echo esc_url( get_edit_post_link( $invoice->get_id() ) ); ?>"> |
|
32 | - <?php _e( 'Edit Invoice', 'invoicing' ); ?> |
|
31 | + <a class="btn btn-secondary invoice-action-edit" href="<?php echo esc_url(get_edit_post_link($invoice->get_id())); ?>"> |
|
32 | + <?php _e('Edit Invoice', 'invoicing'); ?> |
|
33 | 33 | </a> |
34 | 34 | <?php endif; ?> |
35 | 35 | |
36 | 36 | <?php endif; ?> |
37 | 37 | |
38 | - <?php do_action('wpinv_invoice_display_right_actions', $invoice ); ?> |
|
38 | + <?php do_action('wpinv_invoice_display_right_actions', $invoice); ?> |
|
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <?php |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @package Invoicing/data |
7 | 7 | */ |
8 | 8 | |
9 | -defined( 'ABSPATH' ) || exit; |
|
9 | +defined('ABSPATH') || exit; |
|
10 | 10 | |
11 | 11 | return array( |
12 | 12 | "AD" => "AD\d{3}", |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if (!defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | 'block-keywords'=> "['invoicing','history']", |
23 | 23 | 'class_name' => __CLASS__, |
24 | 24 | 'base_id' => 'wpinv_history', |
25 | - 'name' => __('GetPaid > Invoice History','invoicing'), |
|
25 | + 'name' => __('GetPaid > Invoice History', 'invoicing'), |
|
26 | 26 | 'widget_ops' => array( |
27 | 27 | 'classname' => 'wpinv-history-class bsui', |
28 | - 'description' => esc_html__('Displays invoice history.','invoicing'), |
|
28 | + 'description' => esc_html__('Displays invoice history.', 'invoicing'), |
|
29 | 29 | ), |
30 | 30 | 'arguments' => array( |
31 | 31 | 'title' => array( |
32 | - 'title' => __( 'Widget title', 'invoicing' ), |
|
33 | - 'desc' => __( 'Enter widget title.', 'invoicing' ), |
|
32 | + 'title' => __('Widget title', 'invoicing'), |
|
33 | + 'desc' => __('Enter widget title.', 'invoicing'), |
|
34 | 34 | 'type' => 'text', |
35 | 35 | 'desc_tip' => true, |
36 | 36 | 'default' => '', |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ); |
42 | 42 | |
43 | 43 | |
44 | - parent::__construct( $options ); |
|
44 | + parent::__construct($options); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return mixed|string|bool |
55 | 55 | */ |
56 | - public function output( $args = array(), $widget_args = array(), $content = '' ) { |
|
56 | + public function output($args = array(), $widget_args = array(), $content = '') { |
|
57 | 57 | return getpaid_invoice_history(); |
58 | 58 | } |
59 | 59 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if (!defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | 'block-keywords'=> "['invoicing','receipt']", |
23 | 23 | 'class_name' => __CLASS__, |
24 | 24 | 'base_id' => 'wpinv_receipt', |
25 | - 'name' => __('GetPaid > Invoice Receipt','invoicing'), |
|
25 | + 'name' => __('GetPaid > Invoice Receipt', 'invoicing'), |
|
26 | 26 | 'widget_ops' => array( |
27 | 27 | 'classname' => 'wpinv-receipt-class bsui', |
28 | - 'description' => esc_html__('Displays invoice receipt after checkout.','invoicing'), |
|
28 | + 'description' => esc_html__('Displays invoice receipt after checkout.', 'invoicing'), |
|
29 | 29 | ), |
30 | 30 | 'arguments' => array( |
31 | 31 | 'title' => array( |
32 | - 'title' => __( 'Widget title', 'invoicing' ), |
|
33 | - 'desc' => __( 'Enter widget title.', 'invoicing' ), |
|
32 | + 'title' => __('Widget title', 'invoicing'), |
|
33 | + 'desc' => __('Enter widget title.', 'invoicing'), |
|
34 | 34 | 'type' => 'text', |
35 | 35 | 'desc_tip' => true, |
36 | 36 | 'default' => '', |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ); |
42 | 42 | |
43 | 43 | |
44 | - parent::__construct( $options ); |
|
44 | + parent::__construct($options); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return mixed|string|bool |
55 | 55 | */ |
56 | - public function output( $args = array(), $widget_args = array(), $content = '' ) { |
|
56 | + public function output($args = array(), $widget_args = array(), $content = '') { |
|
57 | 57 | return wpinv_payment_receipt(); |
58 | 58 | } |
59 | 59 |
@@ -7,17 +7,17 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -if ( empty( $text ) ) { |
|
13 | - $text = __( 'Your IP address is:', 'invoicing' ); |
|
12 | +if (empty($text)) { |
|
13 | + $text = __('Your IP address is:', 'invoicing'); |
|
14 | 14 | } |
15 | 15 | |
16 | -$ip_address = sanitize_text_field( wpinv_get_ip() ); |
|
17 | -$url = esc_url( getpaid_ip_location_url( $ip_address ) ); |
|
16 | +$ip_address = sanitize_text_field(wpinv_get_ip()); |
|
17 | +$url = esc_url(getpaid_ip_location_url($ip_address)); |
|
18 | 18 | |
19 | 19 | ?> |
20 | 20 | <div class="form-group getpaid-ip-info"> |
21 | - <span><?php echo wp_kses_post( $text ); ?></span> |
|
21 | + <span><?php echo wp_kses_post($text); ?></span> |
|
22 | 22 | <a target='_blank' href='<?php echo $url; ?>'><?php echo $ip_address; ?> <i class='fa fa-external-link-square' aria-hidden='true'></i></a> |
23 | 23 | </div> |
@@ -7,29 +7,29 @@ discard block |
||
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' => __( 'Quantity', 'invoicing' ), |
|
17 | - 'subtotal' => __( 'Subtotal', 'invoicing' ), |
|
14 | + 'name' => __('Item', 'invoicing'), |
|
15 | + 'price' => __('Price', 'invoicing'), |
|
16 | + 'quantity' => __('Quantity', '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 | -$columns = apply_filters( 'getpaid_payment_form_cart_table_columns', $columns, $form ); |
|
24 | +$columns = apply_filters('getpaid_payment_form_cart_table_columns', $columns, $form); |
|
25 | 25 | |
26 | 26 | ?> |
27 | 27 | <div class="getpaid-payment-form-items-cart border"> |
28 | 28 | <div class="getpaid-payment-form-items-cart-header"> |
29 | 29 | <div class="form-row"> |
30 | - <?php foreach ( $columns as $key => $label ) : ?> |
|
31 | - <div class="<?php echo 'name' == $key ? 'col-12 col-sm-5' : 'col-12 col-sm' ?> getpaid-form-cart-item-<?php echo esc_attr( $key ); ?>"> |
|
32 | - <?php echo sanitize_text_field( $label ); ?> |
|
30 | + <?php foreach ($columns as $key => $label) : ?> |
|
31 | + <div class="<?php echo 'name' == $key ? 'col-12 col-sm-5' : 'col-12 col-sm' ?> getpaid-form-cart-item-<?php echo esc_attr($key); ?>"> |
|
32 | + <?php echo sanitize_text_field($label); ?> |
|
33 | 33 | </div> |
34 | 34 | <?php endforeach; ?> |
35 | 35 | </div> |
@@ -37,12 +37,12 @@ discard block |
||
37 | 37 | <?php |
38 | 38 | |
39 | 39 | // Display the item totals. |
40 | - foreach ( $form->get_items() as $item ) { |
|
41 | - wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) ); |
|
40 | + foreach ($form->get_items() as $item) { |
|
41 | + wpinv_get_template('payment-forms/cart-item.php', compact('form', 'item', 'columns')); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | // Display the cart totals. |
45 | - wpinv_get_template( 'payment-forms/cart-totals.php', compact( 'form' ) ); |
|
45 | + wpinv_get_template('payment-forms/cart-totals.php', compact('form')); |
|
46 | 46 | |
47 | 47 | ?> |
48 | 48 | </div> |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | |
13 | 13 | ?><!DOCTYPE html> |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | |
17 | 17 | <head> |
18 | 18 | |
19 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
19 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
20 | 20 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" > |
21 | 21 | |
22 | 22 | <meta name="robots" content="noindex,nofollow"> |
23 | 23 | |
24 | 24 | <link rel="profile" href="https://gmpg.org/xfn/11"> |
25 | 25 | |
26 | - <title><?php _e( 'GetPaid GeoLocation', 'invoicing' ); ?></title> |
|
26 | + <title><?php _e('GetPaid GeoLocation', 'invoicing'); ?></title> |
|
27 | 27 | |
28 | 28 | <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> |
29 | 29 | <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', |
70 | 70 | osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors', |
71 | 71 | osm = L.tileLayer( osmUrl, { maxZoom: 18, attribution: osmAttrib } ), |
72 | - latlng = new L.LatLng( <?php echo sanitize_text_field( $latitude );?>, <?php echo sanitize_text_field( $longitude );?> ); |
|
72 | + latlng = new L.LatLng( <?php echo sanitize_text_field($latitude); ?>, <?php echo sanitize_text_field($longitude); ?> ); |
|
73 | 73 | |
74 | 74 | var map = new L.Map( 'map', {center: latlng, zoom: 18, layers: [osm]}); |
75 | 75 | |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | map.addLayer(marker); |
78 | 78 | |
79 | 79 | marker |
80 | - .bindPopup("<p><?php echo esc_attr( $address );?></p>") |
|
80 | + .bindPopup("<p><?php echo esc_attr($address); ?></p>") |
|
81 | 81 | .openPopup(); |
82 | 82 | </script> |
83 | 83 | |
84 | - <div style="height:100px"><?php echo wp_kses_post( $content ); ?></div> |
|
84 | + <div style="height:100px"><?php echo wp_kses_post($content); ?></div> |
|
85 | 85 | |
86 | 86 | </body> |
87 | 87 |