Completed
Branch develop (9aa69a)
by J.D.
03:55
created
src/components/ranks/classes/user/ranks/maybe/change.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 			$new_rank_users = array();
69 69
 
70 70
 			foreach ( $new_ranks as $user_id => $new_rank ) {
71
-				$new_rank_users[ $new_rank ][] = $user_id;
71
+				$new_rank_users[ $new_rank ][ ] = $user_id;
72 72
 			}
73 73
 
74 74
 			unset( $new_ranks );
Please login to merge, or discard this patch.
src/components/ranks/classes/ranks/installable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		$factories = parent::get_update_routine_factories();
64 64
 
65 65
 		// v2.0.0.
66
-		$factories[] = new WordPoints_Updater_Factory(
66
+		$factories[ ] = new WordPoints_Updater_Factory(
67 67
 			'2.0.0'
68 68
 			, array(
69 69
 				'global' => array(
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
 		);
84 84
 
85 85
 		// v2.4.0-alpha-4.
86
-		$factories[] = new WordPoints_Updater_Factory(
86
+		$factories[ ] = new WordPoints_Updater_Factory(
87 87
 			'2.4.0-alpha-4'
88 88
 			, array( 'global' => array( 'WordPoints_Ranks_Updater_2_4_0_Tables' ) )
89 89
 		);
90 90
 
91
-		$factories[] = new WordPoints_Updater_Factory(
91
+		$factories[ ] = new WordPoints_Updater_Factory(
92 92
 			'2.4.0-alpha-4'
93 93
 			, array(
94 94
 				'local' => array( 'WordPoints_Ranks_Updater_2_4_0_User_Ranks' ),
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 		$factories = parent::get_uninstall_routine_factories();
109 109
 
110
-		$factories[] = new WordPoints_Uninstaller_Factory_Options(
110
+		$factories[ ] = new WordPoints_Uninstaller_Factory_Options(
111 111
 			array(
112 112
 				'local' => array(
113 113
 					'wordpoints_filled_base_ranks',
Please login to merge, or discard this patch.
src/components/ranks/classes/rank/type.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function __construct( array $args ) {
79 79
 
80
-		$this->slug = $args['slug'];
80
+		$this->slug = $args[ 'slug' ];
81 81
 	}
82 82
 
83 83
 	//
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
 
194 194
 			// If we aren't using placeholders, calculate the value. Hidden fields
195 195
 			// never use placeholders.
196
-			if ( ! $args['placeholders'] || 'hidden' === $field['type'] ) {
196
+			if ( ! $args[ 'placeholders' ] || 'hidden' === $field[ 'type' ] ) {
197 197
 
198 198
 				// Default to the default value.
199
-				$value = $field['default'];
199
+				$value = $field[ 'default' ];
200 200
 
201 201
 				// If the value is set use that instead.
202 202
 				if ( isset( $meta[ $name ] ) ) {
@@ -204,23 +204,23 @@  discard block
 block discarded – undo
204 204
 				}
205 205
 			}
206 206
 
207
-			switch ( $field['type'] ) {
207
+			switch ( $field[ 'type' ] ) {
208 208
 
209 209
 				case 'hidden':
210 210
 				case 'number':
211 211
 				case 'text':
212
-					if ( isset( $field['label'] ) ) {
212
+					if ( isset( $field[ 'label' ] ) ) {
213 213
 						?>
214 214
 						<p class="description description-thin"><label>
215 215
 						<?php
216
-						echo esc_html( $field['label'] );
216
+						echo esc_html( $field[ 'label' ] );
217 217
 					}
218 218
 
219 219
 					?>
220 220
 					<input
221
-						type="<?php echo esc_attr( $field['type'] ); ?>"
221
+						type="<?php echo esc_attr( $field[ 'type' ] ); ?>"
222 222
 						name="<?php echo esc_attr( $name ); ?>"
223
-						<?php if ( $args['placeholders'] && 'hidden' !== $field['type'] ) : ?>
223
+						<?php if ( $args[ 'placeholders' ] && 'hidden' !== $field[ 'type' ] ) : ?>
224 224
 						value="<% if ( typeof <?php echo preg_replace( '/[^a-z0-9_]/i', '', $name ); /* WPCS XSS OK. */ ?> !== "undefined" ) { print( <?php echo preg_replace( '/[^a-z0-9_]/i', '', $name ); /* WPCS XSS OK. */ ?> ); } %>"
225 225
 						<?php else : ?>
226 226
 						value="<?php echo esc_attr( $value ); ?>"
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 					/>
230 230
 					<?php
231 231
 
232
-					if ( isset( $field['label'] ) ) {
232
+					if ( isset( $field[ 'label' ] ) ) {
233 233
 						?>
234 234
 						</label></p>
235 235
 						<?php
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 						__METHOD__
242 242
 						, sprintf(
243 243
 							'WordPoints Error: Unknown field type "%s".'
244
-							, esc_html( $field['type'] )
244
+							, esc_html( $field[ 'type' ] )
245 245
 						)
246 246
 						, '1.7.0'
247 247
 					);
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -222,8 +222,11 @@
 block discarded – undo
222 222
 						name="<?php echo esc_attr( $name ); ?>"
223 223
 						<?php if ( $args['placeholders'] && 'hidden' !== $field['type'] ) : ?>
224 224
 						value="<% if ( typeof <?php echo preg_replace( '/[^a-z0-9_]/i', '', $name ); /* WPCS XSS OK. */ ?> !== "undefined" ) { print( <?php echo preg_replace( '/[^a-z0-9_]/i', '', $name ); /* WPCS XSS OK. */ ?> ); } %>"
225
-						<?php else : ?>
226
-						value="<?php echo esc_attr( $value ); ?>"
225
+						<?php else {
226
+	: ?>
227
+						value="<?php echo esc_attr( $value );
228
+}
229
+?>"
227 230
 						<?php endif; ?>
228 231
 						class="widefat"
229 232
 					/>
Please login to merge, or discard this patch.
src/components/ranks/classes/rank/types.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 			return false;
61 61
 		}
62 62
 
63
-		$args['slug'] = $type;
63
+		$args[ 'slug' ] = $type;
64 64
 
65 65
 		self::$types[ $type ] = new $class( $args );
66 66
 
Please login to merge, or discard this patch.
src/components/ranks/classes/rank/shortcode/rank/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 		$result .= $headings;
41 41
 		$result .= '</thead>';
42 42
 
43
-		$group = WordPoints_Rank_Groups::get_group( $this->atts['rank_group'] );
43
+		$group = WordPoints_Rank_Groups::get_group( $this->atts[ 'rank_group' ] );
44 44
 
45 45
 		foreach ( $group->get_ranks() as $rank_id ) {
46 46
 
Please login to merge, or discard this patch.
src/components/ranks/includes/rank-types/points.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 		$this->name = _x( 'Points', 'rank type', 'wordpoints' );
49 49
 
50
-		if ( ! isset( $args['points_type'] ) ) {
50
+		if ( ! isset( $args[ 'points_type' ] ) ) {
51 51
 			_doing_it_wrong(
52 52
 				__METHOD__
53 53
 				, 'WordPoints Error: The "points_type" argument is required.'
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 			return;
57 57
 		}
58 58
 
59
-		$this->meta_fields['points']['label']        = _x( 'Points', 'form label', 'wordpoints' );
60
-		$this->meta_fields['points_type']['default'] = $args['points_type'];
59
+		$this->meta_fields[ 'points' ][ 'label' ]        = _x( 'Points', 'form label', 'wordpoints' );
60
+		$this->meta_fields[ 'points_type' ][ 'default' ] = $args[ 'points_type' ];
61 61
 
62 62
 		add_action( 'wordpoints_points_altered', array( $this, 'hook' ), 10, 3 );
63 63
 	}
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 */
84 84
 	public function hook( $user_id, $points, $points_type ) {
85 85
 
86
-		if ( $points_type !== $this->meta_fields['points_type']['default'] ) {
86
+		if ( $points_type !== $this->meta_fields[ 'points_type' ][ 'default' ] ) {
87 87
 			return;
88 88
 		}
89 89
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function validate_rank_meta( array $meta ) {
97 97
 
98
-		if ( ! isset( $meta['points'] ) || false === wordpoints_int( $meta['points'] ) ) {
98
+		if ( ! isset( $meta[ 'points' ] ) || false === wordpoints_int( $meta[ 'points' ] ) ) {
99 99
 			return new WP_Error(
100 100
 				'wordpoints_points_rank_type_invalid_points'
101 101
 				, __( 'The amount of points is required, and must be a valid number.', 'wordpoints' )
@@ -104,22 +104,22 @@  discard block
 block discarded – undo
104 104
 		}
105 105
 
106 106
 		if (
107
-			! isset( $meta['points_type'] )
108
-			|| ! wordpoints_is_points_type( $meta['points_type'] )
107
+			! isset( $meta[ 'points_type' ] )
108
+			|| ! wordpoints_is_points_type( $meta[ 'points_type' ] )
109 109
 		) {
110 110
 			return false;
111 111
 		}
112 112
 
113
-		$minimum = wordpoints_get_points_minimum( $meta['points_type'] );
113
+		$minimum = wordpoints_get_points_minimum( $meta[ 'points_type' ] );
114 114
 
115
-		if ( $meta['points'] < $minimum ) {
115
+		if ( $meta[ 'points' ] < $minimum ) {
116 116
 
117 117
 			return new WP_Error(
118 118
 				'wordpoints_points_rank_type_points_less_than_minimum'
119 119
 				, sprintf(
120 120
 					// translators: Minimum number of points.
121 121
 					__( 'The number of points must be more than the minimum (%s).', 'wordpoints' )
122
-					, wordpoints_format_points( $minimum, $meta['points_type'], 'points_rank_error' )
122
+					, wordpoints_format_points( $minimum, $meta[ 'points_type' ], 'points_rank_error' )
123 123
 				)
124 124
 				, array( 'field' => 'points' )
125 125
 			);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	public function can_transition_user_ranks( array $user_ids, WordPoints_Rank $rank, array $args ) {
135 135
 
136
-		if ( $rank->points_type !== $this->meta_fields['points_type']['default'] ) {
136
+		if ( $rank->points_type !== $this->meta_fields[ 'points_type' ][ 'default' ] ) {
137 137
 			return array();
138 138
 		}
139 139
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	 */
186 186
 	protected function can_transition_user_rank( $user_id, $rank, array $args ) {
187 187
 
188
-		if ( $rank->points_type !== $this->meta_fields['points_type']['default'] ) {
188
+		if ( $rank->points_type !== $this->meta_fields[ 'points_type' ][ 'default' ] ) {
189 189
 			return false;
190 190
 		}
191 191
 
Please login to merge, or discard this patch.
src/components/ranks/includes/integration/points/functions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 		$rank = wordpoints_get_formatted_user_rank(
22 22
 			get_current_user_id()
23
-			, "points_type-{$instance['points_type']}"
23
+			, "points_type-{$instance[ 'points_type' ]}"
24 24
 			, 'my-points-widget'
25 25
 			, array( 'widget_settings' => $instance )
26 26
 		);
@@ -89,18 +89,18 @@  discard block
 block discarded – undo
89 89
  */
90 90
 function wordpoints_user_rank_shortcode_points_type_attr( $out, $pairs, $atts ) {
91 91
 
92
-	if ( empty( $out['rank_group'] ) ) {
92
+	if ( empty( $out[ 'rank_group' ] ) ) {
93 93
 
94
-		if ( isset( $atts['points_type'] ) ) {
94
+		if ( isset( $atts[ 'points_type' ] ) ) {
95 95
 
96
-			$out['rank_group'] = "points_type-{$atts['points_type']}";
96
+			$out[ 'rank_group' ] = "points_type-{$atts[ 'points_type' ]}";
97 97
 
98 98
 		} else {
99 99
 
100 100
 			$points_type = wordpoints_get_default_points_type();
101 101
 
102 102
 			if ( $points_type ) {
103
-				$out['rank_group'] = "points_type-{$points_type}";
103
+				$out[ 'rank_group' ] = "points_type-{$points_type}";
104 104
 			}
105 105
 		}
106 106
 	}
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
 		WordPoints_Rank_Groups::register_group(
123 123
 			"points_type-{$slug}"
124 124
 			, array(
125
-				'name'        => $points_type['name'],
125
+				'name'        => $points_type[ 'name' ],
126 126
 				'description' => sprintf(
127 127
 					// translators: Points type name.
128 128
 					__( 'This rank group is associated with the &#8220;%s&#8221; points type.', 'wordpoints' )
129
-					, $points_type['name']
129
+					, $points_type[ 'name' ]
130 130
 				),
131 131
 			)
132 132
 		);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
 	?>
185 185
 
186
-	<a href="<?php echo esc_url( self_admin_url( 'admin.php?page=wordpoints_ranks&tab=points_type-' . $points_type['slug'] ) ); ?>">
186
+	<a href="<?php echo esc_url( self_admin_url( 'admin.php?page=wordpoints_ranks&tab=points_type-' . $points_type[ 'slug' ] ) ); ?>">
187 187
 		<?php esc_html_e( 'Go to the ranks for this points type.', 'wordpoints' ); ?>
188 188
 	</a>
189 189
 
Please login to merge, or discard this patch.
src/admin/classes/list/table/extensions.php 2 patches
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		parent::__construct(
50 50
 			array(
51 51
 				'plural' => 'wordpoints-extensions',
52
-				'screen' => ( isset( $args['screen'] ) ) ? $args['screen'] : null,
52
+				'screen' => ( isset( $args[ 'screen' ] ) ) ? $args[ 'screen' ] : null,
53 53
 			)
54 54
 		);
55 55
 
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
 		 */
77 77
 		$module_statuses = apply_filters( 'wordpoints_module_statuses', $module_statuses );
78 78
 
79
-		if ( isset( $_REQUEST['module_status'] ) && in_array( wp_unslash( $_REQUEST['module_status'] ), $module_statuses, true ) ) { // WPCS: CSRF OK.
80
-			$status = sanitize_key( $_REQUEST['module_status'] ); // WPCS: CSRF OK.
79
+		if ( isset( $_REQUEST[ 'module_status' ] ) && in_array( wp_unslash( $_REQUEST[ 'module_status' ] ), $module_statuses, true ) ) { // WPCS: CSRF OK.
80
+			$status = sanitize_key( $_REQUEST[ 'module_status' ] ); // WPCS: CSRF OK.
81 81
 		}
82 82
 
83
-		if ( isset( $_REQUEST['s'] ) ) { // WPCS: CSRF OK.
84
-			$_SERVER['REQUEST_URI'] = add_query_arg( 's', sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ) ); // WPCS: CSRF OK.
83
+		if ( isset( $_REQUEST[ 's' ] ) ) { // WPCS: CSRF OK.
84
+			$_SERVER[ 'REQUEST_URI' ] = add_query_arg( 's', sanitize_text_field( wp_unslash( $_REQUEST[ 's' ] ) ) ); // WPCS: CSRF OK.
85 85
 		}
86 86
 
87 87
 		$page = $this->get_pagenum();
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function get_table_classes() {
98 98
 
99
-		return array( 'widefat', $this->_args['plural'], 'modules', 'plugins' );
99
+		return array( 'widefat', $this->_args[ 'plural' ], 'modules', 'plugins' );
100 100
 	}
101 101
 
102 102
 	/**
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
 		} // End if ( not network admin ).
204 204
 
205
-		foreach ( (array) $modules['all'] as $module_file => $module_data ) {
205
+		foreach ( (array) $modules[ 'all' ] as $module_file => $module_data ) {
206 206
 
207 207
 			// Filter into individual sections.
208 208
 			if (
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
 			) {
213 213
 
214 214
 				if ( $show_network_active ) {
215
-					$modules['inactive'][ $module_file ] = $module_data;
215
+					$modules[ 'inactive' ][ $module_file ] = $module_data;
216 216
 				} else {
217
-					unset( $modules['all'][ $module_file ] );
217
+					unset( $modules[ 'all' ][ $module_file ] );
218 218
 				}
219 219
 
220 220
 			} elseif (
@@ -223,9 +223,9 @@  discard block
 block discarded – undo
223 223
 			) {
224 224
 
225 225
 				if ( $show_network_active ) {
226
-					$modules['active'][ $module_file ] = $module_data;
226
+					$modules[ 'active' ][ $module_file ] = $module_data;
227 227
 				} else {
228
-					unset( $modules['all'][ $module_file ] );
228
+					unset( $modules[ 'all' ][ $module_file ] );
229 229
 				}
230 230
 
231 231
 			} elseif (
@@ -238,16 +238,16 @@  discard block
 block discarded – undo
238 238
 				)
239 239
 			) {
240 240
 
241
-				$modules['active'][ $module_file ] = $module_data;
241
+				$modules[ 'active' ][ $module_file ] = $module_data;
242 242
 
243 243
 			} else {
244 244
 
245 245
 				// Was the module recently activated?
246 246
 				if ( ! $this->screen->in_admin( 'network' ) && isset( $recently_activated[ $module_file ] ) ) {
247
-					$modules['recently_activated'][ $module_file ] = $module_data;
247
+					$modules[ 'recently_activated' ][ $module_file ] = $module_data;
248 248
 				}
249 249
 
250
-				$modules['inactive'][ $module_file ] = $module_data;
250
+				$modules[ 'inactive' ][ $module_file ] = $module_data;
251 251
 
252 252
 			} // End if ().
253 253
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 			 * for modules that have an available update.
257 257
 			 */
258 258
 			if ( $user_can_update && $updates->has_update( $module_file ) ) {
259
-				$modules['upgrade'][ $module_file ] = $modules['all'][ $module_file ];
259
+				$modules[ 'upgrade' ][ $module_file ] = $modules[ 'all' ][ $module_file ];
260 260
 			}
261 261
 
262 262
 		} // End foreach ( modules ).
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 		if ( $s ) {
265 265
 
266 266
 			$status            = 'search';
267
-			$modules['search'] = array_filter( $modules['all'], array( $this, 'search_callback' ) );
267
+			$modules[ 'search' ] = array_filter( $modules[ 'all' ], array( $this, 'search_callback' ) );
268 268
 		}
269 269
 
270 270
 		/**
@@ -342,8 +342,8 @@  discard block
 block discarded – undo
342 342
 
343 343
 		static $term;
344 344
 
345
-		if ( is_null( $term ) && isset( $_REQUEST['s'] ) ) { // WPCS: CSRF OK.
346
-			$term = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ); // WPCS: CSRF OK.
345
+		if ( is_null( $term ) && isset( $_REQUEST[ 's' ] ) ) { // WPCS: CSRF OK.
346
+			$term = sanitize_text_field( wp_unslash( $_REQUEST[ 's' ] ) ); // WPCS: CSRF OK.
347 347
 		}
348 348
 
349 349
 		foreach ( $module_data as $value ) {
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
 		global $modules;
397 397
 
398
-		if ( ! empty( $modules['all'] ) ) {
398
+		if ( ! empty( $modules[ 'all' ] ) ) {
399 399
 			esc_html_e( 'No extensions found.', 'wordpoints' );
400 400
 		} else {
401 401
 			esc_html_e( 'There are not any extensions installed.', 'wordpoints' );
@@ -514,11 +514,11 @@  discard block
 block discarded – undo
514 514
 		$actions = array();
515 515
 
516 516
 		if ( 'active' !== $status ) {
517
-			$actions['activate-selected'] = ( $this->screen->in_admin( 'network' ) ) ? esc_html__( 'Network Activate', 'wordpoints' ) : esc_html__( 'Activate', 'wordpoints' );
517
+			$actions[ 'activate-selected' ] = ( $this->screen->in_admin( 'network' ) ) ? esc_html__( 'Network Activate', 'wordpoints' ) : esc_html__( 'Activate', 'wordpoints' );
518 518
 		}
519 519
 
520 520
 		if ( 'inactive' !== $status && 'recent' !== $status ) {
521
-			$actions['deactivate-selected'] = ( $this->screen->in_admin( 'network' ) ) ? esc_html__( 'Network Deactivate', 'wordpoints' ) : esc_html__( 'Deactivate', 'wordpoints' );
521
+			$actions[ 'deactivate-selected' ] = ( $this->screen->in_admin( 'network' ) ) ? esc_html__( 'Network Deactivate', 'wordpoints' ) : esc_html__( 'Deactivate', 'wordpoints' );
522 522
 		}
523 523
 
524 524
 		if (
@@ -526,14 +526,14 @@  discard block
 block discarded – undo
526 526
 			&& current_user_can( 'delete_wordpoints_extensions' )
527 527
 			&& 'active' !== $status
528 528
 		) {
529
-			$actions['delete-selected'] = esc_html__( 'Delete', 'wordpoints' );
529
+			$actions[ 'delete-selected' ] = esc_html__( 'Delete', 'wordpoints' );
530 530
 		}
531 531
 
532 532
 		if (
533 533
 			( ! is_multisite() || is_network_admin() )
534 534
 			&& current_user_can( 'update_wordpoints_extensions' )
535 535
 		) {
536
-			$actions['update-selected'] = esc_html__( 'Update', 'wordpoints' );
536
+			$actions[ 'update-selected' ] = esc_html__( 'Update', 'wordpoints' );
537 537
 		}
538 538
 
539 539
 		/**
@@ -555,11 +555,11 @@  discard block
 block discarded – undo
555 555
 	protected function display_tablenav( $which ) {
556 556
 
557 557
 		// Back-compat for the old nonce name.
558
-		$this->_args['plural'] = 'modules';
558
+		$this->_args[ 'plural' ] = 'modules';
559 559
 
560 560
 		parent::display_tablenav( $which );
561 561
 
562
-		$this->_args['plural'] = 'wordpoints-extensions';
562
+		$this->_args[ 'plural' ] = 'wordpoints-extensions';
563 563
 	}
564 564
 
565 565
 	/**
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 		$class = apply_filters( 'wordpoints_module_list_row_class', $class, $module_file, $module_data, $context );
644 644
 
645 645
 		?>
646
-		<tr id="<?php echo esc_attr( sanitize_title( $module_data['name'] ) ); ?>" class="<?php echo esc_attr( $class ); ?>">
646
+		<tr id="<?php echo esc_attr( sanitize_title( $module_data[ 'name' ] ) ); ?>" class="<?php echo esc_attr( $class ); ?>">
647 647
 			<?php $this->single_row_columns( $item, $class, $is_active ); ?>
648 648
 		</tr>
649 649
 		<?php
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
 
684 684
 		list( $module_file, $module_data ) = $item;
685 685
 
686
-		$module_data['extra']['module_file'] = $module_file;
686
+		$module_data[ 'extra' ][ 'module_file' ] = $module_file;
687 687
 
688 688
 		if ( $this->screen->in_admin( 'network' ) ) {
689 689
 
@@ -696,11 +696,11 @@  discard block
 block discarded – undo
696 696
 			$restricted_network_only   = ( is_multisite() && is_network_only_wordpoints_module( $module_file ) && ! $is_active );
697 697
 		}
698 698
 
699
-		$module_data['extra']['is_active'] = $is_active;
700
-		$module_data['extra']['restricted_network_active'] = $restricted_network_active;
701
-		$module_data['extra']['restricted_network_only']   = $restricted_network_only;
699
+		$module_data[ 'extra' ][ 'is_active' ] = $is_active;
700
+		$module_data[ 'extra' ][ 'restricted_network_active' ] = $restricted_network_active;
701
+		$module_data[ 'extra' ][ 'restricted_network_only' ]   = $restricted_network_only;
702 702
 
703
-		list( $columns, $hidden, , $primary ) = $this->get_column_info();
703
+		list( $columns, $hidden,, $primary ) = $this->get_column_info();
704 704
 
705 705
 		foreach ( $columns as $column_name => $column_display_name ) {
706 706
 
@@ -737,11 +737,11 @@  discard block
 block discarded – undo
737 737
 	 */
738 738
 	protected function column_cb( $module_data ) {
739 739
 
740
-		$checkbox_id = 'checkbox_' . sanitize_key( $module_data['extra']['module_file'] );
740
+		$checkbox_id = 'checkbox_' . sanitize_key( $module_data[ 'extra' ][ 'module_file' ] );
741 741
 
742 742
 		?>
743 743
 		<th scope="row" class="check-column">
744
-			<?php if ( ! $module_data['extra']['restricted_network_active'] && ! $module_data['extra']['restricted_network_only'] ) : ?>
744
+			<?php if ( ! $module_data[ 'extra' ][ 'restricted_network_active' ] && ! $module_data[ 'extra' ][ 'restricted_network_only' ] ) : ?>
745 745
 				<label class="screen-reader-text" for="<?php echo esc_attr( $checkbox_id ); ?>">
746 746
 					<?php
747 747
 
@@ -749,13 +749,13 @@  discard block
 block discarded – undo
749 749
 						sprintf(
750 750
 							// translators: Extension name.
751 751
 							__( 'Select %s', 'wordpoints' )
752
-							, $module_data['name']
752
+							, $module_data[ 'name' ]
753 753
 						)
754 754
 					);
755 755
 
756 756
 					?>
757 757
 				</label>
758
-				<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $module_data['extra']['module_file'] ); ?>" id="<?php echo esc_attr( $checkbox_id ); ?>" />
758
+				<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $module_data[ 'extra' ][ 'module_file' ] ); ?>" id="<?php echo esc_attr( $checkbox_id ); ?>" />
759 759
 			<?php endif; ?>
760 760
 		</th>
761 761
 		<?php
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
 
775 775
 		?>
776 776
 		<td class="module-title<?php echo ( $is_hidden ) ? ' hidden' : ''; ?><?php echo ( $is_primary ) ? ' has-row-actions column-primary' : ''; ?>">
777
-			<strong><?php echo esc_html( $module_data['name'] ); ?></strong>
777
+			<strong><?php echo esc_html( $module_data[ 'name' ] ); ?></strong>
778 778
 			<?php if ( $is_primary ) : ?>
779 779
 				<?php echo $this->row_actions( $this->get_module_row_actions( $module_data ), true ); /* WPCS XSS OK. */ ?>
780 780
 			<?php endif; ?>
@@ -800,8 +800,8 @@  discard block
 block discarded – undo
800 800
 		<td class="column-description desc<?php echo ( $is_hidden ) ? ' hidden' : ''; ?><?php echo ( $is_primary ) ? ' has-row-actions column-primary' : ''; ?>">
801 801
 			<div class="module-description">
802 802
 				<p>
803
-					<?php if ( ! empty( $module_data['description'] ) ) : ?>
804
-						<?php echo wp_kses( $module_data['description'] , 'wordpoints_module_description' ); ?>
803
+					<?php if ( ! empty( $module_data[ 'description' ] ) ) : ?>
804
+						<?php echo wp_kses( $module_data[ 'description' ], 'wordpoints_module_description' ); ?>
805 805
 					<?php else : ?>
806 806
 						&nbsp;
807 807
 					<?php endif; ?>
@@ -812,25 +812,25 @@  discard block
 block discarded – undo
812 812
 
813 813
 				$module_meta = array();
814 814
 
815
-				if ( ! empty( $module_data['version'] ) ) {
815
+				if ( ! empty( $module_data[ 'version' ] ) ) {
816 816
 					// translators: Extension version.
817
-					$module_meta[] = sprintf( esc_html__( 'Version %s', 'wordpoints' ), $module_data['version'] );
817
+					$module_meta[ ] = sprintf( esc_html__( 'Version %s', 'wordpoints' ), $module_data[ 'version' ] );
818 818
 				}
819 819
 
820
-				if ( ! empty( $module_data['author'] ) ) {
820
+				if ( ! empty( $module_data[ 'author' ] ) ) {
821 821
 
822
-					$author = $module_data['author'];
822
+					$author = $module_data[ 'author' ];
823 823
 
824
-					if ( ! empty( $module_data['author_uri'] ) ) {
825
-						$author = '<a href="' . esc_url( $module_data['author_uri'] ) . '">' . esc_html( $module_data['author'] ) . '</a>';
824
+					if ( ! empty( $module_data[ 'author_uri' ] ) ) {
825
+						$author = '<a href="' . esc_url( $module_data[ 'author_uri' ] ) . '">' . esc_html( $module_data[ 'author' ] ) . '</a>';
826 826
 					}
827 827
 
828 828
 					// translators: Author name.
829
-					$module_meta[] = sprintf( __( 'By %s', 'wordpoints' ), $author );
829
+					$module_meta[ ] = sprintf( __( 'By %s', 'wordpoints' ), $author );
830 830
 				}
831 831
 
832
-				if ( ! empty( $module_data['uri'] ) ) {
833
-					$module_meta[] = '<a href="' . esc_url( $module_data['uri'] ) . '">' . esc_html__( 'Visit extension site', 'wordpoints' ) . '</a>';
832
+				if ( ! empty( $module_data[ 'uri' ] ) ) {
833
+					$module_meta[ ] = '<a href="' . esc_url( $module_data[ 'uri' ] ) . '">' . esc_html__( 'Visit extension site', 'wordpoints' ) . '</a>';
834 834
 				}
835 835
 
836 836
 				/**
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 				 * @param array  $module_data The info about the module.
847 847
 				 * @param string $status      The module status being displayed.
848 848
 				 */
849
-				$module_meta = apply_filters( 'wordpoints_module_row_meta', $module_meta, $module_data['extra']['module_file'], $module_data, $status );
849
+				$module_meta = apply_filters( 'wordpoints_module_row_meta', $module_meta, $module_data[ 'extra' ][ 'module_file' ], $module_data, $status );
850 850
 
851 851
 				echo wp_kses( implode( ' | ', $module_meta ), 'data' );
852 852
 
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
 			 * @param string $module_file The main file of the current module.
884 884
 			 * @param array  $module_data The module's info.
885 885
 			 */
886
-			do_action( 'wordpoints_manage_modules_custom_column', $column_name, $module_data['module_file'], $module_data );
886
+			do_action( 'wordpoints_manage_modules_custom_column', $column_name, $module_data[ 'module_file' ], $module_data );
887 887
 			?>
888 888
 			<?php if ( $is_primary ) : ?>
889 889
 				<?php echo $this->row_actions( $this->get_module_row_actions( $module_data ), true ); /* WPCS XSS OK. */ ?>
@@ -912,8 +912,8 @@  discard block
 block discarded – undo
912 912
 
913 913
 		$context = $status;
914 914
 
915
-		$module_file = $module_data['extra']['module_file'];
916
-		$args        = $module_data['extra'];
915
+		$module_file = $module_data[ 'extra' ][ 'module_file' ];
916
+		$args        = $module_data[ 'extra' ];
917 917
 
918 918
 		// Pre-order.
919 919
 		$actions = array(
@@ -926,49 +926,49 @@  discard block
 block discarded – undo
926 926
 
927 927
 		if ( $this->screen->in_admin( 'network' ) ) {
928 928
 
929
-			if ( $args['is_active'] ) {
929
+			if ( $args[ 'is_active' ] ) {
930 930
 
931 931
 				if ( current_user_can( 'manage_network_wordpoints_extensions' ) ) {
932 932
 					// translators: Extension name.
933
-					$actions['deactivate'] = '<a href="' . wp_nonce_url( add_query_arg( 'action', 'deactivate', $url ), "deactivate-module_{$module_file}" ) . '" aria-label="' . esc_attr( sprintf( __( 'Network deactivate %s', 'wordpoints' ), $module_data['name'] ) ) . '">' . esc_html__( 'Network Deactivate', 'wordpoints' ) . '</a>';
933
+					$actions[ 'deactivate' ] = '<a href="' . wp_nonce_url( add_query_arg( 'action', 'deactivate', $url ), "deactivate-module_{$module_file}" ) . '" aria-label="' . esc_attr( sprintf( __( 'Network deactivate %s', 'wordpoints' ), $module_data[ 'name' ] ) ) . '">' . esc_html__( 'Network Deactivate', 'wordpoints' ) . '</a>';
934 934
 				}
935 935
 
936 936
 			} else {
937 937
 
938 938
 				if ( current_user_can( 'manage_network_wordpoints_extensions' ) ) {
939 939
 					// translators: Extension name.
940
-					$actions['activate'] = '<a href="' . wp_nonce_url( add_query_arg( 'action', 'activate', $url ), "activate-module_{$module_file}" ) . '" aria-label="' . esc_attr( sprintf( __( 'Network activate %s', 'wordpoints' ), $module_data['name'] ) ) . '" class="edit">' . esc_html__( 'Network Activate', 'wordpoints' ) . '</a>';
940
+					$actions[ 'activate' ] = '<a href="' . wp_nonce_url( add_query_arg( 'action', 'activate', $url ), "activate-module_{$module_file}" ) . '" aria-label="' . esc_attr( sprintf( __( 'Network activate %s', 'wordpoints' ), $module_data[ 'name' ] ) ) . '" class="edit">' . esc_html__( 'Network Activate', 'wordpoints' ) . '</a>';
941 941
 				}
942 942
 
943 943
 				if ( current_user_can( 'delete_wordpoints_extensions' ) && ! is_wordpoints_module_active( $module_file ) ) {
944 944
 					// translators: Extension name.
945
-					$actions['delete'] = '<a href="' . wp_nonce_url( self_admin_url( 'admin.php?page=wordpoints_extensions&action=delete-selected&amp;checked[]=' . $module_file . '&amp;module_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s ), 'bulk-modules' ) . '" aria-label="' . esc_attr( sprintf( __( 'Delete %s', 'wordpoints' ), $module_data['name'] ) ) . '" class="delete">' . esc_html__( 'Delete', 'wordpoints' ) . '</a>';
945
+					$actions[ 'delete' ] = '<a href="' . wp_nonce_url( self_admin_url( 'admin.php?page=wordpoints_extensions&action=delete-selected&amp;checked[]=' . $module_file . '&amp;module_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s ), 'bulk-modules' ) . '" aria-label="' . esc_attr( sprintf( __( 'Delete %s', 'wordpoints' ), $module_data[ 'name' ] ) ) . '" class="delete">' . esc_html__( 'Delete', 'wordpoints' ) . '</a>';
946 946
 				}
947 947
 			}
948 948
 
949 949
 		} else {
950 950
 
951
-			if ( $args['restricted_network_active'] ) {
951
+			if ( $args[ 'restricted_network_active' ] ) {
952 952
 
953 953
 				$actions = array( 'network_active' => __( 'Network Active', 'wordpoints' ) );
954 954
 
955
-			} elseif ( $args['restricted_network_only'] ) {
955
+			} elseif ( $args[ 'restricted_network_only' ] ) {
956 956
 
957 957
 				$actions = array( 'network_only' => __( 'Network Only', 'wordpoints' ) );
958 958
 
959
-			} elseif ( $args['is_active'] ) {
959
+			} elseif ( $args[ 'is_active' ] ) {
960 960
 
961 961
 				// translators: Extension name.
962
-				$actions['deactivate'] = '<a href="' . wp_nonce_url( add_query_arg( 'action', 'deactivate', $url ), "deactivate-module_{$module_file}" ) . '" aria-label="' . esc_attr( sprintf( __( 'Deactivate %s', 'wordpoints' ), $module_data['name'] ) ) . '">' . esc_html__( 'Deactivate', 'wordpoints' ) . '</a>';
962
+				$actions[ 'deactivate' ] = '<a href="' . wp_nonce_url( add_query_arg( 'action', 'deactivate', $url ), "deactivate-module_{$module_file}" ) . '" aria-label="' . esc_attr( sprintf( __( 'Deactivate %s', 'wordpoints' ), $module_data[ 'name' ] ) ) . '">' . esc_html__( 'Deactivate', 'wordpoints' ) . '</a>';
963 963
 
964 964
 			} else {
965 965
 
966 966
 				// translators: Extension name.
967
-				$actions['activate'] = '<a href="' . wp_nonce_url( add_query_arg( 'action', 'activate', $url ), "activate-module_{$module_file}" ) . '" aria-label="' . esc_attr( sprintf( __( 'Activate %s', 'wordpoints' ), $module_data['name'] ) ) . '" class="edit">' . esc_html__( 'Activate', 'wordpoints' ) . '</a>';
967
+				$actions[ 'activate' ] = '<a href="' . wp_nonce_url( add_query_arg( 'action', 'activate', $url ), "activate-module_{$module_file}" ) . '" aria-label="' . esc_attr( sprintf( __( 'Activate %s', 'wordpoints' ), $module_data[ 'name' ] ) ) . '" class="edit">' . esc_html__( 'Activate', 'wordpoints' ) . '</a>';
968 968
 
969 969
 				if ( ! is_multisite() && current_user_can( 'delete_wordpoints_extensions' ) ) {
970 970
 					// translators: Extension name.
971
-					$actions['delete'] = '<a href="' . wp_nonce_url( self_admin_url( 'admin.php?page=wordpoints_extensions&action=delete-selected&amp;checked[]=' . $module_file . '&amp;module_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s ), 'bulk-modules' ) . '" aria-label="' . esc_attr( sprintf( __( 'Delete %s', 'wordpoints' ), $module_data['name'] ) ) . '" class="delete">' . esc_html__( 'Delete', 'wordpoints' ) . '</a>';
971
+					$actions[ 'delete' ] = '<a href="' . wp_nonce_url( self_admin_url( 'admin.php?page=wordpoints_extensions&action=delete-selected&amp;checked[]=' . $module_file . '&amp;module_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s ), 'bulk-modules' ) . '" aria-label="' . esc_attr( sprintf( __( 'Delete %s', 'wordpoints' ), $module_data[ 'name' ] ) ) . '" class="delete">' . esc_html__( 'Delete', 'wordpoints' ) . '</a>';
972 972
 				}
973 973
 			}
974 974
 
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,11 +68,13 @@  discard block
 block discarded – undo
68 68
 		 */
69 69
 		$module_statuses = apply_filters( 'wordpoints_module_statuses', $module_statuses );
70 70
 
71
-		if ( isset( $_REQUEST['module_status'] ) && in_array( wp_unslash( $_REQUEST['module_status'] ), $module_statuses, true ) ) { // WPCS: CSRF OK.
71
+		if ( isset( $_REQUEST['module_status'] ) && in_array( wp_unslash( $_REQUEST['module_status'] ), $module_statuses, true ) ) {
72
+// WPCS: CSRF OK.
72 73
 			$status = sanitize_key( $_REQUEST['module_status'] ); // WPCS: CSRF OK.
73 74
 		}
74 75
 
75
-		if ( isset( $_REQUEST['s'] ) ) { // WPCS: CSRF OK.
76
+		if ( isset( $_REQUEST['s'] ) ) {
77
+// WPCS: CSRF OK.
76 78
 			$_SERVER['REQUEST_URI'] = add_query_arg( 's', sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ) ); // WPCS: CSRF OK.
77 79
 		}
78 80
 
@@ -311,7 +313,8 @@  discard block
 block discarded – undo
311 313
 
312 314
 		static $term;
313 315
 
314
-		if ( is_null( $term ) && isset( $_REQUEST['s'] ) ) { // WPCS: CSRF OK.
316
+		if ( is_null( $term ) && isset( $_REQUEST['s'] ) ) {
317
+// WPCS: CSRF OK.
315 318
 			$term = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ); // WPCS: CSRF OK.
316 319
 		}
317 320
 
@@ -737,9 +740,12 @@  discard block
 block discarded – undo
737 740
 				<p>
738 741
 					<?php if ( ! empty( $module_data['description'] ) ) : ?>
739 742
 						<?php echo wp_kses( $module_data['description'] , 'wordpoints_module_description' ); ?>
740
-					<?php else : ?>
743
+					<?php else {
744
+	: ?>
741 745
 						&nbsp;
742
-					<?php endif; ?>
746
+					<?php endif;
747
+}
748
+?>
743 749
 				</p>
744 750
 			</div>
745 751
 			<div class="<?php echo esc_attr( $class ); ?> second module-version-author-uri">
Please login to merge, or discard this patch.
src/admin/screens/modules.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -25,22 +25,22 @@  discard block
 block discarded – undo
25 25
 	}
26 26
 }
27 27
 
28
-if ( isset( $_GET['error'] ) ) {
28
+if ( isset( $_GET[ 'error' ] ) ) {
29 29
 
30
-	if ( isset( $_GET['main'] ) ) {
30
+	if ( isset( $_GET[ 'main' ] ) ) {
31 31
 
32 32
 		wordpoints_show_admin_error(
33 33
 			esc_html__( 'You cannot delete an extension while it is active on the main site.', 'wordpoints' )
34 34
 			, array( 'dismissible' => true )
35 35
 		);
36 36
 
37
-	} elseif ( isset( $_GET['charsout'] ) ) {
37
+	} elseif ( isset( $_GET[ 'charsout' ] ) ) {
38 38
 
39 39
 		wordpoints_show_admin_message(
40 40
 			sprintf(
41 41
 				// translators: Number of characters.
42 42
 				__( 'The extension generated %d characters of <strong>unexpected output</strong> during activation. If you notice &#8220;headers already sent&#8221; messages, problems with syndication feeds or other issues, try deactivating or removing this extension.', 'wordpoints' )
43
-				, (int) $_GET['charsout'] // WPCS: CSRF OK.
43
+				, (int) $_GET[ 'charsout' ] // WPCS: CSRF OK.
44 44
 			)
45 45
 			, 'warning'
46 46
 			, array( 'dismissible' => true )
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
 		$error_message = __( 'Extension could not be activated because it triggered a <strong>fatal error</strong>.', 'wordpoints' );
52 52
 
53 53
 		if (
54
-			isset( $_GET['_error_nonce'], $_GET['module'] )
54
+			isset( $_GET[ '_error_nonce' ], $_GET[ 'module' ] )
55 55
 			&& wordpoints_verify_nonce( '_error_nonce', 'module-activation-error_%s', array( 'module' ) )
56 56
 		) {
57 57
 
58 58
 			$url = self_admin_url(
59 59
 				'admin.php?page=wordpoints_extensions&action=error_scrape&amp;module='
60
-					. sanitize_text_field( wp_unslash( $_GET['module'] ) )
61
-					. '&amp;_wpnonce=' . sanitize_key( $_GET['_error_nonce'] )
60
+					. sanitize_text_field( wp_unslash( $_GET[ 'module' ] ) )
61
+					. '&amp;_wpnonce=' . sanitize_key( $_GET[ '_error_nonce' ] )
62 62
 			);
63 63
 
64 64
 			?>
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 	} // End if ( main error ) elseif ( unexpected output error ) else.
84 84
 
85
-} elseif ( isset( $_GET['deleted'] ) ) {
85
+} elseif ( isset( $_GET[ 'deleted' ] ) ) {
86 86
 
87 87
 	$user_id       = get_current_user_id();
88 88
 	$delete_result = get_transient( 'wordpoints_modules_delete_result_' . $user_id );
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		);
111 111
 	}
112 112
 
113
-} elseif ( isset( $_GET['activate'] ) ) {
113
+} elseif ( isset( $_GET[ 'activate' ] ) ) {
114 114
 
115 115
 	wordpoints_show_admin_message(
116 116
 		__( 'Extension <strong>activated</strong>.', 'wordpoints' )
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		, array( 'dismissible' => true )
119 119
 	);
120 120
 
121
-} elseif ( isset( $_GET['activate-multi'] ) ) {
121
+} elseif ( isset( $_GET[ 'activate-multi' ] ) ) {
122 122
 
123 123
 	wordpoints_show_admin_message(
124 124
 		__( 'Selected extensions <strong>activated</strong>.', 'wordpoints' )
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 		, array( 'dismissible' => true )
127 127
 	);
128 128
 
129
-} elseif ( isset( $_GET['deactivate'] ) ) {
129
+} elseif ( isset( $_GET[ 'deactivate' ] ) ) {
130 130
 
131 131
 	wordpoints_show_admin_message(
132 132
 		__( 'Extension <strong>deactivated</strong>.', 'wordpoints' )
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 		, array( 'dismissible' => true )
135 135
 	);
136 136
 
137
-} elseif ( isset( $_GET['deactivate-multi'] ) ) {
137
+} elseif ( isset( $_GET[ 'deactivate-multi' ] ) ) {
138 138
 
139 139
 	wordpoints_show_admin_message(
140 140
 		__( 'Selected extensions <strong>deactivated</strong>.', 'wordpoints' )
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 		, array( 'dismissible' => true )
143 143
 	);
144 144
 
145
-} elseif ( isset( $_REQUEST['action'] ) && 'update-selected' === sanitize_key( $_REQUEST['action'] ) ) {
145
+} elseif ( isset( $_REQUEST[ 'action' ] ) && 'update-selected' === sanitize_key( $_REQUEST[ 'action' ] ) ) {
146 146
 
147 147
 	wordpoints_show_admin_message(
148 148
 		esc_html__( 'No out of date extensions were selected.', 'wordpoints' )
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			<a href="<?php echo esc_url( self_admin_url( 'admin.php?page=wordpoints_install_extensions' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'extension', 'wordpoints' ); ?></a>
163 163
 		<?php endif; ?>
164 164
 
165
-		<?php if ( ! empty( $_REQUEST['s'] ) ) : ?>
165
+		<?php if ( ! empty( $_REQUEST[ 's' ] ) ) : ?>
166 166
 			<span class="subtitle">
167 167
 				<?php
168 168
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 					sprintf(
171 171
 						// translators: Search term.
172 172
 						__( 'Search results for &#8220;%s&#8221;', 'wordpoints' )
173
-						, sanitize_text_field( wp_unslash( $_REQUEST['s'] ) )
173
+						, sanitize_text_field( wp_unslash( $_REQUEST[ 's' ] ) )
174 174
 					)
175 175
 				);
176 176
 
Please login to merge, or discard this patch.