@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
10 | +if (!defined('ABSPATH')) { |
|
11 | 11 | exit; // Exit if accessed directly |
12 | 12 | } |
13 | 13 | |
@@ -21,20 +21,20 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @param WP_Post $post |
23 | 23 | */ |
24 | - public static function output( $post ) { |
|
24 | + public static function output($post) { |
|
25 | 25 | |
26 | 26 | // Prepare the item. |
27 | - $item = new WPInv_Item( $post ); |
|
27 | + $item = new WPInv_Item($post); |
|
28 | 28 | |
29 | 29 | ?> |
30 | 30 | |
31 | 31 | <div class='bsui' style='padding-top: 10px;'> |
32 | - <?php do_action( 'wpinv_item_before_info_metabox', $item ); ?> |
|
32 | + <?php do_action('wpinv_item_before_info_metabox', $item); ?> |
|
33 | 33 | |
34 | 34 | <div class="wpinv_item_type form-group row"> |
35 | 35 | <label for="wpinv_item_type" class="col-sm-12 col-form-label"> |
36 | - <?php _e( 'Item Type', 'invoicing' );?> |
|
37 | - <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php echo strip_tags( self::get_tooltip( $post ) ); ?>"></span> |
|
36 | + <?php _e('Item Type', 'invoicing'); ?> |
|
37 | + <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php echo strip_tags(self::get_tooltip($post)); ?>"></span> |
|
38 | 38 | </label> |
39 | 39 | |
40 | 40 | <div class="col-sm-12"> |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | array( |
45 | 45 | 'id' => 'wpinv_item_type', |
46 | 46 | 'name' => 'wpinv_item_type', |
47 | - 'placeholder' => __( 'Select item type', 'invoicing' ), |
|
48 | - 'value' => $item->get_type( 'edit' ), |
|
47 | + 'placeholder' => __('Select item type', 'invoicing'), |
|
48 | + 'value' => $item->get_type('edit'), |
|
49 | 49 | 'select2' => true, |
50 | 50 | 'data-allow-clear' => 'false', |
51 | 51 | 'no_wrap' => true, |
@@ -59,53 +59,53 @@ discard block |
||
59 | 59 | |
60 | 60 | <div class="wpinv_item_shortcode form-group row"> |
61 | 61 | <label for="wpinv_item_shortcode" class="col-sm-12 col-form-label"> |
62 | - <?php _e( 'Payment Form Shortcode', 'invoicing' );?> |
|
63 | - <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Displays a payment form', 'invoicing' ); ?>"></span> |
|
62 | + <?php _e('Payment Form Shortcode', 'invoicing'); ?> |
|
63 | + <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Displays a payment form', 'invoicing'); ?>"></span> |
|
64 | 64 | </label> |
65 | 65 | |
66 | 66 | <div class="col-sm-12"> |
67 | - <input onClick="this.select()" type="text" id="wpinv_item_shortcode" value="[getpaid item=<?php echo esc_attr( $item->get_id() ); ?>]" style="width: 100%;" readonly/> |
|
67 | + <input onClick="this.select()" type="text" id="wpinv_item_shortcode" value="[getpaid item=<?php echo esc_attr($item->get_id()); ?>]" style="width: 100%;" readonly/> |
|
68 | 68 | </div> |
69 | 69 | </div> |
70 | 70 | |
71 | 71 | <div class="wpinv_item_buy_shortcode form-group row"> |
72 | 72 | <label for="wpinv_item_button_shortcode" class="col-sm-12 col-form-label"> |
73 | - <?php _e( 'Payment Button Shortcode', 'invoicing' );?> |
|
74 | - <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Displays a buy now button', 'invoicing' ); ?>"></span> |
|
73 | + <?php _e('Payment Button Shortcode', 'invoicing'); ?> |
|
74 | + <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Displays a buy now button', 'invoicing'); ?>"></span> |
|
75 | 75 | </label> |
76 | 76 | |
77 | 77 | <div class="col-sm-12"> |
78 | - <input onClick="this.select()" type="text" id="wpinv_item_button_shortcode" value="[getpaid item=<?php echo esc_attr( $item->get_id() ); ?> button='Buy Now']" style="width: 100%;" readonly/> |
|
78 | + <input onClick="this.select()" type="text" id="wpinv_item_button_shortcode" value="[getpaid item=<?php echo esc_attr($item->get_id()); ?> button='Buy Now']" style="width: 100%;" readonly/> |
|
79 | 79 | <small class="form-text text-muted"> |
80 | - <?php _e( 'Or use the following URL in a link:', 'invoicing' );?> |
|
81 | - <code>#getpaid-item-<?php echo intval( $item->get_id() ); ?>|0</code> |
|
80 | + <?php _e('Or use the following URL in a link:', 'invoicing'); ?> |
|
81 | + <code>#getpaid-item-<?php echo intval($item->get_id()); ?>|0</code> |
|
82 | 82 | </small> |
83 | 83 | </div> |
84 | 84 | </div> |
85 | 85 | |
86 | 86 | <div class="wpinv_item_buy_url form-group row"> |
87 | 87 | <label for="wpinv_item_buy_url" class="col-sm-12 col-form-label"> |
88 | - <?php _e( 'Direct Payment URL', 'invoicing' );?> |
|
89 | - <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'You can use this in an iFrame to embed the payment form on another website', 'invoicing' ); ?>"></span> |
|
88 | + <?php _e('Direct Payment URL', 'invoicing'); ?> |
|
89 | + <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('You can use this in an iFrame to embed the payment form on another website', 'invoicing'); ?>"></span> |
|
90 | 90 | </label> |
91 | 91 | |
92 | 92 | <div class="col-sm-12"> |
93 | - <input onClick="this.select()" type="text" id="wpinv_item_buy_url" value="<?php echo esc_url( getpaid_embed_url( false, $item->get_id() . '|0' ) ); ?>" style="width: 100%;" readonly/> |
|
93 | + <input onClick="this.select()" type="text" id="wpinv_item_buy_url" value="<?php echo esc_url(getpaid_embed_url(false, $item->get_id() . '|0')); ?>" style="width: 100%;" readonly/> |
|
94 | 94 | </div> |
95 | 95 | </div> |
96 | 96 | |
97 | 97 | <div class="wpinv_item_custom_id form-group"> |
98 | - <?php _e( 'Custom ID', 'invoicing' );?> — <?php echo esc_html( $item->get_custom_id() ) ?> |
|
98 | + <?php _e('Custom ID', 'invoicing'); ?> — <?php echo esc_html($item->get_custom_id()) ?> |
|
99 | 99 | </div> |
100 | 100 | |
101 | - <?php do_action( 'wpinv_meta_values_metabox_before', $post ); ?> |
|
102 | - <?php foreach ( apply_filters( 'wpinv_show_meta_values_for_keys', array() ) as $meta_key ) : ?> |
|
101 | + <?php do_action('wpinv_meta_values_metabox_before', $post); ?> |
|
102 | + <?php foreach (apply_filters('wpinv_show_meta_values_for_keys', array()) as $meta_key) : ?> |
|
103 | 103 | <div class="wpinv_item_custom_id form-group"> |
104 | - <?php echo esc_html( $meta_key );?> — <?php echo esc_html( get_post_meta( $item->get_id(), '_wpinv_' . $meta_key, true ) ); ?> |
|
104 | + <?php echo esc_html($meta_key); ?> — <?php echo esc_html(get_post_meta($item->get_id(), '_wpinv_' . $meta_key, true)); ?> |
|
105 | 105 | </div> |
106 | 106 | <?php endforeach; ?> |
107 | - <?php do_action( 'wpinv_meta_values_metabox_after', $post ); ?> |
|
108 | - <?php do_action( 'wpinv_item_info_metabox', $item ); ?> |
|
107 | + <?php do_action('wpinv_meta_values_metabox_after', $post); ?> |
|
108 | + <?php do_action('wpinv_item_info_metabox', $item); ?> |
|
109 | 109 | </div> |
110 | 110 | <?php |
111 | 111 | |
@@ -115,16 +115,16 @@ discard block |
||
115 | 115 | * Returns item type tolltip. |
116 | 116 | * |
117 | 117 | */ |
118 | - public static function get_tooltip( $post ) { |
|
118 | + public static function get_tooltip($post) { |
|
119 | 119 | |
120 | 120 | ob_start(); |
121 | 121 | ?> |
122 | 122 | |
123 | - <?php _e( 'Standard: Standard item type', 'invoicing' );?> |
|
124 | - <?php _e( 'Fee: Like Registration Fee, Sign up Fee etc', 'invoicing' );?> |
|
123 | + <?php _e('Standard: Standard item type', 'invoicing'); ?> |
|
124 | + <?php _e('Fee: Like Registration Fee, Sign up Fee etc', 'invoicing'); ?> |
|
125 | 125 | |
126 | 126 | <?php |
127 | - do_action( 'wpinv_item_info_metabox_after', $post ); |
|
127 | + do_action('wpinv_item_info_metabox_after', $post); |
|
128 | 128 | |
129 | 129 | return ob_get_clean(); |
130 | 130 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
10 | +if (!defined('ABSPATH')) { |
|
11 | 11 | exit; // Exit if accessed directly |
12 | 12 | } |
13 | 13 | |
@@ -21,54 +21,54 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @param WP_Post $post |
23 | 23 | */ |
24 | - public static function output( $post ) { |
|
24 | + public static function output($post) { |
|
25 | 25 | |
26 | 26 | // Prepare the form. |
27 | - $form = new GetPaid_Payment_Form( $post ); |
|
27 | + $form = new GetPaid_Payment_Form($post); |
|
28 | 28 | |
29 | 29 | ?> |
30 | 30 | |
31 | 31 | <div class='bsui' style='padding-top: 10px;'> |
32 | - <?php do_action( 'wpinv_payment_form_before_info_metabox', $form ); ?> |
|
32 | + <?php do_action('wpinv_payment_form_before_info_metabox', $form); ?> |
|
33 | 33 | |
34 | 34 | <div class="wpinv_payment_form_shortcode form-group row"> |
35 | 35 | <label for="wpinv_payment_form_shortcode" class="col-sm-12 col-form-label"> |
36 | - <?php _e( 'Payment Form Shortcode', 'invoicing' );?> |
|
37 | - <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Displays a payment form', 'invoicing' ); ?>"></span> |
|
36 | + <?php _e('Payment Form Shortcode', 'invoicing'); ?> |
|
37 | + <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Displays a payment form', 'invoicing'); ?>"></span> |
|
38 | 38 | </label> |
39 | 39 | |
40 | 40 | <div class="col-sm-12"> |
41 | - <input onClick="this.select()" type="text" id="wpinv_payment_form_shortcode" value="[getpaid form=<?php echo esc_attr( $form->get_id() ); ?>]" style="width: 100%;" /> |
|
41 | + <input onClick="this.select()" type="text" id="wpinv_payment_form_shortcode" value="[getpaid form=<?php echo esc_attr($form->get_id()); ?>]" style="width: 100%;" /> |
|
42 | 42 | </div> |
43 | 43 | </div> |
44 | 44 | |
45 | 45 | <div class="wpinv_payment_form_buy_shortcode form-group row"> |
46 | 46 | <label for="wpinv_payment_form_buy_shortcode" class="col-sm-12 col-form-label"> |
47 | - <?php _e( 'Payment Button Shortcode', 'invoicing' );?> |
|
48 | - <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Displays a buy now button', 'invoicing' ); ?>"></span> |
|
47 | + <?php _e('Payment Button Shortcode', 'invoicing'); ?> |
|
48 | + <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Displays a buy now button', 'invoicing'); ?>"></span> |
|
49 | 49 | </label> |
50 | 50 | |
51 | 51 | <div class="col-sm-12"> |
52 | - <input onClick="this.select()" type="text" id="wpinv_payment_form_buy_shortcode" value="[getpaid form=<?php echo esc_attr( $form->get_id() ); ?> button='Buy Now']" style="width: 100%;" /> |
|
52 | + <input onClick="this.select()" type="text" id="wpinv_payment_form_buy_shortcode" value="[getpaid form=<?php echo esc_attr($form->get_id()); ?> button='Buy Now']" style="width: 100%;" /> |
|
53 | 53 | <small class="form-text text-muted"> |
54 | - <?php _e( 'Or use the following URL in a link:', 'invoicing' );?> |
|
55 | - <code>#getpaid-form-<?php echo intval( $form->get_id() ); ?></code> |
|
54 | + <?php _e('Or use the following URL in a link:', 'invoicing'); ?> |
|
55 | + <code>#getpaid-form-<?php echo intval($form->get_id()); ?></code> |
|
56 | 56 | </small> |
57 | 57 | </div> |
58 | 58 | </div> |
59 | 59 | |
60 | 60 | <div class="wpinv_item_buy_url form-group row"> |
61 | 61 | <label for="wpinv_item_buy_url" class="col-sm-12 col-form-label"> |
62 | - <?php _e( 'Direct Payment URL', 'invoicing' );?> |
|
63 | - <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'You can use this in an iFrame to embed the payment form on another website', 'invoicing' ); ?>"></span> |
|
62 | + <?php _e('Direct Payment URL', 'invoicing'); ?> |
|
63 | + <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('You can use this in an iFrame to embed the payment form on another website', 'invoicing'); ?>"></span> |
|
64 | 64 | </label> |
65 | 65 | |
66 | 66 | <div class="col-sm-12"> |
67 | - <input onClick="this.select()" type="text" id="wpinv_item_buy_url" value="<?php echo esc_url( getpaid_embed_url( $form->get_id(), false ) ); ?>" style="width: 100%;" readonly/> |
|
67 | + <input onClick="this.select()" type="text" id="wpinv_item_buy_url" value="<?php echo esc_url(getpaid_embed_url($form->get_id(), false)); ?>" style="width: 100%;" readonly/> |
|
68 | 68 | </div> |
69 | 69 | </div> |
70 | 70 | |
71 | - <?php do_action( 'wpinv_payment_form_info_metabox', $form ); ?> |
|
71 | + <?php do_action('wpinv_payment_form_info_metabox', $form); ?> |
|
72 | 72 | </div> |
73 | 73 | <?php |
74 | 74 |