Passed
Push — master ( c463fc...5bb76a )
by Brian
11:07
created
templates/invoice-history.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -40,86 +40,86 @@  discard block
 block discarded – undo
40 40
 				<tr class="wpinv-item wpinv-item-<?php echo $invoice_status = $invoice->get_status(); ?>">
41 41
 					<?php
42 42
 
43
-						foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) :
43
+                        foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) :
44 44
 
45
-							$column_id = sanitize_html_class( $column_id );
46
-							$class     = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] );
45
+                            $column_id = sanitize_html_class( $column_id );
46
+                            $class     = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] );
47 47
 
48
-							echo "<td class='$column_id $class'>";
49
-							switch ( $column_id ) {
48
+                            echo "<td class='$column_id $class'>";
49
+                            switch ( $column_id ) {
50 50
 
51
-								case 'invoice-number':
52
-									echo wpinv_invoice_link( $invoice );
53
-									break;
51
+                                case 'invoice-number':
52
+                                    echo wpinv_invoice_link( $invoice );
53
+                                    break;
54 54
 
55
-								case 'created-date':
56
-									echo getpaid_format_date_value( $invoice->get_date_created() );
57
-									break;
55
+                                case 'created-date':
56
+                                    echo getpaid_format_date_value( $invoice->get_date_created() );
57
+                                    break;
58 58
 
59
-								case 'payment-date':
59
+                                case 'payment-date':
60 60
 
61
-									if ( $invoice->needs_payment() ) {
62
-										echo "&mdash;";
63
-									} else {
64
-										echo getpaid_format_date_value( $invoice->get_date_completed() );
65
-									}
61
+                                    if ( $invoice->needs_payment() ) {
62
+                                        echo "&mdash;";
63
+                                    } else {
64
+                                        echo getpaid_format_date_value( $invoice->get_date_completed() );
65
+                                    }
66 66
 
67
-									break;
67
+                                    break;
68 68
 
69
-								case 'invoice-status':
70
-									echo $invoice->get_status_label_html();
69
+                                case 'invoice-status':
70
+                                    echo $invoice->get_status_label_html();
71 71
 
72
-									break;
72
+                                    break;
73 73
 
74
-								case 'invoice-total':
75
-									echo wpinv_price( wpinv_format_amount( $invoice->get_total() ) );
74
+                                case 'invoice-total':
75
+                                    echo wpinv_price( wpinv_format_amount( $invoice->get_total() ) );
76 76
 
77
-									break;
77
+                                    break;
78 78
 
79
-								case 'invoice-actions':
79
+                                case 'invoice-actions':
80 80
 
81
-									$actions = array(
81
+                                    $actions = array(
82 82
 
83
-										'pay'       => array(
84
-											'url'   => $invoice->get_checkout_payment_url(),
85
-											'name'  => __( 'Pay Now', 'invoicing' ),
83
+                                        'pay'       => array(
84
+                                            'url'   => $invoice->get_checkout_payment_url(),
85
+                                            'name'  => __( 'Pay Now', 'invoicing' ),
86 86
                                             'class' => 'btn-success'
87
-										),
87
+                                        ),
88 88
 
89 89
                                         'print'     => array(
90
-											'url'   => $invoice->get_view_url(),
91
-											'name'  => __( 'View', 'invoicing' ),
90
+                                            'url'   => $invoice->get_view_url(),
91
+                                            'name'  => __( 'View', 'invoicing' ),
92 92
                                             'class' => 'btn-secondary',
93 93
                                             'attrs' => 'target="_blank"'
94
-										)
95
-									);
94
+                                        )
95
+                                    );
96 96
 
97
-									if ( ! $invoice->needs_payment() ) {
98
-										unset( $actions['pay'] );
99
-									}
97
+                                    if ( ! $invoice->needs_payment() ) {
98
+                                        unset( $actions['pay'] );
99
+                                    }
100 100
 
101
-									$actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type );
101
+                                    $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type );
102 102
 
103
-									foreach ( $actions as $key => $action ) {
104
-										$class = !empty($action['class']) ? sanitize_html_class($action['class']) : '';
105
-										echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( !empty($action['attrs']) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>';
106
-									}
103
+                                    foreach ( $actions as $key => $action ) {
104
+                                        $class = !empty($action['class']) ? sanitize_html_class($action['class']) : '';
105
+                                        echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( !empty($action['attrs']) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>';
106
+                                    }
107 107
 
108
-									break;
108
+                                    break;
109 109
 
110
-								default:
111
-									do_action( "wpinv_user_invoices_column_$column_id", $invoice );
112
-									break;
110
+                                default:
111
+                                    do_action( "wpinv_user_invoices_column_$column_id", $invoice );
112
+                                    break;
113 113
 
114 114
 
115
-							}
115
+                            }
116 116
 
117
-							do_action( "wpinv_user_invoices_column_after_$column_id", $invoice );
117
+                            do_action( "wpinv_user_invoices_column_after_$column_id", $invoice );
118 118
 
119
-							echo '</td>';
119
+                            echo '</td>';
120 120
 
121
-						endforeach;
122
-					?>
121
+                        endforeach;
122
+                    ?>
123 123
 				</tr>
124 124
 
125 125
 			<?php endforeach; ?>
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
 	<?php if ( 1 < $invoices->max_num_pages ) : ?>
133 133
 		<div class="invoicing-Pagination">
134 134
 			<?php
135
-			$big = 999999;
136
-
137
-			echo paginate_links( array(
138
-				'base'    => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
139
-				'format'  => '?paged=%#%',
140
-				'total'   => $invoices->max_num_pages,
141
-			) );
142
-			?>
135
+            $big = 999999;
136
+
137
+            echo paginate_links( array(
138
+                'base'    => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
139
+                'format'  => '?paged=%#%',
140
+                'total'   => $invoices->max_num_pages,
141
+            ) );
142
+            ?>
143 143
 		</div>
144 144
 	<?php endif; ?>
145 145
 
Please login to merge, or discard this patch.