@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | // Fetch the invoice. |
| 13 | -$invoice = new WPInv_Invoice( $GLOBALS['post'] ); |
|
| 13 | +$invoice = new WPInv_Invoice($GLOBALS['post']); |
|
| 14 | 14 | |
| 15 | 15 | // Abort if it does not exist. |
| 16 | -if ( $invoice->get_id() == 0 ) { |
|
| 16 | +if ($invoice->get_id() == 0) { |
|
| 17 | 17 | exit; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | // Fires before printing an invoice. |
| 21 | -do_action( 'wpinv_invoice_print_before_display', $invoice ); |
|
| 21 | +do_action('wpinv_invoice_print_before_display', $invoice); |
|
| 22 | 22 | |
| 23 | 23 | ?><!DOCTYPE html> |
| 24 | 24 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | <head> |
| 29 | 29 | |
| 30 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
| 30 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
| 31 | 31 | <meta name="viewport" content="width=device-width, initial-scale=1.0" > |
| 32 | 32 | |
| 33 | 33 | <meta name="robots" content="noindex,nofollow"> |
@@ -36,15 +36,15 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | <title><?php wp_title() ?></title> |
| 38 | 38 | |
| 39 | - <?php do_action( 'wpinv_invoice_print_head', $invoice ); ?> |
|
| 39 | + <?php do_action('wpinv_invoice_print_head', $invoice); ?> |
|
| 40 | 40 | |
| 41 | 41 | </head> |
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | <body class="body wpinv wpinv-print"> |
| 45 | 45 | |
| 46 | - <?php do_action( 'getpaid_invoice', $invoice ); ?> |
|
| 47 | - <?php do_action( 'wpinv_invoice_print_body_end', $invoice ); ?> |
|
| 46 | + <?php do_action('getpaid_invoice', $invoice); ?> |
|
| 47 | + <?php do_action('wpinv_invoice_print_body_end', $invoice); ?> |
|
| 48 | 48 | |
| 49 | 49 | </body> |
| 50 | 50 | |
@@ -7,21 +7,21 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | // Make sure that the form is active. |
| 13 | -if ( ! $form->is_active() ) { |
|
| 13 | +if (!$form->is_active()) { |
|
| 14 | 14 | echo aui()->alert( |
| 15 | 15 | array( |
| 16 | 16 | 'type' => 'warning', |
| 17 | - 'content' => __( 'This payment form is no longer active', 'invoicing' ), |
|
| 17 | + 'content' => __('This payment form is no longer active', 'invoicing'), |
|
| 18 | 18 | ) |
| 19 | 19 | ); |
| 20 | 20 | return; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | // Fires before displaying a payment form. |
| 24 | -do_action( 'getpaid_before_payment_form', $form ); |
|
| 24 | +do_action('getpaid_before_payment_form', $form); |
|
| 25 | 25 | |
| 26 | 26 | ?> |
| 27 | 27 | |
@@ -31,44 +31,44 @@ discard block |
||
| 31 | 31 | <?php |
| 32 | 32 | |
| 33 | 33 | // Fires when printing the top of a payment form. |
| 34 | - do_action( 'getpaid_payment_form_top', $form ); |
|
| 34 | + do_action('getpaid_payment_form_top', $form); |
|
| 35 | 35 | |
| 36 | 36 | // Add the vat validation nonce. |
| 37 | - wp_nonce_field( 'vat_validation', '_wpi_nonce' ); |
|
| 37 | + wp_nonce_field('vat_validation', '_wpi_nonce'); |
|
| 38 | 38 | |
| 39 | 39 | // And the optional invoice id. |
| 40 | - if ( ! empty( $form->invoice ) ) { |
|
| 41 | - echo getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
| 40 | + if (!empty($form->invoice)) { |
|
| 41 | + echo getpaid_hidden_field('invoice_id', $form->invoice->get_id()); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // We also want to include the form id. |
| 45 | - echo getpaid_hidden_field( 'form_id', $form->get_id() ); |
|
| 45 | + echo getpaid_hidden_field('form_id', $form->get_id()); |
|
| 46 | 46 | |
| 47 | 47 | // And an indication that this is a payment form submission. |
| 48 | - echo getpaid_hidden_field( 'getpaid_payment_form_submission', '1' ); |
|
| 48 | + echo getpaid_hidden_field('getpaid_payment_form_submission', '1'); |
|
| 49 | 49 | |
| 50 | 50 | // Fires before displaying payment form elements. |
| 51 | - do_action( 'getpaid_payment_form_before_elements', $form ); |
|
| 51 | + do_action('getpaid_payment_form_before_elements', $form); |
|
| 52 | 52 | |
| 53 | 53 | // Display the elements. |
| 54 | - foreach ( $form->get_elements() as $element ) { |
|
| 55 | - if ( isset( $element['type'] ) ) { |
|
| 56 | - do_action( 'getpaid_payment_form_element', $element, $form ); |
|
| 57 | - do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
| 54 | + foreach ($form->get_elements() as $element) { |
|
| 55 | + if (isset($element['type'])) { |
|
| 56 | + do_action('getpaid_payment_form_element', $element, $form); |
|
| 57 | + do_action("getpaid_payment_form_element_{$element['type']}_template", $element, $form); |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // Fires after displaying payment form elements. |
| 62 | - do_action( 'getpaid_payment_form_after_elements', $form ); |
|
| 62 | + do_action('getpaid_payment_form_after_elements', $form); |
|
| 63 | 63 | |
| 64 | 64 | echo "<div class='getpaid-payment-form-errors alert alert-danger d-none'></div>"; |
| 65 | 65 | |
| 66 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
| 66 | + if (wpinv_current_user_can_manage_invoicing()) { |
|
| 67 | 67 | |
| 68 | 68 | edit_post_link( |
| 69 | - __( 'Edit this form.', 'invoicing' ), |
|
| 69 | + __('Edit this form.', 'invoicing'), |
|
| 70 | 70 | '<small class="form-text text-muted">', |
| 71 | - ' ' . __( 'This is only visible to website administators.', 'invoicing' ) . '</small>', |
|
| 71 | + ' ' . __('This is only visible to website administators.', 'invoicing') . '</small>', |
|
| 72 | 72 | $form->get_id(), |
| 73 | 73 | 'text-danger' |
| 74 | 74 | ); |
@@ -82,4 +82,4 @@ discard block |
||
| 82 | 82 | <?php |
| 83 | 83 | |
| 84 | 84 | // Fires after displaying a payment form. |
| 85 | -do_action( 'getpaid_after_payment_form', $form ); |
|
| 85 | +do_action('getpaid_after_payment_form', $form); |
|
@@ -7,13 +7,13 @@ |
||
| 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 = __( 'Total to pay:', 'invoicing' ); |
|
| 12 | +if (empty($text)) { |
|
| 13 | + $text = __('Total to pay:', 'invoicing'); |
|
| 14 | 14 | } |
| 15 | 15 | ?> |
| 16 | 16 | <div class="form-group mt-4"> |
| 17 | - <strong><?php echo sanitize_text_field( $text ); ?></strong> |
|
| 17 | + <strong><?php echo sanitize_text_field($text); ?></strong> |
|
| 18 | 18 | <span class="getpaid-checkout-total-payable"></span> |
| 19 | 19 | </div> |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | global $wpinv_euvat; |
| 13 | 13 | |
| 14 | 14 | // Prepare the company name. |
| 15 | 15 | $company_name = $wpinv_euvat->get_company_name(); |
| 16 | 16 | |
| 17 | -if ( empty( $company_name ) ) { |
|
| 17 | +if (empty($company_name)) { |
|
| 18 | 18 | $company_name = wpinv_get_business_name(); |
| 19 | 19 | } |
| 20 | 20 | |
@@ -24,30 +24,30 @@ discard block |
||
| 24 | 24 | <div class="row"> |
| 25 | 25 | |
| 26 | 26 | <div class="invoice-company-address-label col-2"> |
| 27 | - <strong><?php _e( 'From:', 'invoicing' ) ?></strong> |
|
| 27 | + <strong><?php _e('From:', 'invoicing') ?></strong> |
|
| 28 | 28 | </div> |
| 29 | 29 | |
| 30 | 30 | <div class="invoice-company-address-value col-10"> |
| 31 | 31 | |
| 32 | - <?php do_action( 'getpaid_company_address_top' ); ?> |
|
| 32 | + <?php do_action('getpaid_company_address_top'); ?> |
|
| 33 | 33 | |
| 34 | 34 | <div class="name"> |
| 35 | - <a target="_blank" class="text-dark" href="<?php echo esc_url( wpinv_get_business_website() ); ?>"> |
|
| 36 | - <?php echo esc_html( wpinv_get_business_name() ); ?> |
|
| 35 | + <a target="_blank" class="text-dark" href="<?php echo esc_url(wpinv_get_business_website()); ?>"> |
|
| 36 | + <?php echo esc_html(wpinv_get_business_name()); ?> |
|
| 37 | 37 | </a> |
| 38 | 38 | </div> |
| 39 | 39 | |
| 40 | - <?php if ( $address = wpinv_get_business_address() ) { ?> |
|
| 41 | - <?php echo $address;?> |
|
| 40 | + <?php if ($address = wpinv_get_business_address()) { ?> |
|
| 41 | + <?php echo $address; ?> |
|
| 42 | 42 | <?php } ?> |
| 43 | 43 | |
| 44 | - <?php if ( $email_from = wpinv_mail_get_from_address() ) { ?> |
|
| 44 | + <?php if ($email_from = wpinv_mail_get_from_address()) { ?> |
|
| 45 | 45 | <div class="email_from"> |
| 46 | - <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), $email_from );?> |
|
| 46 | + <?php echo wp_sprintf(__('Email: %s', 'invoicing'), $email_from); ?> |
|
| 47 | 47 | </div> |
| 48 | 48 | <?php } ?> |
| 49 | 49 | |
| 50 | - <?php do_action( 'getpaid_company_address_bottom' ); ?> |
|
| 50 | + <?php do_action('getpaid_company_address_bottom'); ?> |
|
| 51 | 51 | |
| 52 | 52 | </div> |
| 53 | 53 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | +if (!defined('ABSPATH')) { |
|
| 4 | 4 | exit; // Exit if accessed directly |
| 5 | 5 | } |
| 6 | 6 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @return string The rendered component. |
| 20 | 20 | */ |
| 21 | - public static function get($args = array()){ |
|
| 21 | + public static function get($args = array()) { |
|
| 22 | 22 | $defaults = array( |
| 23 | 23 | 'type' => 'a', // a, button, badge |
| 24 | 24 | 'href' => '#', |
@@ -42,38 +42,38 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * Parse incoming $args into an array and merge it with $defaults |
| 44 | 44 | */ |
| 45 | - $args = wp_parse_args( $args, $defaults ); |
|
| 45 | + $args = wp_parse_args($args, $defaults); |
|
| 46 | 46 | $output = ''; |
| 47 | - if ( ! empty( $args['type'] ) ) { |
|
| 47 | + if (!empty($args['type'])) { |
|
| 48 | 48 | $type = $args['type'] != 'a' ? esc_attr($args['type']) : 'a'; |
| 49 | 49 | |
| 50 | 50 | // open/type |
| 51 | - if($type=='a'){ |
|
| 51 | + if ($type == 'a') { |
|
| 52 | 52 | $new_window = !empty($args['new_window']) ? ' target="_blank" ' : ''; |
| 53 | - $output .= '<a href="' . $args['href'] . '"'.$new_window; |
|
| 54 | - }elseif($type=='badge'){ |
|
| 53 | + $output .= '<a href="' . $args['href'] . '"' . $new_window; |
|
| 54 | + }elseif ($type == 'badge') { |
|
| 55 | 55 | $output .= '<span '; |
| 56 | - }else{ |
|
| 56 | + } else { |
|
| 57 | 57 | $output .= '<button type="' . $type . '" '; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | // name |
| 61 | - if(!empty($args['name'])){ |
|
| 61 | + if (!empty($args['name'])) { |
|
| 62 | 62 | $output .= AUI_Component_Helper::name($args['name']); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | // id |
| 66 | - if(!empty($args['id'])){ |
|
| 66 | + if (!empty($args['id'])) { |
|
| 67 | 67 | $output .= AUI_Component_Helper::id($args['id']); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // title |
| 71 | - if(!empty($args['title'])){ |
|
| 71 | + if (!empty($args['title'])) { |
|
| 72 | 72 | $output .= AUI_Component_Helper::title($args['title']); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | // value |
| 76 | - if(!empty($args['value'])){ |
|
| 76 | + if (!empty($args['value'])) { |
|
| 77 | 77 | $output .= AUI_Component_Helper::value($args['value']); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -88,18 +88,18 @@ discard block |
||
| 88 | 88 | $output .= AUI_Component_Helper::aria_attributes($args); |
| 89 | 89 | |
| 90 | 90 | // extra attributes |
| 91 | - if(!empty($args['extra_attributes'])){ |
|
| 91 | + if (!empty($args['extra_attributes'])) { |
|
| 92 | 92 | $output .= AUI_Component_Helper::extra_attributes($args['extra_attributes']); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | // onclick, we don't escape this |
| 96 | - if(!empty($args['onclick'])){ |
|
| 97 | - $output .= ' onclick="'.$args['onclick'].'" '; |
|
| 96 | + if (!empty($args['onclick'])) { |
|
| 97 | + $output .= ' onclick="' . $args['onclick'] . '" '; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | // style, we don't escape this |
| 101 | - if(!empty($args['style'])){ |
|
| 102 | - $output .= ' style="'.$args['style'].'" '; |
|
| 101 | + if (!empty($args['style'])) { |
|
| 102 | + $output .= ' style="' . $args['style'] . '" '; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | // close opening tag |
@@ -108,37 +108,37 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | // hover content |
| 110 | 110 | $hover_content = false; |
| 111 | - if(!empty($args['hover_content']) || !empty($args['hover_icon'])){ |
|
| 112 | - $output .= "<span class='hover-content'>".AUI_Component_Helper::icon($args['hover_icon'],$args['hover_content']).$args['hover_content']."</span>"; |
|
| 111 | + if (!empty($args['hover_content']) || !empty($args['hover_icon'])) { |
|
| 112 | + $output .= "<span class='hover-content'>" . AUI_Component_Helper::icon($args['hover_icon'], $args['hover_content']) . $args['hover_content'] . "</span>"; |
|
| 113 | 113 | $hover_content = true; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // content |
| 117 | - if($hover_content){$output .= "<span class='hover-content-original'>";} |
|
| 118 | - if(!empty($args['content']) || !empty($args['icon'])){ |
|
| 119 | - $output .= AUI_Component_Helper::icon($args['icon'],$args['content'],$args['icon_extra_attributes']).$args['content']; |
|
| 117 | + if ($hover_content) {$output .= "<span class='hover-content-original'>"; } |
|
| 118 | + if (!empty($args['content']) || !empty($args['icon'])) { |
|
| 119 | + $output .= AUI_Component_Helper::icon($args['icon'], $args['content'], $args['icon_extra_attributes']) . $args['content']; |
|
| 120 | 120 | } |
| 121 | - if($hover_content){$output .= "</span>";} |
|
| 121 | + if ($hover_content) {$output .= "</span>"; } |
|
| 122 | 122 | |
| 123 | 123 | |
| 124 | 124 | |
| 125 | 125 | // close |
| 126 | - if($type=='a'){ |
|
| 126 | + if ($type == 'a') { |
|
| 127 | 127 | $output .= '</a>'; |
| 128 | - }elseif($type=='badge'){ |
|
| 128 | + }elseif ($type == 'badge') { |
|
| 129 | 129 | $output .= '</span>'; |
| 130 | - }else{ |
|
| 130 | + } else { |
|
| 131 | 131 | $output .= '</button>'; |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | // maybe new line after? This adds better spacing between buttons. |
| 135 | - if(!empty($args['new_line_after'])){ |
|
| 135 | + if (!empty($args['new_line_after'])) { |
|
| 136 | 136 | $output .= PHP_EOL; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | |
| 140 | 140 | // wrap |
| 141 | - if(!$args['no_wrap']){ |
|
| 141 | + if (!$args['no_wrap']) { |
|
| 142 | 142 | $output = AUI_Component_Input::wrap(array( |
| 143 | 143 | 'content' => $output, |
| 144 | 144 | )); |
@@ -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> |