@@ -4,35 +4,35 @@ discard block |
||
4 | 4 | * |
5 | 5 | */ |
6 | 6 | |
7 | -defined( 'ABSPATH' ) || exit; |
|
7 | +defined('ABSPATH') || exit; |
|
8 | 8 | |
9 | 9 | ?> |
10 | 10 | |
11 | 11 | <div class="card shadow-sm my-5">' |
12 | 12 | |
13 | - <form method="post" class="text-center card-body" action="<?php echo esc_url( admin_url() ); ?>"> |
|
14 | - <?php getpaid_hidden_field( 'getpaid-admin-action', 'install_plugin' ); ?> |
|
15 | - <?php wp_nonce_field( 'getpaid-nonce', 'getpaid-nonce' ); ?> |
|
16 | - <?php getpaid_hidden_field( 'redirect', $next_url ); ?> |
|
13 | + <form method="post" class="text-center card-body" action="<?php echo esc_url(admin_url()); ?>"> |
|
14 | + <?php getpaid_hidden_field('getpaid-admin-action', 'install_plugin'); ?> |
|
15 | + <?php wp_nonce_field('getpaid-nonce', 'getpaid-nonce'); ?> |
|
16 | + <?php getpaid_hidden_field('redirect', $next_url); ?> |
|
17 | 17 | <div class="gd-wizard-recommend"> |
18 | 18 | |
19 | - <h2 class="gd-settings-title h3"><?php esc_html_e( 'Recommended Plugins', 'invoicing' ); ?></h2> |
|
20 | - <p><?php esc_html_e( 'Below are a few of our own plugins that may help you.', 'invoicing' ); ?></p> |
|
19 | + <h2 class="gd-settings-title h3"><?php esc_html_e('Recommended Plugins', 'invoicing'); ?></h2> |
|
20 | + <p><?php esc_html_e('Below are a few of our own plugins that may help you.', 'invoicing'); ?></p> |
|
21 | 21 | |
22 | 22 | <ul class="list-group"> |
23 | - <?php foreach ( $recommended_plugins as $plugin ) : ?> |
|
23 | + <?php foreach ($recommended_plugins as $plugin) : ?> |
|
24 | 24 | <li class="list-group-item d-flex justify-content-between align-items-center flex-wrap text-left"> |
25 | - <span class="mr-auto"><?php echo esc_html( $plugin['name'] ); ?></span> |
|
25 | + <span class="mr-auto"><?php echo esc_html($plugin['name']); ?></span> |
|
26 | 26 | <div class="custom-control custom-switch getpaid-install-plugin-siwtch-div mr-n2"> |
27 | - <input type="checkbox" name="plugins[<?php echo esc_attr( $plugin['slug'] ); ?>]" value="<?php echo esc_attr( $plugin['file'] ); ?>" class="custom-control-input" |
|
27 | + <input type="checkbox" name="plugins[<?php echo esc_attr($plugin['slug']); ?>]" value="<?php echo esc_attr($plugin['file']); ?>" class="custom-control-input" |
|
28 | 28 | <?php |
29 | - if ( is_plugin_active( $plugin['slug'] ) ) { |
|
30 | - echo 'checked';} |
|
29 | + if (is_plugin_active($plugin['slug'])) { |
|
30 | + echo 'checked'; } |
|
31 | 31 | ?> |
32 | 32 | > |
33 | 33 | <label class="custom-control-label" for="ac-setting-updates"></label> |
34 | 34 | </div> |
35 | - <small class="w-100"><?php echo esc_attr( $plugin['desc'] ); ?></small> |
|
35 | + <small class="w-100"><?php echo esc_attr($plugin['desc']); ?></small> |
|
36 | 36 | </li> |
37 | 37 | <?php endforeach; ?> |
38 | 38 | </ul> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | <input |
42 | 42 | type="submit" |
43 | 43 | class="btn btn-primary button-next" |
44 | - value="<?php esc_attr_e( 'Continue', 'invoicing' ); ?>" name="save_step"/> |
|
44 | + value="<?php esc_attr_e('Continue', 'invoicing'); ?>" name="save_step"/> |
|
45 | 45 | </p> |
46 | 46 | |
47 | 47 | </div> |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * |
6 | 6 | */ |
7 | 7 | |
8 | -if ( ! defined( 'ABSPATH' ) ) { |
|
8 | +if (!defined('ABSPATH')) { |
|
9 | 9 | exit; // Exit if accessed directly |
10 | 10 | } |
11 | 11 | |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | * |
20 | 20 | * @param WP_Post $post |
21 | 21 | */ |
22 | - public static function output( $post ) { |
|
22 | + public static function output($post) { |
|
23 | 23 | |
24 | 24 | // Fetch the invoice. |
25 | - $invoice = new WPInv_Invoice( $post ); |
|
25 | + $invoice = new WPInv_Invoice($post); |
|
26 | 26 | |
27 | - do_action( 'wpinv_metabox_resend_invoice_before', $invoice ); |
|
27 | + do_action('wpinv_metabox_resend_invoice_before', $invoice); |
|
28 | 28 | |
29 | 29 | $invoice_actions = array( |
30 | 30 | 'resend-email' => array( |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | 'getpaid-nonce', |
39 | 39 | 'getpaid-nonce' |
40 | 40 | ), |
41 | - 'label' => __( 'Resend Invoice', 'invoicing' ), |
|
41 | + 'label' => __('Resend Invoice', 'invoicing'), |
|
42 | 42 | ), |
43 | 43 | ); |
44 | 44 | |
45 | - if ( $invoice->needs_payment() ) { |
|
45 | + if ($invoice->needs_payment()) { |
|
46 | 46 | |
47 | 47 | $invoice_actions['send-reminder'] = array( |
48 | 48 | 'url' => wp_nonce_url( |
@@ -55,29 +55,29 @@ discard block |
||
55 | 55 | 'getpaid-nonce', |
56 | 56 | 'getpaid-nonce' |
57 | 57 | ), |
58 | - 'label' => __( 'Send Reminder', 'invoicing' ), |
|
58 | + 'label' => __('Send Reminder', 'invoicing'), |
|
59 | 59 | ); |
60 | 60 | |
61 | 61 | } |
62 | 62 | |
63 | - $invoice_actions = apply_filters( 'getpaid_edit_invoice_actions', $invoice_actions, $invoice ); |
|
63 | + $invoice_actions = apply_filters('getpaid_edit_invoice_actions', $invoice_actions, $invoice); |
|
64 | 64 | |
65 | - foreach ( $invoice_actions as $key => $action ) { |
|
65 | + foreach ($invoice_actions as $key => $action) { |
|
66 | 66 | |
67 | - if ( 'resend-email' === $key ) { |
|
68 | - echo wp_kses_post( wpautop( __( "This will send a copy of the invoice to the customer's email address.", 'invoicing' ) ) ); |
|
67 | + if ('resend-email' === $key) { |
|
68 | + echo wp_kses_post(wpautop(__("This will send a copy of the invoice to the customer's email address.", 'invoicing'))); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | printf( |
72 | 72 | '<p class="wpi-meta-row wpi-%s"><a href="%s" class="button button-secondary">%s</a>', |
73 | - esc_attr( $key ), |
|
74 | - esc_url( $action['url'] ), |
|
75 | - esc_html( $action['label'] ) |
|
73 | + esc_attr($key), |
|
74 | + esc_url($action['url']), |
|
75 | + esc_html($action['label']) |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | } |
79 | 79 | |
80 | - do_action( 'wpinv_metabox_resend_invoice_after', $invoice ); |
|
80 | + do_action('wpinv_metabox_resend_invoice_after', $invoice); |
|
81 | 81 | |
82 | 82 | } |
83 | 83 |
@@ -7,11 +7,11 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | aui()->alert( |
13 | 13 | array( |
14 | - 'content' => esc_html__( 'The gateway select box will appear here', 'invoicing' ), |
|
14 | + 'content' => esc_html__('The gateway select box will appear here', 'invoicing'), |
|
15 | 15 | 'type' => 'info', |
16 | 16 | ), |
17 | 17 | true |
@@ -7,11 +7,11 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | aui()->alert( |
13 | 13 | array( |
14 | - 'content' => esc_html__( 'The total payable amount will appear here', 'invoicing' ), |
|
14 | + 'content' => esc_html__('The total payable amount will appear here', 'invoicing'), |
|
15 | 15 | 'type' => 'info', |
16 | 16 | ), |
17 | 17 | true |
@@ -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 ) ) { |
|
12 | +if (empty($text)) { |
|
13 | 13 | return; |
14 | 14 | } |
15 | 15 | |
16 | 16 | aui()->alert( |
17 | 17 | array( |
18 | - 'content' => wp_kses_post( $text ), |
|
19 | - 'dismissible' => ! empty( $dismissible ), |
|
20 | - 'type' => empty( $class ) ? 'info' : str_replace( 'alert-', '', $class ), |
|
18 | + 'content' => wp_kses_post($text), |
|
19 | + 'dismissible' => !empty($dismissible), |
|
20 | + 'type' => empty($class) ? 'info' : str_replace('alert-', '', $class), |
|
21 | 21 | ), |
22 | 22 | true |
23 | 23 | ); |
@@ -7,17 +7,17 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Prepare the selectable items. |
13 | 13 | $selectable = array(); |
14 | -foreach ( $form->get_items() as $item ) { |
|
15 | - if ( ! $item->is_required ) { |
|
16 | - $selectable[ $item->get_id() ] = strip_tags( $item->get_name() . ' — ' . wpinv_price( $item->get_initial_price() ) ); |
|
14 | +foreach ($form->get_items() as $item) { |
|
15 | + if (!$item->is_required) { |
|
16 | + $selectable[$item->get_id()] = strip_tags($item->get_name() . ' — ' . wpinv_price($item->get_initial_price())); |
|
17 | 17 | } |
18 | 18 | } |
19 | 19 | |
20 | -if ( empty( $selectable ) ) { |
|
20 | +if (empty($selectable)) { |
|
21 | 21 | return; |
22 | 22 | } |
23 | 23 | |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | aui()->select( |
28 | 28 | array( |
29 | 29 | 'name' => 'getpaid-payment-form-selected-item', |
30 | - 'id' => 'getpaid-payment-form-selected-item' . uniqid( '_' ), |
|
30 | + 'id' => 'getpaid-payment-form-selected-item' . uniqid('_'), |
|
31 | 31 | 'required' => true, |
32 | - 'label' => __( 'Select Item', 'invoicing' ), |
|
32 | + 'label' => __('Select Item', 'invoicing'), |
|
33 | 33 | 'label_type' => 'vertical', |
34 | 34 | 'inline' => false, |
35 | 35 | 'options' => $selectable, |
@@ -7,17 +7,17 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Prepare the selectable items. |
13 | 13 | $selectable = array(); |
14 | -foreach ( $form->get_items() as $item ) { |
|
15 | - if ( ! $item->is_required ) { |
|
16 | - $selectable[ $item->get_id() ] = $item->get_name() . ' — ' . wpinv_price( $item->get_initial_price() ); |
|
14 | +foreach ($form->get_items() as $item) { |
|
15 | + if (!$item->is_required) { |
|
16 | + $selectable[$item->get_id()] = $item->get_name() . ' — ' . wpinv_price($item->get_initial_price()); |
|
17 | 17 | } |
18 | 18 | } |
19 | 19 | |
20 | -if ( empty( $selectable ) ) { |
|
20 | +if (empty($selectable)) { |
|
21 | 21 | return; |
22 | 22 | } |
23 | 23 | |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | aui()->radio( |
28 | 28 | array( |
29 | 29 | 'name' => 'getpaid-payment-form-selected-item', |
30 | - 'id' => 'getpaid-payment-form-selected-item' . uniqid( '_' ), |
|
30 | + 'id' => 'getpaid-payment-form-selected-item' . uniqid('_'), |
|
31 | 31 | 'required' => true, |
32 | - 'label' => __( 'Select Item', 'invoicing' ), |
|
32 | + 'label' => __('Select Item', 'invoicing'), |
|
33 | 33 | 'label_type' => 'vertical', |
34 | 34 | 'class' => 'w-auto', |
35 | 35 | 'inline' => false, |
@@ -1,51 +1,51 @@ |
||
1 | 1 | <?php |
2 | 2 | // don't load directly |
3 | -if ( ! defined( 'ABSPATH' ) ) { |
|
4 | - die( '-1' ); |
|
3 | +if (!defined('ABSPATH')) { |
|
4 | + die('-1'); |
|
5 | 5 | } |
6 | 6 | |
7 | -do_action( 'wpinv_email_before_billing_details', $invoice ); ?> |
|
7 | +do_action('wpinv_email_before_billing_details', $invoice); ?> |
|
8 | 8 | <div id="wpinv-email-billing"> |
9 | - <h3 class="wpinv-address-t"><?php echo esc_html( apply_filters( 'wpinv_email_billing_title', __( 'Billing Details', 'invoicing' ) ) ); ?></h3> |
|
9 | + <h3 class="wpinv-address-t"><?php echo esc_html(apply_filters('wpinv_email_billing_title', __('Billing Details', 'invoicing'))); ?></h3> |
|
10 | 10 | |
11 | 11 | <table class="table table-bordered table-sm wpi-billing-details"> |
12 | 12 | <tbody> |
13 | - <?php do_action( 'wpinv_email_billing_fields_first', $invoice ); ?> |
|
13 | + <?php do_action('wpinv_email_billing_fields_first', $invoice); ?> |
|
14 | 14 | <tr class="wpi-receipt-name"> |
15 | - <th class="text-left"><?php esc_html_e( 'Name', 'invoicing' ); ?></th> |
|
15 | + <th class="text-left"><?php esc_html_e('Name', 'invoicing'); ?></th> |
|
16 | 16 | <td> |
17 | 17 | <?php |
18 | - if ( $sent_to_admin && $invoice->get_user_id() ) { |
|
18 | + if ($sent_to_admin && $invoice->get_user_id()) { |
|
19 | 19 | ?> |
20 | -<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> |
|
20 | +<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> |
|
21 | 21 | <?php |
22 | 22 | } else { |
23 | - echo esc_html( $invoice->get_user_full_name() ); } |
|
23 | + echo esc_html($invoice->get_user_full_name()); } |
|
24 | 24 | ?> |
25 | 25 | </td> |
26 | 26 | </tr> |
27 | 27 | <tr class="wpi-receipt-email"> |
28 | - <th class="text-left"><?php esc_html_e( 'Email', 'invoicing' ); ?></th> |
|
29 | - <td><?php echo esc_html( sanitize_email( $invoice->get_email() ) ); ?></td> |
|
28 | + <th class="text-left"><?php esc_html_e('Email', 'invoicing'); ?></th> |
|
29 | + <td><?php echo esc_html(sanitize_email($invoice->get_email())); ?></td> |
|
30 | 30 | </tr> |
31 | - <?php if ( $invoice->get_company() ) { ?> |
|
31 | + <?php if ($invoice->get_company()) { ?> |
|
32 | 32 | <tr class="wpi-receipt-company"> |
33 | - <th class="text-left"><?php esc_html_e( 'Company', 'invoicing' ); ?></th> |
|
34 | - <td><?php echo esc_html( $invoice->get_company() ); ?></td> |
|
33 | + <th class="text-left"><?php esc_html_e('Company', 'invoicing'); ?></th> |
|
34 | + <td><?php echo esc_html($invoice->get_company()); ?></td> |
|
35 | 35 | </tr> |
36 | 36 | <?php } ?> |
37 | 37 | <tr class="wpi-receipt-address"> |
38 | - <th class="text-left"><?php esc_html_e( 'Address', 'invoicing' ); ?></th> |
|
39 | - <td><?php echo wp_kses_post( wpinv_get_invoice_address_markup( $invoice->get_user_info() ) ); ?></td> |
|
38 | + <th class="text-left"><?php esc_html_e('Address', 'invoicing'); ?></th> |
|
39 | + <td><?php echo wp_kses_post(wpinv_get_invoice_address_markup($invoice->get_user_info())); ?></td> |
|
40 | 40 | </tr> |
41 | - <?php if ( $invoice->get_phone() ) { ?> |
|
41 | + <?php if ($invoice->get_phone()) { ?> |
|
42 | 42 | <tr class="wpi-receipt-phone"> |
43 | - <th class="text-left"><?php esc_html_e( 'Phone', 'invoicing' ); ?></th> |
|
44 | - <td><?php echo esc_html( $invoice->get_phone() ); ?></td> |
|
43 | + <th class="text-left"><?php esc_html_e('Phone', 'invoicing'); ?></th> |
|
44 | + <td><?php echo esc_html($invoice->get_phone()); ?></td> |
|
45 | 45 | </tr> |
46 | 46 | <?php } ?> |
47 | - <?php do_action( 'wpinv_email_billing_fields_last', $invoice ); ?> |
|
47 | + <?php do_action('wpinv_email_billing_fields_last', $invoice); ?> |
|
48 | 48 | </tbody> |
49 | 49 | </table> |
50 | 50 | </div> |
51 | -<?php do_action( 'wpinv_email_after_billing_details', $invoice ); ?> |
|
51 | +<?php do_action('wpinv_email_after_billing_details', $invoice); ?> |
@@ -1,20 +1,20 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | // don't load directly |
3 | -if ( ! defined( 'ABSPATH' ) ) { |
|
4 | - die( '-1' ); |
|
3 | +if (!defined('ABSPATH')) { |
|
4 | + die('-1'); |
|
5 | 5 | } |
6 | 6 | |
7 | -if ( ! isset( $email_heading ) ) { |
|
7 | +if (!isset($email_heading)) { |
|
8 | 8 | global $email_heading; |
9 | 9 | } |
10 | 10 | ?> |
11 | 11 | <!DOCTYPE html> |
12 | 12 | <html dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>"> |
13 | 13 | <head> |
14 | - <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" /> |
|
14 | + <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" /> |
|
15 | 15 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
16 | 16 | <meta name="robots" content="noindex,nofollow"> |
17 | - <title><?php echo esc_html( wpinv_get_blogname() ); ?></title> |
|
17 | + <title><?php echo esc_html(wpinv_get_blogname()); ?></title> |
|
18 | 18 | </head> |
19 | 19 | <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> |
20 | 20 | <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>"> |
@@ -23,21 +23,21 @@ discard block |
||
23 | 23 | <td align="center" valign="top"> |
24 | 24 | <div id="template_header_image"> |
25 | 25 | <?php |
26 | - $img = wpinv_get_option( 'email_header_image', '' ); |
|
27 | - if ( $img ) { |
|
28 | - echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url( $img ) . '" alt="' . esc_attr( wpinv_get_blogname() ) . '" /></p>'; |
|
26 | + $img = wpinv_get_option('email_header_image', ''); |
|
27 | + if ($img) { |
|
28 | + echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url($img) . '" alt="' . esc_attr(wpinv_get_blogname()) . '" /></p>'; |
|
29 | 29 | } |
30 | 30 | ?> |
31 | 31 | </div> |
32 | 32 | <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container"> |
33 | - <?php if ( ! empty( $email_heading ) ) { ?> |
|
33 | + <?php if (!empty($email_heading)) { ?> |
|
34 | 34 | <tr> |
35 | 35 | <td align="center" valign="top"> |
36 | 36 | <!-- Header --> |
37 | 37 | <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header"> |
38 | 38 | <tr> |
39 | 39 | <td id="header_wrapper"> |
40 | - <h1><?php echo esc_html( $email_heading ); ?></h1> |
|
40 | + <h1><?php echo esc_html($email_heading); ?></h1> |
|
41 | 41 | </td> |
42 | 42 | </tr> |
43 | 43 | </table> |