Passed
Push — develop ( ff75e1...e7463e )
by Remco
04:14
created
classes/Admin/GatewaySettings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 		$classes = apply_filters( 'pronamic_pay_gateway_settings', array() );
36 36
 
37 37
 		foreach ( $classes as $class ) {
38
-			$this->settings[] = new $class();
38
+			$this->settings[ ] = new $class();
39 39
 		}
40 40
 	}
41 41
 
Please login to merge, or discard this patch.
classes/Admin/AdminModule.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 
127 127
 		$args = wp_parse_args( $args, $defaults );
128 128
 
129
-		$id    = $args['label_for'];
129
+		$id    = $args[ 'label_for' ];
130 130
 		$value = get_option( $id );
131 131
 
132 132
 		$legend = sprintf(
133 133
 			'<legend class="screen-reader-text"><span>%s</span></legend>',
134
-			esc_html( $args['label'] )
134
+			esc_html( $args[ 'label' ] )
135 135
 		);
136 136
 
137 137
 		$input = sprintf(
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			'<label for="%s">%s %s</label>',
148 148
 			esc_attr( $id ),
149 149
 			$input,
150
-			esc_html( $args['label'] )
150
+			esc_html( $args[ 'label' ] )
151 151
 		);
152 152
 
153 153
 		printf( // WPCS: XSS ok.
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
 		$output = '';
188 188
 
189 189
 		// Dropdown.
190
-		$id       = $args['name'];
191
-		$name     = $args['name'];
192
-		$selected = $args['selected'];
190
+		$id       = $args[ 'name' ];
191
+		$name     = $args[ 'name' ];
192
+		$selected = $args[ 'selected' ];
193 193
 
194 194
 		if ( false === $selected ) {
195 195
 			$selected = get_option( $id );
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 			esc_attr( $name )
202 202
 		);
203 203
 
204
-		$options = \Pronamic\WordPress\Pay\Plugin::get_config_select_options( $args['payment_method'] );
204
+		$options = \Pronamic\WordPress\Pay\Plugin::get_config_select_options( $args[ 'payment_method' ] );
205 205
 
206 206
 		foreach ( $options as $value => $name ) {
207 207
 			$output .= sprintf(
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		$output .= sprintf( '</select>' );
216 216
 
217 217
 		// Return or echo.
218
-		if ( $args['echo'] ) {
218
+		if ( $args[ 'echo' ] ) {
219 219
 			echo $output; // WPCS: XSS ok.
220 220
 		} else {
221 221
 			return $output;
@@ -231,33 +231,33 @@  discard block
 block discarded – undo
231 231
 	private function create_pages( $pages, $parent = null ) {
232 232
 		foreach ( $pages as $page ) {
233 233
 			$post = array(
234
-				'post_title'     => $page['post_title'],
235
-				'post_name'      => $page['post_title'],
236
-				'post_content'   => $page['post_content'],
234
+				'post_title'     => $page[ 'post_title' ],
235
+				'post_name'      => $page[ 'post_title' ],
236
+				'post_content'   => $page[ 'post_content' ],
237 237
 				'post_status'    => 'publish',
238 238
 				'post_type'      => 'page',
239 239
 				'comment_status' => 'closed',
240 240
 			);
241 241
 
242 242
 			if ( isset( $parent ) ) {
243
-				$post['post_parent'] = $parent;
243
+				$post[ 'post_parent' ] = $parent;
244 244
 			}
245 245
 
246 246
 			$result = wp_insert_post( $post, true );
247 247
 
248 248
 			if ( ! is_wp_error( $result ) ) {
249
-				if ( isset( $page['post_meta'] ) ) {
250
-					foreach ( $page['post_meta'] as $key => $value ) {
249
+				if ( isset( $page[ 'post_meta' ] ) ) {
250
+					foreach ( $page[ 'post_meta' ] as $key => $value ) {
251 251
 						update_post_meta( $result, $key, $value );
252 252
 					}
253 253
 				}
254 254
 
255
-				if ( isset( $page['option_name'] ) ) {
256
-					update_option( $page['option_name'], $result );
255
+				if ( isset( $page[ 'option_name' ] ) ) {
256
+					update_option( $page[ 'option_name' ], $result );
257 257
 				}
258 258
 
259
-				if ( isset( $page['children'] ) ) {
260
-					$this->create_pages( $page['children'], $result );
259
+				if ( isset( $page[ 'children' ] ) ) {
260
+					$this->create_pages( $page[ 'children' ], $result );
261 261
 				}
262 262
 			}
263 263
 		}
@@ -528,8 +528,8 @@  discard block
 block discarded – undo
528 528
 
529 529
 		global $submenu;
530 530
 
531
-		if ( isset( $submenu['pronamic_ideal'] ) ) {
532
-			$submenu['pronamic_ideal'][0][0] = __( 'Dashboard', 'pronamic_ideal' ); // WPCS: override ok.
531
+		if ( isset( $submenu[ 'pronamic_ideal' ] ) ) {
532
+			$submenu[ 'pronamic_ideal' ][ 0 ][ 0 ] = __( 'Dashboard', 'pronamic_ideal' ); // WPCS: override ok.
533 533
 		}
534 534
 	}
535 535
 
Please login to merge, or discard this patch.
classes/Admin/GatewayPostType.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 							$name = __( 'Dashboard', 'pronamic_ideal' );
143 143
 						}
144 144
 
145
-						$content[] = sprintf(
145
+						$content[ ] = sprintf(
146 146
 							'<a href="%s" target="_blank">%s</a>',
147 147
 							esc_attr( $url ),
148 148
 							esc_html( ucfirst( $name ) )
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		}
169 169
 
170 170
 		if ( intval( get_option( 'pronamic_pay_config_id' ) ) === $post->ID ) {
171
-			$post_states['pronamic_pay_config_default'] = __( 'Default', 'pronamic_ideal' );
171
+			$post_states[ 'pronamic_pay_config_default' ] = __( 'Default', 'pronamic_ideal' );
172 172
 		}
173 173
 
174 174
 		return $post_states;
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
 		);
269 269
 
270 270
 		foreach ( $fields as $field ) {
271
-			if ( isset( $field['meta_key'], $field['filter'] ) ) {
272
-				$name   = $field['meta_key'];
273
-				$filter = $field['filter'];
271
+			if ( isset( $field[ 'meta_key' ], $field[ 'filter' ] ) ) {
272
+				$name   = $field[ 'meta_key' ];
273
+				$filter = $field[ 'filter' ];
274 274
 
275 275
 				$definition[ $name ] = $filter;
276 276
 			}
@@ -278,28 +278,28 @@  discard block
 block discarded – undo
278 278
 
279 279
 		$data = filter_input_array( INPUT_POST, $definition );
280 280
 
281
-		if ( ! empty( $data['_pronamic_gateway_id'] ) ) {
281
+		if ( ! empty( $data[ '_pronamic_gateway_id' ] ) ) {
282 282
 			$integrations = $this->admin->plugin->gateway_integrations;
283 283
 
284
-			if ( isset( $integrations[ $data['_pronamic_gateway_id'] ] ) ) {
285
-				$integration = $integrations[ $data['_pronamic_gateway_id'] ];
284
+			if ( isset( $integrations[ $data[ '_pronamic_gateway_id' ] ] ) ) {
285
+				$integration = $integrations[ $data[ '_pronamic_gateway_id' ] ];
286 286
 			}
287 287
 
288 288
 			if ( $integration ) {
289 289
 				$settings = $integration->get_settings();
290 290
 
291 291
 				foreach ( $fields as $field ) {
292
-					if ( isset( $field['default'], $field['meta_key'], $data[ $field['meta_key'] ] ) ) {
292
+					if ( isset( $field[ 'default' ], $field[ 'meta_key' ], $data[ $field[ 'meta_key' ] ] ) ) {
293 293
 						// Remove default value if not applicable to the selected gateway.
294
-						if ( isset( $field['methods'] ) ) {
295
-							$clean_default = array_intersect( $settings, $field['methods'] );
294
+						if ( isset( $field[ 'methods' ] ) ) {
295
+							$clean_default = array_intersect( $settings, $field[ 'methods' ] );
296 296
 
297 297
 							if ( empty( $clean_default ) ) {
298
-								$meta_value = get_post_meta( $post_id, $field['meta_key'], true );
298
+								$meta_value = get_post_meta( $post_id, $field[ 'meta_key' ], true );
299 299
 
300 300
 								// Only remove value if not saved before.
301 301
 								if ( empty( $meta_value ) ) {
302
-									$data[ $field['meta_key'] ] = null;
302
+									$data[ $field[ 'meta_key' ] ] = null;
303 303
 
304 304
 									continue;
305 305
 								}
@@ -307,13 +307,13 @@  discard block
 block discarded – undo
307 307
 						}
308 308
 
309 309
 						// Set the default value if empty.
310
-						if ( empty( $data[ $field['meta_key'] ] ) ) {
311
-							$default = $field['default'];
310
+						if ( empty( $data[ $field[ 'meta_key' ] ] ) ) {
311
+							$default = $field[ 'default' ];
312 312
 
313
-							if ( is_array( $default ) && 2 === count( $default ) && Util::class_method_exists( $default[0], $default[1] ) ) {
314
-								$data[ $field['meta_key'] ] = call_user_func( $default, $field );
313
+							if ( is_array( $default ) && 2 === count( $default ) && Util::class_method_exists( $default[ 0 ], $default[ 1 ] ) ) {
314
+								$data[ $field[ 'meta_key' ] ] = call_user_func( $default, $field );
315 315
 							} else {
316
-								$data[ $field['meta_key'] ] = $default;
316
+								$data[ $field[ 'meta_key' ] ] = $default;
317 317
 							}
318 318
 						}
319 319
 					}
@@ -362,14 +362,14 @@  discard block
 block discarded – undo
362 362
 			0  => '', // Unused. Messages start at index 1.
363 363
 			1  => __( 'Configuration updated.', 'pronamic_ideal' ),
364 364
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229
365
-			2  => $messages['post'][2],
365
+			2  => $messages[ 'post' ][ 2 ],
366 366
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352800&filters[translation_id]=37947870
367
-			3  => $messages['post'][3],
367
+			3  => $messages[ 'post' ][ 3 ],
368 368
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352798&filters[translation_id]=37947230
369 369
 			4  => __( 'Configuration updated.', 'pronamic_ideal' ),
370 370
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352801&filters[translation_id]=37947231
371 371
 			// translators: %s: date and time of the revision.
372
-			5  => isset( $_GET['revision'] ) ? sprintf( __( 'Configuration restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // WPCS: CSRF ok.
372
+			5  => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'Configuration restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, // WPCS: CSRF ok.
373 373
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352802&filters[translation_id]=37949178
374 374
 			6  => __( 'Configuration published.', 'pronamic_ideal' ),
375 375
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352803&filters[translation_id]=37947232
Please login to merge, or discard this patch.
classes/Admin/Install.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,8 +154,8 @@
 block discarded – undo
154 154
 		// Payments.
155 155
 		$payment_capabilities = PaymentPostType::get_capabilities();
156 156
 
157
-		unset( $payment_capabilities['publish_posts'] );
158
-		unset( $payment_capabilities['create_posts'] );
157
+		unset( $payment_capabilities[ 'publish_posts' ] );
158
+		unset( $payment_capabilities[ 'create_posts' ] );
159 159
 
160 160
 		foreach ( $payment_capabilities as $capability ) {
161 161
 			$roles->add_cap( 'administrator', $capability );
Please login to merge, or discard this patch.
classes/Admin/SubscriptionPostType.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 		$screen = get_current_screen();
55 55
 
56 56
 		if ( self::POST_TYPE === $screen->post_type ) {
57
-			if ( ! isset( $vars['post_status'] ) ) {
58
-				$vars['post_status'] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_subscription_states() );
57
+			if ( ! isset( $vars[ 'post_status' ] ) ) {
58
+				$vars[ 'post_status' ] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_subscription_states() );
59 59
 
60
-				$vars['post_status'][] = 'publish';
60
+				$vars[ 'post_status' ][ ] = 'publish';
61 61
 			}
62 62
 		}
63 63
 
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 	 * @return array
96 96
 	 */
97 97
 	public function sortable_columns( $sortable_columns ) {
98
-		$sortable_columns['pronamic_subscription_title'] = 'ID';
99
-		$sortable_columns['pronamic_subscription_date']  = 'date';
98
+		$sortable_columns[ 'pronamic_subscription_title' ] = 'ID';
99
+		$sortable_columns[ 'pronamic_subscription_date' ]  = 'date';
100 100
 
101 101
 		return $sortable_columns;
102 102
 	}
Please login to merge, or discard this patch.
classes/Admin/PaymentPostType.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
 		$screen = get_current_screen();
77 77
 
78 78
 		if ( self::POST_TYPE === $screen->post_type ) {
79
-			if ( ! isset( $vars['post_status'] ) ) {
80
-				$vars['post_status'] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_payment_states() );
79
+			if ( ! isset( $vars[ 'post_status' ] ) ) {
80
+				$vars[ 'post_status' ] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_payment_states() );
81 81
 
82
-				$vars['post_status'][] = 'publish';
82
+				$vars[ 'post_status' ][ ] = 'publish';
83 83
 			}
84 84
 		}
85 85
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 			\Pronamic\WordPress\Pay\Plugin::update_payment( $payment, false );
111 111
 
112
-			$this->admin_notices[] = array(
112
+			$this->admin_notices[ ] = array(
113 113
 				'type'    => 'info',
114 114
 				'message' => __( 'Payment status updated.', 'pronamic_ideal' ),
115 115
 			);
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 		foreach ( $this->admin_notices as $notice ) {
124 124
 			printf(
125 125
 				'<div class="notice notice-%1$s"><p>%2$s</p></div>',
126
-				esc_attr( $notice['type'] ),
127
-				esc_html( $notice['message'] )
126
+				esc_attr( $notice[ 'type' ] ),
127
+				esc_html( $notice[ 'message' ] )
128 128
 			);
129 129
 		}
130 130
 	}
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
 	 * @return array
180 180
 	 */
181 181
 	public function default_hidden_columns( $hidden ) {
182
-		$hidden[] = 'pronamic_payment_gateway';
183
-		$hidden[] = 'pronamic_payment_description';
182
+		$hidden[ ] = 'pronamic_payment_gateway';
183
+		$hidden[ ] = 'pronamic_payment_description';
184 184
 
185 185
 		return $hidden;
186 186
 	}
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
 	 * @return array
193 193
 	 */
194 194
 	public function sortable_columns( $sortable_columns ) {
195
-		$sortable_columns['pronamic_payment_title']  = 'ID';
196
-		$sortable_columns['pronamic_payment_amount'] = 'pronamic_payment_amount';
197
-		$sortable_columns['pronamic_payment_date']   = 'date';
195
+		$sortable_columns[ 'pronamic_payment_title' ]  = 'ID';
196
+		$sortable_columns[ 'pronamic_payment_amount' ] = 'pronamic_payment_amount';
197
+		$sortable_columns[ 'pronamic_payment_date' ]   = 'date';
198 198
 
199 199
 		return $sortable_columns;
200 200
 	}
@@ -532,14 +532,14 @@  discard block
 block discarded – undo
532 532
 			0  => '', // Unused. Messages start at index 1.
533 533
 			1  => __( 'Payment updated.', 'pronamic_ideal' ),
534 534
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229.
535
-			2  => $messages['post'][2],
535
+			2  => $messages[ 'post' ][ 2 ],
536 536
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352800&filters[translation_id]=37947870.
537
-			3  => $messages['post'][3],
537
+			3  => $messages[ 'post' ][ 3 ],
538 538
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352798&filters[translation_id]=37947230.
539 539
 			4  => __( 'Payment updated.', 'pronamic_ideal' ),
540 540
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352801&filters[translation_id]=37947231.
541 541
 			// translators: %s: date and time of the revision
542
-			5  => isset( $_GET['revision'] ) ? sprintf( __( 'Payment restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // WPCS: CSRF ok.
542
+			5  => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'Payment restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, // WPCS: CSRF ok.
543 543
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352802&filters[translation_id]=37949178.
544 544
 			6  => __( 'Payment published.', 'pronamic_ideal' ),
545 545
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352803&filters[translation_id]=37947232.
Please login to merge, or discard this patch.
classes/Admin/AdminReports.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -347,7 +347,7 @@
 block discarded – undo
347 347
 				$value = (float) $data[ $key ]->value;
348 348
 			}
349 349
 
350
-			$report[] = array(
350
+			$report[ ] = array(
351 351
 				// Flot requires milliseconds so multiply with 1000.
352 352
 				$date->getTimestamp() * 1000,
353 353
 				$value,
Please login to merge, or discard this patch.
classes/Admin/PaymentBulkActions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function bulk_actions( $bulk_actions ) {
63 63
 		// Don't allow edit in bulk.
64
-		unset( $bulk_actions['edit'] );
64
+		unset( $bulk_actions[ 'edit' ] );
65 65
 
66 66
 		// Bulk check payment status.
67
-		$bulk_actions['pronamic_payment_check_status'] = __( 'Check Payment Status', 'pronamic_ideal' );
67
+		$bulk_actions[ 'pronamic_payment_check_status' ] = __( 'Check Payment Status', 'pronamic_ideal' );
68 68
 
69 69
 		return $bulk_actions;
70 70
 	}
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 				$gateways[ $config_id ] = \Pronamic\WordPress\Pay\Plugin::get_gateway( $config_id );
107 107
 
108 108
 				if ( $gateways[ $config_id ] && ! $gateways[ $config_id ]->supports( 'payment_status_request' ) ) {
109
-					$unsupported_gateways[] = $config_id;
109
+					$unsupported_gateways[ ] = $config_id;
110 110
 				}
111 111
 			}
112 112
 
Please login to merge, or discard this patch.
classes/Admin/AdminSettings.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 * @param array $args Arguments.
168 168
 	 */
169 169
 	public function settings_section( $args ) {
170
-		switch ( $args['id'] ) {
170
+		switch ( $args[ 'id' ] ) {
171 171
 			case 'pronamic_pay_pages':
172 172
 				echo '<p>';
173 173
 				esc_html_e( 'The page an user will get redirected to after payment, based on the payment status.', 'pronamic_ideal' );
@@ -212,14 +212,14 @@  discard block
 block discarded – undo
212 212
 
213 213
 		$args = wp_parse_args( $args, $defaults );
214 214
 
215
-		$name  = $args['label_for'];
215
+		$name  = $args[ 'label_for' ];
216 216
 		$value = get_option( $name );
217 217
 
218 218
 		$atts = array(
219 219
 			'name'  => $name,
220 220
 			'id'    => $name,
221
-			'type'  => $args['type'],
222
-			'class' => $args['classes'],
221
+			'type'  => $args[ 'type' ],
222
+			'class' => $args[ 'classes' ],
223 223
 			'value' => $value,
224 224
 		);
225 225
 
@@ -230,10 +230,10 @@  discard block
 block discarded – undo
230 230
 			// @codingStandardsIgnoreEn
231 231
 		);
232 232
 
233
-		if ( ! empty( $args['description'] ) ) {
233
+		if ( ! empty( $args[ 'description' ] ) ) {
234 234
 			printf(
235 235
 				'<p class="description">%s</p>',
236
-				esc_html( $args['description'] )
236
+				esc_html( $args[ 'description' ] )
237 237
 			);
238 238
 		}
239 239
 	}
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
 	 * @param array $args Arguments.
247 247
 	 */
248 248
 	public function input_checkbox( $args ) {
249
-		$id     = $args['label_for'];
250
-		$name   = $args['label_for'];
249
+		$id     = $args[ 'label_for' ];
250
+		$name   = $args[ 'label_for' ];
251 251
 		$value  = get_option( $name );
252
-		$legend = $args['legend'];
252
+		$legend = $args[ 'legend' ];
253 253
 
254 254
 		echo '<fieldset>';
255 255
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 			checked( $value, 1, false )
271 271
 		);
272 272
 
273
-		echo esc_html( $args['description'] );
273
+		echo esc_html( $args[ 'description' ] );
274 274
 
275 275
 		echo '</label>';
276 276
 
@@ -300,13 +300,13 @@  discard block
 block discarded – undo
300 300
 	 * @param array $args Arguments.
301 301
 	 */
302 302
 	public function input_page( $args ) {
303
-		$name = $args['label_for'];
303
+		$name = $args[ 'label_for' ];
304 304
 
305 305
 		wp_dropdown_pages( array(
306 306
 			'name'             => esc_attr( $name ),
307
-			'post_type'        => esc_attr( isset( $args['post_type'] ) ? $args['post_type'] : 'page' ),
307
+			'post_type'        => esc_attr( isset( $args[ 'post_type' ] ) ? $args[ 'post_type' ] : 'page' ),
308 308
 			'selected'         => esc_attr( get_option( $name, '' ) ),
309
-			'show_option_none' => esc_attr( isset( $args['show_option_none'] ) ? $args['show_option_none'] : __( '— Select a page —', 'pronamic_ideal' ) ),
309
+			'show_option_none' => esc_attr( isset( $args[ 'show_option_none' ] ) ? $args[ 'show_option_none' ] : __( '— Select a page —', 'pronamic_ideal' ) ),
310 310
 			'class'            => 'regular-text',
311 311
 		) );
312 312
 	}
Please login to merge, or discard this patch.