Completed
Push — master ( fe4649...9700bf )
by Stiofan
14s
created
templates/emails/wpinv-email-footer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-$email_footer = apply_filters( 'wpinv_email_footer_text', wpinv_get_option( 'email_footer_text' ) );
7
-$email_footer = $email_footer ? wpautop( wp_kses_post( wptexturize( $email_footer ) ) ) : '';
6
+$email_footer = apply_filters('wpinv_email_footer_text', wpinv_get_option('email_footer_text'));
7
+$email_footer = $email_footer ? wpautop(wp_kses_post(wptexturize($email_footer))) : '';
8 8
 ?>
9 9
                                                             </div>
10 10
                                                         </td>
Please login to merge, or discard this patch.
templates/emails/wpinv-email-header.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-if ( !isset( $email_heading ) ) {
6
+if (!isset($email_heading)) {
7 7
     global $email_heading;
8 8
 }
9 9
 ?>
10 10
 <!DOCTYPE html>
11 11
 <html dir="<?php echo is_rtl() ? 'rtl' : 'ltr'?>">
12 12
     <head>
13
-        <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
13
+        <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
14 14
         <meta name="viewport" content="width=device-width, initial-scale=1">
15 15
         <meta name="robots" content="noindex,nofollow">
16 16
         <title><?php echo wpinv_get_blogname(); ?></title>
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
                     <td align="center" valign="top">
23 23
                         <div id="template_header_image">
24 24
                         <?php
25
-                            if ( $img = wpinv_get_option( 'email_header_image' ) ) {
26
-                                echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url( $img ) . '" alt="' . esc_attr( wpinv_get_blogname() ) . '" /></p>';
25
+                            if ($img = wpinv_get_option('email_header_image')) {
26
+                                echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url($img) . '" alt="' . esc_attr(wpinv_get_blogname()) . '" /></p>';
27 27
                             }
28 28
                         ?>
29 29
                         </div>
30 30
                         <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container">
31
-                            <?php if ( !empty( $email_heading ) ) { ?>
31
+                            <?php if (!empty($email_heading)) { ?>
32 32
                             <tr>
33 33
                                 <td align="center" valign="top">
34 34
                                     <!-- Header -->
Please login to merge, or discard this patch.
templates/emails/wpinv-email-processing_invoice.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
6
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
7 7
 ?>
8 8
 
9
-<p><?php _e( "Your invoice has been received and is now being processed. Your invoice details are shown below for your reference:", 'invoicing' ); ?></p>
9
+<p><?php _e("Your invoice has been received and is now being processed. Your invoice details are shown below for your reference:", 'invoicing'); ?></p>
10 10
 
11 11
 <?php
12
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
12
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
13 13
 
14
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
14
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
15 15
 
16
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
16
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
17 17
 
18
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
19 18
\ No newline at end of file
19
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
templates/emails/wpinv-email-overdue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
6
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
7 7
 
8
-echo wpautop( wptexturize( $message_body ) );
8
+echo wpautop(wptexturize($message_body));
9 9
 
10
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
11 10
\ No newline at end of file
11
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
templates/emails/wpinv-email-cancelled_invoice.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
6
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
7 7
 ?>
8 8
 
9
-<p><?php printf( __( 'The invoice #%s from %s has been cancelled. The invoice is as follows:', 'invoicing' ), $invoice->get_number(), $invoice->get_user_full_name() ); ?></p>
9
+<p><?php printf(__('The invoice #%s from %s has been cancelled. The invoice is as follows:', 'invoicing'), $invoice->get_number(), $invoice->get_user_full_name()); ?></p>
10 10
 
11 11
 <?php
12
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
12
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
13 13
 
14
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
14
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
15 15
 
16
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
16
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
17 17
 
18
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
19 18
\ No newline at end of file
19
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
templates/emails/wpinv-email-billing-details.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,67 +1,67 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-do_action( 'wpinv_email_before_billing_details', $invoice ); ?>
6
+do_action('wpinv_email_before_billing_details', $invoice); ?>
7 7
 <div id="wpinv-email-billing">
8
-    <h3 class="wpinv-address-t"><?php echo apply_filters( 'wpinv_email_billing_title', __( 'Billing Details', 'invoicing' ) ); ?></h3>
8
+    <h3 class="wpinv-address-t"><?php echo apply_filters('wpinv_email_billing_title', __('Billing Details', 'invoicing')); ?></h3>
9 9
     <?php 
10 10
     $address_row = '';
11
-    if ( $address = $invoice->get_address() ) {
12
-        $address_row .= wpautop( wp_kses_post( $address ) );
11
+    if ($address = $invoice->get_address()) {
12
+        $address_row .= wpautop(wp_kses_post($address));
13 13
     }
14 14
     
15 15
     $address_fields = array();
16
-    if ( !empty( $invoice->city ) ) {
16
+    if (!empty($invoice->city)) {
17 17
         $address_fields[] = $invoice->city;
18 18
     }
19 19
     
20
-    $country_code = !empty( $invoice->country ) ? $invoice->country : '';
21
-    if ( !empty( $invoice->state ) ) {
22
-        $address_fields[] = wpinv_state_name( $invoice->state, $country_code );
20
+    $country_code = !empty($invoice->country) ? $invoice->country : '';
21
+    if (!empty($invoice->state)) {
22
+        $address_fields[] = wpinv_state_name($invoice->state, $country_code);
23 23
     }
24 24
     
25
-    if ( !empty( $address_fields ) ) {
26
-        $address_fields = implode( ", ", $address_fields );
27
-        $address_row .= wpautop( wp_kses_post( $address_fields ) );
25
+    if (!empty($address_fields)) {
26
+        $address_fields = implode(", ", $address_fields);
27
+        $address_row .= wpautop(wp_kses_post($address_fields));
28 28
     }
29 29
     
30
-    if ( !empty( $country_code ) ) {
31
-        $country = wpinv_country_name( $country_code );
32
-        $address_row .= wpautop( wp_kses_post( trim( $country . '(' . $country_code . ')' . ' ' . $invoice->zip ) ) );
30
+    if (!empty($country_code)) {
31
+        $country = wpinv_country_name($country_code);
32
+        $address_row .= wpautop(wp_kses_post(trim($country . '(' . $country_code . ')' . ' ' . $invoice->zip)));
33 33
     }
34 34
     
35 35
     ?>
36 36
     <table class="table table-bordered table-sm wpi-billing-details">
37 37
         <tbody>
38
-            <?php do_action( 'wpinv_email_billing_fields_first', $invoice ); ?>
38
+            <?php do_action('wpinv_email_billing_fields_first', $invoice); ?>
39 39
             <tr class="wpi-receipt-name">
40
-                <th class="text-left"><?php _e( 'Name', 'invoicing' ); ?></th>
41
-                <td><?php if ( $sent_to_admin && $invoice->user_id ) { ?><a href="<?php echo esc_url( add_query_arg( 'user_id', $invoice->get_user_id(), self_admin_url( 'user-edit.php' ) ) ) ;?>"><?php echo esc_html( $invoice->get_user_full_name() ); ?></a><?php } else { echo esc_html( $invoice->get_user_full_name() ); } ?></td>
40
+                <th class="text-left"><?php _e('Name', 'invoicing'); ?></th>
41
+                <td><?php if ($sent_to_admin && $invoice->user_id) { ?><a href="<?php echo esc_url(add_query_arg('user_id', $invoice->get_user_id(), self_admin_url('user-edit.php'))); ?>"><?php echo esc_html($invoice->get_user_full_name()); ?></a><?php } else { echo esc_html($invoice->get_user_full_name()); } ?></td>
42 42
             </tr>
43 43
             <tr class="wpi-receipt-email">
44
-                <th class="text-left"><?php _e( 'Email', 'invoicing' ); ?></th>
45
-                <td><?php echo $invoice->get_email() ;?></td>
44
+                <th class="text-left"><?php _e('Email', 'invoicing'); ?></th>
45
+                <td><?php echo $invoice->get_email(); ?></td>
46 46
             </tr>
47
-            <?php if ( $invoice->company ) { ?>
47
+            <?php if ($invoice->company) { ?>
48 48
             <tr class="wpi-receipt-company">
49
-                <th class="text-left"><?php _e( 'Company', 'invoicing' ); ?></th>
50
-                <td><?php echo esc_html( $invoice->company ) ;?></td>
49
+                <th class="text-left"><?php _e('Company', 'invoicing'); ?></th>
50
+                <td><?php echo esc_html($invoice->company); ?></td>
51 51
             </tr>
52 52
             <?php } ?>
53 53
             <tr class="wpi-receipt-address">
54
-                <th class="text-left"><?php _e( 'Address', 'invoicing' ); ?></th>
55
-                <td><?php echo $address_row ;?></td>
54
+                <th class="text-left"><?php _e('Address', 'invoicing'); ?></th>
55
+                <td><?php echo $address_row; ?></td>
56 56
             </tr>
57
-            <?php if ( $invoice->phone ) { ?>
57
+            <?php if ($invoice->phone) { ?>
58 58
             <tr class="wpi-receipt-phone">
59
-                <th class="text-left"><?php _e( 'Phone', 'invoicing' ); ?></th>
60
-                <td><?php echo esc_html( $invoice->phone ) ;?></td>
59
+                <th class="text-left"><?php _e('Phone', 'invoicing'); ?></th>
60
+                <td><?php echo esc_html($invoice->phone); ?></td>
61 61
             </tr>
62 62
             <?php } ?>
63
-            <?php do_action( 'wpinv_email_billing_fields_last', $invoice ); ?>
63
+            <?php do_action('wpinv_email_billing_fields_last', $invoice); ?>
64 64
         </tbody>
65 65
     </table>
66 66
 </div>
67
-<?php do_action( 'wpinv_email_after_billing_details', $invoice ); ?>
68 67
\ No newline at end of file
68
+<?php do_action('wpinv_email_after_billing_details', $invoice); ?>
69 69
\ No newline at end of file
Please login to merge, or discard this patch.
templates/emails/wpinv-email-failed_invoice.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
6
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
7 7
 ?>
8 8
 
9
-<p><?php printf( __( 'Payment for invoice #%s from %s has failed. The invoice is as follows:', 'invoicing' ), $invoice->get_number(), $invoice->get_user_full_name() ); ?></p>
9
+<p><?php printf(__('Payment for invoice #%s from %s has failed. The invoice is as follows:', 'invoicing'), $invoice->get_number(), $invoice->get_user_full_name()); ?></p>
10 10
 
11 11
 <?php
12
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
12
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
13 13
 
14
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
14
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
15 15
 
16
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
16
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
17 17
 
18
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
19 18
\ No newline at end of file
19
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
templates/emails/wpinv-email-completed_invoice.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
6
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
7 7
 ?>
8 8
 
9
-<p><?php printf( __( "Hi there. Your recent invoice on %s has been paid. Your invoice details are shown below for your reference:", 'invoicing' ), wpinv_get_business_name() ); ?></p>
9
+<p><?php printf(__("Hi there. Your recent invoice on %s has been paid. Your invoice details are shown below for your reference:", 'invoicing'), wpinv_get_business_name()); ?></p>
10 10
 
11 11
 <?php
12
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
12
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
13 13
 
14
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
14
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
15 15
 
16
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
16
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
17 17
 
18
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
19 18
\ No newline at end of file
19
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
templates/emails/wpinv-email-onhold_invoice.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if (!defined('ABSPATH'))
4 4
     die('-1');
5 5
 
6
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
6
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
7 7
 ?>
8 8
 
9
-<p><?php _e( "Your invoice is on-hold until we confirm payment has been received. Your invoice details are shown below for your reference:", 'invoicing' ); ?></p>
9
+<p><?php _e("Your invoice is on-hold until we confirm payment has been received. Your invoice details are shown below for your reference:", 'invoicing'); ?></p>
10 10
 
11 11
 <?php
12
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
12
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
13 13
 
14
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
14
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
15 15
 
16
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
16
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
17 17
 
18
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
19 18
\ No newline at end of file
19
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
20 20
\ No newline at end of file
Please login to merge, or discard this patch.