Test Failed
Push — master ( 2f4c9e...518013 )
by Devin
06:05
created
includes/admin/shortcodes/class-shortcode-button.php 1 patch
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly.
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * Class constructor
33 33
 	 */
34 34
 	public function __construct() {
35
-		add_action( 'admin_init', array( $this, 'init'), 999 );
35
+		add_action('admin_init', array($this, 'init'), 999);
36 36
 	}
37 37
 
38 38
 	/**
@@ -41,17 +41,17 @@  discard block
 block discarded – undo
41 41
 	 * @since 2.1.0
42 42
 	 * @access public
43 43
 	 */
44
-	public function init(){
45
-		if ( $this->is_add_button() ) {
46
-			add_filter( 'mce_external_plugins', array( $this, 'mce_external_plugins' ), 15 );
44
+	public function init() {
45
+		if ($this->is_add_button()) {
46
+			add_filter('mce_external_plugins', array($this, 'mce_external_plugins'), 15);
47 47
 
48
-			add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_assets' ) );
49
-			add_action( 'admin_enqueue_scripts', array( $this, 'admin_localize_scripts' ), 13 );
50
-			add_action( 'media_buttons', array( $this, 'shortcode_button' ) );
48
+			add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_assets'));
49
+			add_action('admin_enqueue_scripts', array($this, 'admin_localize_scripts'), 13);
50
+			add_action('media_buttons', array($this, 'shortcode_button'));
51 51
 		}
52 52
 
53
-		add_action( "wp_ajax_give_shortcode", array( $this, 'shortcode_ajax' ) );
54
-		add_action( "wp_ajax_nopriv_give_shortcode", array( $this, 'shortcode_ajax' ) );
53
+		add_action("wp_ajax_give_shortcode", array($this, 'shortcode_ajax'));
54
+		add_action("wp_ajax_nopriv_give_shortcode", array($this, 'shortcode_ajax'));
55 55
 	}
56 56
 
57 57
 	/**
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @since 1.0
65 65
 	 */
66
-	public function mce_external_plugins( $plugin_array ) {
66
+	public function mce_external_plugins($plugin_array) {
67 67
 
68
-		if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
68
+		if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages')) {
69 69
 			return false;
70 70
 		}
71 71
 
72
-		$plugin_array['give_shortcode'] = GIVE_PLUGIN_URL . 'includes/admin/shortcodes/mce-plugin.js';
72
+		$plugin_array['give_shortcode'] = GIVE_PLUGIN_URL.'includes/admin/shortcodes/mce-plugin.js';
73 73
 
74 74
 		return $plugin_array;
75 75
 	}
@@ -82,19 +82,19 @@  discard block
 block discarded – undo
82 82
 	 * @since 1.0
83 83
 	 */
84 84
 	public function admin_enqueue_assets() {
85
-		$direction = ( is_rtl() || isset( $_GET['d'] ) && 'rtl' === $_GET['d'] ) ? '.rtl' : '';
85
+		$direction = (is_rtl() || isset($_GET['d']) && 'rtl' === $_GET['d']) ? '.rtl' : '';
86 86
 
87 87
 		wp_enqueue_script(
88 88
 			'give_shortcode',
89
-			GIVE_PLUGIN_URL . 'assets/dist/js/admin-shortcodes.js',
90
-			array( 'jquery' ),
89
+			GIVE_PLUGIN_URL.'assets/dist/js/admin-shortcodes.js',
90
+			array('jquery'),
91 91
 			GIVE_VERSION,
92 92
 			true
93 93
 		);
94 94
 
95 95
 		wp_enqueue_style(
96 96
 			'give-admin-shortcode-button-style',
97
-			GIVE_PLUGIN_URL . 'assets/dist/css/admin-shortcode-button' . $direction . '.css',
97
+			GIVE_PLUGIN_URL.'assets/dist/css/admin-shortcode-button'.$direction.'.css',
98 98
 			array(),
99 99
 			GIVE_VERSION
100 100
 		);
@@ -109,17 +109,17 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function admin_localize_scripts() {
111 111
 
112
-		if ( ! empty( self::$shortcodes ) ) {
112
+		if ( ! empty(self::$shortcodes)) {
113 113
 
114 114
 			$variables = array();
115 115
 
116
-			foreach ( self::$shortcodes as $shortcode => $values ) {
117
-				if ( ! empty( $values['required'] ) ) {
118
-					$variables[ $shortcode ] = $values['required'];
116
+			foreach (self::$shortcodes as $shortcode => $values) {
117
+				if ( ! empty($values['required'])) {
118
+					$variables[$shortcode] = $values['required'];
119 119
 				}
120 120
 			}
121 121
 
122
-			wp_localize_script( 'give_shortcode', 'scShortcodes', $variables );
122
+			wp_localize_script('give_shortcode', 'scShortcodes', $variables);
123 123
 		}
124 124
 	}
125 125
 
@@ -134,16 +134,16 @@  discard block
 block discarded – undo
134 134
 
135 135
 		$shortcodes = array();
136 136
 
137
-		foreach ( self::$shortcodes as $shortcode => $values ) {
137
+		foreach (self::$shortcodes as $shortcode => $values) {
138 138
 
139 139
 			/**
140 140
 			 * Filters the condition for including the current shortcode
141 141
 			 *
142 142
 			 * @since 1.0
143 143
 			 */
144
-			if ( apply_filters( sanitize_title( $shortcode ) . '_condition', true ) ) {
144
+			if (apply_filters(sanitize_title($shortcode).'_condition', true)) {
145 145
 
146
-				$shortcodes[ $shortcode ] = sprintf(
146
+				$shortcodes[$shortcode] = sprintf(
147 147
 					'<div class="sc-shortcode mce-menu-item give-shortcode-item-%1$s" data-shortcode="%2$s">%3$s</div>',
148 148
 					$shortcode,
149 149
 					$shortcode,
@@ -152,37 +152,37 @@  discard block
 block discarded – undo
152 152
 			}
153 153
 		}
154 154
 
155
-		if ( ! empty( $shortcodes ) ) {
155
+		if ( ! empty($shortcodes)) {
156 156
 
157 157
 			// check current WP version
158
-			$img = ( version_compare( get_bloginfo( 'version' ), '3.5', '<' ) )
159
-				? '<img src="' . GIVE_PLUGIN_URL . 'assets/dist/images/give-media.png" />'
160
-				: '<span class="wp-media-buttons-icon" id="give-media-button" style="background-image: url(' . give_svg_icons( 'give_grey' ) . ');"></span>';
158
+			$img = (version_compare(get_bloginfo('version'), '3.5', '<'))
159
+				? '<img src="'.GIVE_PLUGIN_URL.'assets/dist/images/give-media.png" />'
160
+				: '<span class="wp-media-buttons-icon" id="give-media-button" style="background-image: url('.give_svg_icons('give_grey').');"></span>';
161 161
 
162
-			reset( $shortcodes );
162
+			reset($shortcodes);
163 163
 
164
-			if ( 1 === count( $shortcodes ) ) {
164
+			if (1 === count($shortcodes)) {
165 165
 
166
-				$shortcode = key( $shortcodes );
166
+				$shortcode = key($shortcodes);
167 167
 
168 168
 				printf(
169 169
 					'<button type="button" class="button sc-shortcode" data-shortcode="%s">%s</button>',
170 170
 					$shortcode,
171
-					sprintf( '%s %s %s',
171
+					sprintf('%s %s %s',
172 172
 						$img,
173
-						__( 'Insert', 'give' ),
174
-						self::$shortcodes[ $shortcode ]['label']
173
+						__('Insert', 'give'),
174
+						self::$shortcodes[$shortcode]['label']
175 175
 					)
176 176
 				);
177 177
 			} else {
178 178
 				printf(
179
-					'<div class="sc-wrap">' .
180
-					'<button class="button sc-button" type="button">%s %s</button>' .
181
-					'<div class="sc-menu mce-menu">%s</div>' .
179
+					'<div class="sc-wrap">'.
180
+					'<button class="button sc-button" type="button">%s %s</button>'.
181
+					'<div class="sc-menu mce-menu">%s</div>'.
182 182
 					'</div>',
183 183
 					$img,
184
-					__( 'Give Shortcodes', 'give' ),
185
-					implode( '', array_values( $shortcodes ) )
184
+					__('Give Shortcodes', 'give'),
185
+					implode('', array_values($shortcodes))
186 186
 				);
187 187
 			}
188 188
 		}
@@ -197,15 +197,15 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	public function shortcode_ajax() {
199 199
 
200
-		$shortcode = isset( $_POST['shortcode'] ) ? $_POST['shortcode'] : false;
200
+		$shortcode = isset($_POST['shortcode']) ? $_POST['shortcode'] : false;
201 201
 		$response  = false;
202 202
 
203
-		if ( $shortcode && array_key_exists( $shortcode, self::$shortcodes ) ) {
203
+		if ($shortcode && array_key_exists($shortcode, self::$shortcodes)) {
204 204
 
205
-			$data = self::$shortcodes[ $shortcode ];
205
+			$data = self::$shortcodes[$shortcode];
206 206
 
207
-			if ( ! empty( $data['errors'] ) ) {
208
-				$data['btn_okay'] = array( esc_html__( 'Okay', 'give' ) );
207
+			if ( ! empty($data['errors'])) {
208
+				$data['btn_okay'] = array(esc_html__('Okay', 'give'));
209 209
 			}
210 210
 
211 211
 			$response = array(
@@ -217,10 +217,10 @@  discard block
 block discarded – undo
217 217
 			);
218 218
 		} else {
219 219
 			// todo: handle error
220
-			error_log( print_r( 'AJAX error!', 1 ) );
220
+			error_log(print_r('AJAX error!', 1));
221 221
 		}
222 222
 
223
-		wp_send_json( $response );
223
+		wp_send_json($response);
224 224
 	}
225 225
 
226 226
 
@@ -234,22 +234,22 @@  discard block
 block discarded – undo
234 234
 	private function is_add_button() {
235 235
 		global $pagenow;
236 236
 
237
-		$shortcode_button_pages = apply_filters( 'give_shortcode_button_pages', array(
237
+		$shortcode_button_pages = apply_filters('give_shortcode_button_pages', array(
238 238
 			'post.php',
239 239
 			'page.php',
240 240
 			'post-new.php',
241 241
 			'post-edit.php',
242 242
 			'edit.php',
243 243
 			'edit.php?post_type=page',
244
-		) );
244
+		));
245 245
 
246 246
 		$setting_page = give_get_current_setting_page();
247 247
 
248 248
 		// Only run in admin post/page creation and edit screens
249 249
 		if (
250 250
 			! is_admin()
251
-			|| ! in_array( $pagenow, $shortcode_button_pages )
252
-			|| ( 'give-settings' === $setting_page )
251
+			|| ! in_array($pagenow, $shortcode_button_pages)
252
+			|| ('give-settings' === $setting_page)
253 253
 
254 254
 			/**
255 255
 			 * Fire the filter
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
 			 * @since 1.0
259 259
 			 *
260 260
 			 */
261
-			|| ! apply_filters( 'give_shortcode_button_condition', true )
262
-			|| empty( self::$shortcodes )
261
+			|| ! apply_filters('give_shortcode_button_condition', true)
262
+			|| empty(self::$shortcodes)
263 263
 		) {
264 264
 			return false;
265 265
 		}
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-donor-wall.php 1 patch
Spacing   +34 added lines, -34 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
 
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 	 */
25 25
 	public function __construct() {
26 26
 
27
-		$this->shortcode['title'] = esc_html__( 'Donor Wall', 'give' );
28
-		$this->shortcode['label'] = esc_html__( 'Donor Wall', 'give' );
27
+		$this->shortcode['title'] = esc_html__('Donor Wall', 'give');
28
+		$this->shortcode['label'] = esc_html__('Donor Wall', 'give');
29 29
 
30
-		parent::__construct( 'give_donor_wall' );
30
+		parent::__construct('give_donor_wall');
31 31
 	}
32 32
 
33 33
 	/**
@@ -43,90 +43,90 @@  discard block
 block discarded – undo
43 43
 					'post_type' => 'give_forms',
44 44
 				),
45 45
 				'name'        => 'form_id',
46
-				'tooltip'     => esc_attr__( 'Select a Donation Form', 'give' ),
47
-				'placeholder' => '- ' . esc_attr__( 'Select a Donation Form', 'give' ) . ' -',
46
+				'tooltip'     => esc_attr__('Select a Donation Form', 'give'),
47
+				'placeholder' => '- '.esc_attr__('Select a Donation Form', 'give').' -',
48 48
 			),
49 49
 			array(
50 50
 				'type'        => 'textbox',
51 51
 				'name'        => 'donors_per_page',
52
-				'label'       => esc_attr__( 'Donors Per Page', 'give' ),
52
+				'label'       => esc_attr__('Donors Per Page', 'give'),
53 53
 				'placeholder' => '20',
54 54
 			),
55 55
 			array(
56 56
 				'type'        => 'textbox',
57 57
 				'name'        => 'comment_length',
58
-				'label'       => esc_attr__( 'Comment Length', 'give' ),
58
+				'label'       => esc_attr__('Comment Length', 'give'),
59 59
 				'placeholder' => '20',
60 60
 			),
61 61
 			array(
62 62
 				'type'        => 'textbox',
63 63
 				'name'        => 'readmore_text',
64
-				'label'       => esc_attr__( 'Read More Text', 'give' ),
65
-				'placeholder' => esc_html__( 'Read More', 'give' ),
64
+				'label'       => esc_attr__('Read More Text', 'give'),
65
+				'placeholder' => esc_html__('Read More', 'give'),
66 66
 			),
67 67
 			array(
68 68
 				'type'        => 'textbox',
69 69
 				'name'        => 'loadmore_text',
70
-				'label'       => esc_attr__( 'Load More Text', 'give' ),
71
-				'placeholder' => esc_html__( 'Load More', 'give' ),
70
+				'label'       => esc_attr__('Load More Text', 'give'),
71
+				'placeholder' => esc_html__('Load More', 'give'),
72 72
 			),
73 73
 			array(
74 74
 				'type'        => 'listbox',
75 75
 				'name'        => 'columns',
76
-				'label'       => esc_attr__( 'Columns:', 'give' ),
77
-				'tooltip'     => esc_attr__( 'Sets the number of forms per row.', 'give' ),
76
+				'label'       => esc_attr__('Columns:', 'give'),
77
+				'tooltip'     => esc_attr__('Sets the number of forms per row.', 'give'),
78 78
 				'options'     => array(
79
-					'1' => esc_html__( '1', 'give' ),
80
-					'2' => esc_html__( '2', 'give' ),
81
-					'3' => esc_html__( '3', 'give' ),
82
-					'4' => esc_html__( '4', 'give' ),
79
+					'1' => esc_html__('1', 'give'),
80
+					'2' => esc_html__('2', 'give'),
81
+					'3' => esc_html__('3', 'give'),
82
+					'4' => esc_html__('4', 'give'),
83 83
 				),
84
-				'placeholder' => esc_html__( 'Best Fit', 'give' ),
84
+				'placeholder' => esc_html__('Best Fit', 'give'),
85 85
 			),
86 86
 			array(
87 87
 				'type'        => 'listbox',
88 88
 				'name'        => 'show_avatar',
89
-				'label'       => esc_attr__( 'Show Avatar', 'give' ),
89
+				'label'       => esc_attr__('Show Avatar', 'give'),
90 90
 				'options'     => array(
91
-					'false' => esc_html__( 'Hide', 'give' ),
91
+					'false' => esc_html__('Hide', 'give'),
92 92
 				),
93
-				'placeholder' => esc_html__( 'Show', 'give' ),
93
+				'placeholder' => esc_html__('Show', 'give'),
94 94
 			),
95 95
 			array(
96 96
 				'type'        => 'listbox',
97 97
 				'name'        => 'show_name',
98
-				'label'       => esc_attr__( 'Show Name', 'give' ),
98
+				'label'       => esc_attr__('Show Name', 'give'),
99 99
 				'options'     => array(
100
-					'false' => esc_html__( 'Hide', 'give' ),
100
+					'false' => esc_html__('Hide', 'give'),
101 101
 				),
102
-				'placeholder' => esc_html__( 'Show', 'give' ),
102
+				'placeholder' => esc_html__('Show', 'give'),
103 103
 			),
104 104
 			array(
105 105
 				'type'        => 'listbox',
106 106
 				'name'        => 'show_total',
107
-				'label'       => esc_attr__( 'Show Total', 'give' ),
107
+				'label'       => esc_attr__('Show Total', 'give'),
108 108
 				'options'     => array(
109
-					'false' => esc_html__( 'Hide', 'give' ),
109
+					'false' => esc_html__('Hide', 'give'),
110 110
 				),
111
-				'placeholder' => esc_html__( 'Show', 'give' ),
111
+				'placeholder' => esc_html__('Show', 'give'),
112 112
 			),
113 113
 			array(
114 114
 				'type'        => 'listbox',
115 115
 				'name'        => 'show_time',
116
-				'label'       => esc_attr__( 'Show Date', 'give' ),
116
+				'label'       => esc_attr__('Show Date', 'give'),
117 117
 				'options'     => array(
118
-					'false' => esc_html__( 'Hide', 'give' ),
118
+					'false' => esc_html__('Hide', 'give'),
119 119
 				),
120
-				'placeholder' => esc_html__( 'Show', 'give' ),
120
+				'placeholder' => esc_html__('Show', 'give'),
121 121
 			),
122 122
 			array(
123 123
 				'type'        => 'listbox',
124 124
 				'name'        => 'show_comments',
125
-				'label'       => esc_attr__( 'Show Comments', 'give' ),
125
+				'label'       => esc_attr__('Show Comments', 'give'),
126 126
 				'options'     => array(
127
-					'false' => esc_html__( 'Hide', 'give' ),
127
+					'false' => esc_html__('Hide', 'give'),
128 128
 				),
129
-				'placeholder' => esc_html__( 'Show', 'give' ),
129
+				'placeholder' => esc_html__('Show', 'give'),
130 130
 			)
131 131
 		);
132 132
 	}
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-donation-grid.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 // Exit if accessed directly.
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit;
14 14
 }
15 15
 
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	public function __construct() {
25 25
 
26
-		$this->shortcode['title'] = esc_html__( 'Donation Form Grid', 'give' );
27
-		$this->shortcode['label'] = esc_html__( 'Donation Form Grid', 'give' );
26
+		$this->shortcode['title'] = esc_html__('Donation Form Grid', 'give');
27
+		$this->shortcode['label'] = esc_html__('Donation Form Grid', 'give');
28 28
 
29
-		parent::__construct( 'give_form_grid' );
29
+		parent::__construct('give_form_grid');
30 30
 	}
31 31
 
32 32
 	/**
@@ -39,80 +39,80 @@  discard block
 block discarded – undo
39 39
 		return array(
40 40
 			array(
41 41
 				'type' => 'container',
42
-				'html' => sprintf( '<p class="strong margin-top">%s</p>', esc_html__( 'Optional settings', 'give' ) ),
42
+				'html' => sprintf('<p class="strong margin-top">%s</p>', esc_html__('Optional settings', 'give')),
43 43
 			),
44 44
 			array(
45 45
 				'type'        => 'textbox',
46 46
 				'name'        => 'ids',
47
-				'label'       => esc_attr__( 'Form IDs:', 'give' ),
48
-				'tooltip'     => esc_attr__( 'Enter a comma-separated list of form IDs. If empty, all published forms are displayed.', 'give' ),
49
-				'placeholder' => esc_html__( 'All Forms', 'give' )
47
+				'label'       => esc_attr__('Form IDs:', 'give'),
48
+				'tooltip'     => esc_attr__('Enter a comma-separated list of form IDs. If empty, all published forms are displayed.', 'give'),
49
+				'placeholder' => esc_html__('All Forms', 'give')
50 50
 			),
51 51
 			array(
52 52
 				'type'        => 'textbox',
53 53
 				'name'        => 'exclude',
54
-				'label'       => esc_attr__( 'Excluded Form IDs:', 'give' ),
55
-				'tooltip'     => esc_attr__( 'Enter a comma-separated list of form IDs to exclude those from the grid.', 'give' ),
56
-				'placeholder' => esc_html__( 'Excluded Forms', 'give' )
54
+				'label'       => esc_attr__('Excluded Form IDs:', 'give'),
55
+				'tooltip'     => esc_attr__('Enter a comma-separated list of form IDs to exclude those from the grid.', 'give'),
56
+				'placeholder' => esc_html__('Excluded Forms', 'give')
57 57
 			),
58 58
 			array(
59 59
 				'type'        => 'listbox',
60 60
 				'name'        => 'columns',
61
-				'label'       => esc_attr__( 'Columns:', 'give' ),
62
-				'tooltip'     => esc_attr__( 'Sets the number of forms per row.', 'give' ),
61
+				'label'       => esc_attr__('Columns:', 'give'),
62
+				'tooltip'     => esc_attr__('Sets the number of forms per row.', 'give'),
63 63
 				'options'     => array(
64
-					'1' => esc_html__( '1', 'give' ),
65
-					'2' => esc_html__( '2', 'give' ),
66
-					'3' => esc_html__( '3', 'give' ),
67
-					'4' => esc_html__( '4', 'give' ),
64
+					'1' => esc_html__('1', 'give'),
65
+					'2' => esc_html__('2', 'give'),
66
+					'3' => esc_html__('3', 'give'),
67
+					'4' => esc_html__('4', 'give'),
68 68
 				),
69
-				'placeholder' => esc_html__( 'Best Fit', 'give' )
69
+				'placeholder' => esc_html__('Best Fit', 'give')
70 70
 			),
71 71
 			array(
72 72
 				'type'    => 'listbox',
73 73
 				'name'    => 'show_goal',
74
-				'label'   => esc_attr__( 'Show Goal:', 'give' ),
75
-				'tooltip' => __( 'Do you want to display the goal\'s progress bar?', 'give' ),
74
+				'label'   => esc_attr__('Show Goal:', 'give'),
75
+				'tooltip' => __('Do you want to display the goal\'s progress bar?', '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_excerpt',
84
-				'label'   => esc_attr__( 'Show Excerpt:', 'give' ),
85
-				'tooltip' => esc_attr__( 'Do you want to display the excerpt?', 'give' ),
84
+				'label'   => esc_attr__('Show Excerpt:', 'give'),
85
+				'tooltip' => esc_attr__('Do you want to display the excerpt?', 'give'),
86 86
 				'options' => array(
87
-					'true'  => esc_html__( 'Show', 'give' ),
88
-					'false' => esc_html__( 'Hide', 'give' ),
87
+					'true'  => esc_html__('Show', 'give'),
88
+					'false' => esc_html__('Hide', 'give'),
89 89
 				),
90 90
 			),
91 91
 			array(
92 92
 				'type'    => 'listbox',
93 93
 				'name'    => 'show_featured_image',
94
-				'label'   => esc_attr__( 'Show Featured Image:', 'give' ),
95
-				'tooltip' => esc_attr__( 'Do you want to display the featured image?', 'give' ),
94
+				'label'   => esc_attr__('Show Featured Image:', 'give'),
95
+				'tooltip' => esc_attr__('Do you want to display the featured image?', 'give'),
96 96
 				'options' => array(
97
-					'true'  => esc_html__( 'Show', 'give' ),
98
-					'false' => esc_html__( 'Hide', 'give' ),
97
+					'true'  => esc_html__('Show', 'give'),
98
+					'false' => esc_html__('Hide', 'give'),
99 99
 				),
100 100
 			),
101 101
 			array(
102 102
 				'type'    => 'listbox',
103 103
 				'name'    => 'display_style',
104
-				'label'   => esc_attr__( 'Display Style:', 'give' ),
105
-				'tooltip' => esc_attr__( 'Show form as modal window or redirect to a new page?', 'give' ),
104
+				'label'   => esc_attr__('Display Style:', 'give'),
105
+				'tooltip' => esc_attr__('Show form as modal window or redirect to a new page?', 'give'),
106 106
 				'options' => array(
107
-					'redirect'     => esc_html__( 'Redirect', 'give' ),
108
-					'modal_reveal' => esc_html__( 'Modal', 'give' ),
107
+					'redirect'     => esc_html__('Redirect', 'give'),
108
+					'modal_reveal' => esc_html__('Modal', 'give'),
109 109
 				),
110 110
 			),
111 111
 			array(
112 112
 				'type'    => 'textbox',
113 113
 				'name'    => 'forms_per_page',
114
-				'label'   => esc_attr__( 'Forms Per Page:', 'give' ),
115
-				'tooltip' => esc_attr__( 'Sets the number of forms to display per page.', 'give' ),
114
+				'label'   => esc_attr__('Forms Per Page:', 'give'),
115
+				'tooltip' => esc_attr__('Sets the number of forms to display per page.', 'give'),
116 116
 				'value'   => 12,
117 117
 			),
118 118
 		);
Please login to merge, or discard this patch.
includes/class-give-donor-wall-widget.php 1 patch
Spacing   +18 added lines, -18 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
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		// widget settings
35 35
 		$widget_ops = array(
36 36
 			'classname'   => 'give-donors-gravatars',
37
-			'description' => esc_html__( 'Displays gravatars of people who have donated using your your form. Will only show on the single form page.', 'give' ),
37
+			'description' => esc_html__('Displays gravatars of people who have donated using your your form. Will only show on the single form page.', 'give'),
38 38
 		);
39 39
 
40 40
 		// widget control settings
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		// create the widget
48 48
 		parent::__construct(
49 49
 			'give_donors_gravatars_widget',
50
-			esc_html__( 'Give Donors Gravatars', 'give' ),
50
+			esc_html__('Give Donors Gravatars', 'give'),
51 51
 			$widget_ops,
52 52
 			$control_ops
53 53
 		);
@@ -67,29 +67,29 @@  discard block
 block discarded – undo
67 67
 	 *
68 68
 	 * @return void
69 69
 	 */
70
-	public function widget( $args, $instance ) {
70
+	public function widget($args, $instance) {
71 71
 
72 72
 		//@TODO: Don't extract it!!!
73
-		extract( $args );
73
+		extract($args);
74 74
 
75
-		if ( ! is_singular( 'give_forms' ) ) {
75
+		if ( ! is_singular('give_forms')) {
76 76
 			return;
77 77
 		}
78 78
 
79 79
 		// Variables from widget settings
80
-		$title = apply_filters( 'widget_title', $instance['title'] );
80
+		$title = apply_filters('widget_title', $instance['title']);
81 81
 
82 82
 		// Used by themes. Opens the widget
83 83
 		echo $before_widget;
84 84
 
85 85
 		// Display the widget title
86
-		if ( $title ) {
87
-			echo $before_title . $title . $after_title;
86
+		if ($title) {
87
+			echo $before_title.$title.$after_title;
88 88
 		}
89 89
 
90 90
 		$gravatars = new Give_Donor_Wall();
91 91
 
92
-		echo $gravatars->gravatars( get_the_ID(), null ); // remove title
92
+		echo $gravatars->gravatars(get_the_ID(), null); // remove title
93 93
 
94 94
 		// Used by themes. Closes the widget
95 95
 		echo $after_widget;
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
 	 *
110 110
 	 * @return array Updated settings to save.
111 111
 	 */
112
-	public function update( $new_instance, $old_instance ) {
112
+	public function update($new_instance, $old_instance) {
113 113
 
114 114
 		$instance = $old_instance;
115 115
 
116
-		$instance['title'] = strip_tags( $new_instance['title'] );
116
+		$instance['title'] = strip_tags($new_instance['title']);
117 117
 
118 118
 		return $instance;
119 119
 
@@ -131,19 +131,19 @@  discard block
 block discarded – undo
131 131
 	 *
132 132
 	 * @return void
133 133
 	 */
134
-	public function form( $instance ) {
134
+	public function form($instance) {
135 135
 
136 136
 		// Set up some default widget settings.
137 137
 		$defaults = array(
138 138
 			'title' => '',
139 139
 		);
140 140
 
141
-		$instance = wp_parse_args( (array) $instance, $defaults ); ?>
141
+		$instance = wp_parse_args((array) $instance, $defaults); ?>
142 142
 
143 143
 		<!-- Title -->
144 144
 		<p>
145
-			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'give' ) ?></label>
146
-			<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $instance['title']; ?>" />
145
+			<label for="<?php echo $this->get_field_id('title'); ?>"><?php esc_html_e('Title:', 'give') ?></label>
146
+			<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $instance['title']; ?>" />
147 147
 		</p>
148 148
 
149 149
 		<?php
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 	 *
155 155
 	 * @return void
156 156
 	 */
157
-	function widget_init(){
158
-		register_widget( $this->self );
157
+	function widget_init() {
158
+		register_widget($this->self);
159 159
 	}
160 160
 
161 161
 }
Please login to merge, or discard this patch.
includes/currency-functions.php 1 patch
Spacing   +223 added lines, -223 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
  *
21 21
  * @return string The currency code
22 22
  */
23
-function give_get_currency( $donation_or_form_id = null, $args = array() ) {
23
+function give_get_currency($donation_or_form_id = null, $args = array()) {
24 24
 
25 25
 	// Get currency from donation
26
-	if ( is_numeric( $donation_or_form_id ) && 'give_payment' === get_post_type( $donation_or_form_id ) ) {
27
-		$currency = give_get_meta( $donation_or_form_id, '_give_payment_currency', true );
26
+	if (is_numeric($donation_or_form_id) && 'give_payment' === get_post_type($donation_or_form_id)) {
27
+		$currency = give_get_meta($donation_or_form_id, '_give_payment_currency', true);
28 28
 
29
-		if ( empty( $currency ) ) {
30
-			$currency = give_get_option( 'currency', 'USD' );
29
+		if (empty($currency)) {
30
+			$currency = give_get_option('currency', 'USD');
31 31
 		}
32 32
 	} else {
33
-		$currency = give_get_option( 'currency', 'USD' );
33
+		$currency = give_get_option('currency', 'USD');
34 34
 	}
35 35
 
36 36
 	/**
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 *
39 39
 	 * @since 1.0
40 40
 	 */
41
-	return apply_filters( 'give_currency', $currency, $donation_or_form_id, $args );
41
+	return apply_filters('give_currency', $currency, $donation_or_form_id, $args);
42 42
 }
43 43
 
44 44
 /**
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
  */
51 51
 function give_get_currency_position() {
52 52
 
53
-	$currency_pos = give_get_option( 'currency_position', 'before' );
53
+	$currency_pos = give_get_option('currency_position', 'before');
54 54
 
55
-	return apply_filters( 'give_currency_position', $currency_pos );
55
+	return apply_filters('give_currency_position', $currency_pos);
56 56
 }
57 57
 
58 58
 /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 function give_get_currencies_list() {
66 66
 	$currencies = array(
67 67
 		'USD' => array(
68
-			'admin_label' => sprintf( __('US Dollars (%1$s)', 'give'), '&#36;'),
68
+			'admin_label' => sprintf(__('US Dollars (%1$s)', 'give'), '&#36;'),
69 69
 			'symbol'      => '&#36;',
70 70
 			'setting'     => array(
71 71
 				'currency_position'   => 'before',
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 			),
76 76
 		),
77 77
 		'EUR' => array(
78
-			'admin_label' => sprintf( __('Euros (%1$s)', 'give'), '&euro;'),
78
+			'admin_label' => sprintf(__('Euros (%1$s)', 'give'), '&euro;'),
79 79
 			'symbol'      => '&euro;',
80 80
 			'setting'     => array(
81 81
 				'currency_position'   => 'before',
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			),
86 86
 		),
87 87
 		'GBP' => array(
88
-			'admin_label' => sprintf( __('Pounds Sterling (%1$s)', 'give'), '&pound;'),
88
+			'admin_label' => sprintf(__('Pounds Sterling (%1$s)', 'give'), '&pound;'),
89 89
 			'symbol'      => '&pound;',
90 90
 			'setting'     => array(
91 91
 				'currency_position'   => 'before',
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			),
96 96
 		),
97 97
 		'AUD' => array(
98
-			'admin_label' => sprintf( __('Australian Dollars (%1$s)', 'give'), '&#36;'),
98
+			'admin_label' => sprintf(__('Australian Dollars (%1$s)', 'give'), '&#36;'),
99 99
 			'symbol'      => '&#36;',
100 100
 			'setting'     => array(
101 101
 				'currency_position'   => 'before',
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 			),
106 106
 		),
107 107
 		'BRL' => array(
108
-			'admin_label' => sprintf( __('Brazilian Real (%1$s)', 'give'), '&#82;&#36;'),
108
+			'admin_label' => sprintf(__('Brazilian Real (%1$s)', 'give'), '&#82;&#36;'),
109 109
 			'symbol'      => '&#82;&#36;',
110 110
 			'setting'     => array(
111 111
 				'currency_position'   => 'before',
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			),
116 116
 		),
117 117
 		'CAD' => array(
118
-			'admin_label' => sprintf( __('Canadian Dollars (%1$s)', 'give'), '&#36;'),
118
+			'admin_label' => sprintf(__('Canadian Dollars (%1$s)', 'give'), '&#36;'),
119 119
 			'symbol'      => '&#36;',
120 120
 			'setting'     => array(
121 121
 				'currency_position'   => 'before',
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			),
126 126
 		),
127 127
 		'CZK' => array(
128
-			'admin_label' => sprintf( __('Czech Koruna (%1$s)', 'give'), '&#75;&#269;'),
128
+			'admin_label' => sprintf(__('Czech Koruna (%1$s)', 'give'), '&#75;&#269;'),
129 129
 			'symbol'      => '&#75;&#269;',
130 130
 			'setting'     => array(
131 131
 				'currency_position'   => 'after',
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 			),
136 136
 		),
137 137
 		'DKK' => array(
138
-			'admin_label' => sprintf( __('Danish Krone (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
138
+			'admin_label' => sprintf(__('Danish Krone (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
139 139
 			'symbol'      => '&nbsp;kr.&nbsp;',
140 140
 			'setting'     => array(
141 141
 				'currency_position'   => 'before',
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			),
146 146
 		),
147 147
 		'HKD' => array(
148
-			'admin_label' => sprintf( __('Hong Kong Dollar (%1$s)', 'give'), '&#36;'),
148
+			'admin_label' => sprintf(__('Hong Kong Dollar (%1$s)', 'give'), '&#36;'),
149 149
 			'symbol'      => '&#36;',
150 150
 			'setting'     => array(
151 151
 				'currency_position'   => 'before',
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 			),
156 156
 		),
157 157
 		'HUF' => array(
158
-			'admin_label' => sprintf( __('Hungarian Forint (%1$s)', 'give'), '&#70;&#116;'),
158
+			'admin_label' => sprintf(__('Hungarian Forint (%1$s)', 'give'), '&#70;&#116;'),
159 159
 			'symbol'      => '&#70;&#116;',
160 160
 			'setting'     => array(
161 161
 				'currency_position'   => 'after',
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 			),
166 166
 		),
167 167
 		'ILS' => array(
168
-			'admin_label' => sprintf( __('Israeli Shekel (%1$s)', 'give'), '&#8362;'),
168
+			'admin_label' => sprintf(__('Israeli Shekel (%1$s)', 'give'), '&#8362;'),
169 169
 			'symbol'      => '&#8362;',
170 170
 			'setting'     => array(
171 171
 				'currency_position'   => 'after',
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			),
176 176
 		),
177 177
 		'JPY' => array(
178
-			'admin_label' => sprintf( __('Japanese Yen (%1$s)', 'give'), '&yen;'),
178
+			'admin_label' => sprintf(__('Japanese Yen (%1$s)', 'give'), '&yen;'),
179 179
 			'symbol'      => '&yen;',
180 180
 			'setting'     => array(
181 181
 				'currency_position'   => 'before',
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 			),
186 186
 		),
187 187
 		'MYR' => array(
188
-			'admin_label' => sprintf( __('Malaysian Ringgits (%1$s)', 'give'), '&#82;&#77;'),
188
+			'admin_label' => sprintf(__('Malaysian Ringgits (%1$s)', 'give'), '&#82;&#77;'),
189 189
 			'symbol'      => '&#82;&#77;',
190 190
 			'setting'     => array(
191 191
 				'currency_position'   => 'before',
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 			),
196 196
 		),
197 197
 		'MXN' => array(
198
-			'admin_label' => sprintf( __('Mexican Peso (%1$s)', 'give'), '&#36;'),
198
+			'admin_label' => sprintf(__('Mexican Peso (%1$s)', 'give'), '&#36;'),
199 199
 			'symbol'      => '&#36;',
200 200
 			'setting'     => array(
201 201
 				'currency_position'   => 'before',
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			),
206 206
 		),
207 207
 		'MAD' => array(
208
-			'admin_label' => sprintf( __('Moroccan Dirham (%1$s)', 'give'), '&#x2e;&#x62f;&#x2e;&#x645;'),
208
+			'admin_label' => sprintf(__('Moroccan Dirham (%1$s)', 'give'), '&#x2e;&#x62f;&#x2e;&#x645;'),
209 209
 			'symbol'      => '&#x2e;&#x62f;&#x2e;&#x645;',
210 210
 			'setting'     => array(
211 211
 				'currency_position'   => 'before',
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			),
216 216
 		),
217 217
 		'NZD' => array(
218
-			'admin_label' => sprintf( __('New Zealand Dollar (%1$s)', 'give'), '&#36;'),
218
+			'admin_label' => sprintf(__('New Zealand Dollar (%1$s)', 'give'), '&#36;'),
219 219
 			'symbol'      => '&#36;',
220 220
 			'setting'     => array(
221 221
 				'currency_position'   => 'before',
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			),
226 226
 		),
227 227
 		'NOK' => array(
228
-			'admin_label' => sprintf( __('Norwegian Krone (%1$s)', 'give'), '&#107;&#114;.'),
228
+			'admin_label' => sprintf(__('Norwegian Krone (%1$s)', 'give'), '&#107;&#114;.'),
229 229
 			'symbol'      => '&#107;&#114;.',
230 230
 			'setting'     => array(
231 231
 				'currency_position'   => 'before',
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			),
236 236
 		),
237 237
 		'PHP' => array(
238
-			'admin_label' => sprintf( __('Philippine Pesos (%1$s)', 'give'), '&#8369;'),
238
+			'admin_label' => sprintf(__('Philippine Pesos (%1$s)', 'give'), '&#8369;'),
239 239
 			'symbol'      => '&#8369;',
240 240
 			'setting'     => array(
241 241
 				'currency_position'   => 'before',
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 			),
246 246
 		),
247 247
 		'PLN' => array(
248
-			'admin_label' => sprintf( __('Polish Zloty (%1$s)', 'give'), '&#122;&#322;'),
248
+			'admin_label' => sprintf(__('Polish Zloty (%1$s)', 'give'), '&#122;&#322;'),
249 249
 			'symbol'      => '&#122;&#322;',
250 250
 			'setting'     => array(
251 251
 				'currency_position'   => 'after',
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 			),
256 256
 		),
257 257
 		'SGD' => array(
258
-			'admin_label' => sprintf( __('Singapore Dollar (%1$s)', 'give'), '&#36;'),
258
+			'admin_label' => sprintf(__('Singapore Dollar (%1$s)', 'give'), '&#36;'),
259 259
 			'symbol'      => '&#36;',
260 260
 			'setting'     => array(
261 261
 				'currency_position'   => 'before',
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 			),
266 266
 		),
267 267
 		'KRW' => array(
268
-			'admin_label' => sprintf( __('South Korean Won (%1$s)', 'give'), '&#8361;'),
268
+			'admin_label' => sprintf(__('South Korean Won (%1$s)', 'give'), '&#8361;'),
269 269
 			'symbol'      => '&#8361;',
270 270
 			'setting'     => array(
271 271
 				'currency_position'   => 'before',
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 			),
276 276
 		),
277 277
 		'ZAR' => array(
278
-			'admin_label' => sprintf( __('South African Rand (%1$s)', 'give'), '&#82;'),
278
+			'admin_label' => sprintf(__('South African Rand (%1$s)', 'give'), '&#82;'),
279 279
 			'symbol'      => '&#82;',
280 280
 			'setting'     => array(
281 281
 				'currency_position'   => 'before',
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 			),
286 286
 		),
287 287
 		'SEK' => array(
288
-			'admin_label' => sprintf( __('Swedish Krona (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
288
+			'admin_label' => sprintf(__('Swedish Krona (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
289 289
 			'symbol'      => '&nbsp;kr.&nbsp;',
290 290
 			'setting'     => array(
291 291
 				'currency_position'   => 'before',
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 			),
296 296
 		),
297 297
 		'CHF' => array(
298
-			'admin_label' => sprintf( __('Swiss Franc (%1$s)', 'give'), '&#70;&#114;'),
298
+			'admin_label' => sprintf(__('Swiss Franc (%1$s)', 'give'), '&#70;&#114;'),
299 299
 			'symbol'      => '&#70;&#114;',
300 300
 			'setting'     => array(
301 301
 				'currency_position'   => 'before',
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 			),
306 306
 		),
307 307
 		'TWD' => array(
308
-			'admin_label' => sprintf( __('Taiwan New Dollars (%1$s)', 'give'), '&#78;&#84;&#36;'),
308
+			'admin_label' => sprintf(__('Taiwan New Dollars (%1$s)', 'give'), '&#78;&#84;&#36;'),
309 309
 			'symbol'      => '&#78;&#84;&#36;',
310 310
 			'setting'     => array(
311 311
 				'currency_position'   => 'before',
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 			),
316 316
 		),
317 317
 		'THB' => array(
318
-			'admin_label' => sprintf( __('Thai Baht (%1$s)', 'give'), '&#3647;'),
318
+			'admin_label' => sprintf(__('Thai Baht (%1$s)', 'give'), '&#3647;'),
319 319
 			'symbol'      => '&#3647;',
320 320
 			'setting'     => array(
321 321
 				'currency_position'   => 'before',
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 			),
326 326
 		),
327 327
 		'INR' => array(
328
-			'admin_label' => sprintf( __('Indian Rupee (%1$s)', 'give'), '&#8377;'),
328
+			'admin_label' => sprintf(__('Indian Rupee (%1$s)', 'give'), '&#8377;'),
329 329
 			'symbol'      => '&#8377;',
330 330
 			'setting'     => array(
331 331
 				'currency_position'   => 'before',
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 			),
336 336
 		),
337 337
 		'TRY' => array(
338
-			'admin_label' => sprintf( __('Turkish Lira (%1$s)', 'give'), '&#8378;'),
338
+			'admin_label' => sprintf(__('Turkish Lira (%1$s)', 'give'), '&#8378;'),
339 339
 			'symbol'      => '&#8378;',
340 340
 			'setting'     => array(
341 341
 				'currency_position'   => 'after',
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			),
346 346
 		),
347 347
 		'IRR' => array(
348
-			'admin_label' => sprintf( __('Iranian Rial (%1$s)', 'give'), '&#xfdfc;'),
348
+			'admin_label' => sprintf(__('Iranian Rial (%1$s)', 'give'), '&#xfdfc;'),
349 349
 			'symbol'      => '&#xfdfc;',
350 350
 			'setting'     => array(
351 351
 				'currency_position'   => 'after',
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 			),
356 356
 		),
357 357
 		'RUB' => array(
358
-			'admin_label' => sprintf( __('Russian Rubles (%1$s)', 'give'), '&#8381;'),
358
+			'admin_label' => sprintf(__('Russian Rubles (%1$s)', 'give'), '&#8381;'),
359 359
 			'symbol'      => '&#8381;',
360 360
 			'setting'     => array(
361 361
 				'currency_position'   => 'before',
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 			),
366 366
 		),
367 367
 		'AED' => array(
368
-			'admin_label' => sprintf( __('United Arab Emirates dirham (%1$s)', 'give'), '&#x62f;.&#x625;'),
368
+			'admin_label' => sprintf(__('United Arab Emirates dirham (%1$s)', 'give'), '&#x62f;.&#x625;'),
369 369
 			'symbol'      => '&#x62f;.&#x625;',
370 370
 			'setting'     => array(
371 371
 				'currency_position'   => 'before',
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 			),
376 376
 		),
377 377
 		'AMD' => array(
378
-			'admin_label' => sprintf( __('Armenian dram (%1$s)', 'give'), 'AMD'),
378
+			'admin_label' => sprintf(__('Armenian dram (%1$s)', 'give'), 'AMD'),
379 379
 			'symbol'      => 'AMD', // Add backward compatibility. Using AMD in place of &#1423;
380 380
 			'setting'     => array(
381 381
 				'currency_position'   => 'before',
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 			),
386 386
 		),
387 387
 		'ANG' => array(
388
-			'admin_label' => sprintf( __('Netherlands Antillean guilder (%1$s)', 'give'), '&#402;'),
388
+			'admin_label' => sprintf(__('Netherlands Antillean guilder (%1$s)', 'give'), '&#402;'),
389 389
 			'symbol'      => '&#402;',
390 390
 			'setting'     => array(
391 391
 				'currency_position'   => 'before',
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 			),
396 396
 		),
397 397
 		'ARS' => array(
398
-			'admin_label' => sprintf( __('Argentine peso (%1$s)', 'give'), '&#36;'),
398
+			'admin_label' => sprintf(__('Argentine peso (%1$s)', 'give'), '&#36;'),
399 399
 			'symbol'      => '&#36;',
400 400
 			'setting'     => array(
401 401
 				'currency_position'   => 'before',
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 			),
406 406
 		),
407 407
 		'AWG' => array(
408
-			'admin_label' => sprintf( __( 'Aruban florin (%1$s)', 'give' ), '&#402;' ),
408
+			'admin_label' => sprintf(__('Aruban florin (%1$s)', 'give'), '&#402;'),
409 409
 			'symbol'      => '&#402;',
410 410
 			'setting'     => array(
411 411
 				'currency_position'   => 'before',
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 			),
416 416
 		),
417 417
 		'BAM' => array(
418
-			'admin_label' => sprintf( __( 'Bosnia and Herzegovina convertible mark (%1$s)', 'give' ), '&#75;&#77;' ),
418
+			'admin_label' => sprintf(__('Bosnia and Herzegovina convertible mark (%1$s)', 'give'), '&#75;&#77;'),
419 419
 			'symbol'      => '&#75;&#77;',
420 420
 			'setting'     => array(
421 421
 				'currency_position'   => 'before',
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 			),
426 426
 		),
427 427
 		'BDT' => array(
428
-			'admin_label' => sprintf( __( 'Bangladeshi taka (%1$s)', 'give' ), '&#2547;' ),
428
+			'admin_label' => sprintf(__('Bangladeshi taka (%1$s)', 'give'), '&#2547;'),
429 429
 			'symbol'      => '&#2547;',
430 430
 			'setting'     => array(
431 431
 				'currency_position'   => 'before',
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 			),
436 436
 		),
437 437
 		'BHD' => array(
438
-			'admin_label' => sprintf( __( 'Bahraini dinar (%1$s)', 'give' ), '.&#x62f;.&#x628;' ),
438
+			'admin_label' => sprintf(__('Bahraini dinar (%1$s)', 'give'), '.&#x62f;.&#x628;'),
439 439
 			'symbol'      => '.&#x62f;.&#x628;',
440 440
 			'setting'     => array(
441 441
 				'currency_position'   => 'before',
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 			),
446 446
 		),
447 447
 		'BMD' => array(
448
-			'admin_label' => sprintf( __( 'Bermudian dollar (%1$s)', 'give' ), '&#66;&#68;&#36;' ),
448
+			'admin_label' => sprintf(__('Bermudian dollar (%1$s)', 'give'), '&#66;&#68;&#36;'),
449 449
 			'symbol'      => '&#66;&#68;&#36;',
450 450
 			'setting'     => array(
451 451
 				'currency_position'   => 'before',
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 			),
456 456
 		),
457 457
 		'BND' => array(
458
-			'admin_label' => sprintf( __( 'Brunei dollar (%1$s)', 'give' ), '&#66;&#36;' ),
458
+			'admin_label' => sprintf(__('Brunei dollar (%1$s)', 'give'), '&#66;&#36;'),
459 459
 			'symbol'      => '&#66;&#36;',
460 460
 			'setting'     => array(
461 461
 				'currency_position'   => 'before',
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 			),
466 466
 		),
467 467
 		'BOB' => array(
468
-			'admin_label' => sprintf( __( 'Bolivian boliviano (%1$s)', 'give' ), '&#66;&#115;&#46;' ),
468
+			'admin_label' => sprintf(__('Bolivian boliviano (%1$s)', 'give'), '&#66;&#115;&#46;'),
469 469
 			'symbol'      => '&#66;&#115;&#46;',
470 470
 			'setting'     => array(
471 471
 				'currency_position'   => 'before',
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 			),
476 476
 		),
477 477
 		'BSD' => array(
478
-			'admin_label' => sprintf( __( 'Bahamian dollar (%1$s)', 'give' ), '&#66;&#36;' ),
478
+			'admin_label' => sprintf(__('Bahamian dollar (%1$s)', 'give'), '&#66;&#36;'),
479 479
 			'symbol'      => '&#66;&#36;',
480 480
 			'setting'     => array(
481 481
 				'currency_position'   => 'before',
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 			),
486 486
 		),
487 487
 		'BWP' => array(
488
-			'admin_label' => sprintf( __( 'Botswana pula (%1$s)', 'give' ), '&#80;' ),
488
+			'admin_label' => sprintf(__('Botswana pula (%1$s)', 'give'), '&#80;'),
489 489
 			'symbol'      => '&#80;',
490 490
 			'setting'     => array(
491 491
 				'currency_position'   => 'before',
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 			),
496 496
 		),
497 497
 		'BZD' => array(
498
-			'admin_label' => sprintf( __( 'Belizean dollar (%1$s)', 'give' ), '&#66;&#90;&#36;' ),
498
+			'admin_label' => sprintf(__('Belizean dollar (%1$s)', 'give'), '&#66;&#90;&#36;'),
499 499
 			'symbol'      => '&#66;&#90;&#36;',
500 500
 			'setting'     => array(
501 501
 				'currency_position'   => 'before',
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 			),
506 506
 		),
507 507
 		'CLP' => array(
508
-			'admin_label' => sprintf( __( 'Chilean peso (%1$s)', 'give' ), '&#36;' ),
508
+			'admin_label' => sprintf(__('Chilean peso (%1$s)', 'give'), '&#36;'),
509 509
 			'symbol'      => '&#36;',
510 510
 			'setting'     => array(
511 511
 				'currency_position'   => 'before',
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 			),
516 516
 		),
517 517
 		'CNY' => array(
518
-			'admin_label' => sprintf( __( 'Chinese yuan (%1$s)', 'give' ), '&yen;' ),
518
+			'admin_label' => sprintf(__('Chinese yuan (%1$s)', 'give'), '&yen;'),
519 519
 			'symbol'      => '&yen;',
520 520
 			'setting'     => array(
521 521
 				'currency_position'   => 'before',
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 			),
526 526
 		),
527 527
 		'COP' => array(
528
-			'admin_label' => sprintf( __( 'Colombian peso (%1$s)', 'give' ), '&#36;' ),
528
+			'admin_label' => sprintf(__('Colombian peso (%1$s)', 'give'), '&#36;'),
529 529
 			'symbol'      => '&#36;',
530 530
 			'setting'     => array(
531 531
 				'currency_position'   => 'before',
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 			),
536 536
 		),
537 537
 		'CRC' => array(
538
-			'admin_label' => sprintf( __( 'Costa Rican colón (%1$s)', 'give' ), '&#8353;' ),
538
+			'admin_label' => sprintf(__('Costa Rican colón (%1$s)', 'give'), '&#8353;'),
539 539
 			'symbol'      => '&#8353;',
540 540
 			'setting'     => array(
541 541
 				'currency_position'   => 'before',
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 			),
546 546
 		),
547 547
 		'CUC' => array(
548
-			'admin_label' => sprintf( __( 'Cuban convertible peso (%1$s)', 'give' ), '&#8369;' ),
548
+			'admin_label' => sprintf(__('Cuban convertible peso (%1$s)', 'give'), '&#8369;'),
549 549
 			'symbol'      => '&#8369;',
550 550
 			'setting'     => array(
551 551
 				'currency_position'   => 'before',
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 			),
556 556
 		),
557 557
 		'CUP' => array(
558
-			'admin_label' => sprintf( __( 'Cuban convertible peso (%1$s)', 'give' ), '&#8369;' ),
558
+			'admin_label' => sprintf(__('Cuban convertible peso (%1$s)', 'give'), '&#8369;'),
559 559
 			'symbol'      => '&#8369;',
560 560
 			'setting'     => array(
561 561
 				'currency_position'   => 'before',
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 			),
566 566
 		),
567 567
 		'DOP' => array(
568
-			'admin_label' => sprintf( __( 'Dominican peso (%1$s)', 'give' ), '&#82;&#68;&#36;' ),
568
+			'admin_label' => sprintf(__('Dominican peso (%1$s)', 'give'), '&#82;&#68;&#36;'),
569 569
 			'symbol'      => '&#82;&#68;&#36;',
570 570
 			'setting'     => array(
571 571
 				'currency_position'   => 'before',
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 			),
576 576
 		),
577 577
 		'EGP' => array(
578
-			'admin_label' => sprintf( __( 'Egyptian pound (%1$s)', 'give' ), '&#69;&pound;' ),
578
+			'admin_label' => sprintf(__('Egyptian pound (%1$s)', 'give'), '&#69;&pound;'),
579 579
 			'symbol'      => '&#69;&pound;',
580 580
 			'setting'     => array(
581 581
 				'currency_position'   => 'before',
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 			),
586 586
 		),
587 587
 		'GIP' => array(
588
-			'admin_label' => sprintf( __( 'Gibraltar pound (%1$s)', 'give' ), '&pound;' ),
588
+			'admin_label' => sprintf(__('Gibraltar pound (%1$s)', 'give'), '&pound;'),
589 589
 			'symbol'      => '&pound;',
590 590
 			'setting'     => array(
591 591
 				'currency_position'   => 'before',
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 			),
596 596
 		),
597 597
 		'GTQ' => array(
598
-			'admin_label' => sprintf( __( 'Guatemalan quetzal (%1$s)', 'give' ), '&#81;' ),
598
+			'admin_label' => sprintf(__('Guatemalan quetzal (%1$s)', 'give'), '&#81;'),
599 599
 			'symbol'      => '&#81;',
600 600
 			'setting'     => array(
601 601
 				'currency_position'   => 'before',
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 			),
606 606
 		),
607 607
 		'HNL' => array(
608
-			'admin_label' => sprintf( __( 'Honduran lempira (%1$s)', 'give' ), '&#76;' ),
608
+			'admin_label' => sprintf(__('Honduran lempira (%1$s)', 'give'), '&#76;'),
609 609
 			'symbol'      => '&#76;',
610 610
 			'setting'     => array(
611 611
 				'currency_position'   => 'before',
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 			),
616 616
 		),
617 617
 		'HRK' => array(
618
-			'admin_label' => sprintf( __( 'Croatian kuna (%1$s)', 'give' ), '&#107;&#110;' ),
618
+			'admin_label' => sprintf(__('Croatian kuna (%1$s)', 'give'), '&#107;&#110;'),
619 619
 			'symbol'      => '&#107;&#110;',
620 620
 			'setting'     => array(
621 621
 				'currency_position'   => 'after',
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
 			),
626 626
 		),
627 627
 		'IDR' => array(
628
-			'admin_label' => sprintf( __( 'Indonesian rupiah (%1$s)', 'give' ), '&#82;&#112;' ),
628
+			'admin_label' => sprintf(__('Indonesian rupiah (%1$s)', 'give'), '&#82;&#112;'),
629 629
 			'symbol'      => '&#82;&#112;',
630 630
 			'setting'     => array(
631 631
 				'currency_position'   => 'before',
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 			),
636 636
 		),
637 637
 		'ISK' => array(
638
-			'admin_label' => sprintf( __( 'Icelandic króna (%1$s)', 'give' ), '&#107;&#114;' ),
638
+			'admin_label' => sprintf(__('Icelandic króna (%1$s)', 'give'), '&#107;&#114;'),
639 639
 			'symbol'      => '&#107;&#114;',
640 640
 			'setting'     => array(
641 641
 				'currency_position'   => 'after',
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 			),
646 646
 		),
647 647
 		'JMD' => array(
648
-			'admin_label' => sprintf( __( 'Jamaican dollar (%1$s)', 'give' ), '&#106;&#36;' ),
648
+			'admin_label' => sprintf(__('Jamaican dollar (%1$s)', 'give'), '&#106;&#36;'),
649 649
 			'symbol'      => '&#106;&#36;',
650 650
 			'setting'     => array(
651 651
 				'currency_position'   => 'before',
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 			),
656 656
 		),
657 657
 		'JOD' => array(
658
-			'admin_label' => sprintf( __( 'Jordanian dinar (%1$s)', 'give' ), '&#x62f;.&#x627;' ),
658
+			'admin_label' => sprintf(__('Jordanian dinar (%1$s)', 'give'), '&#x62f;.&#x627;'),
659 659
 			'symbol'      => '&#x62f;.&#x627;',
660 660
 			'setting'     => array(
661 661
 				'currency_position'   => 'before',
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 			),
666 666
 		),
667 667
 		'KES' => array(
668
-			'admin_label' => sprintf( __( 'Kenyan shilling (%1$s)', 'give' ), '&#75;&#83;&#104;' ),
668
+			'admin_label' => sprintf(__('Kenyan shilling (%1$s)', 'give'), '&#75;&#83;&#104;'),
669 669
 			'symbol'      => '&#75;&#83;&#104;',
670 670
 			'setting'     => array(
671 671
 				'currency_position'   => 'before',
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
 			),
676 676
 		),
677 677
 		'KWD' => array(
678
-			'admin_label' => sprintf( __( 'Kuwaiti dinar (%1$s)', 'give' ), '&#x62f;.&#x643;' ),
678
+			'admin_label' => sprintf(__('Kuwaiti dinar (%1$s)', 'give'), '&#x62f;.&#x643;'),
679 679
 			'symbol'      => '&#x62f;.&#x643;',
680 680
 			'setting'     => array(
681 681
 				'currency_position'   => 'before',
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 			),
686 686
 		),
687 687
 		'KYD' => array(
688
-			'admin_label' => sprintf( __( 'Cayman Islands dollar (%1$s)', 'give' ), '&#75;&#89;&#36;' ),
688
+			'admin_label' => sprintf(__('Cayman Islands dollar (%1$s)', 'give'), '&#75;&#89;&#36;'),
689 689
 			'symbol'      => '&#75;&#89;&#36;',
690 690
 			'setting'     => array(
691 691
 				'currency_position'   => 'before',
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 			),
696 696
 		),
697 697
 		'MKD' => array(
698
-			'admin_label' => sprintf( __( 'Macedonian denar (%1$s)', 'give' ), '&#x434;&#x435;&#x43d;' ),
698
+			'admin_label' => sprintf(__('Macedonian denar (%1$s)', 'give'), '&#x434;&#x435;&#x43d;'),
699 699
 			'symbol'      => '&#x434;&#x435;&#x43d;',
700 700
 			'setting'     => array(
701 701
 				'currency_position'   => 'before',
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
 			),
706 706
 		),
707 707
 		'NPR' => array(
708
-			'admin_label' => sprintf( __( 'Nepalese rupee (%1$s)', 'give' ), '&#8360;' ),
708
+			'admin_label' => sprintf(__('Nepalese rupee (%1$s)', 'give'), '&#8360;'),
709 709
 			'symbol'      => '&#8360;',
710 710
 			'setting'     => array(
711 711
 				'currency_position'   => 'before',
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
 			),
716 716
 		),
717 717
 		'OMR' => array(
718
-			'admin_label' => sprintf( __( 'Omani rial (%1$s)', 'give' ), '&#x631;.&#x639;&#46;' ),
718
+			'admin_label' => sprintf(__('Omani rial (%1$s)', 'give'), '&#x631;.&#x639;&#46;'),
719 719
 			'symbol'      => '&#x631;.&#x639;&#46;',
720 720
 			'setting'     => array(
721 721
 				'currency_position'   => 'before',
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
 			),
726 726
 		),
727 727
 		'PEN' => array(
728
-			'admin_label' => sprintf( __( 'Peruvian nuevo sol (%1$s)', 'give' ), 'S/.' ),
728
+			'admin_label' => sprintf(__('Peruvian nuevo sol (%1$s)', 'give'), 'S/.'),
729 729
 			'symbol'      => 'S/.',
730 730
 			'setting'     => array(
731 731
 				'currency_position'   => 'before',
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 			),
736 736
 		),
737 737
 		'PKR' => array(
738
-			'admin_label' => sprintf( __( 'Pakistani rupee (%1$s)', 'give' ), '&#8360;' ),
738
+			'admin_label' => sprintf(__('Pakistani rupee (%1$s)', 'give'), '&#8360;'),
739 739
 			'symbol'      => '&#8360;',
740 740
 			'setting'     => array(
741 741
 				'currency_position'   => 'before',
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 			),
746 746
 		),
747 747
 		'RON' => array(
748
-			'admin_label' => sprintf( __( 'Romanian leu (%1$s)', 'give' ), '&#76;' ),
748
+			'admin_label' => sprintf(__('Romanian leu (%1$s)', 'give'), '&#76;'),
749 749
 			'symbol'      => '&#76;',
750 750
 			'setting'     => array(
751 751
 				'currency_position'   => 'after',
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 			),
756 756
 		),
757 757
 		'SAR' => array(
758
-			'admin_label' => sprintf( __( 'Saudi riyal (%1$s)', 'give' ), '&#x631;.&#x633;' ),
758
+			'admin_label' => sprintf(__('Saudi riyal (%1$s)', 'give'), '&#x631;.&#x633;'),
759 759
 			'symbol'      => '&#x631;.&#x633;',
760 760
 			'setting'     => array(
761 761
 				'currency_position'   => 'before',
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 			),
766 766
 		),
767 767
 		'SZL' => array(
768
-			'admin_label' => sprintf( __( 'Swazi lilangeni (%1$s)', 'give' ), '&#76;'),
768
+			'admin_label' => sprintf(__('Swazi lilangeni (%1$s)', 'give'), '&#76;'),
769 769
 			'symbol'      => '&#76;',
770 770
 			'setting'     => array(
771 771
 				'currency_position'   => 'before',
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 			),
776 776
 		),
777 777
 		'TOP' => array(
778
-			'admin_label' => sprintf( __( 'Tongan paʻanga (%1$s)', 'give' ), '&#84;&#36;'),
778
+			'admin_label' => sprintf(__('Tongan paʻanga (%1$s)', 'give'), '&#84;&#36;'),
779 779
 			'symbol'      => '&#84;&#36;',
780 780
 			'setting'     => array(
781 781
 				'currency_position'   => 'before',
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 			),
786 786
 		),
787 787
 		'TZS' => array(
788
-			'admin_label' => sprintf( __( 'Tanzanian shilling (%1$s)', 'give' ), '&#84;&#83;&#104;'),
788
+			'admin_label' => sprintf(__('Tanzanian shilling (%1$s)', 'give'), '&#84;&#83;&#104;'),
789 789
 			'symbol'      => '&#84;&#83;&#104;',
790 790
 			'setting'     => array(
791 791
 				'currency_position'   => 'before',
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 			),
796 796
 		),
797 797
 		'UAH' => array(
798
-			'admin_label' => sprintf( __( 'Ukrainian hryvnia (%1$s)', 'give' ), '&#8372;'),
798
+			'admin_label' => sprintf(__('Ukrainian hryvnia (%1$s)', 'give'), '&#8372;'),
799 799
 			'symbol'      => '&#8372;',
800 800
 			'setting'     => array(
801 801
 				'currency_position'   => 'before',
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 			),
806 806
 		),
807 807
 		'UYU' => array(
808
-			'admin_label' => sprintf( __( 'Uruguayan peso (%1$s)', 'give' ), '&#36;&#85;'),
808
+			'admin_label' => sprintf(__('Uruguayan peso (%1$s)', 'give'), '&#36;&#85;'),
809 809
 			'symbol'      => '&#36;&#85;',
810 810
 			'setting'     => array(
811 811
 				'currency_position'   => 'before',
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
 			),
816 816
 		),
817 817
 		'VEF' => array(
818
-			'admin_label' => sprintf( __( 'Venezuelan bolívar (%1$s)', 'give' ), '&#66;&#115;'),
818
+			'admin_label' => sprintf(__('Venezuelan bolívar (%1$s)', 'give'), '&#66;&#115;'),
819 819
 			'symbol'      => '&#66;&#115;',
820 820
 			'setting'     => array(
821 821
 				'currency_position'   => 'before',
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
 			),
826 826
 		),
827 827
 		'XCD' => array(
828
-			'admin_label' => sprintf( __( 'East Caribbean dollar (%1$s)', 'give' ), '&#69;&#67;&#36;'),
828
+			'admin_label' => sprintf(__('East Caribbean dollar (%1$s)', 'give'), '&#69;&#67;&#36;'),
829 829
 			'symbol'      => '&#69;&#67;&#36;',
830 830
 			'setting'     => array(
831 831
 				'currency_position'   => 'before',
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
 			),
836 836
 		),
837 837
 		'AFN' => array(
838
-			'admin_label' => sprintf( __('Afghan afghani (%1$s)', 'give'), '&#x60b;'),
838
+			'admin_label' => sprintf(__('Afghan afghani (%1$s)', 'give'), '&#x60b;'),
839 839
 			'symbol'      => '&#x60b;',
840 840
 			'setting'     => array(
841 841
 				'currency_position'   => 'before',
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
 			),
846 846
 		),
847 847
 		'ALL' => array(
848
-			'admin_label' => sprintf( __('Albanian lek (%1$s)', 'give'), 'L'),
848
+			'admin_label' => sprintf(__('Albanian lek (%1$s)', 'give'), 'L'),
849 849
 			'symbol'      => 'L',
850 850
 			'setting'     => array(
851 851
 				'currency_position'   => 'after',
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 			),
856 856
 		),
857 857
 		'AOA' => array(
858
-			'admin_label' => sprintf( __('Angolan kwanza (%1$s)', 'give'), 'Kz'),
858
+			'admin_label' => sprintf(__('Angolan kwanza (%1$s)', 'give'), 'Kz'),
859 859
 			'symbol'      => 'Kz',
860 860
 			'setting'     => array(
861 861
 				'currency_position'   => 'before',
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 			),
866 866
 		),
867 867
 		'AZN' => array(
868
-			'admin_label' => sprintf( __('Azerbaijani manat (%1$s)', 'give'), 'AZN'),
868
+			'admin_label' => sprintf(__('Azerbaijani manat (%1$s)', 'give'), 'AZN'),
869 869
 			'symbol'      => 'AZN',
870 870
 			'setting'     => array(
871 871
 				'currency_position'   => 'after',
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 			),
876 876
 		),
877 877
 		'BBD' => array(
878
-			'admin_label' => sprintf( __('Barbadian dollar (%1$s)', 'give'), '&#36;'),
878
+			'admin_label' => sprintf(__('Barbadian dollar (%1$s)', 'give'), '&#36;'),
879 879
 			'symbol'      => '&#36;',
880 880
 			'setting'     => array(
881 881
 				'currency_position'   => 'before',
@@ -885,7 +885,7 @@  discard block
 block discarded – undo
885 885
 			),
886 886
 		),
887 887
 		'BGN' => array(
888
-			'admin_label' => sprintf( __('Bulgarian lev (%1$s)', 'give'), '&#1083;&#1074;.'),
888
+			'admin_label' => sprintf(__('Bulgarian lev (%1$s)', 'give'), '&#1083;&#1074;.'),
889 889
 			'symbol'      => '&#1083;&#1074;.',
890 890
 			'setting'     => array(
891 891
 				'currency_position'   => 'after',
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
 			),
896 896
 		),
897 897
 		'BIF' => array(
898
-			'admin_label' => sprintf( __('Burundian franc (%1$s)', 'give'), 'Fr'),
898
+			'admin_label' => sprintf(__('Burundian franc (%1$s)', 'give'), 'Fr'),
899 899
 			'symbol'      => 'Fr',
900 900
 			'setting'     => array(
901 901
 				'currency_position'   => 'after',
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
 			),
906 906
 		),
907 907
 		'BTC' => array(
908
-			'admin_label' => sprintf( __('Bitcoin (%1$s)', 'give'), '&#3647;'),
908
+			'admin_label' => sprintf(__('Bitcoin (%1$s)', 'give'), '&#3647;'),
909 909
 			'symbol'      => '&#3647;',
910 910
 			'setting'     => array(
911 911
 				'currency_position'   => 'after',
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
 			),
916 916
 		),
917 917
 		'BTN' => array(
918
-			'admin_label' => sprintf( __('Bhutanese ngultrum (%1$s)', 'give'), 'Nu.'),
918
+			'admin_label' => sprintf(__('Bhutanese ngultrum (%1$s)', 'give'), 'Nu.'),
919 919
 			'symbol'      => 'Nu.',
920 920
 			'setting'     => array(
921 921
 				'currency_position'   => 'before',
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
 			),
926 926
 		),
927 927
 		'BYR' => array(
928
-			'admin_label' => sprintf( __('Belarusian ruble (old) (%1$s)', 'give'), 'Br'),
928
+			'admin_label' => sprintf(__('Belarusian ruble (old) (%1$s)', 'give'), 'Br'),
929 929
 			'symbol'      => 'Br',
930 930
 			'setting'     => array(
931 931
 				'currency_position'   => 'after',
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
 			),
936 936
 		),
937 937
 		'BYN' => array(
938
-			'admin_label' => sprintf( __('Belarusian ruble (%1$s)', 'give'), 'Br'),
938
+			'admin_label' => sprintf(__('Belarusian ruble (%1$s)', 'give'), 'Br'),
939 939
 			'symbol'      => 'Br',
940 940
 			'setting'     => array(
941 941
 				'currency_position'   => 'after',
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
 			),
946 946
 		),
947 947
 		'CDF' => array(
948
-			'admin_label' => sprintf( __('Congolese franc (%1$s)', 'give'), 'Fr'),
948
+			'admin_label' => sprintf(__('Congolese franc (%1$s)', 'give'), 'Fr'),
949 949
 			'symbol'      => 'Fr',
950 950
 			'setting'     => array(
951 951
 				'currency_position'   => 'after',
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
 			),
956 956
 		),
957 957
 		'CVE' => array(
958
-			'admin_label' => sprintf( __('Cape Verdean escudo (%1$s)', 'give'), '&#36;'),
958
+			'admin_label' => sprintf(__('Cape Verdean escudo (%1$s)', 'give'), '&#36;'),
959 959
 			'symbol'      => '&#36;',
960 960
 			'setting'     => array(
961 961
 				'currency_position'   => 'before',
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
 			),
966 966
 		),
967 967
 		'DJF' => array(
968
-			'admin_label' => sprintf( __('Djiboutian franc (%1$s)', 'give'), 'Fr'),
968
+			'admin_label' => sprintf(__('Djiboutian franc (%1$s)', 'give'), 'Fr'),
969 969
 			'symbol'      => 'Fr',
970 970
 			'setting'     => array(
971 971
 				'currency_position'   => 'after',
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
 			),
976 976
 		),
977 977
 		'DZD' => array(
978
-			'admin_label' => sprintf( __('Algerian dinar (%1$s)', 'give'), '&#x62f;.&#x62c;'),
978
+			'admin_label' => sprintf(__('Algerian dinar (%1$s)', 'give'), '&#x62f;.&#x62c;'),
979 979
 			'symbol'      => '&#x62f;.&#x62c;',
980 980
 			'setting'     => array(
981 981
 				'currency_position'   => 'before',
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
 			),
986 986
 		),
987 987
 		'ERN' => array(
988
-			'admin_label' => sprintf( __('Eritrean nakfa (%1$s)', 'give'), 'Nfk'),
988
+			'admin_label' => sprintf(__('Eritrean nakfa (%1$s)', 'give'), 'Nfk'),
989 989
 			'symbol'      => 'Nfk',
990 990
 			'setting'     => array(
991 991
 				'currency_position'   => 'after',
@@ -995,7 +995,7 @@  discard block
 block discarded – undo
995 995
 			),
996 996
 		),
997 997
 		'ETB' => array(
998
-			'admin_label' => sprintf( __('Ethiopian birr (%1$s)', 'give'), 'Br'),
998
+			'admin_label' => sprintf(__('Ethiopian birr (%1$s)', 'give'), 'Br'),
999 999
 			'symbol'      => 'Br',
1000 1000
 			'setting'     => array(
1001 1001
 				'currency_position'   => 'before',
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
 			),
1006 1006
 		),
1007 1007
 		'FJD' => array(
1008
-			'admin_label' => sprintf( __('Fijian dollar (%1$s)', 'give'), '&#36;'),
1008
+			'admin_label' => sprintf(__('Fijian dollar (%1$s)', 'give'), '&#36;'),
1009 1009
 			'symbol'      => '&#36;',
1010 1010
 			'setting'     => array(
1011 1011
 				'currency_position'   => 'before',
@@ -1015,7 +1015,7 @@  discard block
 block discarded – undo
1015 1015
 			),
1016 1016
 		),
1017 1017
 		'FKP' => array(
1018
-			'admin_label' => sprintf( __('Falkland Islands pound (%1$s)', 'give'), '&pound;'),
1018
+			'admin_label' => sprintf(__('Falkland Islands pound (%1$s)', 'give'), '&pound;'),
1019 1019
 			'symbol'      => '&pound;',
1020 1020
 			'setting'     => array(
1021 1021
 				'currency_position'   => 'before',
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
 			),
1026 1026
 		),
1027 1027
 		'GEL' => array(
1028
-			'admin_label' => sprintf( __('Georgian lari (%1$s)', 'give'), '&#x20be;'),
1028
+			'admin_label' => sprintf(__('Georgian lari (%1$s)', 'give'), '&#x20be;'),
1029 1029
 			'symbol'      => '&#x20be;',
1030 1030
 			'setting'     => array(
1031 1031
 				'currency_position'   => 'after',
@@ -1035,7 +1035,7 @@  discard block
 block discarded – undo
1035 1035
 			),
1036 1036
 		),
1037 1037
 		'GGP' => array(
1038
-			'admin_label' => sprintf( __('Guernsey pound (%1$s)', 'give'), '&pound;'),
1038
+			'admin_label' => sprintf(__('Guernsey pound (%1$s)', 'give'), '&pound;'),
1039 1039
 			'symbol'      => '&pound;',
1040 1040
 			'setting'     => array(
1041 1041
 				'currency_position'   => 'before',
@@ -1045,7 +1045,7 @@  discard block
 block discarded – undo
1045 1045
 			),
1046 1046
 		),
1047 1047
 		'GHS' => array(
1048
-			'admin_label' => sprintf( __('Ghana cedi (%1$s)', 'give'), '&#x20b5;'),
1048
+			'admin_label' => sprintf(__('Ghana cedi (%1$s)', 'give'), '&#x20b5;'),
1049 1049
 			'symbol'      => '&#x20b5;',
1050 1050
 			'setting'     => array(
1051 1051
 				'currency_position'   => 'before',
@@ -1055,7 +1055,7 @@  discard block
 block discarded – undo
1055 1055
 			),
1056 1056
 		),
1057 1057
 		'GMD' => array(
1058
-			'admin_label' => sprintf( __('Gambian dalasi (%1$s)', 'give'), 'D'),
1058
+			'admin_label' => sprintf(__('Gambian dalasi (%1$s)', 'give'), 'D'),
1059 1059
 			'symbol'      => 'D',
1060 1060
 			'setting'     => array(
1061 1061
 				'currency_position'   => 'after',
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
 			),
1066 1066
 		),
1067 1067
 		'GNF' => array(
1068
-			'admin_label' => sprintf( __('Guinean franc (%1$s)', 'give'), 'Fr'),
1068
+			'admin_label' => sprintf(__('Guinean franc (%1$s)', 'give'), 'Fr'),
1069 1069
 			'symbol'      => 'Fr',
1070 1070
 			'setting'     => array(
1071 1071
 				'currency_position'   => 'after',
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 			),
1076 1076
 		),
1077 1077
 		'GYD' => array(
1078
-			'admin_label' => sprintf( __('Guyanese dollar (%1$s)', 'give'), '&#36;'),
1078
+			'admin_label' => sprintf(__('Guyanese dollar (%1$s)', 'give'), '&#36;'),
1079 1079
 			'symbol'      => '&#36;',
1080 1080
 			'setting'     => array(
1081 1081
 				'currency_position'   => 'before',
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
 			),
1086 1086
 		),
1087 1087
 		'HTG' => array(
1088
-			'admin_label' => sprintf( __('Haitian gourde (%1$s)', 'give'), 'G'),
1088
+			'admin_label' => sprintf(__('Haitian gourde (%1$s)', 'give'), 'G'),
1089 1089
 			'symbol'      => 'G',
1090 1090
 			'setting'     => array(
1091 1091
 				'currency_position'   => 'before',
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
 			),
1096 1096
 		),
1097 1097
 		'IMP' => array(
1098
-			'admin_label' => sprintf( __('Manx pound (%1$s)', 'give'), '&pound;'),
1098
+			'admin_label' => sprintf(__('Manx pound (%1$s)', 'give'), '&pound;'),
1099 1099
 			'symbol'      => '&pound;',
1100 1100
 			'setting'     => array(
1101 1101
 				'currency_position'   => 'before',
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
 			),
1106 1106
 		),
1107 1107
 		'IQD' => array(
1108
-			'admin_label' => sprintf( __('Iraqi dinar (%1$s)', 'give'), '&#x639;.&#x62f;'),
1108
+			'admin_label' => sprintf(__('Iraqi dinar (%1$s)', 'give'), '&#x639;.&#x62f;'),
1109 1109
 			'symbol'      => '&#x639;.&#x62f;',
1110 1110
 			'setting'     => array(
1111 1111
 				'currency_position'   => 'before',
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
 			),
1116 1116
 		),
1117 1117
 		'IRT' => array(
1118
-			'admin_label' => sprintf( __('Iranian toman (%1$s)', 'give'), '&#x062A;&#x0648;&#x0645;&#x0627;&#x0646;'),
1118
+			'admin_label' => sprintf(__('Iranian toman (%1$s)', 'give'), '&#x062A;&#x0648;&#x0645;&#x0627;&#x0646;'),
1119 1119
 			'symbol'      => '&#x062A;&#x0648;&#x0645;&#x0627;&#x0646;',
1120 1120
 			'setting'     => array(
1121 1121
 				'currency_position'   => 'after',
@@ -1125,7 +1125,7 @@  discard block
 block discarded – undo
1125 1125
 			),
1126 1126
 		),
1127 1127
 		'JEP' => array(
1128
-			'admin_label' => sprintf( __('Jersey pound (%1$s)', 'give'), '&pound;'),
1128
+			'admin_label' => sprintf(__('Jersey pound (%1$s)', 'give'), '&pound;'),
1129 1129
 			'symbol'      => '&pound;',
1130 1130
 			'setting'     => array(
1131 1131
 				'currency_position'   => 'before',
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
 			),
1136 1136
 		),
1137 1137
 		'KGS' => array(
1138
-			'admin_label' => sprintf( __('Kyrgyzstani som (%1$s)', 'give'), '&#x441;&#x43e;&#x43c;'),
1138
+			'admin_label' => sprintf(__('Kyrgyzstani som (%1$s)', 'give'), '&#x441;&#x43e;&#x43c;'),
1139 1139
 			'symbol'      => '&#x441;&#x43e;&#x43c;',
1140 1140
 			'setting'     => array(
1141 1141
 				'currency_position'   => 'after',
@@ -1145,7 +1145,7 @@  discard block
 block discarded – undo
1145 1145
 			),
1146 1146
 		),
1147 1147
 		'KHR' => array(
1148
-			'admin_label' => sprintf( __('Cambodian riel (%1$s)', 'give'), '&#x17db;'),
1148
+			'admin_label' => sprintf(__('Cambodian riel (%1$s)', 'give'), '&#x17db;'),
1149 1149
 			'symbol'      => '&#x17db;',
1150 1150
 			'setting'     => array(
1151 1151
 				'currency_position'   => 'after',
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
 			),
1156 1156
 		),
1157 1157
 		'KMF' => array(
1158
-			'admin_label' => sprintf( __('Comorian franc (%1$s)', 'give'), 'Fr'),
1158
+			'admin_label' => sprintf(__('Comorian franc (%1$s)', 'give'), 'Fr'),
1159 1159
 			'symbol'      => 'Fr',
1160 1160
 			'setting'     => array(
1161 1161
 				'currency_position'   => 'after',
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 			),
1166 1166
 		),
1167 1167
 		'KPW' => array(
1168
-			'admin_label' => sprintf( __('North Korean won (%1$s)', 'give'), '&#x20a9;'),
1168
+			'admin_label' => sprintf(__('North Korean won (%1$s)', 'give'), '&#x20a9;'),
1169 1169
 			'symbol'      => '&#x20a9;',
1170 1170
 			'setting'     => array(
1171 1171
 				'currency_position'   => 'before',
@@ -1175,7 +1175,7 @@  discard block
 block discarded – undo
1175 1175
 			),
1176 1176
 		),
1177 1177
 		'KZT' => array(
1178
-			'admin_label' => sprintf( __('Kazakhstani tenge (%1$s)', 'give'), 'KZT'),
1178
+			'admin_label' => sprintf(__('Kazakhstani tenge (%1$s)', 'give'), 'KZT'),
1179 1179
 			'symbol'      => 'KZT',
1180 1180
 			'setting'     => array(
1181 1181
 				'currency_position'   => 'before',
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
 			),
1186 1186
 		),
1187 1187
 		'LAK' => array(
1188
-			'admin_label' => sprintf( __('Lao kip (%1$s)', 'give'), '&#8365;'),
1188
+			'admin_label' => sprintf(__('Lao kip (%1$s)', 'give'), '&#8365;'),
1189 1189
 			'symbol'      => '&#8365;',
1190 1190
 			'setting'     => array(
1191 1191
 				'currency_position'   => 'after',
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
 			),
1196 1196
 		),
1197 1197
 		'LBP' => array(
1198
-			'admin_label' => sprintf( __('Lebanese pound (%1$s)', 'give'), '&#x644;.&#x644;'),
1198
+			'admin_label' => sprintf(__('Lebanese pound (%1$s)', 'give'), '&#x644;.&#x644;'),
1199 1199
 			'symbol'      => '&#x644;.&#x644;',
1200 1200
 			'setting'     => array(
1201 1201
 				'currency_position'   => 'before',
@@ -1205,7 +1205,7 @@  discard block
 block discarded – undo
1205 1205
 			),
1206 1206
 		),
1207 1207
 		'LKR' => array(
1208
-			'admin_label' => sprintf( __('Sri Lankan rupee (%1$s)', 'give'), '&#xdbb;&#xdd4;'),
1208
+			'admin_label' => sprintf(__('Sri Lankan rupee (%1$s)', 'give'), '&#xdbb;&#xdd4;'),
1209 1209
 			'symbol'      => '&#xdbb;&#xdd4;',
1210 1210
 			'setting'     => array(
1211 1211
 				'currency_position'   => 'before',
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
 			),
1216 1216
 		),
1217 1217
 		'LRD' => array(
1218
-			'admin_label' => sprintf( __('Liberian dollar (%1$s)', 'give'), '&#36;'),
1218
+			'admin_label' => sprintf(__('Liberian dollar (%1$s)', 'give'), '&#36;'),
1219 1219
 			'symbol'      => '&#36;',
1220 1220
 			'setting'     => array(
1221 1221
 				'currency_position'   => 'before',
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
 			),
1226 1226
 		),
1227 1227
 		'LSL' => array(
1228
-			'admin_label' => sprintf( __('Lesotho loti (%1$s)', 'give'), 'L'),
1228
+			'admin_label' => sprintf(__('Lesotho loti (%1$s)', 'give'), 'L'),
1229 1229
 			'symbol'      => 'L',
1230 1230
 			'setting'     => array(
1231 1231
 				'currency_position'   => 'after',
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
 			),
1236 1236
 		),
1237 1237
 		'LYD' => array(
1238
-			'admin_label' => sprintf( __('Libyan dinar (%1$s)', 'give'), '&#x644;.&#x62f;'),
1238
+			'admin_label' => sprintf(__('Libyan dinar (%1$s)', 'give'), '&#x644;.&#x62f;'),
1239 1239
 			'symbol'      => '&#x644;.&#x62f;',
1240 1240
 			'setting'     => array(
1241 1241
 				'currency_position'   => 'before',
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
 			),
1246 1246
 		),
1247 1247
 		'MDL' => array(
1248
-			'admin_label' => sprintf( __('Moldovan leu (%1$s)', 'give'), 'MDL'),
1248
+			'admin_label' => sprintf(__('Moldovan leu (%1$s)', 'give'), 'MDL'),
1249 1249
 			'symbol'      => 'MDL',
1250 1250
 			'setting'     => array(
1251 1251
 				'currency_position'   => 'after',
@@ -1255,7 +1255,7 @@  discard block
 block discarded – undo
1255 1255
 			),
1256 1256
 		),
1257 1257
 		'MGA' => array(
1258
-			'admin_label' => sprintf( __('Malagasy ariary (%1$s)', 'give'), 'Ar'),
1258
+			'admin_label' => sprintf(__('Malagasy ariary (%1$s)', 'give'), 'Ar'),
1259 1259
 			'symbol'      => 'Ar',
1260 1260
 			'setting'     => array(
1261 1261
 				'currency_position'   => 'before',
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
 			),
1266 1266
 		),
1267 1267
 		'MMK' => array(
1268
-			'admin_label' => sprintf( __('Burmese kyat (%1$s)', 'give'), 'Ks'),
1268
+			'admin_label' => sprintf(__('Burmese kyat (%1$s)', 'give'), 'Ks'),
1269 1269
 			'symbol'      => 'Ks',
1270 1270
 			'setting'     => array(
1271 1271
 				'currency_position'   => 'before',
@@ -1275,7 +1275,7 @@  discard block
 block discarded – undo
1275 1275
 			),
1276 1276
 		),
1277 1277
 		'MNT' => array(
1278
-			'admin_label' => sprintf( __('Mongolian tögrög (%1$s)', 'give'), '&#x20ae;'),
1278
+			'admin_label' => sprintf(__('Mongolian tögrög (%1$s)', 'give'), '&#x20ae;'),
1279 1279
 			'symbol'      => '&#x20ae;',
1280 1280
 			'setting'     => array(
1281 1281
 				'currency_position'   => 'before',
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
 			),
1286 1286
 		),
1287 1287
 		'MOP' => array(
1288
-			'admin_label' => sprintf( __('Macanese pataca (%1$s)', 'give'), 'P'),
1288
+			'admin_label' => sprintf(__('Macanese pataca (%1$s)', 'give'), 'P'),
1289 1289
 			'symbol'      => 'P',
1290 1290
 			'setting'     => array(
1291 1291
 				'currency_position'   => 'before',
@@ -1295,7 +1295,7 @@  discard block
 block discarded – undo
1295 1295
 			),
1296 1296
 		),
1297 1297
 		'MRO' => array(
1298
-			'admin_label' => sprintf( __('Mauritanian ouguiya (%1$s)', 'give'), 'UM'),
1298
+			'admin_label' => sprintf(__('Mauritanian ouguiya (%1$s)', 'give'), 'UM'),
1299 1299
 			'symbol'      => 'UM',
1300 1300
 			'setting'     => array(
1301 1301
 				'currency_position'   => 'after',
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
 			),
1306 1306
 		),
1307 1307
 		'MUR' => array(
1308
-			'admin_label' => sprintf( __('Mauritian rupee (%1$s)', 'give'), '&#x20a8;'),
1308
+			'admin_label' => sprintf(__('Mauritian rupee (%1$s)', 'give'), '&#x20a8;'),
1309 1309
 			'symbol'      => '&#x20a8;',
1310 1310
 			'setting'     => array(
1311 1311
 				'currency_position'   => 'before',
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
 			),
1316 1316
 		),
1317 1317
 		'MVR' => array(
1318
-			'admin_label' => sprintf( __('Maldivian rufiyaa (%1$s)', 'give'), '.&#x783;'),
1318
+			'admin_label' => sprintf(__('Maldivian rufiyaa (%1$s)', 'give'), '.&#x783;'),
1319 1319
 			'symbol'      => '.&#x783;',
1320 1320
 			'setting'     => array(
1321 1321
 				'currency_position'   => 'after',
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
 			),
1326 1326
 		),
1327 1327
 		'MWK' => array(
1328
-			'admin_label' => sprintf( __('Malawian kwacha (%1$s)', 'give'), 'MK'),
1328
+			'admin_label' => sprintf(__('Malawian kwacha (%1$s)', 'give'), 'MK'),
1329 1329
 			'symbol'      => 'MK',
1330 1330
 			'setting'     => array(
1331 1331
 				'currency_position'   => 'before',
@@ -1335,7 +1335,7 @@  discard block
 block discarded – undo
1335 1335
 			),
1336 1336
 		),
1337 1337
 		'MZN' => array(
1338
-			'admin_label' => sprintf( __('Mozambican metical (%1$s)', 'give'), 'MT'),
1338
+			'admin_label' => sprintf(__('Mozambican metical (%1$s)', 'give'), 'MT'),
1339 1339
 			'symbol'      => 'MT',
1340 1340
 			'setting'     => array(
1341 1341
 				'currency_position'   => 'before',
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
 			),
1346 1346
 		),
1347 1347
 		'NAD' => array(
1348
-			'admin_label' => sprintf( __('Namibian dollar (%1$s)', 'give'), '&#36;'),
1348
+			'admin_label' => sprintf(__('Namibian dollar (%1$s)', 'give'), '&#36;'),
1349 1349
 			'symbol'      => '&#36;',
1350 1350
 			'setting'     => array(
1351 1351
 				'currency_position'   => 'before',
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
 			),
1356 1356
 		),
1357 1357
 		'NGN' => array(
1358
-			'admin_label' => sprintf( __('Nigerian naira (%1$s)', 'give'), '&#8358;'),
1358
+			'admin_label' => sprintf(__('Nigerian naira (%1$s)', 'give'), '&#8358;'),
1359 1359
 			'symbol'      => '&#8358;',
1360 1360
 			'setting'     => array(
1361 1361
 				'currency_position'   => 'before',
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
 			),
1366 1366
 		),
1367 1367
 		'NIO' => array(
1368
-			'admin_label' => sprintf( __('Nicaraguan córdoba (%1$s)', 'give'), 'C&#36;'),
1368
+			'admin_label' => sprintf(__('Nicaraguan córdoba (%1$s)', 'give'), 'C&#36;'),
1369 1369
 			'symbol'      => 'C&#36;',
1370 1370
 			'setting'     => array(
1371 1371
 				'currency_position'   => 'before',
@@ -1375,7 +1375,7 @@  discard block
 block discarded – undo
1375 1375
 			),
1376 1376
 		),
1377 1377
 		'PAB' => array(
1378
-			'admin_label' => sprintf( __('Panamanian balboa (%1$s)', 'give'), 'B/.'),
1378
+			'admin_label' => sprintf(__('Panamanian balboa (%1$s)', 'give'), 'B/.'),
1379 1379
 			'symbol'      => 'B/.',
1380 1380
 			'setting'     => array(
1381 1381
 				'currency_position'   => 'before',
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
 			),
1386 1386
 		),
1387 1387
 		'PGK' => array(
1388
-			'admin_label' => sprintf( __('Papua New Guinean kina (%1$s)', 'give'), 'K'),
1388
+			'admin_label' => sprintf(__('Papua New Guinean kina (%1$s)', 'give'), 'K'),
1389 1389
 			'symbol'      => 'K',
1390 1390
 			'setting'     => array(
1391 1391
 				'currency_position'   => 'before',
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
 			),
1396 1396
 		),
1397 1397
 		'PRB' => array(
1398
-			'admin_label' => sprintf( __('Transnistrian ruble (%1$s)', 'give'), '&#x440;.'),
1398
+			'admin_label' => sprintf(__('Transnistrian ruble (%1$s)', 'give'), '&#x440;.'),
1399 1399
 			'symbol'      => '&#x440;.',
1400 1400
 			'setting'     => array(
1401 1401
 				'currency_position'   => 'before',
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
 			),
1406 1406
 		),
1407 1407
 		'PYG' => array(
1408
-			'admin_label' => sprintf( __('Paraguayan guaraní (%1$s)', 'give'), '&#8370;'),
1408
+			'admin_label' => sprintf(__('Paraguayan guaraní (%1$s)', 'give'), '&#8370;'),
1409 1409
 			'symbol'      => '&#8370;',
1410 1410
 			'setting'     => array(
1411 1411
 				'currency_position'   => 'before',
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
 			),
1416 1416
 		),
1417 1417
 		'QAR' => array(
1418
-			'admin_label' => sprintf( __('Qatari riyal (%1$s)', 'give'), '&#x631;.&#x642;'),
1418
+			'admin_label' => sprintf(__('Qatari riyal (%1$s)', 'give'), '&#x631;.&#x642;'),
1419 1419
 			'symbol'      => '&#x631;.&#x642;',
1420 1420
 			'setting'     => array(
1421 1421
 				'currency_position'   => 'before',
@@ -1425,7 +1425,7 @@  discard block
 block discarded – undo
1425 1425
 			),
1426 1426
 		),
1427 1427
 		'RSD' => array(
1428
-			'admin_label' => sprintf( __('Serbian dinar (%1$s)', 'give'), '&#x434;&#x438;&#x43d;.'),
1428
+			'admin_label' => sprintf(__('Serbian dinar (%1$s)', 'give'), '&#x434;&#x438;&#x43d;.'),
1429 1429
 			'symbol'      => '&#x434;&#x438;&#x43d;.',
1430 1430
 			'setting'     => array(
1431 1431
 				'currency_position'   => 'after',
@@ -1435,7 +1435,7 @@  discard block
 block discarded – undo
1435 1435
 			),
1436 1436
 		),
1437 1437
 		'RWF' => array(
1438
-			'admin_label' => sprintf( __('Rwandan franc (%1$s)', 'give'), 'Fr'),
1438
+			'admin_label' => sprintf(__('Rwandan franc (%1$s)', 'give'), 'Fr'),
1439 1439
 			'symbol'      => 'Fr',
1440 1440
 			'setting'     => array(
1441 1441
 				'currency_position'   => 'before',
@@ -1445,7 +1445,7 @@  discard block
 block discarded – undo
1445 1445
 			),
1446 1446
 		),
1447 1447
 		'SBD' => array(
1448
-			'admin_label' => sprintf( __('Solomon Islands dollar (%1$s)', 'give'), '&#36;'),
1448
+			'admin_label' => sprintf(__('Solomon Islands dollar (%1$s)', 'give'), '&#36;'),
1449 1449
 			'symbol'      => '&#36;',
1450 1450
 			'setting'     => array(
1451 1451
 				'currency_position'   => 'before',
@@ -1455,7 +1455,7 @@  discard block
 block discarded – undo
1455 1455
 			),
1456 1456
 		),
1457 1457
 		'SCR' => array(
1458
-			'admin_label' => sprintf( __('Seychellois rupee (%1$s)', 'give'), '&#x20a8;'),
1458
+			'admin_label' => sprintf(__('Seychellois rupee (%1$s)', 'give'), '&#x20a8;'),
1459 1459
 			'symbol'      => '&#x20a8;',
1460 1460
 			'setting'     => array(
1461 1461
 				'currency_position'   => 'before',
@@ -1465,7 +1465,7 @@  discard block
 block discarded – undo
1465 1465
 			),
1466 1466
 		),
1467 1467
 		'SDG' => array(
1468
-			'admin_label' => sprintf( __('Sudanese pound (%1$s)', 'give'), '&#x62c;.&#x633;.'),
1468
+			'admin_label' => sprintf(__('Sudanese pound (%1$s)', 'give'), '&#x62c;.&#x633;.'),
1469 1469
 			'symbol'      => '&#x62c;.&#x633;.',
1470 1470
 			'setting'     => array(
1471 1471
 				'currency_position'   => 'before',
@@ -1475,7 +1475,7 @@  discard block
 block discarded – undo
1475 1475
 			),
1476 1476
 		),
1477 1477
 		'SHP' => array(
1478
-			'admin_label' => sprintf( __('Saint Helena pound (%1$s)', 'give'), '&pound;'),
1478
+			'admin_label' => sprintf(__('Saint Helena pound (%1$s)', 'give'), '&pound;'),
1479 1479
 			'symbol'      => '&pound;',
1480 1480
 			'setting'     => array(
1481 1481
 				'currency_position'   => 'before',
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
 			),
1486 1486
 		),
1487 1487
 		'SLL' => array(
1488
-			'admin_label' => sprintf( __('Sierra Leonean leone (%1$s)', 'give'), 'Le'),
1488
+			'admin_label' => sprintf(__('Sierra Leonean leone (%1$s)', 'give'), 'Le'),
1489 1489
 			'symbol'      => 'Le',
1490 1490
 			'setting'     => array(
1491 1491
 				'currency_position'   => 'before',
@@ -1495,7 +1495,7 @@  discard block
 block discarded – undo
1495 1495
 			),
1496 1496
 		),
1497 1497
 		'SOS' => array(
1498
-			'admin_label' => sprintf( __('Somali shilling (%1$s)', 'give'), 'Sh'),
1498
+			'admin_label' => sprintf(__('Somali shilling (%1$s)', 'give'), 'Sh'),
1499 1499
 			'symbol'      => 'Sh',
1500 1500
 			'setting'     => array(
1501 1501
 				'currency_position'   => 'before',
@@ -1505,7 +1505,7 @@  discard block
 block discarded – undo
1505 1505
 			),
1506 1506
 		),
1507 1507
 		'SRD' => array(
1508
-			'admin_label' => sprintf( __('Surinamese dollar (%1$s)', 'give'), '&#36;'),
1508
+			'admin_label' => sprintf(__('Surinamese dollar (%1$s)', 'give'), '&#36;'),
1509 1509
 			'symbol'      => '&#36;',
1510 1510
 			'setting'     => array(
1511 1511
 				'currency_position'   => 'before',
@@ -1515,7 +1515,7 @@  discard block
 block discarded – undo
1515 1515
 			),
1516 1516
 		),
1517 1517
 		'SSP' => array(
1518
-			'admin_label' => sprintf( __('South Sudanese pound (%1$s)', 'give'), '&pound;'),
1518
+			'admin_label' => sprintf(__('South Sudanese pound (%1$s)', 'give'), '&pound;'),
1519 1519
 			'symbol'      => '&pound;',
1520 1520
 			'setting'     => array(
1521 1521
 				'currency_position'   => 'before',
@@ -1525,7 +1525,7 @@  discard block
 block discarded – undo
1525 1525
 			),
1526 1526
 		),
1527 1527
 		'STD' => array(
1528
-			'admin_label' => sprintf( __('São Tomé and Príncipe dobra (%1$s)', 'give'), 'Db'),
1528
+			'admin_label' => sprintf(__('São Tomé and Príncipe dobra (%1$s)', 'give'), 'Db'),
1529 1529
 			'symbol'      => 'Db',
1530 1530
 			'setting'     => array(
1531 1531
 				'currency_position'   => 'before',
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
 			),
1536 1536
 		),
1537 1537
 		'SYP' => array(
1538
-			'admin_label' => sprintf( __('Syrian pound (%1$s)', 'give'), '&#x644;.&#x633;'),
1538
+			'admin_label' => sprintf(__('Syrian pound (%1$s)', 'give'), '&#x644;.&#x633;'),
1539 1539
 			'symbol'      => '&#x644;.&#x633;',
1540 1540
 			'setting'     => array(
1541 1541
 				'currency_position'   => 'before',
@@ -1545,7 +1545,7 @@  discard block
 block discarded – undo
1545 1545
 			),
1546 1546
 		),
1547 1547
 		'TJS' => array(
1548
-			'admin_label' => sprintf( __('Tajikistani somoni (%1$s)', 'give'), '&#x405;&#x41c;'),
1548
+			'admin_label' => sprintf(__('Tajikistani somoni (%1$s)', 'give'), '&#x405;&#x41c;'),
1549 1549
 			'symbol'      => '&#x405;&#x41c;',
1550 1550
 			'setting'     => array(
1551 1551
 				'currency_position'   => 'after',
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
 			),
1556 1556
 		),
1557 1557
 		'TMT' => array(
1558
-			'admin_label' => sprintf( __('Turkmenistan manat (%1$s)', 'give'), 'm'),
1558
+			'admin_label' => sprintf(__('Turkmenistan manat (%1$s)', 'give'), 'm'),
1559 1559
 			'symbol'      => 'm',
1560 1560
 			'setting'     => array(
1561 1561
 				'currency_position'   => 'after',
@@ -1565,7 +1565,7 @@  discard block
 block discarded – undo
1565 1565
 			),
1566 1566
 		),
1567 1567
 		'TND' => array(
1568
-			'admin_label' => sprintf( __('Turkmenistan manat (%1$s)', 'give'), '&#x62f;.&#x62a;'),
1568
+			'admin_label' => sprintf(__('Turkmenistan manat (%1$s)', 'give'), '&#x62f;.&#x62a;'),
1569 1569
 			'symbol'      => '&#x62f;.&#x62a;',
1570 1570
 			'setting'     => array(
1571 1571
 				'currency_position'   => 'before',
@@ -1575,7 +1575,7 @@  discard block
 block discarded – undo
1575 1575
 			),
1576 1576
 		),
1577 1577
 		'TTD' => array(
1578
-			'admin_label' => sprintf( __('Trinidad and Tobago dollar (%1$s)', 'give'), '&#36;'),
1578
+			'admin_label' => sprintf(__('Trinidad and Tobago dollar (%1$s)', 'give'), '&#36;'),
1579 1579
 			'symbol'      => '&#36;',
1580 1580
 			'setting'     => array(
1581 1581
 				'currency_position'   => 'before',
@@ -1585,7 +1585,7 @@  discard block
 block discarded – undo
1585 1585
 			),
1586 1586
 		),
1587 1587
 		'UGX' => array(
1588
-			'admin_label' => sprintf( __('Ugandan shilling (%1$s)', 'give'), 'UGX'),
1588
+			'admin_label' => sprintf(__('Ugandan shilling (%1$s)', 'give'), 'UGX'),
1589 1589
 			'symbol'      => 'UGX',
1590 1590
 			'setting'     => array(
1591 1591
 				'currency_position'   => 'before',
@@ -1595,7 +1595,7 @@  discard block
 block discarded – undo
1595 1595
 			),
1596 1596
 		),
1597 1597
 		'UZS' => array(
1598
-			'admin_label' => sprintf( __('Uzbekistani som (%1$s)', 'give'), 'UZS'),
1598
+			'admin_label' => sprintf(__('Uzbekistani som (%1$s)', 'give'), 'UZS'),
1599 1599
 			'symbol'      => 'UZS',
1600 1600
 			'setting'     => array(
1601 1601
 				'currency_position'   => 'after',
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
 			),
1606 1606
 		),
1607 1607
 		'VND' => array(
1608
-			'admin_label' => sprintf( __('Vietnamese đồng (%1$s)', 'give'), '&#8363;'),
1608
+			'admin_label' => sprintf(__('Vietnamese đồng (%1$s)', 'give'), '&#8363;'),
1609 1609
 			'symbol'      => '&#8363;',
1610 1610
 			'setting'     => array(
1611 1611
 				'currency_position'   => 'after',
@@ -1615,7 +1615,7 @@  discard block
 block discarded – undo
1615 1615
 			),
1616 1616
 		),
1617 1617
 		'VUV' => array(
1618
-			'admin_label' => sprintf( __('Vanuatu vatu (%1$s)', 'give'), 'Vt'),
1618
+			'admin_label' => sprintf(__('Vanuatu vatu (%1$s)', 'give'), 'Vt'),
1619 1619
 			'symbol'      => 'Vt',
1620 1620
 			'setting'     => array(
1621 1621
 				'currency_position'   => 'after',
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
 			),
1626 1626
 		),
1627 1627
 		'WST' => array(
1628
-			'admin_label' => sprintf( __('Samoan tālā (%1$s)', 'give'), 'T'),
1628
+			'admin_label' => sprintf(__('Samoan tālā (%1$s)', 'give'), 'T'),
1629 1629
 			'symbol'      => 'T',
1630 1630
 			'setting'     => array(
1631 1631
 				'currency_position'   => 'before',
@@ -1635,7 +1635,7 @@  discard block
 block discarded – undo
1635 1635
 			),
1636 1636
 		),
1637 1637
 		'XAF' => array(
1638
-			'admin_label' => sprintf( __('Central African CFA franc (%1$s)', 'give'), 'CFA'),
1638
+			'admin_label' => sprintf(__('Central African CFA franc (%1$s)', 'give'), 'CFA'),
1639 1639
 			'symbol'      => 'CFA',
1640 1640
 			'setting'     => array(
1641 1641
 				'currency_position'   => 'after',
@@ -1645,7 +1645,7 @@  discard block
 block discarded – undo
1645 1645
 			),
1646 1646
 		),
1647 1647
 		'XOF' => array(
1648
-			'admin_label' => sprintf( __('West African CFA franc (%1$s)', 'give'), 'CFA'),
1648
+			'admin_label' => sprintf(__('West African CFA franc (%1$s)', 'give'), 'CFA'),
1649 1649
 			'symbol'      => 'CFA',
1650 1650
 			'setting'     => array(
1651 1651
 				'currency_position'   => 'after',
@@ -1655,7 +1655,7 @@  discard block
 block discarded – undo
1655 1655
 			),
1656 1656
 		),
1657 1657
 		'XPF' => array(
1658
-			'admin_label' => sprintf( __('CFP franc (%1$s)', 'give'), 'Fr'),
1658
+			'admin_label' => sprintf(__('CFP franc (%1$s)', 'give'), 'Fr'),
1659 1659
 			'symbol'      => 'Fr',
1660 1660
 			'setting'     => array(
1661 1661
 				'currency_position'   => 'after',
@@ -1665,7 +1665,7 @@  discard block
 block discarded – undo
1665 1665
 			),
1666 1666
 		),
1667 1667
 		'YER' => array(
1668
-			'admin_label' => sprintf( __('Yemeni rial (%1$s)', 'give'), '&#xfdfc;'),
1668
+			'admin_label' => sprintf(__('Yemeni rial (%1$s)', 'give'), '&#xfdfc;'),
1669 1669
 			'symbol'      => '&#xfdfc;',
1670 1670
 			'setting'     => array(
1671 1671
 				'currency_position'   => 'before',
@@ -1675,7 +1675,7 @@  discard block
 block discarded – undo
1675 1675
 			),
1676 1676
 		),
1677 1677
 		'ZMW' => array(
1678
-			'admin_label' => sprintf( __('Zambian kwacha (%1$s)', 'give'), 'ZK'),
1678
+			'admin_label' => sprintf(__('Zambian kwacha (%1$s)', 'give'), 'ZK'),
1679 1679
 			'symbol'      => 'ZK',
1680 1680
 			'setting'     => array(
1681 1681
 				'currency_position'   => 'before',
@@ -1700,7 +1700,7 @@  discard block
 block discarded – undo
1700 1700
 	 *
1701 1701
 	 * @param array $currencies
1702 1702
 	 */
1703
-	return (array) apply_filters( 'give_currencies', $currencies );
1703
+	return (array) apply_filters('give_currencies', $currencies);
1704 1704
 }
1705 1705
 
1706 1706
 /**
@@ -1712,22 +1712,22 @@  discard block
 block discarded – undo
1712 1712
  *
1713 1713
  * @return array $currencies A list of the available currencies
1714 1714
  */
1715
-function give_get_currencies( $info = 'admin_label' ) {
1715
+function give_get_currencies($info = 'admin_label') {
1716 1716
 
1717 1717
 	$currencies = give_get_currencies_list();
1718 1718
 
1719 1719
 	// Backward compatibility: handle old way of currency registration.
1720 1720
 	// Backward compatibility: Return desired result.
1721
-	if ( ! empty( $currencies ) ) {
1722
-		foreach ( $currencies as $currency_code => $currency_setting ) {
1723
-			if ( is_string( $currency_setting ) ) {
1724
-				$currencies[ $currency_code ] = array(
1721
+	if ( ! empty($currencies)) {
1722
+		foreach ($currencies as $currency_code => $currency_setting) {
1723
+			if (is_string($currency_setting)) {
1724
+				$currencies[$currency_code] = array(
1725 1725
 					'admin_label' => $currency_setting,
1726 1726
 				);
1727 1727
 			}
1728 1728
 
1729
-			$currencies[ $currency_code ] = wp_parse_args(
1730
-				$currencies[ $currency_code ],
1729
+			$currencies[$currency_code] = wp_parse_args(
1730
+				$currencies[$currency_code],
1731 1731
 				array(
1732 1732
 					'admin_label' => '',
1733 1733
 					'symbol'      => $currency_code,
@@ -1736,8 +1736,8 @@  discard block
 block discarded – undo
1736 1736
 			);
1737 1737
 		}
1738 1738
 
1739
-		if ( ! empty( $info ) && is_string( $info ) && 'all' !== $info ) {
1740
-			$currencies = wp_list_pluck( $currencies, $info );
1739
+		if ( ! empty($info) && is_string($info) && 'all' !== $info) {
1740
+			$currencies = wp_list_pluck($currencies, $info);
1741 1741
 		}
1742 1742
 	}
1743 1743
 
@@ -1754,12 +1754,12 @@  discard block
 block discarded – undo
1754 1754
  *
1755 1755
  * @return array
1756 1756
  */
1757
-function give_currency_symbols( $decode_currencies = false ) {
1758
-	$currencies = give_get_currencies( 'symbol' );
1757
+function give_currency_symbols($decode_currencies = false) {
1758
+	$currencies = give_get_currencies('symbol');
1759 1759
 
1760
-	if ( $decode_currencies ) {
1761
-		array_walk( $currencies, function ( &$currency_symbol ) {
1762
-			$currency_symbol = html_entity_decode( $currency_symbol, ENT_COMPAT, 'UTF-8' );
1760
+	if ($decode_currencies) {
1761
+		array_walk($currencies, function(&$currency_symbol) {
1762
+			$currency_symbol = html_entity_decode($currency_symbol, ENT_COMPAT, 'UTF-8');
1763 1763
 		} );
1764 1764
 	}
1765 1765
 
@@ -1770,7 +1770,7 @@  discard block
 block discarded – undo
1770 1770
 	 *
1771 1771
 	 * @param array $currencies
1772 1772
 	 */
1773
-	return apply_filters( 'give_currency_symbols', $currencies );
1773
+	return apply_filters('give_currency_symbols', $currencies);
1774 1774
 }
1775 1775
 
1776 1776
 
@@ -1787,14 +1787,14 @@  discard block
 block discarded – undo
1787 1787
  *
1788 1788
  * @return string           The symbol to use for the currency
1789 1789
  */
1790
-function give_currency_symbol( $currency = '', $decode_currency = false ) {
1790
+function give_currency_symbol($currency = '', $decode_currency = false) {
1791 1791
 
1792
-	if ( empty( $currency ) ) {
1792
+	if (empty($currency)) {
1793 1793
 		$currency = give_get_currency();
1794 1794
 	}
1795 1795
 
1796
-	$currencies = give_currency_symbols( $decode_currency );
1797
-	$symbol     = array_key_exists( $currency, $currencies ) ? $currencies[ $currency ] : $currency;
1796
+	$currencies = give_currency_symbols($decode_currency);
1797
+	$symbol     = array_key_exists($currency, $currencies) ? $currencies[$currency] : $currency;
1798 1798
 
1799 1799
 	/**
1800 1800
 	 * Filter the currency symbol
@@ -1804,7 +1804,7 @@  discard block
 block discarded – undo
1804 1804
 	 * @param string $symbol
1805 1805
 	 * @param string $currency
1806 1806
 	 */
1807
-	return apply_filters( 'give_currency_symbol', $symbol, $currency );
1807
+	return apply_filters('give_currency_symbol', $symbol, $currency);
1808 1808
 }
1809 1809
 
1810 1810
 
@@ -1817,13 +1817,13 @@  discard block
 block discarded – undo
1817 1817
  *
1818 1818
  * @return string
1819 1819
  */
1820
-function give_get_currency_name( $currency_code ) {
1820
+function give_get_currency_name($currency_code) {
1821 1821
 	$currency_name  = '';
1822 1822
 	$currency_names = give_get_currencies();
1823 1823
 
1824
-	if ( $currency_code && array_key_exists( $currency_code, $currency_names ) ) {
1825
-		$currency_name = explode( '(', $currency_names[ $currency_code ] );
1826
-		$currency_name = trim( current( $currency_name ) );
1824
+	if ($currency_code && array_key_exists($currency_code, $currency_names)) {
1825
+		$currency_name = explode('(', $currency_names[$currency_code]);
1826
+		$currency_name = trim(current($currency_name));
1827 1827
 	}
1828 1828
 
1829 1829
 	/**
@@ -1834,7 +1834,7 @@  discard block
 block discarded – undo
1834 1834
 	 * @param string $currency_name
1835 1835
 	 * @param string $currency_code
1836 1836
 	 */
1837
-	return apply_filters( 'give_currency_name', $currency_name, $currency_code );
1837
+	return apply_filters('give_currency_name', $currency_name, $currency_code);
1838 1838
 }
1839 1839
 
1840 1840
 /**
@@ -1847,20 +1847,20 @@  discard block
 block discarded – undo
1847 1847
  *
1848 1848
  * @return mixed|string
1849 1849
  */
1850
-function give_currency_filter( $price = '', $args = array() ) {
1850
+function give_currency_filter($price = '', $args = array()) {
1851 1851
 
1852 1852
 	// Get functions arguments.
1853 1853
 	$func_args = func_get_args();
1854 1854
 
1855 1855
 	// Backward compatibility: modify second param to array
1856
-	if ( isset( $func_args[1] ) && is_string( $func_args[1] ) ) {
1856
+	if (isset($func_args[1]) && is_string($func_args[1])) {
1857 1857
 		$args = array(
1858
-			'currency_code'   => isset( $func_args[1] ) ? $func_args[1] : '',
1859
-			'decode_currency' => isset( $func_args[2] ) ? $func_args[2] : false,
1860
-			'form_id'         => isset( $func_args[3] ) ? $func_args[3] : '',
1858
+			'currency_code'   => isset($func_args[1]) ? $func_args[1] : '',
1859
+			'decode_currency' => isset($func_args[2]) ? $func_args[2] : false,
1860
+			'form_id'         => isset($func_args[3]) ? $func_args[3] : '',
1861 1861
 		);
1862 1862
 
1863
-		give_doing_it_wrong( __FUNCTION__, 'Pass second argument as Array.', GIVE_VERSION );
1863
+		give_doing_it_wrong(__FUNCTION__, 'Pass second argument as Array.', GIVE_VERSION);
1864 1864
 	}
1865 1865
 
1866 1866
 	// Set default values.
@@ -1873,22 +1873,22 @@  discard block
 block discarded – undo
1873 1873
 		)
1874 1874
 	);
1875 1875
 
1876
-	if ( empty( $args['currency_code'] ) || ! array_key_exists( (string) $args['currency_code'], give_get_currencies() ) ) {
1877
-		$args['currency_code'] = give_get_currency( $args['form_id'] );
1876
+	if (empty($args['currency_code']) || ! array_key_exists((string) $args['currency_code'], give_get_currencies())) {
1877
+		$args['currency_code'] = give_get_currency($args['form_id']);
1878 1878
 	}
1879 1879
 
1880
-	$args['position'] = give_get_option( 'currency_position', 'before' );
1880
+	$args['position'] = give_get_option('currency_position', 'before');
1881 1881
 
1882 1882
 	$negative = $price < 0;
1883 1883
 
1884
-	if ( $negative ) {
1884
+	if ($negative) {
1885 1885
 		// Remove proceeding "-".
1886
-		$price = substr( $price, 1 );
1886
+		$price = substr($price, 1);
1887 1887
 	}
1888 1888
 
1889
-	$args['symbol'] = give_currency_symbol( $args['currency_code'], $args['decode_currency'] );
1889
+	$args['symbol'] = give_currency_symbol($args['currency_code'], $args['decode_currency']);
1890 1890
 
1891
-	switch ( $args['currency_code'] ) :
1891
+	switch ($args['currency_code']) :
1892 1892
 		case 'GBP' :
1893 1893
 		case 'BRL' :
1894 1894
 		case 'EUR' :
@@ -1918,13 +1918,13 @@  discard block
 block discarded – undo
1918 1918
 		case 'MAD' :
1919 1919
 		case 'KRW' :
1920 1920
 		case 'ZAR' :
1921
-			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . $price : $price . $args['symbol'] );
1921
+			$formatted = ('before' === $args['position'] ? $args['symbol'].$price : $price.$args['symbol']);
1922 1922
 			break;
1923 1923
 		case 'NOK':
1924
-			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . ' ' . $price : $price . ' ' . $args['symbol'] );
1924
+			$formatted = ('before' === $args['position'] ? $args['symbol'].' '.$price : $price.' '.$args['symbol']);
1925 1925
 			break;
1926 1926
 		default:
1927
-			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . ' ' . $price : $price . ' ' . $args['symbol'] );
1927
+			$formatted = ('before' === $args['position'] ? $args['symbol'].' '.$price : $price.' '.$args['symbol']);
1928 1928
 			break;
1929 1929
 	endswitch;
1930 1930
 
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
 	 *
1934 1934
 	 * @since 1.8.17
1935 1935
 	 */
1936
-	$formatted = apply_filters( 'give_currency_filter', $formatted, $args, $price );
1936
+	$formatted = apply_filters('give_currency_filter', $formatted, $args, $price);
1937 1937
 
1938 1938
 	/**
1939 1939
 	 * Filter formatted amount with currency
@@ -1947,16 +1947,16 @@  discard block
 block discarded – undo
1947 1947
 	 *           filter name will be give_usd_currency_filter_after
1948 1948
 	 */
1949 1949
 	$formatted = apply_filters(
1950
-		'give_' . strtolower( $args['currency_code'] ) . "_currency_filter_{$args['position']}",
1950
+		'give_'.strtolower($args['currency_code'])."_currency_filter_{$args['position']}",
1951 1951
 		$formatted,
1952 1952
 		$args['currency_code'],
1953 1953
 		$price,
1954 1954
 		$args
1955 1955
 	);
1956 1956
 
1957
-	if ( $negative ) {
1957
+	if ($negative) {
1958 1958
 		// Prepend the minus sign before the currency sign.
1959
-		$formatted = '-' . $formatted;
1959
+		$formatted = '-'.$formatted;
1960 1960
 	}
1961 1961
 
1962 1962
 	return $formatted;
@@ -1974,7 +1974,7 @@  discard block
 block discarded – undo
1974 1974
  *
1975 1975
  * @return bool
1976 1976
  */
1977
-function give_is_zero_based_currency( $currency = '' ) {
1977
+function give_is_zero_based_currency($currency = '') {
1978 1978
 	$zero_based_currency = array(
1979 1979
 		'JPY', // Japanese Yen.
1980 1980
 		'KRW', // South Korean Won.
@@ -1994,12 +1994,12 @@  discard block
 block discarded – undo
1994 1994
 	);
1995 1995
 
1996 1996
 	// Set default currency.
1997
-	if ( empty( $currency ) ) {
1997
+	if (empty($currency)) {
1998 1998
 		$currency = give_get_currency();
1999 1999
 	}
2000 2000
 
2001 2001
 	// Check for Zero Based Currency.
2002
-	if ( in_array( $currency, $zero_based_currency ) ) {
2002
+	if (in_array($currency, $zero_based_currency)) {
2003 2003
 		return true;
2004 2004
 	}
2005 2005
 
@@ -2014,7 +2014,7 @@  discard block
 block discarded – undo
2014 2014
  *
2015 2015
  * @return bool
2016 2016
  */
2017
-function give_is_right_to_left_supported_currency( $currency = '' ) {
2017
+function give_is_right_to_left_supported_currency($currency = '') {
2018 2018
 	$zero_based_currency = apply_filters(
2019 2019
 		'give_right_to_left_supported_currency',
2020 2020
 		array(
@@ -2038,12 +2038,12 @@  discard block
 block discarded – undo
2038 2038
 	);
2039 2039
 
2040 2040
 	// Set default currency.
2041
-	if ( empty( $currency ) ) {
2041
+	if (empty($currency)) {
2042 2042
 		$currency = give_get_currency();
2043 2043
 	}
2044 2044
 
2045 2045
 	// Check for Zero Based Currency.
2046
-	if ( in_array( $currency, $zero_based_currency ) ) {
2046
+	if (in_array($currency, $zero_based_currency)) {
2047 2047
 		return true;
2048 2048
 	}
2049 2049
 
Please login to merge, or discard this patch.
includes/donors/class-give-donors-query.php 1 patch
Spacing   +74 added lines, -74 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
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 *
87 87
 	 * @param  $args array The array of arguments that can be passed in and used for setting up this payment query.
88 88
 	 */
89
-	public function __construct( $args = array() ) {
89
+	public function __construct($args = array()) {
90 90
 		$defaults = array(
91 91
 			'number'          => 20,
92 92
 			'offset'          => 0,
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 			// 'form'       => array(),
117 117
 		);
118 118
 
119
-		$this->args            = wp_parse_args( $args, $defaults );
119
+		$this->args            = wp_parse_args($args, $defaults);
120 120
 		$this->table_name      = Give()->donors->table_name;
121 121
 		$this->meta_table_name = Give()->donor_meta->table_name;
122 122
 		$this->meta_type       = Give()->donor_meta->meta_type;
@@ -158,21 +158,21 @@  discard block
 block discarded – undo
158 158
 		 *
159 159
 		 * @param Give_Donors_Query $this Donors query object.
160 160
 		 */
161
-		do_action( 'give_pre_get_donors', $this );
161
+		do_action('give_pre_get_donors', $this);
162 162
 
163
-		$cache_key = Give_Cache::get_key( 'give_donor', $this->get_sql(), false );
163
+		$cache_key = Give_Cache::get_key('give_donor', $this->get_sql(), false);
164 164
 
165 165
 		// Get donors from cache.
166
-		$this->donors = Give_Cache::get_db_query( $cache_key );
166
+		$this->donors = Give_Cache::get_db_query($cache_key);
167 167
 
168
-		if ( is_null( $this->donors ) ) {
169
-			if ( empty( $this->args['count'] ) ) {
170
-				$this->donors = $wpdb->get_results( $this->get_sql() );
168
+		if (is_null($this->donors)) {
169
+			if (empty($this->args['count'])) {
170
+				$this->donors = $wpdb->get_results($this->get_sql());
171 171
 			} else {
172
-				$this->donors = $wpdb->get_var( $this->get_sql() );
172
+				$this->donors = $wpdb->get_var($this->get_sql());
173 173
 			}
174 174
 
175
-			Give_Cache::set_db_query( $cache_key, $this->donors );
175
+			Give_Cache::set_db_query($cache_key, $this->donors);
176 176
 		}
177 177
 
178 178
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		 *
184 184
 		 * @param Give_Donors_Query $this Donors query object.
185 185
 		 */
186
-		do_action( 'give_post_get_donors', $this );
186
+		do_action('give_post_get_donors', $this);
187 187
 
188 188
 		return $this->donors;
189 189
 	}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	public function get_sql() {
201 201
 		global $wpdb;
202 202
 
203
-		if ( $this->args['number'] < 1 ) {
203
+		if ($this->args['number'] < 1) {
204 204
 			$this->args['number'] = 99999999999;
205 205
 		}
206 206
 
@@ -208,32 +208,32 @@  discard block
 block discarded – undo
208 208
 
209 209
 
210 210
 		// Set offset.
211
-		if ( empty( $this->args['offset'] ) && ( 0 < $this->args['paged'] ) ) {
212
-			$this->args['offset'] = $this->args['number'] * ( $this->args['paged'] - 1 );
211
+		if (empty($this->args['offset']) && (0 < $this->args['paged'])) {
212
+			$this->args['offset'] = $this->args['number'] * ($this->args['paged'] - 1);
213 213
 		}
214 214
 
215 215
 		// Set fields.
216 216
 		$fields = "{$this->table_name}.*";
217
-		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
218
-			if ( is_string( $this->args['fields'] ) ) {
217
+		if ( ! empty($this->args['fields']) && 'all' !== $this->args['fields']) {
218
+			if (is_string($this->args['fields'])) {
219 219
 				$fields = "{$this->table_name}.{$this->args['fields']}";
220
-			} elseif ( is_array( $this->args['fields'] ) ) {
221
-				$fields = "{$this->table_name}." . implode( " , {$this->table_name}.", $this->args['fields'] );
220
+			} elseif (is_array($this->args['fields'])) {
221
+				$fields = "{$this->table_name}.".implode(" , {$this->table_name}.", $this->args['fields']);
222 222
 			}
223 223
 		}
224 224
 
225 225
 		// Set count.
226
-		if ( ! empty( $this->args['count'] ) ) {
226
+		if ( ! empty($this->args['count'])) {
227 227
 			$fields = "COUNT({$this->table_name}.id)";
228 228
 		}
229 229
 
230 230
 		$orderby = $this->get_order_query();
231 231
 
232
-		$sql = $wpdb->prepare( "SELECT {$fields} FROM {$this->table_name} LIMIT %d,%d;", absint( $this->args['offset'] ), absint( $this->args['number'] ) );
232
+		$sql = $wpdb->prepare("SELECT {$fields} FROM {$this->table_name} LIMIT %d,%d;", absint($this->args['offset']), absint($this->args['number']));
233 233
 
234 234
 		// $where, $orderby and order already prepared query they can generate notice if you re prepare them in above.
235 235
 		// WordPress consider LIKE condition as placeholder if start with s,f, or d.
236
-		$sql = str_replace( 'LIMIT', "{$where} {$orderby} LIMIT", $sql );
236
+		$sql = str_replace('LIMIT', "{$where} {$orderby} LIMIT", $sql);
237 237
 
238 238
 		return $sql;
239 239
 	}
@@ -250,11 +250,11 @@  discard block
 block discarded – undo
250 250
 	private function get_where_query() {
251 251
 
252 252
 		// Get sql query for meta.
253
-		if ( ! empty( $this->args['meta_query'] ) ) {
254
-			$meta_query_object = new WP_Meta_Query( $this->args['meta_query'] );
255
-			$meta_query        = $meta_query_object->get_sql( $this->meta_type, $this->table_name, 'id' );
253
+		if ( ! empty($this->args['meta_query'])) {
254
+			$meta_query_object = new WP_Meta_Query($this->args['meta_query']);
255
+			$meta_query        = $meta_query_object->get_sql($this->meta_type, $this->table_name, 'id');
256 256
 
257
-			$where[] = implode( '', $meta_query );
257
+			$where[] = implode('', $meta_query);
258 258
 		}
259 259
 
260 260
 		$where[] = 'WHERE 1=1';
@@ -267,9 +267,9 @@  discard block
 block discarded – undo
267 267
 		$where[] = $this->get_where_donation_count();
268 268
 		$where[] = $this->get_where_give_forms();
269 269
 
270
-		$where = array_filter( $where );
270
+		$where = array_filter($where);
271 271
 
272
-		return trim( implode( ' ', array_map( 'trim', $where ) ) );
272
+		return trim(implode(' ', array_map('trim', $where)));
273 273
 
274 274
 	}
275 275
 
@@ -287,17 +287,17 @@  discard block
 block discarded – undo
287 287
 
288 288
 		$where = '';
289 289
 
290
-		if ( ! empty( $this->args['email'] ) ) {
290
+		if ( ! empty($this->args['email'])) {
291 291
 
292
-			if ( is_array( $this->args['email'] ) ) {
292
+			if (is_array($this->args['email'])) {
293 293
 
294
-				$emails_count       = count( $this->args['email'] );
295
-				$emails_placeholder = array_fill( 0, $emails_count, '%s' );
296
-				$emails             = implode( ', ', $emails_placeholder );
294
+				$emails_count       = count($this->args['email']);
295
+				$emails_placeholder = array_fill(0, $emails_count, '%s');
296
+				$emails             = implode(', ', $emails_placeholder);
297 297
 
298
-				$where .= $wpdb->prepare( "AND {$this->table_name}.email IN( $emails )", $this->args['email'] );
298
+				$where .= $wpdb->prepare("AND {$this->table_name}.email IN( $emails )", $this->args['email']);
299 299
 			} else {
300
-				$where .= $wpdb->prepare( "AND {$this->table_name}.email = %s", $this->args['email'] );
300
+				$where .= $wpdb->prepare("AND {$this->table_name}.email = %s", $this->args['email']);
301 301
 			}
302 302
 		}
303 303
 
@@ -317,11 +317,11 @@  discard block
 block discarded – undo
317 317
 		$where = '';
318 318
 
319 319
 		// Specific donors.
320
-		if ( ! empty( $this->args['donor'] ) ) {
321
-			if ( ! is_array( $this->args['donor'] ) ) {
322
-				$this->args['donor'] = explode( ',', $this->args['donor'] );
320
+		if ( ! empty($this->args['donor'])) {
321
+			if ( ! is_array($this->args['donor'])) {
322
+				$this->args['donor'] = explode(',', $this->args['donor']);
323 323
 			}
324
-			$donor_ids = implode( ',', array_map( 'intval', $this->args['donor'] ) );
324
+			$donor_ids = implode(',', array_map('intval', $this->args['donor']));
325 325
 
326 326
 			$where .= "AND {$this->table_name}.id IN( {$donor_ids} )";
327 327
 		}
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
 		$where = '';
343 343
 
344 344
 		// Donors created for a specific date or in a date range
345
-		if ( ! empty( $this->args['date_query'] ) ) {
346
-			$date_query_object = new WP_Date_Query( is_array( $this->args['date_query'] ) ? $this->args['date_query'] : wp_parse_args( $this->args['date_query'] ), "{$this->table_name}.date_created" );
345
+		if ( ! empty($this->args['date_query'])) {
346
+			$date_query_object = new WP_Date_Query(is_array($this->args['date_query']) ? $this->args['date_query'] : wp_parse_args($this->args['date_query']), "{$this->table_name}.date_created");
347 347
 
348
-			$where .= str_replace( array(
348
+			$where .= str_replace(array(
349 349
 				"\n",
350 350
 				'(   (',
351 351
 				'))',
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 				'',
354 354
 				'( (',
355 355
 				') )',
356
-			), $date_query_object->get_sql() );
356
+			), $date_query_object->get_sql());
357 357
 		}
358 358
 
359 359
 		return $where;
@@ -372,11 +372,11 @@  discard block
 block discarded – undo
372 372
 		$where = '';
373 373
 
374 374
 		// Donors created for a specific date or in a date range
375
-		if ( ! empty( $this->args['s'] ) && false !== strpos( $this->args['s'], ':' ) ) {
376
-			$search_parts = explode( ':', $this->args['s'] );
375
+		if ( ! empty($this->args['s']) && false !== strpos($this->args['s'], ':')) {
376
+			$search_parts = explode(':', $this->args['s']);
377 377
 
378
-			if ( ! empty( $search_parts[0] ) ) {
379
-				switch ( $search_parts[0] ) {
378
+			if ( ! empty($search_parts[0])) {
379
+				switch ($search_parts[0]) {
380 380
 					case 'name':
381 381
 						$where = "AND {$this->table_name}.name LIKE '%{$search_parts[1]}%'";
382 382
 						break;
@@ -404,11 +404,11 @@  discard block
 block discarded – undo
404 404
 		$where = '';
405 405
 
406 406
 		// Donors create for specific wp user.
407
-		if ( ! empty( $this->args['user'] ) ) {
408
-			if ( ! is_array( $this->args['user'] ) ) {
409
-				$this->args['user'] = explode( ',', $this->args['user'] );
407
+		if ( ! empty($this->args['user'])) {
408
+			if ( ! is_array($this->args['user'])) {
409
+				$this->args['user'] = explode(',', $this->args['user']);
410 410
 			}
411
-			$user_ids = implode( ',', array_map( 'intval', $this->args['user'] ) );
411
+			$user_ids = implode(',', array_map('intval', $this->args['user']));
412 412
 
413 413
 			$where .= "AND {$this->table_name}.user_id IN( {$user_ids} )";
414 414
 		}
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 		$query = array();
431 431
 		$ordersby = $this->args['orderby'];
432 432
 
433
-		if( ! is_array( $ordersby ) ) {
433
+		if ( ! is_array($ordersby)) {
434 434
 			$ordersby = array(
435 435
 				$this->args['orderby'] => $this->args['order']
436 436
 			);
@@ -438,23 +438,23 @@  discard block
 block discarded – undo
438 438
 
439 439
 		// Remove non existing column.
440 440
 		// Filter orderby values.
441
-		foreach ( $ordersby as $orderby => $order ) {
442
-			if( ! array_key_exists( $orderby, $table_columns ) ) {
443
-				unset( $ordersby[$orderby] );
441
+		foreach ($ordersby as $orderby => $order) {
442
+			if ( ! array_key_exists($orderby, $table_columns)) {
443
+				unset($ordersby[$orderby]);
444 444
 			}
445 445
 
446
-			$ordersby[ esc_sql( $orderby ) ] = esc_sql( $this->args['order'] );
446
+			$ordersby[esc_sql($orderby)] = esc_sql($this->args['order']);
447 447
 		}
448 448
 
449
-		if( empty( $ordersby ) ) {
449
+		if (empty($ordersby)) {
450 450
 			$ordersby = array(
451 451
 				'id' => $this->args['order']
452 452
 			);
453 453
 		}
454 454
 
455 455
 		// Create query.
456
-		foreach ( $ordersby as $orderby => $order ) {
457
-			switch ( $table_columns[ $orderby ] ) {
456
+		foreach ($ordersby as $orderby => $order) {
457
+			switch ($table_columns[$orderby]) {
458 458
 				case '%d':
459 459
 				case '%f':
460 460
 					$query[] = "{$this->table_name}.{$orderby}+0 {$order}";
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 			}
466 466
 		}
467 467
 
468
-		return ! empty( $query ) ? 'ORDER BY ' . implode( ', ', $query ) : '';
468
+		return ! empty($query) ? 'ORDER BY '.implode(', ', $query) : '';
469 469
 	}
470 470
 
471 471
 	/**
@@ -481,10 +481,10 @@  discard block
 block discarded – undo
481 481
 	private function get_where_donation_count() {
482 482
 		$where = '';
483 483
 
484
-		if ( ! empty( $this->args['donation_count'] ) ) {
484
+		if ( ! empty($this->args['donation_count'])) {
485 485
 			$compare = '>';
486 486
 			$amount  = $this->args['donation_count'];
487
-			if ( is_array( $this->args['donation_count'] ) ) {
487
+			if (is_array($this->args['donation_count'])) {
488 488
 				$compare = $this->args['donation_count'] ['compare'];
489 489
 				$amount = $this->args['donation_count']['amount'];
490 490
 			}
@@ -508,10 +508,10 @@  discard block
 block discarded – undo
508 508
 	private function get_where_donation_amount() {
509 509
 		$where = '';
510 510
 
511
-		if ( ! empty( $this->args['donation_amount'] ) ) {
511
+		if ( ! empty($this->args['donation_amount'])) {
512 512
 			$compare = '>';
513 513
 			$amount  = $this->args['donation_amount'];
514
-			if ( is_array( $this->args['donation_amount'] ) ) {
514
+			if (is_array($this->args['donation_amount'])) {
515 515
 				$compare = $this->args['donation_amount'] ['compare'];
516 516
 				$amount = $this->args['donation_amount']['amount'];
517 517
 			}
@@ -537,13 +537,13 @@  discard block
 block discarded – undo
537 537
 		global $wpdb;
538 538
 		$where = '';
539 539
 
540
-		if ( ! empty( $this->args['give_forms'] ) ) {
541
-			if ( ! is_array( $this->args['give_forms'] ) ) {
542
-				$this->args['give_forms'] = explode( ',', $this->args['give_forms'] );
540
+		if ( ! empty($this->args['give_forms'])) {
541
+			if ( ! is_array($this->args['give_forms'])) {
542
+				$this->args['give_forms'] = explode(',', $this->args['give_forms']);
543 543
 			}
544 544
 
545
-			$form_ids        = implode( ',', array_map( 'intval', $this->args['give_forms'] ) );
546
-			$donation_id_col = Give()->payment_meta->get_meta_type() . '_id';
545
+			$form_ids        = implode(',', array_map('intval', $this->args['give_forms']));
546
+			$donation_id_col = Give()->payment_meta->get_meta_type().'_id';
547 547
 
548 548
 			$query = $wpdb->prepare(
549 549
 				"
@@ -562,12 +562,12 @@  discard block
 block discarded – undo
562 562
 				$form_ids
563 563
 			);
564 564
 
565
-			$donor_ids = $wpdb->get_results( $query, ARRAY_A );
565
+			$donor_ids = $wpdb->get_results($query, ARRAY_A);
566 566
 
567
-			if ( ! empty( $donor_ids ) ) {
568
-				$donor_ids = wp_list_pluck( $donor_ids, 'donor_id' );
569
-				$donor_ids = implode( ',', array_map( 'intval', $donor_ids ) );
570
-				$where     .= "AND {$this->table_name}.id IN ({$donor_ids})";
567
+			if ( ! empty($donor_ids)) {
568
+				$donor_ids = wp_list_pluck($donor_ids, 'donor_id');
569
+				$donor_ids = implode(',', array_map('intval', $donor_ids));
570
+				$where .= "AND {$this->table_name}.id IN ({$donor_ids})";
571 571
 			} else {
572 572
 				$where .= "AND {$this->table_name}.id IN ('0')";
573 573
 			}
Please login to merge, or discard this patch.
includes/donors/actions.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -8,28 +8,28 @@  discard block
 block discarded – undo
8 8
  * @param array $donation_data
9 9
  *
10 10
  */
11
-function __give_insert_donor_donation_comment( $donation_id, $donation_data ) {
12
-	$is_anonymous_donation = isset( $_POST['give_anonymous_donation'] )
13
-		? absint( $_POST['give_anonymous_donation'] )
11
+function __give_insert_donor_donation_comment($donation_id, $donation_data) {
12
+	$is_anonymous_donation = isset($_POST['give_anonymous_donation'])
13
+		? absint($_POST['give_anonymous_donation'])
14 14
 		: 0;
15 15
 
16
-	if ( ! empty( $_POST['give_comment'] ) ) {
16
+	if ( ! empty($_POST['give_comment'])) {
17 17
 		$comment_id = give_insert_donor_donation_comment(
18 18
 			$donation_id,
19 19
 			$donation_data['user_info']['donor_id'],
20
-			trim( $_POST['give_comment'] ), // We are sanitizing comment in Give_comment:add
21
-			array( 'comment_author_email' => $donation_data['user_info']['email'] )
20
+			trim($_POST['give_comment']), // We are sanitizing comment in Give_comment:add
21
+			array('comment_author_email' => $donation_data['user_info']['email'])
22 22
 		);
23 23
 
24
-		update_comment_meta( $comment_id, '_give_anonymous_donation', $is_anonymous_donation );
25
-		Give()->donor_meta->update_meta( $donation_data['user_info']['donor_id'], '_give_has_comment', '1' );
24
+		update_comment_meta($comment_id, '_give_anonymous_donation', $is_anonymous_donation);
25
+		Give()->donor_meta->update_meta($donation_data['user_info']['donor_id'], '_give_has_comment', '1');
26 26
 	}
27 27
 
28
-	give_update_meta( $donation_id, '_give_anonymous_donation', $is_anonymous_donation );
29
-	Give()->donor_meta->update_meta( $donation_data['user_info']['donor_id'], '_give_anonymous_donor', $is_anonymous_donation );
28
+	give_update_meta($donation_id, '_give_anonymous_donation', $is_anonymous_donation);
29
+	Give()->donor_meta->update_meta($donation_data['user_info']['donor_id'], '_give_anonymous_donor', $is_anonymous_donation);
30 30
 }
31 31
 
32
-add_action( 'give_insert_payment', '__give_insert_donor_donation_comment', 10, 2 );
32
+add_action('give_insert_payment', '__give_insert_donor_donation_comment', 10, 2);
33 33
 
34 34
 
35 35
 /**
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
  */
40 40
 function __give_validate_donor_comment() {
41 41
 	// Check wp_check_comment_data_max_lengths for comment length validation.
42
-	if ( ! empty( $_POST['give_comment'] ) ) {
42
+	if ( ! empty($_POST['give_comment'])) {
43 43
 		$max_lengths = wp_get_comment_fields_max_lengths();
44
-		$comment     = give_clean( $_POST['give_comment'] );
44
+		$comment     = give_clean($_POST['give_comment']);
45 45
 
46
-		if ( mb_strlen( $comment, '8bit' ) > $max_lengths['comment_content'] ) {
47
-			give_set_error( 'comment_content_column_length', __( 'Your comment is too long.', 'give' ) );
46
+		if (mb_strlen($comment, '8bit') > $max_lengths['comment_content']) {
47
+			give_set_error('comment_content_column_length', __('Your comment is too long.', 'give'));
48 48
 		}
49 49
 	}
50 50
 }
51
-add_action( 'give_checkout_error_checks', '__give_validate_donor_comment', 10, 1 );
51
+add_action('give_checkout_error_checks', '__give_validate_donor_comment', 10, 1);
52 52
 
53 53
 
54 54
 /**
@@ -59,18 +59,18 @@  discard block
 block discarded – undo
59 59
  * @param $donation_id
60 60
  * @param $status
61 61
  */
62
-function __give_update_donor_donation_comment_status( $donation_id, $status ) {
63
-	$approve = absint( 'publish' === $status );
62
+function __give_update_donor_donation_comment_status($donation_id, $status) {
63
+	$approve = absint('publish' === $status);
64 64
 
65 65
 	/* @var WP_Comment $note */
66
-	$donor_comment = give_get_donor_donation_comment( $donation_id, give_get_payment_donor_id( $donation_id ) );
66
+	$donor_comment = give_get_donor_donation_comment($donation_id, give_get_payment_donor_id($donation_id));
67 67
 
68
-	if( $donor_comment instanceof WP_Comment ) {
69
-		wp_set_comment_status( $donor_comment->comment_ID, (string) $approve );
68
+	if ($donor_comment instanceof WP_Comment) {
69
+		wp_set_comment_status($donor_comment->comment_ID, (string) $approve);
70 70
 	}
71 71
 }
72 72
 
73
-add_action( 'give_update_payment_status', '__give_update_donor_donation_comment_status', 10, 2 );
73
+add_action('give_update_payment_status', '__give_update_donor_donation_comment_status', 10, 2);
74 74
 
75 75
 /**
76 76
  * Remove donor comment when donation delete
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
  *
80 80
  * @param $donation_id
81 81
  */
82
-function __give_remove_donor_donation_comment( $donation_id ) {
82
+function __give_remove_donor_donation_comment($donation_id) {
83 83
 	/* @var WP_Comment $note */
84
-	$donor_comment = give_get_donor_donation_comment( $donation_id, give_get_payment_donor_id( $donation_id ) );
84
+	$donor_comment = give_get_donor_donation_comment($donation_id, give_get_payment_donor_id($donation_id));
85 85
 
86
-	if( $donor_comment instanceof WP_Comment ) {
87
-		wp_delete_comment( $donor_comment->comment_ID );
86
+	if ($donor_comment instanceof WP_Comment) {
87
+		wp_delete_comment($donor_comment->comment_ID);
88 88
 	}
89 89
 }
90 90
 
91
-add_action( 'give_payment_deleted', '__give_remove_donor_donation_comment', 10 );
91
+add_action('give_payment_deleted', '__give_remove_donor_donation_comment', 10);
Please login to merge, or discard this patch.
includes/actions.php 1 patch
Spacing   +77 added lines, -77 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
 
@@ -25,16 +25,16 @@  discard block
 block discarded – undo
25 25
  */
26 26
 function give_get_actions() {
27 27
 
28
-	$get_data = give_clean( $_GET ); // WPCS: input var ok, sanitization ok, CSRF ok.
28
+	$get_data = give_clean($_GET); // WPCS: input var ok, sanitization ok, CSRF ok.
29 29
 
30
-	$_get_action = ! empty( $get_data['give_action'] ) ? $get_data['give_action'] : null;
30
+	$_get_action = ! empty($get_data['give_action']) ? $get_data['give_action'] : null;
31 31
 
32 32
 	// Add backward compatibility to give-action param ( $_GET ).
33
-	if ( empty( $_get_action ) ) {
34
-		$_get_action = ! empty( $get_data['give-action'] ) ? $get_data['give-action'] : null;
33
+	if (empty($_get_action)) {
34
+		$_get_action = ! empty($get_data['give-action']) ? $get_data['give-action'] : null;
35 35
 	}
36 36
 
37
-	if ( isset( $_get_action ) ) {
37
+	if (isset($_get_action)) {
38 38
 		/**
39 39
 		 * Fires in WordPress init or admin init, when give_action is present in $_GET.
40 40
 		 *
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 		 *
43 43
 		 * @param array $_GET Array of HTTP GET variables.
44 44
 		 */
45
-		do_action( "give_{$_get_action}", $get_data );
45
+		do_action("give_{$_get_action}", $get_data);
46 46
 	}
47 47
 
48 48
 }
49 49
 
50
-add_action( 'init', 'give_get_actions' );
50
+add_action('init', 'give_get_actions');
51 51
 
52 52
 /**
53 53
  * Hooks Give actions, when present in the $_POST super global. Every give_action
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
  */
61 61
 function give_post_actions() {
62 62
 
63
-	$post_data = give_clean( $_POST ); // WPCS: input var ok, sanitization ok, CSRF ok.
63
+	$post_data = give_clean($_POST); // WPCS: input var ok, sanitization ok, CSRF ok.
64 64
 
65
-	$_post_action = ! empty( $post_data['give_action'] ) ? $post_data['give_action'] : null;
65
+	$_post_action = ! empty($post_data['give_action']) ? $post_data['give_action'] : null;
66 66
 
67 67
 	// Add backward compatibility to give-action param ( $_POST ).
68
-	if ( empty( $_post_action ) ) {
69
-		$_post_action = ! empty( $post_data['give-action'] ) ? $post_data['give-action'] : null;
68
+	if (empty($_post_action)) {
69
+		$_post_action = ! empty($post_data['give-action']) ? $post_data['give-action'] : null;
70 70
 	}
71 71
 
72
-	if ( isset( $_post_action ) ) {
72
+	if (isset($_post_action)) {
73 73
 		/**
74 74
 		 * Fires in WordPress init or admin init, when give_action is present in $_POST.
75 75
 		 *
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
 		 *
78 78
 		 * @param array $_POST Array of HTTP POST variables.
79 79
 		 */
80
-		do_action( "give_{$_post_action}", $post_data );
80
+		do_action("give_{$_post_action}", $post_data);
81 81
 	}
82 82
 
83 83
 }
84 84
 
85
-add_action( 'init', 'give_post_actions' );
85
+add_action('init', 'give_post_actions');
86 86
 
87 87
 /**
88 88
  * Connect WordPress user with Donor.
@@ -94,17 +94,17 @@  discard block
 block discarded – undo
94 94
  *
95 95
  * @return void
96 96
  */
97
-function give_connect_donor_to_wpuser( $user_id, $user_data ) {
97
+function give_connect_donor_to_wpuser($user_id, $user_data) {
98 98
 	/* @var Give_Donor $donor */
99
-	$donor = new Give_Donor( $user_data['user_email'] );
99
+	$donor = new Give_Donor($user_data['user_email']);
100 100
 
101 101
 	// Validate donor id and check if do nor is already connect to wp user or not.
102
-	if ( $donor->id && ! $donor->user_id ) {
102
+	if ($donor->id && ! $donor->user_id) {
103 103
 
104 104
 		// Update donor user_id.
105
-		if ( $donor->update( array( 'user_id' => $user_id ) ) ) {
106
-			$donor_note = sprintf( esc_html__( 'WordPress user #%d is connected to #%d', 'give' ), $user_id, $donor->id );
107
-			$donor->add_note( $donor_note );
105
+		if ($donor->update(array('user_id' => $user_id))) {
106
+			$donor_note = sprintf(esc_html__('WordPress user #%d is connected to #%d', 'give'), $user_id, $donor->id);
107
+			$donor->add_note($donor_note);
108 108
 
109 109
 			// Update user_id meta in payments.
110 110
 			// if( ! empty( $donor->payment_ids ) && ( $donations = explode( ',', $donor->payment_ids ) ) ) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	}
118 118
 }
119 119
 
120
-add_action( 'give_insert_user', 'give_connect_donor_to_wpuser', 10, 2 );
120
+add_action('give_insert_user', 'give_connect_donor_to_wpuser', 10, 2);
121 121
 
122 122
 
123 123
 /**
@@ -127,19 +127,19 @@  discard block
 block discarded – undo
127 127
  *
128 128
  * @param $data
129 129
  */
130
-function give_donor_batch_export_complete( $data ) {
130
+function give_donor_batch_export_complete($data) {
131 131
 	// Remove donor ids cache.
132 132
 	if (
133
-		isset( $data['class'] )
133
+		isset($data['class'])
134 134
 		&& 'Give_Batch_Donors_Export' === $data['class']
135
-		&& ! empty( $data['forms'] )
136
-		&& isset( $data['give_export_option']['query_id'] )
135
+		&& ! empty($data['forms'])
136
+		&& isset($data['give_export_option']['query_id'])
137 137
 	) {
138
-		Give_Cache::delete( Give_Cache::get_key( $data['give_export_option']['query_id'] ) );
138
+		Give_Cache::delete(Give_Cache::get_key($data['give_export_option']['query_id']));
139 139
 	}
140 140
 }
141 141
 
142
-add_action( 'give_file_export_complete', 'give_donor_batch_export_complete' );
142
+add_action('give_file_export_complete', 'give_donor_batch_export_complete');
143 143
 
144 144
 /**
145 145
  * Print css for wordpress setting pages.
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
 	/* @var WP_Screen $screen */
151 151
 	$screen = get_current_screen();
152 152
 
153
-	if ( ! ( $screen instanceof WP_Screen ) ) {
153
+	if ( ! ($screen instanceof WP_Screen)) {
154 154
 		return false;
155 155
 	}
156 156
 
157
-	switch ( true ) {
158
-		case ( 'plugins' === $screen->base || 'plugins-network' === $screen->base ):
157
+	switch (true) {
158
+		case ('plugins' === $screen->base || 'plugins-network' === $screen->base):
159 159
 			?>
160 160
 			<style>
161 161
 				tr.active.update + tr.give-addon-notice-tr td {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	}
193 193
 }
194 194
 
195
-add_action( 'admin_head', 'give_admin_quick_css' );
195
+add_action('admin_head', 'give_admin_quick_css');
196 196
 
197 197
 
198 198
 /**
@@ -204,31 +204,31 @@  discard block
 block discarded – undo
204 204
  *
205 205
  * @return void
206 206
  */
207
-function give_set_donation_levels_max_min_amount( $form_id ) {
207
+function give_set_donation_levels_max_min_amount($form_id) {
208 208
 	if (
209
-		( 'set' === $_POST['_give_price_option'] ) ||
210
-		( in_array( '_give_donation_levels', $_POST ) && count( $_POST['_give_donation_levels'] ) <= 0 ) ||
211
-		! ( $donation_levels_amounts = wp_list_pluck( $_POST['_give_donation_levels'], '_give_amount' ) )
209
+		('set' === $_POST['_give_price_option']) ||
210
+		(in_array('_give_donation_levels', $_POST) && count($_POST['_give_donation_levels']) <= 0) ||
211
+		! ($donation_levels_amounts = wp_list_pluck($_POST['_give_donation_levels'], '_give_amount'))
212 212
 	) {
213 213
 		// Delete old meta.
214
-		give_delete_meta( $form_id, '_give_levels_minimum_amount' );
215
-		give_delete_meta( $form_id, '_give_levels_maximum_amount' );
214
+		give_delete_meta($form_id, '_give_levels_minimum_amount');
215
+		give_delete_meta($form_id, '_give_levels_maximum_amount');
216 216
 
217 217
 		return;
218 218
 	}
219 219
 
220 220
 	// Sanitize donation level amounts.
221
-	$donation_levels_amounts = array_map( 'give_maybe_sanitize_amount', $donation_levels_amounts );
221
+	$donation_levels_amounts = array_map('give_maybe_sanitize_amount', $donation_levels_amounts);
222 222
 
223
-	$min_amount = min( $donation_levels_amounts );
224
-	$max_amount = max( $donation_levels_amounts );
223
+	$min_amount = min($donation_levels_amounts);
224
+	$max_amount = max($donation_levels_amounts);
225 225
 
226 226
 	// Set Minimum and Maximum amount for Multi Level Donation Forms.
227
-	give_update_meta( $form_id, '_give_levels_minimum_amount', $min_amount ? give_sanitize_amount_for_db( $min_amount ) : 0 );
228
-	give_update_meta( $form_id, '_give_levels_maximum_amount', $max_amount ? give_sanitize_amount_for_db( $max_amount ) : 0 );
227
+	give_update_meta($form_id, '_give_levels_minimum_amount', $min_amount ? give_sanitize_amount_for_db($min_amount) : 0);
228
+	give_update_meta($form_id, '_give_levels_maximum_amount', $max_amount ? give_sanitize_amount_for_db($max_amount) : 0);
229 229
 }
230 230
 
231
-add_action( 'give_pre_process_give_forms_meta', 'give_set_donation_levels_max_min_amount', 30 );
231
+add_action('give_pre_process_give_forms_meta', 'give_set_donation_levels_max_min_amount', 30);
232 232
 
233 233
 
234 234
 /**
@@ -238,23 +238,23 @@  discard block
 block discarded – undo
238 238
  *
239 239
  * @param int $payment_id
240 240
  */
241
-function _give_save_donor_billing_address( $payment_id ) {
242
-	$donor_id  = absint( give_get_payment_donor_id( $payment_id ));
241
+function _give_save_donor_billing_address($payment_id) {
242
+	$donor_id = absint(give_get_payment_donor_id($payment_id));
243 243
 
244 244
 	// Bailout
245
-	if ( ! $donor_id ) {
245
+	if ( ! $donor_id) {
246 246
 		return;
247 247
 	}
248 248
 
249 249
 
250 250
 	/* @var Give_Donor $donor */
251
-	$donor = new Give_Donor( $donor_id );
251
+	$donor = new Give_Donor($donor_id);
252 252
 
253 253
 	// Save address.
254
-	$donor->add_address( 'billing[]', give_get_donation_address( $payment_id ) );
254
+	$donor->add_address('billing[]', give_get_donation_address($payment_id));
255 255
 }
256 256
 
257
-add_action( 'give_complete_donation', '_give_save_donor_billing_address', 9999 );
257
+add_action('give_complete_donation', '_give_save_donor_billing_address', 9999);
258 258
 
259 259
 
260 260
 /**
@@ -264,26 +264,26 @@  discard block
 block discarded – undo
264 264
  *
265 265
  * @param array $args
266 266
  */
267
-function give_update_log_form_id( $args ) {
268
-	$new_form_id = absint( $args[0] );
269
-	$payment_id  = absint( $args[1] );
270
-	$logs        = Give()->logs->get_logs( $payment_id );
267
+function give_update_log_form_id($args) {
268
+	$new_form_id = absint($args[0]);
269
+	$payment_id  = absint($args[1]);
270
+	$logs        = Give()->logs->get_logs($payment_id);
271 271
 
272 272
 	// Bailout.
273
-	if ( empty( $logs ) ) {
273
+	if (empty($logs)) {
274 274
 		return;
275 275
 	}
276 276
 
277 277
 	/* @var object $log */
278
-	foreach ( $logs as $log ) {
279
-		Give()->logs->logmeta_db->update_meta( $log->ID, '_give_log_form_id', $new_form_id );
278
+	foreach ($logs as $log) {
279
+		Give()->logs->logmeta_db->update_meta($log->ID, '_give_log_form_id', $new_form_id);
280 280
 	}
281 281
 
282 282
 	// Delete cache.
283 283
 	Give()->logs->delete_cache();
284 284
 }
285 285
 
286
-add_action( 'give_update_log_form_id', 'give_update_log_form_id' );
286
+add_action('give_update_log_form_id', 'give_update_log_form_id');
287 287
 
288 288
 /**
289 289
  * Verify addon dependency before addon update
@@ -295,22 +295,22 @@  discard block
 block discarded – undo
295 295
  *
296 296
  * @return WP_Error
297 297
  */
298
-function __give_verify_addon_dependency_before_update( $error, $hook_extra ) {
298
+function __give_verify_addon_dependency_before_update($error, $hook_extra) {
299 299
 	// Bailout.
300
-	if ( is_wp_error( $error ) ) {
300
+	if (is_wp_error($error)) {
301 301
 		return $error;
302 302
 	}
303 303
 
304
-	$plugin_base    = strtolower( $hook_extra['plugin'] );
305
-	$licensed_addon = array_map( 'strtolower', Give_License::get_licensed_addons() );
304
+	$plugin_base    = strtolower($hook_extra['plugin']);
305
+	$licensed_addon = array_map('strtolower', Give_License::get_licensed_addons());
306 306
 
307 307
 	// Skip if not a Give addon.
308
-	if ( ! in_array( $plugin_base, $licensed_addon ) ) {
308
+	if ( ! in_array($plugin_base, $licensed_addon)) {
309 309
 		return $error;
310 310
 	}
311 311
 
312
-	$plugin_base = strtolower( $plugin_base );
313
-	$plugin_slug = str_replace( '.php', '', basename( $plugin_base ) );
312
+	$plugin_base = strtolower($plugin_base);
313
+	$plugin_slug = str_replace('.php', '', basename($plugin_base));
314 314
 
315 315
 	/**
316 316
 	 * Filter the addon readme.txt url
@@ -323,15 +323,15 @@  discard block
 block discarded – undo
323 323
 		$plugin_slug
324 324
 	);
325 325
 
326
-	$parser           = new Give_Readme_Parser( $url );
326
+	$parser           = new Give_Readme_Parser($url);
327 327
 	$give_min_version = $parser->requires_at_least();
328 328
 
329 329
 
330
-	if ( version_compare( GIVE_VERSION, $give_min_version, '<' ) ) {
330
+	if (version_compare(GIVE_VERSION, $give_min_version, '<')) {
331 331
 		return new WP_Error(
332 332
 			'Give_Addon_Update_Error',
333 333
 			sprintf(
334
-				__( 'Give version %s is required to update this add-on.', 'give' ),
334
+				__('Give version %s is required to update this add-on.', 'give'),
335 335
 				$give_min_version
336 336
 			)
337 337
 		);
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 	return $error;
341 341
 }
342 342
 
343
-add_filter( 'upgrader_pre_install', '__give_verify_addon_dependency_before_update', 10, 2 );
343
+add_filter('upgrader_pre_install', '__give_verify_addon_dependency_before_update', 10, 2);
344 344
 
345 345
 /**
346 346
  * Function to add suppress_filters param if WPML add-on is activated.
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
  *
352 352
  * @return array WP query argument for Total Goal.
353 353
  */
354
-function __give_wpml_total_goal_shortcode_agrs( $args ) {
354
+function __give_wpml_total_goal_shortcode_agrs($args) {
355 355
 	$args['suppress_filters'] = true;
356 356
 
357 357
 	return $args;
@@ -386,19 +386,19 @@  discard block
 block discarded – undo
386 386
  * @since 2.1.4
387 387
  */
388 388
 function give_add_support_for_wpml() {
389
-	if ( ! function_exists( 'is_plugin_active' ) ) {
390
-		include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
389
+	if ( ! function_exists('is_plugin_active')) {
390
+		include_once(ABSPATH.'wp-admin/includes/plugin.php');
391 391
 	}
392 392
 
393 393
 
394
-	if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
394
+	if (is_plugin_active('sitepress-multilingual-cms/sitepress.php')) {
395 395
 
396
-		add_filter( 'give_totals_goal_shortcode_query_args', '__give_wpml_total_goal_shortcode_agrs' );
396
+		add_filter('give_totals_goal_shortcode_query_args', '__give_wpml_total_goal_shortcode_agrs');
397 397
 
398 398
 		// @see https://wpml.org/forums/topic/problem-with-query-filter-in-get_posts-function/#post-271309
399
-		add_action( 'give_totals_goal_shortcode_before_render', '__give_remove_wpml_parse_query_filter', 99 );
400
-		add_action( 'give_totals_goal_shortcode_after_render', '__give_add_wpml_parse_query_filter', 99 );
399
+		add_action('give_totals_goal_shortcode_before_render', '__give_remove_wpml_parse_query_filter', 99);
400
+		add_action('give_totals_goal_shortcode_after_render', '__give_add_wpml_parse_query_filter', 99);
401 401
 	}
402 402
 }
403 403
 
404
-add_action( 'give_init', 'give_add_support_for_wpml', 1000 );
404
+add_action('give_init', 'give_add_support_for_wpml', 1000);
Please login to merge, or discard this patch.
includes/class-give-html-elements.php 1 patch
Spacing   +159 added lines, -159 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
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 *
36 36
 	 * @return string       Donations dropdown.
37 37
 	 */
38
-	public function donations_dropdown( $args = array() ) {
38
+	public function donations_dropdown($args = array()) {
39 39
 
40 40
 		$defaults = array(
41 41
 			'name'        => 'donations',
@@ -45,32 +45,32 @@  discard block
 block discarded – undo
45 45
 			'selected'    => 0,
46 46
 			'chosen'      => false,
47 47
 			'number'      => 30,
48
-			'placeholder' => __( 'Select a donation', 'give' ),
48
+			'placeholder' => __('Select a donation', 'give'),
49 49
 		);
50 50
 
51
-		$args = wp_parse_args( $args, $defaults );
51
+		$args = wp_parse_args($args, $defaults);
52 52
 
53
-		$payments = new Give_Payments_Query( array(
53
+		$payments = new Give_Payments_Query(array(
54 54
 			'number' => $args['number'],
55
-		) );
55
+		));
56 56
 
57 57
 		$payments = $payments->get_payments();
58 58
 
59 59
 		$options = array();
60 60
 
61 61
 		// Provide nice human readable options.
62
-		if ( $payments ) {
62
+		if ($payments) {
63 63
 			$options[0] = $args['placeholder'];
64
-			foreach ( $payments as $payment ) {
64
+			foreach ($payments as $payment) {
65 65
 
66
-				$options[ absint( $payment->ID ) ] = esc_html( '#' . $payment->ID . ' - ' . $payment->email . ' - ' . $payment->form_title );
66
+				$options[absint($payment->ID)] = esc_html('#'.$payment->ID.' - '.$payment->email.' - '.$payment->form_title);
67 67
 
68 68
 			}
69 69
 		} else {
70
-			$options[0] = __( 'No donations found.', 'give' );
70
+			$options[0] = __('No donations found.', 'give');
71 71
 		}
72 72
 
73
-		$output = $this->select( array(
73
+		$output = $this->select(array(
74 74
 			'name'             => $args['name'],
75 75
 			'selected'         => $args['selected'],
76 76
 			'id'               => $args['id'],
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 			'select_atts'      => $args['select_atts'],
83 83
 			'show_option_all'  => false,
84 84
 			'show_option_none' => false,
85
-		) );
85
+		));
86 86
 
87 87
 		return $output;
88 88
 	}
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @return string      Give forms dropdown.
101 101
 	 */
102
-	public function forms_dropdown( $args = array() ) {
102
+	public function forms_dropdown($args = array()) {
103 103
 
104 104
 		$defaults = array(
105 105
 			'name'        => 'forms',
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
 			'selected'    => 0,
110 110
 			'chosen'      => false,
111 111
 			'number'      => 30,
112
-			'placeholder' => esc_attr__( 'All Forms', 'give' ),
112
+			'placeholder' => esc_attr__('All Forms', 'give'),
113 113
 			'data'        => array(
114 114
 				'search-type' => 'form',
115 115
 			),
116 116
 			'query_args' => array()
117 117
 		);
118 118
 
119
-		$args = wp_parse_args( $args, $defaults );
119
+		$args = wp_parse_args($args, $defaults);
120 120
 
121 121
 		$form_args = wp_parse_args(
122 122
 			$args['query_args'],
@@ -128,37 +128,37 @@  discard block
 block discarded – undo
128 128
 			)
129 129
 		);
130 130
 
131
-		$cache_key   = Give_Cache::get_key( 'give_forms', $form_args, false );
131
+		$cache_key = Give_Cache::get_key('give_forms', $form_args, false);
132 132
 
133 133
 		// Get forms from cache.
134
-		$forms = Give_Cache::get_db_query( $cache_key );
134
+		$forms = Give_Cache::get_db_query($cache_key);
135 135
 
136
-		if ( is_null( $forms ) ) {
137
-			$forms = new WP_Query( $form_args );
136
+		if (is_null($forms)) {
137
+			$forms = new WP_Query($form_args);
138 138
 			$forms = $forms->posts;
139
-			Give_Cache::set_db_query( $cache_key, $forms );
139
+			Give_Cache::set_db_query($cache_key, $forms);
140 140
 		}
141 141
 
142 142
 		$options = array();
143 143
 
144 144
 		// Ensure the selected.
145
-		if ( false !== $args['selected'] && $args['selected'] !== 0 ) {
146
-			$options[ $args['selected'] ] = get_the_title( $args['selected'] );
145
+		if (false !== $args['selected'] && $args['selected'] !== 0) {
146
+			$options[$args['selected']] = get_the_title($args['selected']);
147 147
 		}
148 148
 
149
-		$options[0] = esc_html__( 'No forms found.', 'give' );
150
-		if ( ! empty( $forms ) ) {
149
+		$options[0] = esc_html__('No forms found.', 'give');
150
+		if ( ! empty($forms)) {
151 151
 			$options[0] = $args['placeholder'];
152
-			foreach ( $forms as $form ) {
153
-				$form_title = empty( $form->post_title )
154
-					? sprintf( __( 'Untitled (#%s)', 'give' ), $form->ID )
152
+			foreach ($forms as $form) {
153
+				$form_title = empty($form->post_title)
154
+					? sprintf(__('Untitled (#%s)', 'give'), $form->ID)
155 155
 					: $form->post_title;
156 156
 
157
-				$options[ absint( $form->ID ) ] = esc_html( $form_title );
157
+				$options[absint($form->ID)] = esc_html($form_title);
158 158
 			}
159 159
 		}
160 160
 
161
-		$output = $this->select( array(
161
+		$output = $this->select(array(
162 162
 			'name'             => $args['name'],
163 163
 			'selected'         => $args['selected'],
164 164
 			'id'               => $args['id'],
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 			'show_option_all'  => false,
171 171
 			'show_option_none' => false,
172 172
 			'data'             => $args['data'],
173
-		) );
173
+		));
174 174
 
175 175
 		return $output;
176 176
 	}
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 *
188 188
 	 * @return string      Donors dropdown.
189 189
 	 */
190
-	public function donor_dropdown( $args = array() ) {
190
+	public function donor_dropdown($args = array()) {
191 191
 
192 192
 		$defaults = array(
193 193
 			'name'        => 'donors',
@@ -196,58 +196,58 @@  discard block
 block discarded – undo
196 196
 			'multiple'    => false,
197 197
 			'selected'    => 0,
198 198
 			'chosen'      => true,
199
-			'placeholder' => esc_attr__( 'Select a Donor', 'give' ),
199
+			'placeholder' => esc_attr__('Select a Donor', 'give'),
200 200
 			'number'      => 30,
201 201
 			'data'        => array(
202 202
 				'search-type' => 'donor',
203 203
 			),
204 204
 		);
205 205
 
206
-		$args = wp_parse_args( $args, $defaults );
206
+		$args = wp_parse_args($args, $defaults);
207 207
 
208
-		$donors = Give()->donors->get_donors( array(
208
+		$donors = Give()->donors->get_donors(array(
209 209
 			'number' => $args['number'],
210
-		) );
210
+		));
211 211
 
212 212
 		$options = array();
213 213
 
214
-		if ( $donors ) {
215
-			$options[0] = esc_html__( 'No donor attached', 'give' );
216
-			foreach ( $donors as $donor ) {
217
-				$donor = give_get_name_with_title_prefixes( $donor );
218
-				$options[ absint( $donor->id ) ] = esc_html( $donor->name . ' (' . $donor->email . ')' );
214
+		if ($donors) {
215
+			$options[0] = esc_html__('No donor attached', 'give');
216
+			foreach ($donors as $donor) {
217
+				$donor = give_get_name_with_title_prefixes($donor);
218
+				$options[absint($donor->id)] = esc_html($donor->name.' ('.$donor->email.')');
219 219
 			}
220 220
 		} else {
221
-			$options[0] = esc_html__( 'No donors found.', 'give' );
221
+			$options[0] = esc_html__('No donors found.', 'give');
222 222
 		}
223 223
 
224
-		if ( ! empty( $args['selected'] ) ) {
224
+		if ( ! empty($args['selected'])) {
225 225
 
226 226
 			// If a selected customer has been specified, we need to ensure it's in the initial list of customers displayed.
227
-			if ( ! array_key_exists( $args['selected'], $options ) ) {
227
+			if ( ! array_key_exists($args['selected'], $options)) {
228 228
 
229
-				$donor = new Give_Donor( $args['selected'] );
229
+				$donor = new Give_Donor($args['selected']);
230 230
 
231
-				if ( $donor ) {
232
-					$donor = give_get_name_with_title_prefixes( $donor );
233
-					$options[ absint( $args['selected'] ) ] = esc_html( $donor->name . ' (' . $donor->email . ')' );
231
+				if ($donor) {
232
+					$donor = give_get_name_with_title_prefixes($donor);
233
+					$options[absint($args['selected'])] = esc_html($donor->name.' ('.$donor->email.')');
234 234
 
235 235
 				}
236 236
 			}
237 237
 		}
238 238
 
239
-		$output = $this->select( array(
239
+		$output = $this->select(array(
240 240
 			'name'             => $args['name'],
241 241
 			'selected'         => $args['selected'],
242 242
 			'id'               => $args['id'],
243
-			'class'            => $args['class'] . ' give-customer-select',
243
+			'class'            => $args['class'].' give-customer-select',
244 244
 			'options'          => $options,
245 245
 			'multiple'         => $args['multiple'],
246 246
 			'chosen'           => $args['chosen'],
247 247
 			'show_option_all'  => false,
248 248
 			'show_option_none' => false,
249 249
 			'data'             => $args['data'],
250
-		) );
250
+		));
251 251
 
252 252
 		return $output;
253 253
 	}
@@ -266,22 +266,22 @@  discard block
 block discarded – undo
266 266
 	 *
267 267
 	 * @return string           Categories dropdown.
268 268
 	 */
269
-	public function category_dropdown( $name = 'give_forms_categories', $selected = 0, $args = array() ) {
270
-		$categories = get_terms( 'give_forms_category', apply_filters( 'give_forms_category_dropdown', array() ) );
269
+	public function category_dropdown($name = 'give_forms_categories', $selected = 0, $args = array()) {
270
+		$categories = get_terms('give_forms_category', apply_filters('give_forms_category_dropdown', array()));
271 271
 
272 272
 		$options = array();
273 273
 
274
-		foreach ( $categories as $category ) {
275
-			$options[ absint( $category->term_id ) ] = esc_html( $category->name );
274
+		foreach ($categories as $category) {
275
+			$options[absint($category->term_id)] = esc_html($category->name);
276 276
 		}
277 277
 
278
-		$output = $this->select( wp_parse_args( $args, array(
278
+		$output = $this->select(wp_parse_args($args, array(
279 279
 			'name'             => $name,
280 280
 			'selected'         => $selected,
281 281
 			'options'          => $options,
282
-			'show_option_all'  => esc_html__( 'All Categories', 'give' ),
282
+			'show_option_all'  => esc_html__('All Categories', 'give'),
283 283
 			'show_option_none' => false,
284
-		) ) );
284
+		)));
285 285
 
286 286
 		return $output;
287 287
 	}
@@ -300,22 +300,22 @@  discard block
 block discarded – undo
300 300
 	 *
301 301
 	 * @return string           Tags dropdown.
302 302
 	 */
303
-	public function tags_dropdown( $name = 'give_forms_tags', $selected = 0, $args = array() ) {
304
-		$tags    = get_terms( 'give_forms_tag', apply_filters( 'give_forms_tag_dropdown', array() ) );
303
+	public function tags_dropdown($name = 'give_forms_tags', $selected = 0, $args = array()) {
304
+		$tags    = get_terms('give_forms_tag', apply_filters('give_forms_tag_dropdown', array()));
305 305
 
306 306
 		$options = array();
307 307
 
308
-		foreach ( $tags as $tag ) {
309
-			$options[ absint( $tag->term_id ) ] = esc_html( $tag->name );
308
+		foreach ($tags as $tag) {
309
+			$options[absint($tag->term_id)] = esc_html($tag->name);
310 310
 		}
311 311
 
312
-		$output = $this->select( wp_parse_args( $args, array(
312
+		$output = $this->select(wp_parse_args($args, array(
313 313
 			'name'             => $name,
314 314
 			'selected'         => $selected,
315 315
 			'options'          => $options,
316
-			'show_option_all'  => esc_html__( 'All Tags', 'give' ),
316
+			'show_option_all'  => esc_html__('All Tags', 'give'),
317 317
 			'show_option_none' => false,
318
-		) ) );
318
+		)));
319 319
 
320 320
 		return $output;
321 321
 	}
@@ -335,25 +335,25 @@  discard block
 block discarded – undo
335 335
 	 *
336 336
 	 * @return string               Years dropdown.
337 337
 	 */
338
-	public function year_dropdown( $name = 'year', $selected = 0, $years_before = 5, $years_after = 0 ) {
339
-		$current    = date( 'Y' );
340
-		$start_year = $current - absint( $years_before );
341
-		$end_year   = $current + absint( $years_after );
342
-		$selected   = empty( $selected ) ? date( 'Y' ) : $selected;
338
+	public function year_dropdown($name = 'year', $selected = 0, $years_before = 5, $years_after = 0) {
339
+		$current    = date('Y');
340
+		$start_year = $current - absint($years_before);
341
+		$end_year   = $current + absint($years_after);
342
+		$selected   = empty($selected) ? date('Y') : $selected;
343 343
 		$options    = array();
344 344
 
345
-		while ( $start_year <= $end_year ) {
346
-			$options[ absint( $start_year ) ] = $start_year;
347
-			$start_year ++;
345
+		while ($start_year <= $end_year) {
346
+			$options[absint($start_year)] = $start_year;
347
+			$start_year++;
348 348
 		}
349 349
 
350
-		$output = $this->select( array(
350
+		$output = $this->select(array(
351 351
 			'name'             => $name,
352 352
 			'selected'         => $selected,
353 353
 			'options'          => $options,
354 354
 			'show_option_all'  => false,
355 355
 			'show_option_none' => false,
356
-		) );
356
+		));
357 357
 
358 358
 		return $output;
359 359
 	}
@@ -371,23 +371,23 @@  discard block
 block discarded – undo
371 371
 	 *
372 372
 	 * @return string           Months dropdown.
373 373
 	 */
374
-	public function month_dropdown( $name = 'month', $selected = 0 ) {
374
+	public function month_dropdown($name = 'month', $selected = 0) {
375 375
 		$month    = 1;
376 376
 		$options  = array();
377
-		$selected = empty( $selected ) ? date( 'n' ) : $selected;
377
+		$selected = empty($selected) ? date('n') : $selected;
378 378
 
379
-		while ( $month <= 12 ) {
380
-			$options[ absint( $month ) ] = give_month_num_to_name( $month );
381
-			$month ++;
379
+		while ($month <= 12) {
380
+			$options[absint($month)] = give_month_num_to_name($month);
381
+			$month++;
382 382
 		}
383 383
 
384
-		$output = $this->select( array(
384
+		$output = $this->select(array(
385 385
 			'name'             => $name,
386 386
 			'selected'         => $selected,
387 387
 			'options'          => $options,
388 388
 			'show_option_all'  => false,
389 389
 			'show_option_none' => false,
390
-		) );
390
+		));
391 391
 
392 392
 		return $output;
393 393
 	}
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	 *
405 405
 	 * @return string      The dropdown.
406 406
 	 */
407
-	public function select( $args = array() ) {
407
+	public function select($args = array()) {
408 408
 		$defaults = array(
409 409
 			'options'          => array(),
410 410
 			'name'             => null,
@@ -415,74 +415,74 @@  discard block
 block discarded – undo
415 415
 			'placeholder'      => null,
416 416
 			'multiple'         => false,
417 417
 			'select_atts'      => false,
418
-			'show_option_all'  => __( 'All', 'give' ),
419
-			'show_option_none' => __( 'None', 'give' ),
418
+			'show_option_all'  => __('All', 'give'),
419
+			'show_option_none' => __('None', 'give'),
420 420
 			'data'             => array(),
421 421
 			'readonly'         => false,
422 422
 			'disabled'         => false,
423 423
 		);
424 424
 
425
-		$args = wp_parse_args( $args, $defaults );
425
+		$args = wp_parse_args($args, $defaults);
426 426
 
427 427
 		$data_elements = '';
428
-		foreach ( $args['data'] as $key => $value ) {
429
-			$data_elements .= ' data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
428
+		foreach ($args['data'] as $key => $value) {
429
+			$data_elements .= ' data-'.esc_attr($key).'="'.esc_attr($value).'"';
430 430
 		}
431 431
 
432 432
 		$multiple = '';
433
-		if ( $args['multiple'] ) {
433
+		if ($args['multiple']) {
434 434
 			$multiple = 'MULTIPLE';
435 435
 		}
436 436
 
437
-		if ( $args['chosen'] ) {
437
+		if ($args['chosen']) {
438 438
 			$args['class'] .= ' give-select-chosen';
439 439
 		}
440 440
 
441 441
 		$placeholder = '';
442
-		if ( $args['placeholder'] ) {
442
+		if ($args['placeholder']) {
443 443
 			$placeholder = $args['placeholder'];
444 444
 		}
445 445
 
446 446
 		$output = sprintf(
447 447
 			'<select name="%1$s" id="%2$s" autocomplete="address-level4" class="give-select %3$s" %4$s %5$s placeholder="%6$s" data-placeholder="%6$s" %7$s>',
448
-			esc_attr( $args['name'] ),
449
-			esc_attr( sanitize_key( str_replace( '-', '_', $args['id'] ) ) ),
450
-			esc_attr( $args['class'] ),
448
+			esc_attr($args['name']),
449
+			esc_attr(sanitize_key(str_replace('-', '_', $args['id']))),
450
+			esc_attr($args['class']),
451 451
 			$multiple,
452 452
 			$args['select_atts'],
453 453
 			$placeholder,
454 454
 			$data_elements
455 455
 		);
456 456
 
457
-		if ( $args['show_option_all'] ) {
458
-			if ( $args['multiple'] ) {
459
-				$selected = selected( true, in_array( 0, $args['selected'] ), false );
457
+		if ($args['show_option_all']) {
458
+			if ($args['multiple']) {
459
+				$selected = selected(true, in_array(0, $args['selected']), false);
460 460
 			} else {
461
-				$selected = selected( $args['selected'], 0, false );
461
+				$selected = selected($args['selected'], 0, false);
462 462
 			}
463
-			$output .= '<option value="all"' . $selected . '>' . esc_html( $args['show_option_all'] ) . '</option>';
463
+			$output .= '<option value="all"'.$selected.'>'.esc_html($args['show_option_all']).'</option>';
464 464
 		}
465 465
 
466
-		if ( ! empty( $args['options'] ) ) {
466
+		if ( ! empty($args['options'])) {
467 467
 
468
-			if ( $args['show_option_none'] ) {
469
-				if ( $args['multiple'] ) {
470
-					$selected = selected( true, in_array( - 1, $args['selected'] ), false );
468
+			if ($args['show_option_none']) {
469
+				if ($args['multiple']) {
470
+					$selected = selected(true, in_array( -1, $args['selected'] ), false);
471 471
 				} else {
472
-					$selected = selected( $args['selected'], - 1, false );
472
+					$selected = selected($args['selected'], - 1, false);
473 473
 				}
474
-				$output .= '<option value="-1"' . $selected . '>' . esc_html( $args['show_option_none'] ) . '</option>';
474
+				$output .= '<option value="-1"'.$selected.'>'.esc_html($args['show_option_none']).'</option>';
475 475
 			}
476 476
 
477
-			foreach ( $args['options'] as $key => $option ) {
477
+			foreach ($args['options'] as $key => $option) {
478 478
 
479
-				if ( $args['multiple'] && is_array( $args['selected'] ) ) {
480
-					$selected = selected( true, in_array( $key, $args['selected'] ), false );
479
+				if ($args['multiple'] && is_array($args['selected'])) {
480
+					$selected = selected(true, in_array($key, $args['selected']), false);
481 481
 				} else {
482
-					$selected = selected( $args['selected'], $key, false );
482
+					$selected = selected($args['selected'], $key, false);
483 483
 				}
484 484
 
485
-				$output .= '<option value="' . esc_attr( $key ) . '"' . $selected . '>' . esc_html( $option ) . '</option>';
485
+				$output .= '<option value="'.esc_attr($key).'"'.$selected.'>'.esc_html($option).'</option>';
486 486
 			}
487 487
 		}
488 488
 
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 	 *
504 504
 	 * @return string      The checkbox.
505 505
 	 */
506
-	public function checkbox( $args = array() ) {
506
+	public function checkbox($args = array()) {
507 507
 		$defaults = array(
508 508
 			'name'    => null,
509 509
 			'current' => null,
@@ -514,16 +514,16 @@  discard block
 block discarded – undo
514 514
 			),
515 515
 		);
516 516
 
517
-		$args = wp_parse_args( $args, $defaults );
517
+		$args = wp_parse_args($args, $defaults);
518 518
 
519 519
 		$options = '';
520
-		if ( ! empty( $args['options']['disabled'] ) ) {
520
+		if ( ! empty($args['options']['disabled'])) {
521 521
 			$options .= ' disabled="disabled"';
522
-		} elseif ( ! empty( $args['options']['readonly'] ) ) {
522
+		} elseif ( ! empty($args['options']['readonly'])) {
523 523
 			$options .= ' readonly';
524 524
 		}
525 525
 
526
-		$output = '<input type="checkbox"' . $options . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['name'] ) . '" class="' . $args['class'] . ' ' . esc_attr( $args['name'] ) . '" ' . checked( 1, $args['current'], false ) . ' />';
526
+		$output = '<input type="checkbox"'.$options.' name="'.esc_attr($args['name']).'" id="'.esc_attr($args['name']).'" class="'.$args['class'].' '.esc_attr($args['name']).'" '.checked(1, $args['current'], false).' />';
527 527
 
528 528
 		return $output;
529 529
 	}
@@ -540,22 +540,22 @@  discard block
 block discarded – undo
540 540
 	 *
541 541
 	 * @return string      The text field.
542 542
 	 */
543
-	public function text( $args = array() ) {
543
+	public function text($args = array()) {
544 544
 		// Backwards compatibility.
545
-		if ( func_num_args() > 1 ) {
545
+		if (func_num_args() > 1) {
546 546
 			$args = func_get_args();
547 547
 
548 548
 			$name  = $args[0];
549
-			$value = isset( $args[1] ) ? $args[1] : '';
550
-			$label = isset( $args[2] ) ? $args[2] : '';
551
-			$desc  = isset( $args[3] ) ? $args[3] : '';
549
+			$value = isset($args[1]) ? $args[1] : '';
550
+			$label = isset($args[2]) ? $args[2] : '';
551
+			$desc  = isset($args[3]) ? $args[3] : '';
552 552
 		}
553 553
 
554 554
 		$defaults = array(
555
-			'name'         => isset( $name ) ? $name : 'text',
556
-			'value'        => isset( $value ) ? $value : null,
557
-			'label'        => isset( $label ) ? $label : null,
558
-			'desc'         => isset( $desc ) ? $desc : null,
555
+			'name'         => isset($name) ? $name : 'text',
556
+			'value'        => isset($value) ? $value : null,
557
+			'label'        => isset($label) ? $label : null,
558
+			'desc'         => isset($desc) ? $desc : null,
559 559
 			'placeholder'  => '',
560 560
 			'class'        => 'regular-text',
561 561
 			'disabled'     => false,
@@ -563,29 +563,29 @@  discard block
 block discarded – undo
563 563
 			'data'         => false,
564 564
 		);
565 565
 
566
-		$args = wp_parse_args( $args, $defaults );
566
+		$args = wp_parse_args($args, $defaults);
567 567
 
568 568
 		$disabled = '';
569
-		if ( $args['disabled'] ) {
569
+		if ($args['disabled']) {
570 570
 			$disabled = ' disabled="disabled"';
571 571
 		}
572 572
 
573 573
 		$data = '';
574
-		if ( ! empty( $args['data'] ) ) {
575
-			foreach ( $args['data'] as $key => $value ) {
576
-				$data .= 'data-' . $key . '="' . $value . '" ';
574
+		if ( ! empty($args['data'])) {
575
+			foreach ($args['data'] as $key => $value) {
576
+				$data .= 'data-'.$key.'="'.$value.'" ';
577 577
 			}
578 578
 		}
579 579
 
580
-		$output = '<span id="give-' . sanitize_key( $args['name'] ) . '-wrap">';
580
+		$output = '<span id="give-'.sanitize_key($args['name']).'-wrap">';
581 581
 
582
-		$output .= '<label class="give-label" for="give-' . sanitize_key( $args['name'] ) . '">' . esc_html( $args['label'] ) . '</label>';
582
+		$output .= '<label class="give-label" for="give-'.sanitize_key($args['name']).'">'.esc_html($args['label']).'</label>';
583 583
 
584
-		if ( ! empty( $args['desc'] ) ) {
585
-			$output .= '<span class="give-description">' . esc_html( $args['desc'] ) . '</span>';
584
+		if ( ! empty($args['desc'])) {
585
+			$output .= '<span class="give-description">'.esc_html($args['desc']).'</span>';
586 586
 		}
587 587
 
588
-		$output .= '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['name'] ) . '" autocomplete="' . esc_attr( $args['autocomplete'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="' . $args['class'] . '" ' . $data . '' . $disabled . '/>';
588
+		$output .= '<input type="text" name="'.esc_attr($args['name']).'" id="'.esc_attr($args['name']).'" autocomplete="'.esc_attr($args['autocomplete']).'" value="'.esc_attr($args['value']).'" placeholder="'.esc_attr($args['placeholder']).'" class="'.$args['class'].'" '.$data.''.$disabled.'/>';
589 589
 
590 590
 		$output .= '</span>';
591 591
 
@@ -604,15 +604,15 @@  discard block
 block discarded – undo
604 604
 	 *
605 605
 	 * @return string      The date picker.
606 606
 	 */
607
-	public function date_field( $args = array() ) {
607
+	public function date_field($args = array()) {
608 608
 
609
-		if ( empty( $args['class'] ) ) {
609
+		if (empty($args['class'])) {
610 610
 			$args['class'] = 'give_datepicker';
611
-		} elseif ( ! strpos( $args['class'], 'give_datepicker' ) ) {
611
+		} elseif ( ! strpos($args['class'], 'give_datepicker')) {
612 612
 			$args['class'] .= ' give_datepicker';
613 613
 		}
614 614
 
615
-		return $this->text( $args );
615
+		return $this->text($args);
616 616
 	}
617 617
 
618 618
 	/**
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 	 *
628 628
 	 * @return string      The textarea.
629 629
 	 */
630
-	public function textarea( $args = array() ) {
630
+	public function textarea($args = array()) {
631 631
 		$defaults = array(
632 632
 			'name'     => 'textarea',
633 633
 			'value'    => null,
@@ -637,21 +637,21 @@  discard block
 block discarded – undo
637 637
 			'disabled' => false,
638 638
 		);
639 639
 
640
-		$args = wp_parse_args( $args, $defaults );
640
+		$args = wp_parse_args($args, $defaults);
641 641
 
642 642
 		$disabled = '';
643
-		if ( $args['disabled'] ) {
643
+		if ($args['disabled']) {
644 644
 			$disabled = ' disabled="disabled"';
645 645
 		}
646 646
 
647
-		$output = '<span id="give-' . sanitize_key( $args['name'] ) . '-wrap">';
647
+		$output = '<span id="give-'.sanitize_key($args['name']).'-wrap">';
648 648
 
649
-		$output .= '<label class="give-label" for="give-' . sanitize_key( $args['name'] ) . '">' . esc_html( $args['label'] ) . '</label>';
649
+		$output .= '<label class="give-label" for="give-'.sanitize_key($args['name']).'">'.esc_html($args['label']).'</label>';
650 650
 
651
-		$output .= '<textarea name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['name'] ) . '" class="' . $args['class'] . '"' . $disabled . '>' . esc_attr( $args['value'] ) . '</textarea>';
651
+		$output .= '<textarea name="'.esc_attr($args['name']).'" id="'.esc_attr($args['name']).'" class="'.$args['class'].'"'.$disabled.'>'.esc_attr($args['value']).'</textarea>';
652 652
 
653
-		if ( ! empty( $args['desc'] ) ) {
654
-			$output .= '<span class="give-description">' . esc_html( $args['desc'] ) . '</span>';
653
+		if ( ! empty($args['desc'])) {
654
+			$output .= '<span class="give-description">'.esc_html($args['desc']).'</span>';
655 655
 		}
656 656
 
657 657
 		$output .= '</span>';
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
 	 *
672 672
 	 * @return string      The text field with ajax search.
673 673
 	 */
674
-	public function ajax_user_search( $args = array() ) {
674
+	public function ajax_user_search($args = array()) {
675 675
 
676 676
 		$defaults = array(
677 677
 			'name'        => 'users',
@@ -682,13 +682,13 @@  discard block
 block discarded – undo
682 682
 			'chosen'      => true,
683 683
 			'number'      => 30,
684 684
 			'select_atts' => '',
685
-			'placeholder' => __( 'Select a user', 'give' ),
685
+			'placeholder' => __('Select a user', 'give'),
686 686
 			'data'        => array(
687 687
 				'search-type' => 'user',
688 688
 			),
689 689
 		);
690 690
 
691
-		$args = wp_parse_args( $args, $defaults );
691
+		$args = wp_parse_args($args, $defaults);
692 692
 
693 693
 		// Set initial args.
694 694
 		$get_users_args = array(
@@ -697,31 +697,31 @@  discard block
 block discarded – undo
697 697
 
698 698
 		// Ensure selected user is not included in initial query.
699 699
 		// This is because sites with many users, it's not a guarantee the selected user will be returned.
700
-		if ( ! empty( $args['selected'] ) ) {
700
+		if ( ! empty($args['selected'])) {
701 701
 			$get_users_args['exclude'] = $args['selected'];
702 702
 		}
703 703
 
704 704
 		// Initial users array.
705
-		$users = apply_filters( 'give_ajax_user_search_initial_results', get_users( $get_users_args ), $args );
705
+		$users = apply_filters('give_ajax_user_search_initial_results', get_users($get_users_args), $args);
706 706
 
707 707
 		// Now add the selected user to the $users array if the arg is present.
708
-		if ( ! empty( $args['selected'] ) ) {
709
-			$selected_user =  apply_filters( 'give_ajax_user_search_selected_results', get_users( "include={$args['selected']}" ), $args );;
710
-			$users         = array_merge( $users, $selected_user );
708
+		if ( ! empty($args['selected'])) {
709
+			$selected_user = apply_filters('give_ajax_user_search_selected_results', get_users("include={$args['selected']}"), $args); ;
710
+			$users         = array_merge($users, $selected_user);
711 711
 		}
712 712
 
713 713
 		$options = array();
714 714
 
715
-		if ( $users ) {
715
+		if ($users) {
716 716
 			$options[0] = $args['placeholder'];
717
-			foreach ( $users as $user ) {
718
-				$options[ absint( $user->ID ) ] = esc_html( $user->user_login . ' (' . $user->user_email . ')' );
717
+			foreach ($users as $user) {
718
+				$options[absint($user->ID)] = esc_html($user->user_login.' ('.$user->user_email.')');
719 719
 			}
720 720
 		} else {
721
-			$options[0] = __( 'No users found.', 'give' );
721
+			$options[0] = __('No users found.', 'give');
722 722
 		}
723 723
 
724
-		$output = $this->select( array(
724
+		$output = $this->select(array(
725 725
 			'name'             => $args['name'],
726 726
 			'selected'         => $args['selected'],
727 727
 			'id'               => $args['id'],
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 			'show_option_all'  => false,
735 735
 			'show_option_none' => false,
736 736
 			'data'             => $args['data'],
737
-		) );
737
+		));
738 738
 
739 739
 		return $output;
740 740
 
Please login to merge, or discard this patch.