@@ -1,32 +1,32 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | - // Is the request set up correctly? |
|
4 | - if ( empty( $_GET['form'] ) && empty( $_GET['item'] ) ) { |
|
5 | - return aui()->alert( |
|
6 | - array( |
|
7 | - 'type' => 'warning', |
|
8 | - 'content' => __( 'No payment form or item selected', 'invoicing' ), |
|
9 | - ) |
|
10 | - ); |
|
11 | - wp_die( esc_html__( 'No payment form or item selected', 'invoicing' ), 400 ); |
|
12 | - } |
|
13 | - |
|
14 | - // Payment form or button? |
|
15 | - if ( ! empty( $_GET['form'] ) ) { |
|
16 | - |
|
17 | - $shortcode = sprintf( |
|
18 | - '[getpaid form=%s]', |
|
19 | - (int) $_GET['form'] |
|
20 | - ); |
|
21 | - |
|
22 | - } else { |
|
23 | - |
|
24 | - $shortcode = sprintf( |
|
25 | - '[getpaid item=%s]', |
|
26 | - esc_attr( urldecode( $_GET['item'] ) ) |
|
27 | - ); |
|
28 | - |
|
29 | - } |
|
3 | + // Is the request set up correctly? |
|
4 | + if ( empty( $_GET['form'] ) && empty( $_GET['item'] ) ) { |
|
5 | + return aui()->alert( |
|
6 | + array( |
|
7 | + 'type' => 'warning', |
|
8 | + 'content' => __( 'No payment form or item selected', 'invoicing' ), |
|
9 | + ) |
|
10 | + ); |
|
11 | + wp_die( esc_html__( 'No payment form or item selected', 'invoicing' ), 400 ); |
|
12 | + } |
|
13 | + |
|
14 | + // Payment form or button? |
|
15 | + if ( ! empty( $_GET['form'] ) ) { |
|
16 | + |
|
17 | + $shortcode = sprintf( |
|
18 | + '[getpaid form=%s]', |
|
19 | + (int) $_GET['form'] |
|
20 | + ); |
|
21 | + |
|
22 | + } else { |
|
23 | + |
|
24 | + $shortcode = sprintf( |
|
25 | + '[getpaid item=%s]', |
|
26 | + esc_attr( urldecode( $_GET['item'] ) ) |
|
27 | + ); |
|
28 | + |
|
29 | + } |
|
30 | 30 | |
31 | 31 | ?> |
32 | 32 | |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | |
45 | 45 | <title><?php echo esc_html( get_bloginfo( 'name' ) ); ?></title> |
46 | 46 | <?php |
47 | - wp_enqueue_scripts(); |
|
48 | - wp_print_styles(); |
|
49 | - wp_print_head_scripts(); |
|
50 | - wp_custom_css_cb(); |
|
51 | - wpinv_get_template( 'frontend-head.php' ); |
|
52 | - wp_site_icon(); |
|
53 | - ?> |
|
47 | + wp_enqueue_scripts(); |
|
48 | + wp_print_styles(); |
|
49 | + wp_print_head_scripts(); |
|
50 | + wp_custom_css_cb(); |
|
51 | + wpinv_get_template( 'frontend-head.php' ); |
|
52 | + wp_site_icon(); |
|
53 | + ?> |
|
54 | 54 | |
55 | 55 | <style type="text/css"> |
56 | 56 | .body{ |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | <body class="body page-template-default page"> |
85 | 85 | <div id="getpaid-form-embed" class="container my-5 page type-page status-publish hentry post post-content"> |
86 | 86 | <?php |
87 | - do_action( 'getpaid_payment_form_embed_top' ); |
|
88 | - echo do_shortcode( $shortcode ); |
|
89 | - do_action( 'getpaid_payment_form_embed_bottom' ); |
|
90 | - wpinv_get_template( 'frontend-footer.php' ); |
|
91 | - ?> |
|
87 | + do_action( 'getpaid_payment_form_embed_top' ); |
|
88 | + echo do_shortcode( $shortcode ); |
|
89 | + do_action( 'getpaid_payment_form_embed_bottom' ); |
|
90 | + wpinv_get_template( 'frontend-footer.php' ); |
|
91 | + ?> |
|
92 | 92 | </div> |
93 | 93 | <?php wp_footer(); ?> |
94 | 94 | </body> |