Passed
Push — master ( 8936bd...3127f7 )
by Brian
05:25
created
templates/payment-forms/embed.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@  discard block
 block discarded – undo
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,12 +44,12 @@  discard block
 block discarded – undo
44 44
 
45 45
         <title>GetPaid</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
-		?>
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
+        ?>
53 53
 
54 54
 		<style type="text/css">
55 55
 			.body{ 
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 	<body class="body page-template-default page">
84 84
 		<div id="getpaid-form-embed" class="container my-5 page type-page status-publish hentry post post-content">
85 85
 			<?php
86
-				do_action( 'getpaid_payment_form_embed_top' );
87
-				echo do_shortcode( $shortcode );
88
-				do_action( 'getpaid_payment_form_embed_bottom' );
89
-				wpinv_get_template( 'frontend-footer.php' );
90
-			?>
86
+                do_action( 'getpaid_payment_form_embed_top' );
87
+                echo do_shortcode( $shortcode );
88
+                do_action( 'getpaid_payment_form_embed_bottom' );
89
+                wpinv_get_template( 'frontend-footer.php' );
90
+            ?>
91 91
 		</div>
92 92
 		<?php wp_footer(); ?>
93 93
 	</body>
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,7 +35,7 @@  discard block
 block discarded – undo
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">
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
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
 		?>
53 53
 
54 54
 		<style type="text/css">
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 	<body class="body page-template-default page">
84 84
 		<div id="getpaid-form-embed" class="container my-5 page type-page status-publish hentry post post-content">
85 85
 			<?php
86
-				do_action( 'getpaid_payment_form_embed_top' );
87
-				echo do_shortcode( $shortcode );
88
-				do_action( 'getpaid_payment_form_embed_bottom' );
89
-				wpinv_get_template( 'frontend-footer.php' );
86
+				do_action('getpaid_payment_form_embed_top');
87
+				echo do_shortcode($shortcode);
88
+				do_action('getpaid_payment_form_embed_bottom');
89
+				wpinv_get_template('frontend-footer.php');
90 90
 			?>
91 91
 		</div>
92 92
 		<?php wp_footer(); ?>
Please login to merge, or discard this patch.
invoicing.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@  discard block
 block discarded – undo
19 19
 
20 20
 // Define constants.
21 21
 if ( ! defined( 'WPINV_PLUGIN_FILE' ) ) {
22
-	define( 'WPINV_PLUGIN_FILE', __FILE__ );
22
+    define( 'WPINV_PLUGIN_FILE', __FILE__ );
23 23
 }
24 24
 
25 25
 if ( ! defined( 'WPINV_VERSION' ) ) {
26
-	define( 'WPINV_VERSION', '2.6.8' );
26
+    define( 'WPINV_VERSION', '2.6.8' );
27 27
 }
28 28
 
29 29
 // Include the main Invoicing class.
30 30
 if ( ! class_exists( 'WPInv_Plugin', false ) ) {
31
-	require_once plugin_dir_path( WPINV_PLUGIN_FILE ) . 'includes/class-wpinv.php';
31
+    require_once plugin_dir_path( WPINV_PLUGIN_FILE ) . 'includes/class-wpinv.php';
32 32
 }
33 33
 
34 34
 /**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $GLOBALS['invoicing'] = new WPInv_Plugin();
44 44
     }
45 45
 
46
-	return $GLOBALS['invoicing'];
46
+    return $GLOBALS['invoicing'];
47 47
 }
48 48
 
49 49
 /**
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@  discard block
 block discarded – undo
15 15
  * @package GetPaid
16 16
  */
17 17
 
18
-defined( 'ABSPATH' ) || exit;
18
+defined('ABSPATH') || exit;
19 19
 
20 20
 // Define constants.
21
-if ( ! defined( 'WPINV_PLUGIN_FILE' ) ) {
22
-	define( 'WPINV_PLUGIN_FILE', __FILE__ );
21
+if (!defined('WPINV_PLUGIN_FILE')) {
22
+	define('WPINV_PLUGIN_FILE', __FILE__);
23 23
 }
24 24
 
25
-if ( ! defined( 'WPINV_VERSION' ) ) {
26
-	define( 'WPINV_VERSION', '2.6.8' );
25
+if (!defined('WPINV_VERSION')) {
26
+	define('WPINV_VERSION', '2.6.8');
27 27
 }
28 28
 
29 29
 // Include the main Invoicing class.
30
-if ( ! class_exists( 'WPInv_Plugin', false ) ) {
31
-	require_once plugin_dir_path( WPINV_PLUGIN_FILE ) . 'includes/class-wpinv.php';
30
+if (!class_exists('WPInv_Plugin', false)) {
31
+	require_once plugin_dir_path(WPINV_PLUGIN_FILE) . 'includes/class-wpinv.php';
32 32
 }
33 33
 
34 34
 /**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  */
40 40
 function getpaid() {
41 41
 
42
-    if ( empty( $GLOBALS['invoicing'] ) ) {
42
+    if (empty($GLOBALS['invoicing'])) {
43 43
         $GLOBALS['invoicing'] = new WPInv_Plugin();
44 44
     }
45 45
 
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
  * @since  2.0.8
53 53
  */
54 54
 function getpaid_deactivation_hook() {
55
-    update_option( 'wpinv_flush_permalinks', 1 );
55
+    update_option('wpinv_flush_permalinks', 1);
56 56
 }
57
-register_deactivation_hook( __FILE__, 'getpaid_deactivation_hook' );
57
+register_deactivation_hook(__FILE__, 'getpaid_deactivation_hook');
58 58
 
59 59
 /**
60 60
  * @deprecated
@@ -64,4 +64,4 @@  discard block
 block discarded – undo
64 64
 }
65 65
 
66 66
 // Kickstart the plugin.
67
-add_action( 'plugins_loaded', 'getpaid', -100 );
67
+add_action('plugins_loaded', 'getpaid', -100);
Please login to merge, or discard this patch.