@@ -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> |
@@ -1,18 +1,18 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Is the request set up correctly? |
| 4 | - if ( empty( $_GET['form'] ) && empty( $_GET['item'] ) ) { |
|
| 4 | + if (empty($_GET['form']) && empty($_GET['item'])) { |
|
| 5 | 5 | return aui()->alert( |
| 6 | 6 | array( |
| 7 | 7 | 'type' => 'warning', |
| 8 | - 'content' => __( 'No payment form or item selected', 'invoicing' ), |
|
| 8 | + 'content' => __('No payment form or item selected', 'invoicing'), |
|
| 9 | 9 | ) |
| 10 | 10 | ); |
| 11 | - wp_die( esc_html__( 'No payment form or item selected', 'invoicing' ), 400 ); |
|
| 11 | + wp_die(esc_html__('No payment form or item selected', 'invoicing'), 400); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Payment form or button? |
| 15 | - if ( ! empty( $_GET['form'] ) ) { |
|
| 15 | + if (!empty($_GET['form'])) { |
|
| 16 | 16 | |
| 17 | 17 | $shortcode = sprintf( |
| 18 | 18 | '[getpaid form=%s]', |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | $shortcode = sprintf( |
| 25 | 25 | '[getpaid item=%s]', |
| 26 | - esc_attr( urldecode( $_GET['item'] ) ) |
|
| 26 | + esc_attr(urldecode($_GET['item'])) |
|
| 27 | 27 | ); |
| 28 | 28 | |
| 29 | 29 | } |
@@ -35,20 +35,20 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | <head> |
| 37 | 37 | |
| 38 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
| 38 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
| 39 | 39 | <meta name="viewport" content="width=device-width, initial-scale=1.0" > |
| 40 | 40 | |
| 41 | 41 | <meta name="robots" content="noindex,nofollow"> |
| 42 | 42 | |
| 43 | 43 | <link rel="profile" href="https://gmpg.org/xfn/11"> |
| 44 | 44 | |
| 45 | - <title><?php echo esc_html( get_bloginfo( 'name' ) ); ?></title> |
|
| 45 | + <title><?php echo esc_html(get_bloginfo('name')); ?></title> |
|
| 46 | 46 | <?php |
| 47 | 47 | wp_enqueue_scripts(); |
| 48 | 48 | wp_print_styles(); |
| 49 | 49 | wp_print_head_scripts(); |
| 50 | 50 | wp_custom_css_cb(); |
| 51 | - wpinv_get_template( 'frontend-head.php' ); |
|
| 51 | + wpinv_get_template('frontend-head.php'); |
|
| 52 | 52 | wp_site_icon(); |
| 53 | 53 | ?> |
| 54 | 54 | |
@@ -84,10 +84,10 @@ 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' ); |
|
| 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 | 91 | ?> |
| 92 | 92 | </div> |
| 93 | 93 | <?php wp_footer(); ?> |