Completed
Pull Request — master (#779)
by
unknown
20:35
created
includes/admin/shortcodes/shortcode-give-register.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Register extends Give_Shortcode_Generator {
15 15
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['title'] = esc_html( 'Register', 'give' );
22
-		$this->shortcode['label'] = esc_html( 'Register', 'give' );
21
+		$this->shortcode['title'] = esc_html('Register', 'give');
22
+		$this->shortcode['label'] = esc_html('Register', 'give');
23 23
 
24
-		parent::__construct( 'give_register' );
24
+		parent::__construct('give_register');
25 25
 	}
26 26
 
27 27
 	/**
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 		return array(
35 35
 			array(
36 36
 				'type' => 'container',
37
-				'html' => sprintf( '<p class="no-margin">%s</p>', esc_html( 'Redirect URL (optional):', 'give' ) ),
37
+				'html' => sprintf('<p class="no-margin">%s</p>', esc_html('Redirect URL (optional):', 'give')),
38 38
 			),
39 39
 			array(
40 40
 				'type'     => 'textbox',
41 41
 				'name'     => 'redirect',
42 42
 				'minWidth' => 320,
43
-				'tooltip'  => esc_attr( 'Enter an URL here to redirect to after registering.', 'give' ),
43
+				'tooltip'  => esc_attr('Enter an URL here to redirect to after registering.', 'give'),
44 44
 			),
45 45
 		);
46 46
 	}
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-profile-editor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Profile_Editor extends Give_Shortcode_Generator {
15 15
 
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['label'] = esc_html( 'Profile Editor', 'give' );
21
+		$this->shortcode['label'] = esc_html('Profile Editor', 'give');
22 22
 
23
-		parent::__construct( 'give_profile_editor' );
23
+		parent::__construct('give_profile_editor');
24 24
 	}
25 25
 }
26 26
 
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-login.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Login extends Give_Shortcode_Generator {
15 15
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['title'] = esc_html( 'Login', 'give' );
22
-		$this->shortcode['label'] = esc_html( 'Login', 'give' );
21
+		$this->shortcode['title'] = esc_html('Login', 'give');
22
+		$this->shortcode['label'] = esc_html('Login', 'give');
23 23
 
24
-		parent::__construct( 'give_login' );
24
+		parent::__construct('give_login');
25 25
 	}
26 26
 
27 27
 	/**
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 		return array(
35 35
 			array(
36 36
 				'type' => 'container',
37
-				'html' => sprintf( '<p class="no-margin">%s</p>', esc_html( 'Redirect URL (optional):', 'give' ) ),
37
+				'html' => sprintf('<p class="no-margin">%s</p>', esc_html('Redirect URL (optional):', 'give')),
38 38
 			),
39 39
 			array(
40 40
 				'type'     => 'textbox',
41 41
 				'name'     => 'redirect',
42 42
 				'minWidth' => 320,
43
-				'tooltip'  => esc_attr( 'Enter an URL here to redirect to after login.', 'give' ),
43
+				'tooltip'  => esc_attr('Enter an URL here to redirect to after login.', 'give'),
44 44
 			),
45 45
 		);
46 46
 	}
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-form.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 /**
15 15
  * Class Give_Shortcode_Donation_Form
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function __construct() {
23 23
 
24
-		$this->shortcode['title']   = esc_html( 'Donation Form', 'give' );
25
-		$this->shortcode['label']   = esc_html( 'Donation Form', 'give' );
24
+		$this->shortcode['title']   = esc_html('Donation Form', 'give');
25
+		$this->shortcode['label']   = esc_html('Donation Form', 'give');
26 26
 
27
-		parent::__construct( 'give_form' );
27
+		parent::__construct('give_form');
28 28
 	}
29 29
 
30 30
 	/**
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
 		$create_form_link = sprintf(
38 38
 			/* translators: %s: create new form URL */
39
-			__( '<a href="%s">Create</a> a new Donation Form.', 'give' ),
40
-			admin_url( 'post-new.php?post_type=give_forms' )
39
+			__('<a href="%s">Create</a> a new Donation Form.', 'give'),
40
+			admin_url('post-new.php?post_type=give_forms')
41 41
 		);
42 42
 
43 43
 		return array(
@@ -47,68 +47,68 @@  discard block
 block discarded – undo
47 47
 					'post_type' => 'give_forms',
48 48
 				),
49 49
 				'name'        => 'id',
50
-				'tooltip'     => esc_attr( 'Select a Donation Form', 'give' ),
51
-				'placeholder' => esc_attr( '- Select a Form -', 'give' ),
50
+				'tooltip'     => esc_attr('Select a Donation Form', 'give'),
51
+				'placeholder' => esc_attr('- Select a Form -', 'give'),
52 52
 				'required'    => array(
53
-					'alert' => esc_html( 'You must first select a Form!', 'give' ),
54
-					'error' => sprintf( '<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html( 'No donation forms were found!', 'give' ), $create_form_link ),
53
+					'alert' => esc_html('You must first select a Form!', 'give'),
54
+					'error' => sprintf('<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html('No donation forms were found!', 'give'), $create_form_link),
55 55
 				),
56 56
 			),
57 57
 			array(
58 58
 				'type' => 'container',
59
-				'html' => sprintf( '<p class="strong margin-top">%s</p>', esc_html( 'Optional form settings', 'give' ) ),
59
+				'html' => sprintf('<p class="strong margin-top">%s</p>', esc_html('Optional form settings', 'give')),
60 60
 			),
61 61
 			array(
62 62
 				'type'    => 'listbox',
63 63
 				'name'    => 'show_title',
64
-				'label'   => esc_html( 'Show Title:', 'give' ),
65
-				'tooltip' => esc_attr( 'Do you want to display the form title?', 'give' ),
64
+				'label'   => esc_html('Show Title:', 'give'),
65
+				'tooltip' => esc_attr('Do you want to display the form title?', 'give'),
66 66
 				'options' => array(
67
-					'true'  => esc_html( 'Show', 'give' ),
68
-					'false' => esc_html( 'Hide', 'give' ),
67
+					'true'  => esc_html('Show', 'give'),
68
+					'false' => esc_html('Hide', 'give'),
69 69
 				),
70 70
 			),
71 71
 			array(
72 72
 				'type'    => 'listbox',
73 73
 				'name'    => 'show_goal',
74
-				'label'   => esc_html( 'Show Goal:', 'give' ),
75
-				'tooltip' => esc_attr( 'Do you want to display the donation goal?', 'give' ),
74
+				'label'   => esc_html('Show Goal:', 'give'),
75
+				'tooltip' => esc_attr('Do you want to display the donation goal?', 'give'),
76 76
 				'options' => array(
77
-					'true'  => esc_html( 'Show', 'give' ),
78
-					'false' => esc_html( 'Hide', 'give' ),
77
+					'true'  => esc_html('Show', 'give'),
78
+					'false' => esc_html('Hide', 'give'),
79 79
 				),
80 80
 			),
81 81
 			array(
82 82
 				'type'    => 'listbox',
83 83
 				'name'    => 'show_content',
84 84
 				'minWidth' => 240,
85
-				'label'   => esc_html( 'Display Content:', 'give' ),
86
-				'tooltip' => esc_attr( 'Do you want to display the form content?', 'give' ),
85
+				'label'   => esc_html('Display Content:', 'give'),
86
+				'tooltip' => esc_attr('Do you want to display the form content?', 'give'),
87 87
 				'options' => array(
88
-					'none'  => esc_html( 'No Content', 'give' ),
89
-					'above' => esc_html( 'Display above the form fields', 'give' ),
90
-					'below' => esc_html( 'Display below the form fields', 'give' ),
88
+					'none'  => esc_html('No Content', 'give'),
89
+					'above' => esc_html('Display above the form fields', 'give'),
90
+					'below' => esc_html('Display below the form fields', 'give'),
91 91
 				),
92 92
 			),
93 93
 			array(
94 94
 				'type'    => 'listbox',
95 95
 				'name'    => 'display_style',
96
-				'label'   => esc_html( 'Payment Fields:', 'give' ),
97
-				'tooltip' => esc_attr( 'How would you like to display payment information?', 'give' ),
96
+				'label'   => esc_html('Payment Fields:', 'give'),
97
+				'tooltip' => esc_attr('How would you like to display payment information?', 'give'),
98 98
 				'options' => array(
99
-					'onpage' => esc_html( 'Show on Page', 'give' ),
100
-					'reveal' => esc_html( 'Reveal Upon Click', 'give' ),
101
-					'modal'  => esc_html( 'Modal Window Upon Click', 'give' ),
99
+					'onpage' => esc_html('Show on Page', 'give'),
100
+					'reveal' => esc_html('Reveal Upon Click', 'give'),
101
+					'modal'  => esc_html('Modal Window Upon Click', 'give'),
102 102
 				),
103 103
 			),
104 104
 			array(
105 105
 				'type'    => 'listbox',
106 106
 				'name'    => 'float_labels',
107
-				'label'   => esc_html( 'Floating Labels:', 'give' ),
108
-				'tooltip' => esc_attr( 'Override the default floating labels setting for this form?', 'give' ),
107
+				'label'   => esc_html('Floating Labels:', 'give'),
108
+				'tooltip' => esc_attr('Override the default floating labels setting for this form?', 'give'),
109 109
 				'options' => array(
110
-					'enabled'  => esc_html( 'Enabled', 'give' ),
111
-					'disabled' => esc_html( 'Disabled', 'give' ),
110
+					'enabled'  => esc_html('Enabled', 'give'),
111
+					'disabled' => esc_html('Disabled', 'give'),
112 112
 				),
113 113
 			),
114 114
 		);
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-donation-history.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Donation_History extends Give_Shortcode_Generator {
15 15
 
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['label'] = esc_html( 'Donation History', 'give' );
21
+		$this->shortcode['label'] = esc_html('Donation History', 'give');
22 22
 
23
-		parent::__construct( 'donation_history' );
23
+		parent::__construct('donation_history');
24 24
 	}
25 25
 }
26 26
 
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-receipt.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Donation_Receipt extends Give_Shortcode_Generator {
15 15
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['title'] = esc_html( 'Donation Receipt', 'give' );
22
-		$this->shortcode['label'] = esc_html( 'Donation Receipt', 'give' );
21
+		$this->shortcode['title'] = esc_html('Donation Receipt', 'give');
22
+		$this->shortcode['label'] = esc_html('Donation Receipt', 'give');
23 23
 
24
-		parent::__construct( 'give_receipt' );
24
+		parent::__construct('give_receipt');
25 25
 	}
26 26
 
27 27
 	/**
@@ -34,60 +34,60 @@  discard block
 block discarded – undo
34 34
 		return array(
35 35
 			array(
36 36
 				'type' => 'container',
37
-				'html' => sprintf( '<p class="strong">%s</p>', esc_html( 'Optional settings', 'give' ) ),
37
+				'html' => sprintf('<p class="strong">%s</p>', esc_html('Optional settings', 'give')),
38 38
 			),
39 39
 			array(
40 40
 				'type'    => 'listbox',
41 41
 				'name'    => 'price',
42
-				'label'   => esc_html( 'Show Donation Amount:', 'give' ),
42
+				'label'   => esc_html('Show Donation Amount:', 'give'),
43 43
 				'options' => array(
44
-					'true'  => esc_html( 'Show', 'give' ),
45
-					'false' => esc_html( 'Hide', 'give' ),
44
+					'true'  => esc_html('Show', 'give'),
45
+					'false' => esc_html('Hide', 'give'),
46 46
 				),
47 47
 			),
48 48
 			array(
49 49
 				'type'    => 'listbox',
50 50
 				'name'    => 'donor',
51
-				'label'   => esc_html( 'Show Donor Name:', 'give' ),
51
+				'label'   => esc_html('Show Donor Name:', 'give'),
52 52
 				'options' => array(
53
-					'true'  => esc_html( 'Show', 'give' ),
54
-					'false' => esc_html( 'Hide', 'give' ),
53
+					'true'  => esc_html('Show', 'give'),
54
+					'false' => esc_html('Hide', 'give'),
55 55
 				),
56 56
 			),
57 57
 			array(
58 58
 				'type'    => 'listbox',
59 59
 				'name'    => 'date',
60
-				'label'   => esc_html( 'Show Date:', 'give' ),
60
+				'label'   => esc_html('Show Date:', 'give'),
61 61
 				'options' => array(
62
-					'true'  => esc_html( 'Show', 'give' ),
63
-					'false' => esc_html( 'Hide', 'give' ),
62
+					'true'  => esc_html('Show', 'give'),
63
+					'false' => esc_html('Hide', 'give'),
64 64
 				),
65 65
 			),
66 66
 			array(
67 67
 				'type'    => 'listbox',
68 68
 				'name'    => 'payment_key',
69
-				'label'   => esc_html( 'Show Payment Key:', 'give' ),
69
+				'label'   => esc_html('Show Payment Key:', 'give'),
70 70
 				'options' => array(
71
-					'true'  => esc_html( 'Show', 'give' ),
72
-					'false' => esc_html( 'Hide', 'give' ),
71
+					'true'  => esc_html('Show', 'give'),
72
+					'false' => esc_html('Hide', 'give'),
73 73
 				),
74 74
 			),
75 75
 			array(
76 76
 				'type'    => 'listbox',
77 77
 				'name'    => 'payment_method',
78
-				'label'   => esc_html( 'Show Payment Method:', 'give' ),
78
+				'label'   => esc_html('Show Payment Method:', 'give'),
79 79
 				'options' => array(
80
-					'true'  => esc_html( 'Show', 'give' ),
81
-					'false' => esc_html( 'Hide', 'give' ),
80
+					'true'  => esc_html('Show', 'give'),
81
+					'false' => esc_html('Hide', 'give'),
82 82
 				),
83 83
 			),
84 84
 			array(
85 85
 				'type'    => 'listbox',
86 86
 				'name'    => 'payment_id',
87
-				'label'   => esc_html( 'Show Payment ID:', 'give' ),
87
+				'label'   => esc_html('Show Payment ID:', 'give'),
88 88
 				'options' => array(
89
-					'true'  => esc_html( 'Show', 'give' ),
90
-					'false' => esc_html( 'Hide', 'give' ),
89
+					'true'  => esc_html('Show', 'give'),
90
+					'false' => esc_html('Hide', 'give'),
91 91
 				),
92 92
 			),
93 93
 		);
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-goal.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.3.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) or exit;
12
+defined('ABSPATH') or exit;
13 13
 
14 14
 class Give_Shortcode_Donation_Form_Goal extends Give_Shortcode_Generator {
15 15
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		$this->shortcode['title'] = esc_html( 'Donation Form Goal', 'give' );
22
-		$this->shortcode['label'] = esc_html( 'Donation Form Goal', 'give' );
21
+		$this->shortcode['title'] = esc_html('Donation Form Goal', 'give');
22
+		$this->shortcode['label'] = esc_html('Donation Form Goal', 'give');
23 23
 
24
-		parent::__construct( 'give_goal' );
24
+		parent::__construct('give_goal');
25 25
 	}
26 26
 
27 27
 	/**
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 
34 34
 		$create_form_link = sprintf(
35 35
 			/* translators: %s: create new form URL */
36
-			__( '<a href="%s">Create</a> a new Donation Form.', 'give' ),
37
-			admin_url( 'post-new.php?post_type=give_forms' )
36
+			__('<a href="%s">Create</a> a new Donation Form.', 'give'),
37
+			admin_url('post-new.php?post_type=give_forms')
38 38
 		);
39 39
 
40 40
 		return array(
@@ -44,35 +44,35 @@  discard block
 block discarded – undo
44 44
 					'post_type' => 'give_forms',
45 45
 				),
46 46
 				'name'        => 'id',
47
-				'tooltip'     => esc_attr( 'Select a Donation Form', 'give' ),
48
-				'placeholder' => esc_attr( '- Select a Form -', 'give' ),
47
+				'tooltip'     => esc_attr('Select a Donation Form', 'give'),
48
+				'placeholder' => esc_attr('- Select a Form -', 'give'),
49 49
 				'required'    => array(
50
-					'alert' => esc_html( 'You must first select a Form!', 'give' ),
51
-					'error' => sprintf( '<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html( 'No donation forms were found!', 'give' ), $create_form_link ),
50
+					'alert' => esc_html('You must first select a Form!', 'give'),
51
+					'error' => sprintf('<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html('No donation forms were found!', 'give'), $create_form_link),
52 52
 				),
53 53
 			),
54 54
 			array(
55 55
 				'type' => 'container',
56
-				'html' => sprintf( '<p class="strong margin-top">%s</p>', esc_html( 'Optional settings', 'give' ) ),
56
+				'html' => sprintf('<p class="strong margin-top">%s</p>', esc_html('Optional settings', 'give')),
57 57
 			),
58 58
 			array(
59 59
 				'type'    => 'listbox',
60 60
 				'name'    => 'show_text',
61
-				'label'   => esc_html( 'Show Text:', 'give' ),
62
-				'tooltip' => esc_attr( 'This text displays the amount of income raised compared to the goal.', 'give' ),
61
+				'label'   => esc_html('Show Text:', 'give'),
62
+				'tooltip' => esc_attr('This text displays the amount of income raised compared to the goal.', 'give'),
63 63
 				'options' => array(
64
-					'true'  => esc_html( 'Show', 'give' ),
65
-					'false' => esc_html( 'Hide', 'give' ),
64
+					'true'  => esc_html('Show', 'give'),
65
+					'false' => esc_html('Hide', 'give'),
66 66
 				),
67 67
 			),
68 68
 			array(
69 69
 				'type'    => 'listbox',
70 70
 				'name'    => 'show_bar',
71
-				'label'   => esc_html( 'Show Progress Bar:', 'give' ),
72
-				'tooltip' => esc_attr( 'Do you want to display the goal\'s progress bar?', 'give' ),
71
+				'label'   => esc_html('Show Progress Bar:', 'give'),
72
+				'tooltip' => esc_attr('Do you want to display the goal\'s progress bar?', 'give'),
73 73
 				'options' => array(
74
-					'true'  => esc_html( 'Show', 'give' ),
75
-					'false' => esc_html( 'Hide', 'give' ),
74
+					'true'  => esc_html('Show', 'give'),
75
+					'false' => esc_html('Hide', 'give'),
76 76
 				),
77 77
 			),
78 78
 		);
Please login to merge, or discard this patch.
includes/admin/dashboard-widgets.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
  * @return void
22 22
  */
23 23
 function give_register_dashboard_widgets() {
24
-	if ( current_user_can( apply_filters( 'give_dashboard_stats_cap', 'view_give_reports' ) ) ) {
25
-		wp_add_dashboard_widget( 'give_dashboard_sales', esc_html( 'Give: Donation Statistics', 'give' ), 'give_dashboard_sales_widget' );
24
+	if (current_user_can(apply_filters('give_dashboard_stats_cap', 'view_give_reports'))) {
25
+		wp_add_dashboard_widget('give_dashboard_sales', esc_html('Give: Donation Statistics', 'give'), 'give_dashboard_sales_widget');
26 26
 	}
27 27
 }
28 28
 
29
-add_action( 'wp_dashboard_setup', 'give_register_dashboard_widgets', 10 );
29
+add_action('wp_dashboard_setup', 'give_register_dashboard_widgets', 10);
30 30
 
31 31
 /**
32 32
  * Sales Summary Dashboard Widget
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
  */
39 39
 function give_dashboard_sales_widget() {
40 40
 
41
-	if ( ! current_user_can( apply_filters( 'give_dashboard_stats_cap', 'view_give_reports' ) ) ) {
41
+	if ( ! current_user_can(apply_filters('give_dashboard_stats_cap', 'view_give_reports'))) {
42 42
 		return;
43 43
 	}
44 44
 	$stats = new Give_Payment_Stats; ?>
@@ -46,25 +46,25 @@  discard block
 block discarded – undo
46 46
 	<div class="give-dashboard-widget">
47 47
 
48 48
 		<div class="give-dashboard-today give-clearfix">
49
-			<h3 class="give-dashboard-date-today"><?php echo date( 'F j, Y' ); ?></h3>
49
+			<h3 class="give-dashboard-date-today"><?php echo date('F j, Y'); ?></h3>
50 50
 
51 51
 			<p class="give-dashboard-happy-day"><?php
52 52
 				printf(
53 53
 					/* translators: %s: day of the week */
54
-					esc_html( 'Happy %s!', 'give' ),
55
-					date( 'l', current_time( 'timestamp' ) )
54
+					esc_html('Happy %s!', 'give'),
55
+					date('l', current_time('timestamp'))
56 56
 				);
57 57
 			?></p>
58 58
 
59
-			<?php $earnings_today = $stats->get_earnings( 0, 'today', false ); ?>
59
+			<?php $earnings_today = $stats->get_earnings(0, 'today', false); ?>
60 60
 
61
-			<p class="give-dashboard-today-earnings"><?php echo give_currency_filter( give_format_amount( $earnings_today ) ); ?></p>
61
+			<p class="give-dashboard-today-earnings"><?php echo give_currency_filter(give_format_amount($earnings_today)); ?></p>
62 62
 
63
-			<p class="give-orders-today"><?php $donations_today = $stats->get_sales( 0, 'today', false, array(
63
+			<p class="give-orders-today"><?php $donations_today = $stats->get_sales(0, 'today', false, array(
64 64
 					'publish',
65 65
 					'revoked'
66
-				) ); ?><?php echo give_format_amount( $donations_today, false ); ?>
67
-				<span><?php echo _x( 'donations today', 'Displays in WP admin dashboard widget after the day\'s total donations', 'give' ); ?></span>
66
+				)); ?><?php echo give_format_amount($donations_today, false); ?>
67
+				<span><?php echo _x('donations today', 'Displays in WP admin dashboard widget after the day\'s total donations', 'give'); ?></span>
68 68
 			</p>
69 69
 
70 70
 
@@ -74,34 +74,34 @@  discard block
 block discarded – undo
74 74
 		<table class="give-table-stats">
75 75
 			<thead style="display: none;">
76 76
 			<tr>
77
-				<th><?php esc_html_e( 'This Week', 'give' ); ?></th>
78
-				<th><?php esc_html_e( 'This Month', 'give' ); ?></th>
79
-				<th><?php esc_html_e( 'Past 30 Days', 'give' ); ?></th>
77
+				<th><?php esc_html_e('This Week', 'give'); ?></th>
78
+				<th><?php esc_html_e('This Month', 'give'); ?></th>
79
+				<th><?php esc_html_e('Past 30 Days', 'give'); ?></th>
80 80
 			</tr>
81 81
 			</thead>
82 82
 			<tbody>
83 83
 			<tr id="give-table-stats-tr-1">
84 84
 				<td>
85
-					<p class="give-dashboard-stat-total"><?php echo give_currency_filter( give_format_amount( $stats->get_earnings( 0, 'this_week' ) ) ); ?></p>
85
+					<p class="give-dashboard-stat-total"><?php echo give_currency_filter(give_format_amount($stats->get_earnings(0, 'this_week'))); ?></p>
86 86
 
87
-					<p class="give-dashboard-stat-total-label"><?php esc_html_e( 'this week', 'give' ); ?></p>
87
+					<p class="give-dashboard-stat-total-label"><?php esc_html_e('this week', 'give'); ?></p>
88 88
 				</td>
89 89
 				<td>
90
-					<p class="give-dashboard-stat-total"><?php echo give_currency_filter( give_format_amount( $stats->get_earnings( 0, 'this_month' ) ) ); ?></p>
90
+					<p class="give-dashboard-stat-total"><?php echo give_currency_filter(give_format_amount($stats->get_earnings(0, 'this_month'))); ?></p>
91 91
 
92
-					<p class="give-dashboard-stat-total-label"><?php esc_html_e( 'this month', 'give' ); ?></p>
92
+					<p class="give-dashboard-stat-total-label"><?php esc_html_e('this month', 'give'); ?></p>
93 93
 				</td>
94 94
 			</tr>
95 95
 			<tr id="give-table-stats-tr-2">
96 96
 				<td>
97
-					<p class="give-dashboard-stat-total"><?php echo give_currency_filter( give_format_amount( $stats->get_earnings( 0, 'last_month' ) ) ) ?></p>
97
+					<p class="give-dashboard-stat-total"><?php echo give_currency_filter(give_format_amount($stats->get_earnings(0, 'last_month'))) ?></p>
98 98
 
99
-					<p class="give-dashboard-stat-total-label"><?php esc_html_e( 'last month', 'give' ); ?></p>
99
+					<p class="give-dashboard-stat-total-label"><?php esc_html_e('last month', 'give'); ?></p>
100 100
 				</td>
101 101
 				<td>
102
-					<p class="give-dashboard-stat-total"><?php echo give_currency_filter( give_format_amount( $stats->get_earnings( 0, 'this_year', false ) ) ) ?></p>
102
+					<p class="give-dashboard-stat-total"><?php echo give_currency_filter(give_format_amount($stats->get_earnings(0, 'this_year', false))) ?></p>
103 103
 
104
-					<p class="give-dashboard-stat-total-label"><?php esc_html_e( 'this year', 'give' ); ?></p>
104
+					<p class="give-dashboard-stat-total-label"><?php esc_html_e('this year', 'give'); ?></p>
105 105
 				</td>
106 106
 			</tr>
107 107
 			</tbody>
@@ -121,25 +121,25 @@  discard block
 block discarded – undo
121 121
  *
122 122
  * @return array
123 123
  */
124
-function give_dashboard_at_a_glance_widget( $items ) {
125
-	$num_posts = wp_count_posts( 'give_forms' );
124
+function give_dashboard_at_a_glance_widget($items) {
125
+	$num_posts = wp_count_posts('give_forms');
126 126
 
127
-	if ( $num_posts && $num_posts->publish ) {
127
+	if ($num_posts && $num_posts->publish) {
128 128
         
129 129
 		$text = sprintf(
130 130
 			/* translators: 1: number of posts published 2: forms singular label 3: forms plural label */
131
-			_n( '%1$s Give %2$s', '%1$s Give %3$s', $num_posts->publish, 'give' ),
131
+			_n('%1$s Give %2$s', '%1$s Give %3$s', $num_posts->publish, 'give'),
132 132
 			$num_posts->publish,
133 133
 			give_get_forms_label_singular(),
134 134
 			give_get_forms_label_plural()
135 135
 		);
136 136
 
137
-		$text = sprintf( $text, number_format_i18n( $num_posts->publish ) );
137
+		$text = sprintf($text, number_format_i18n($num_posts->publish));
138 138
 
139
-		if ( current_user_can( 'edit_give_forms', get_current_user_id() ) ) {
140
-			$text = sprintf( '<a class="give-forms-count" href="edit.php?post_type=give_forms">%1$s</a>', $text );
139
+		if (current_user_can('edit_give_forms', get_current_user_id())) {
140
+			$text = sprintf('<a class="give-forms-count" href="edit.php?post_type=give_forms">%1$s</a>', $text);
141 141
 		} else {
142
-			$text = sprintf( '<span class="give-forms-count">%1$s</span>', $text );
142
+			$text = sprintf('<span class="give-forms-count">%1$s</span>', $text);
143 143
 		}
144 144
 
145 145
 		$items[] = $text;
@@ -148,4 +148,4 @@  discard block
 block discarded – undo
148 148
 	return $items;
149 149
 }
150 150
 
151
-add_filter( 'dashboard_glance_items', 'give_dashboard_at_a_glance_widget', 1, 1);
151
+add_filter('dashboard_glance_items', 'give_dashboard_at_a_glance_widget', 1, 1);
Please login to merge, or discard this patch.
includes/admin/admin-pages.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -29,31 +29,31 @@  discard block
 block discarded – undo
29 29
 	global $give_settings_page, $give_payments_page, $give_reports_page, $give_add_ons_page, $give_upgrades_screen, $give_donors_page;
30 30
 
31 31
 	//Payments
32
-	$give_payment       = get_post_type_object( 'give_payment' );
33
-	$give_payments_page = add_submenu_page( 'edit.php?post_type=give_forms', $give_payment->labels->name, $give_payment->labels->menu_name, 'edit_give_payments', 'give-payment-history', 'give_payment_history_page' );
32
+	$give_payment       = get_post_type_object('give_payment');
33
+	$give_payments_page = add_submenu_page('edit.php?post_type=give_forms', $give_payment->labels->name, $give_payment->labels->menu_name, 'edit_give_payments', 'give-payment-history', 'give_payment_history_page');
34 34
 
35 35
 	//Donors
36
-	$give_donors_page = add_submenu_page( 'edit.php?post_type=give_forms', esc_html( 'Donors', 'give' ), esc_html( 'Donors', 'give' ), 'view_give_reports', 'give-donors', 'give_customers_page' );
36
+	$give_donors_page = add_submenu_page('edit.php?post_type=give_forms', esc_html('Donors', 'give'), esc_html('Donors', 'give'), 'view_give_reports', 'give-donors', 'give_customers_page');
37 37
 
38 38
 	//Reports`
39
-	$give_reports_page = add_submenu_page( 'edit.php?post_type=give_forms', esc_html( 'Donation Reports', 'give' ), esc_html( 'Reports', 'give' ), 'view_give_reports', 'give-reports', 'give_reports_page' );
39
+	$give_reports_page = add_submenu_page('edit.php?post_type=give_forms', esc_html('Donation Reports', 'give'), esc_html('Reports', 'give'), 'view_give_reports', 'give-reports', 'give_reports_page');
40 40
 
41 41
 	//Settings
42
-	$give_settings_page = add_submenu_page( 'edit.php?post_type=give_forms', esc_html( 'Give Settings', 'give' ), esc_html( 'Settings', 'give' ), 'manage_give_settings', 'give-settings', array(
42
+	$give_settings_page = add_submenu_page('edit.php?post_type=give_forms', esc_html('Give Settings', 'give'), esc_html('Settings', 'give'), 'manage_give_settings', 'give-settings', array(
43 43
 		Give()->give_settings,
44 44
 		'admin_page_display'
45
-	) );
45
+	));
46 46
 
47 47
 	//Add-ons
48
-	$give_add_ons_page = add_submenu_page( 'edit.php?post_type=give_forms', esc_html( 'Give Add-ons', 'give' ), esc_html( 'Add-ons', 'give' ), 'install_plugins', 'give-addons', 'give_add_ons_page' );
48
+	$give_add_ons_page = add_submenu_page('edit.php?post_type=give_forms', esc_html('Give Add-ons', 'give'), esc_html('Add-ons', 'give'), 'install_plugins', 'give-addons', 'give_add_ons_page');
49 49
 
50 50
 	//Upgrades
51
-	$give_upgrades_screen = add_submenu_page( null, esc_html( 'Give Upgrades', 'give' ), esc_html( 'Give Upgrades', 'give' ), 'manage_give_settings', 'give-upgrades', 'give_upgrades_screen' );
51
+	$give_upgrades_screen = add_submenu_page(null, esc_html('Give Upgrades', 'give'), esc_html('Give Upgrades', 'give'), 'manage_give_settings', 'give-upgrades', 'give_upgrades_screen');
52 52
 
53 53
 
54 54
 }
55 55
 
56
-add_action( 'admin_menu', 'give_add_options_links', 10 );
56
+add_action('admin_menu', 'give_add_options_links', 10);
57 57
 
58 58
 /**
59 59
  *  Determines whether the current admin page is a Give admin page.
@@ -68,224 +68,224 @@  discard block
 block discarded – undo
68 68
  *
69 69
  * @return bool True if Give admin page.
70 70
  */
71
-function give_is_admin_page( $passed_page = '', $passed_view = '' ) {
71
+function give_is_admin_page($passed_page = '', $passed_view = '') {
72 72
 
73 73
 	global $pagenow, $typenow;
74 74
 
75 75
 	$found     = false;
76
-	$post_type = isset( $_GET['post_type'] ) ? strtolower( $_GET['post_type'] ) : false;
77
-	$action    = isset( $_GET['action'] ) ? strtolower( $_GET['action'] ) : false;
78
-	$taxonomy  = isset( $_GET['taxonomy'] ) ? strtolower( $_GET['taxonomy'] ) : false;
79
-	$page      = isset( $_GET['page'] ) ? strtolower( $_GET['page'] ) : false;
80
-	$view      = isset( $_GET['view'] ) ? strtolower( $_GET['view'] ) : false;
81
-	$tab       = isset( $_GET['tab'] ) ? strtolower( $_GET['tab'] ) : false;
76
+	$post_type = isset($_GET['post_type']) ? strtolower($_GET['post_type']) : false;
77
+	$action    = isset($_GET['action']) ? strtolower($_GET['action']) : false;
78
+	$taxonomy  = isset($_GET['taxonomy']) ? strtolower($_GET['taxonomy']) : false;
79
+	$page      = isset($_GET['page']) ? strtolower($_GET['page']) : false;
80
+	$view      = isset($_GET['view']) ? strtolower($_GET['view']) : false;
81
+	$tab       = isset($_GET['tab']) ? strtolower($_GET['tab']) : false;
82 82
 
83
-	switch ( $passed_page ) {
83
+	switch ($passed_page) {
84 84
 		case 'give_forms':
85
-			switch ( $passed_view ) {
85
+			switch ($passed_view) {
86 86
 				case 'list-table':
87
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' ) {
87
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php') {
88 88
 						$found = true;
89 89
 					}
90 90
 					break;
91 91
 				case 'edit':
92
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'post.php' ) {
92
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'post.php') {
93 93
 						$found = true;
94 94
 					}
95 95
 					break;
96 96
 				case 'new':
97
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'post-new.php' ) {
97
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'post-new.php') {
98 98
 						$found = true;
99 99
 					}
100 100
 					break;
101 101
 				default:
102
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) || 'give_forms' === $post_type || ( 'post-new.php' == $pagenow && 'give_forms' === $post_type ) ) {
102
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) || 'give_forms' === $post_type || ('post-new.php' == $pagenow && 'give_forms' === $post_type)) {
103 103
 						$found = true;
104 104
 					}
105 105
 					break;
106 106
 			}
107 107
 			break;
108 108
 		case 'categories':
109
-			switch ( $passed_view ) {
109
+			switch ($passed_view) {
110 110
 				case 'list-table':
111 111
 				case 'new':
112
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'edit' !== $action && 'give_forms_category' === $taxonomy ) {
112
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'edit' !== $action && 'give_forms_category' === $taxonomy) {
113 113
 						$found = true;
114 114
 					}
115 115
 					break;
116 116
 				case 'edit':
117
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'edit' === $action && 'give_forms_category' === $taxonomy ) {
117
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'edit' === $action && 'give_forms_category' === $taxonomy) {
118 118
 						$found = true;
119 119
 					}
120 120
 					break;
121 121
 				default:
122
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'give_forms_category' === $taxonomy ) {
122
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'give_forms_category' === $taxonomy) {
123 123
 						$found = true;
124 124
 					}
125 125
 					break;
126 126
 			}
127 127
 			break;
128 128
 		case 'tags':
129
-			switch ( $passed_view ) {
129
+			switch ($passed_view) {
130 130
 				case 'list-table':
131 131
 				case 'new':
132
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'edit' !== $action && 'give_forms_tag' === $taxonomy ) {
132
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'edit' !== $action && 'give_forms_tag' === $taxonomy) {
133 133
 						$found = true;
134 134
 					}
135 135
 					break;
136 136
 				case 'edit':
137
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'edit' === $action && 'give_forms_tag' === $taxonomy ) {
137
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'edit' === $action && 'give_forms_tag' === $taxonomy) {
138 138
 						$found = true;
139 139
 					}
140 140
 					break;
141 141
 				default:
142
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'give_forms_tag' === $taxonomy ) {
142
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'give_forms_tag' === $taxonomy) {
143 143
 						$found = true;
144 144
 					}
145 145
 					break;
146 146
 			}
147 147
 			break;
148 148
 		case 'payments':
149
-			switch ( $passed_view ) {
149
+			switch ($passed_view) {
150 150
 				case 'list-table':
151
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-payment-history' === $page && false === $view ) {
151
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-payment-history' === $page && false === $view) {
152 152
 						$found = true;
153 153
 					}
154 154
 					break;
155 155
 				case 'edit':
156
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-payment-history' === $page && 'view-order-details' === $view ) {
156
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-payment-history' === $page && 'view-order-details' === $view) {
157 157
 						$found = true;
158 158
 					}
159 159
 					break;
160 160
 				default:
161
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-payment-history' === $page ) {
161
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-payment-history' === $page) {
162 162
 						$found = true;
163 163
 					}
164 164
 					break;
165 165
 			}
166 166
 			break;
167 167
 		case 'reports':
168
-			switch ( $passed_view ) {
168
+			switch ($passed_view) {
169 169
 				// If you want to do something like enqueue a script on a particular report's duration, look at $_GET[ 'range' ]
170 170
 				case 'earnings':
171
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && ( 'earnings' === $view || '-1' === $view || false === $view ) ) {
171
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && ('earnings' === $view || '-1' === $view || false === $view)) {
172 172
 						$found = true;
173 173
 					}
174 174
 					break;
175 175
 				case 'donors':
176
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && 'customers' === $view ) {
176
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && 'customers' === $view) {
177 177
 						$found = true;
178 178
 					}
179 179
 					break;
180 180
 				case 'gateways':
181
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && 'gateways' === $view ) {
181
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && 'gateways' === $view) {
182 182
 						$found = true;
183 183
 					}
184 184
 					break;
185 185
 				case 'export':
186
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && 'export' === $view ) {
186
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && 'export' === $view) {
187 187
 						$found = true;
188 188
 					}
189 189
 					break;
190 190
 				case 'logs':
191
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && 'logs' === $view ) {
191
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && 'logs' === $view) {
192 192
 						$found = true;
193 193
 					}
194 194
 					break;
195 195
 				default:
196
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page ) {
196
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page) {
197 197
 						$found = true;
198 198
 					}
199 199
 					break;
200 200
 			}
201 201
 			break;
202 202
 		case 'settings':
203
-			switch ( $passed_view ) {
203
+			switch ($passed_view) {
204 204
 				case 'general':
205
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && ( 'general' === $tab || false === $tab ) ) {
205
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && ('general' === $tab || false === $tab)) {
206 206
 						$found = true;
207 207
 					}
208 208
 					break;
209 209
 				case 'gateways':
210
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'gateways' === $tab ) {
210
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'gateways' === $tab) {
211 211
 						$found = true;
212 212
 					}
213 213
 					break;
214 214
 				case 'emails':
215
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'emails' === $tab ) {
215
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'emails' === $tab) {
216 216
 						$found = true;
217 217
 					}
218 218
 					break;
219 219
 				case 'display':
220
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'display' === $tab ) {
220
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'display' === $tab) {
221 221
 						$found = true;
222 222
 					}
223 223
 					break;
224 224
 				case 'licenses':
225
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'licenses' === $tab ) {
225
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'licenses' === $tab) {
226 226
 						$found = true;
227 227
 					}
228 228
 					break;
229 229
 				case 'api':
230
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'api' === $tab ) {
230
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'api' === $tab) {
231 231
 						$found = true;
232 232
 					}
233 233
 					break;
234 234
 				case 'advanced':
235
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'advanced' === $tab ) {
235
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'advanced' === $tab) {
236 236
 						$found = true;
237 237
 					}
238 238
 					break;
239 239
 				case 'system_info':
240
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'system_info' === $tab ) {
240
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'system_info' === $tab) {
241 241
 						$found = true;
242 242
 					}
243 243
 					break;
244 244
 				default:
245
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page ) {
245
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page) {
246 246
 						$found = true;
247 247
 					}
248 248
 					break;
249 249
 			}
250 250
 			break;
251 251
 		case 'addons':
252
-			if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-addons' === $page ) {
252
+			if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-addons' === $page) {
253 253
 				$found = true;
254 254
 			}
255 255
 			break;
256 256
 		case 'donors':
257
-			switch ( $passed_view ) {
257
+			switch ($passed_view) {
258 258
 				case 'list-table':
259
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-donors' === $page && false === $view ) {
259
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-donors' === $page && false === $view) {
260 260
 						$found = true;
261 261
 					}
262 262
 					break;
263 263
 				case 'overview':
264
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-donors' === $page && 'overview' === $view ) {
264
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-donors' === $page && 'overview' === $view) {
265 265
 						$found = true;
266 266
 					}
267 267
 					break;
268 268
 				case 'notes':
269
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-donors' === $page && 'notes' === $view ) {
269
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-donors' === $page && 'notes' === $view) {
270 270
 						$found = true;
271 271
 					}
272 272
 					break;
273 273
 				default:
274
-					if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-donors' === $page ) {
274
+					if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-donors' === $page) {
275 275
 						$found = true;
276 276
 					}
277 277
 					break;
278 278
 			}
279 279
 			break;
280 280
 		case 'reports':
281
-			if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page ) {
281
+			if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page) {
282 282
 				$found = true;
283 283
 			}
284 284
 			break;
285 285
 		default:
286 286
 			global $give_payments_page, $give_settings_page, $give_reports_page, $give_system_info_page, $give_add_ons_page, $give_settings_export, $give_upgrades_screen, $give_customers_page;
287 287
 
288
-			$admin_pages = apply_filters( 'give_admin_pages', array(
288
+			$admin_pages = apply_filters('give_admin_pages', array(
289 289
 				$give_payments_page,
290 290
 				$give_settings_page,
291 291
 				$give_reports_page,
@@ -294,18 +294,18 @@  discard block
 block discarded – undo
294 294
 				$give_upgrades_screen,
295 295
 				$give_settings_export,
296 296
 				$give_customers_page
297
-			) );
298
-			if ( 'give_forms' == $typenow || 'index.php' == $pagenow || 'post-new.php' == $pagenow || 'post.php' == $pagenow ) {
297
+			));
298
+			if ('give_forms' == $typenow || 'index.php' == $pagenow || 'post-new.php' == $pagenow || 'post.php' == $pagenow) {
299 299
 				$found = true;
300
-				if ( 'give-upgrades' === $page ) {
300
+				if ('give-upgrades' === $page) {
301 301
 					$found = false;
302 302
 				}
303
-			} elseif ( in_array( $pagenow, $admin_pages ) ) {
303
+			} elseif (in_array($pagenow, $admin_pages)) {
304 304
 				$found = true;
305 305
 			}
306 306
 			break;
307 307
 	}
308 308
 
309
-	return (bool) apply_filters( 'give_is_admin_page', $found, $page, $view, $passed_page, $passed_view );
309
+	return (bool) apply_filters('give_is_admin_page', $found, $page, $view, $passed_page, $passed_view);
310 310
 
311 311
 }
312 312
\ No newline at end of file
Please login to merge, or discard this patch.