Passed
Push — master ( 25d35d...96325b )
by Brian
05:31
created
templates/invoice/header-right-actions.php 2 patches
Switch Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays right side of the invoice header.
4 4
  *
@@ -8,56 +8,56 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-?>
13
+    ?>
14 14
 
15 15
     <div class="getpaid-header-right-actions">
16 16
 
17 17
         <?php
18 18
 
19
-            $actions   = array();
19
+                $actions   = array();
20 20
 
21
-            echo sprintf(
22
-                '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary text-white invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>',
23
-                sprintf(
24
-                    esc_html__( 'Print %s', 'invoicing' ),
25
-                    esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
26
-                )
27
-            );
28
-
29
-            if ( is_user_logged_in() ) {
30
-
31
-                $actions[] = sprintf(
32
-                    '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-history">%s</a>',
33
-                    esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ),
21
+                echo sprintf(
22
+                    '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary text-white invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>',
34 23
                     sprintf(
35
-                        __( '%s History', 'invoicing' ),
24
+                        esc_html__( 'Print %s', 'invoicing' ),
36 25
                         esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
37 26
                     )
38 27
                 );
39 28
 
40
-            }
29
+                if ( is_user_logged_in() ) {
41 30
 
42
-            if ( wpinv_current_user_can_manage_invoicing() ) {
31
+                    $actions[] = sprintf(
32
+                        '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-history">%s</a>',
33
+                        esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ),
34
+                        sprintf(
35
+                            __( '%s History', 'invoicing' ),
36
+                            esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
37
+                        )
38
+                    );
43 39
 
44
-                $actions[] = sprintf(
45
-                    '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-edit">%s</a>',
46
-                    esc_url( get_edit_post_link( $invoice->get_id() ) ),
47
-                    sprintf(
48
-                        __( 'Edit %s', 'invoicing' ),
49
-                        esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
50
-                    )
51
-                );
40
+                }
41
+
42
+                if ( wpinv_current_user_can_manage_invoicing() ) {
52 43
 
53
-            }
44
+                    $actions[] = sprintf(
45
+                        '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-edit">%s</a>',
46
+                        esc_url( get_edit_post_link( $invoice->get_id() ) ),
47
+                        sprintf(
48
+                            __( 'Edit %s', 'invoicing' ),
49
+                            esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
50
+                        )
51
+                    );
54 52
 
55
-            $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice );
56
-            echo wp_kses_post( implode( '', $actions ) );
53
+                }
57 54
 
58
-        ?>
55
+                $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice );
56
+                echo wp_kses_post( implode( '', $actions ) );
59 57
 
58
+            ?>
59
+    
60 60
         <?php do_action( 'wpinv_invoice_display_right_actions', $invoice ); ?>
61
-    </div>
61
+        </div>
62 62
 
63
-<?php
63
+    <?php
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 ?>
14 14
 
@@ -16,48 +16,48 @@  discard block
 block discarded – undo
16 16
 
17 17
         <?php
18 18
 
19
-            $actions   = array();
19
+            $actions = array();
20 20
 
21 21
             echo sprintf(
22 22
                 '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary text-white invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>',
23 23
                 sprintf(
24
-                    esc_html__( 'Print %s', 'invoicing' ),
25
-                    esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
24
+                    esc_html__('Print %s', 'invoicing'),
25
+                    esc_html(ucfirst($invoice->get_invoice_quote_type()))
26 26
                 )
27 27
             );
28 28
 
29
-            if ( is_user_logged_in() ) {
29
+            if (is_user_logged_in()) {
30 30
 
31 31
                 $actions[] = sprintf(
32 32
                     '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-history">%s</a>',
33
-                    esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ),
33
+                    esc_url(wpinv_get_history_page_uri($invoice->get_post_type())),
34 34
                     sprintf(
35
-                        __( '%s History', 'invoicing' ),
36
-                        esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
35
+                        __('%s History', 'invoicing'),
36
+                        esc_html(ucfirst($invoice->get_invoice_quote_type()))
37 37
                     )
38 38
                 );
39 39
 
40 40
             }
41 41
 
42
-            if ( wpinv_current_user_can_manage_invoicing() ) {
42
+            if (wpinv_current_user_can_manage_invoicing()) {
43 43
 
44 44
                 $actions[] = sprintf(
45 45
                     '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-edit">%s</a>',
46
-                    esc_url( get_edit_post_link( $invoice->get_id() ) ),
46
+                    esc_url(get_edit_post_link($invoice->get_id())),
47 47
                     sprintf(
48
-                        __( 'Edit %s', 'invoicing' ),
49
-                        esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
48
+                        __('Edit %s', 'invoicing'),
49
+                        esc_html(ucfirst($invoice->get_invoice_quote_type()))
50 50
                     )
51 51
                 );
52 52
 
53 53
             }
54 54
 
55
-            $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice );
56
-            echo wp_kses_post( implode( '', $actions ) );
55
+            $actions = apply_filters('getpaid_invoice_header_right_actions_array', $actions, $invoice);
56
+            echo wp_kses_post(implode('', $actions));
57 57
 
58 58
         ?>
59 59
 
60
-        <?php do_action( 'wpinv_invoice_display_right_actions', $invoice ); ?>
60
+        <?php do_action('wpinv_invoice_display_right_actions', $invoice); ?>
61 61
     </div>
62 62
 
63 63
 <?php
Please login to merge, or discard this patch.