Completed
Push — develop ( 9aa69a...b20875 )
by J.D.
03:27
created
src/classes/hook/condition/number/greater/than.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 			return false;
47 47
 		}
48 48
 
49
-		return $value > $settings['value'];
49
+		return $value > $settings[ 'value' ];
50 50
 	}
51 51
 }
52 52
 
Please login to merge, or discard this patch.
src/classes/hook/condition/equals.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 			}
63 63
 		}
64 64
 
65
-		return $settings['value'] === $value;
65
+		return $settings[ 'value' ] === $value;
66 66
 	}
67 67
 }
68 68
 
Please login to merge, or discard this patch.
src/classes/entity.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -453,7 +453,7 @@
 block discarded – undo
453 453
 	 *
454 454
 	 * @since 2.1.0
455 455
 	 *
456
-	 * @return mixed The ID of the entity.
456
+	 * @return integer The ID of the entity.
457 457
 	 */
458 458
 	public function get_the_id() {
459 459
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -408,10 +408,10 @@
 block discarded – undo
408 408
 		} elseif ( $this->is_guid( $value ) ) {
409 409
 
410 410
 			$guid    = $this->split_guid( $value );
411
-			$context = $guid['context'];
412
-			$value   = $guid['id'];
411
+			$context = $guid[ 'context' ];
412
+			$value   = $guid[ 'id' ];
413 413
 
414
-			$entity = $this->get_entity_from_context( $guid['id'], $context );
414
+			$entity = $this->get_entity_from_context( $guid[ 'id' ], $context );
415 415
 
416 416
 		} else {
417 417
 
Please login to merge, or discard this patch.
src/classes/extension/updatesi.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -29,6 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @since 2.4.0
30 30
 	 *
31 31
 	 * @param int $time The timestamp that the extension update check was performed.
32
+	 * @return void
32 33
 	 */
33 34
 	public function set_time_checked( $time );
34 35
 
@@ -48,6 +49,7 @@  discard block
 block discarded – undo
48 49
 	 *
49 50
 	 * @param string[] $versions The extension versions that were checked, indexed by
50 51
 	 *                           extension basename.
52
+	 * @return void
51 53
 	 */
52 54
 	public function set_versions_checked( array $versions );
53 55
 
@@ -67,6 +69,7 @@  discard block
 block discarded – undo
67 69
 	 *
68 70
 	 * @param string[] $versions The new extension versions that are available to
69 71
 	 *                           update to, indexed by extension basename.
72
+	 * @return void
70 73
 	 */
71 74
 	public function set_new_versions( array $versions );
72 75
 
@@ -99,6 +102,7 @@  discard block
 block discarded – undo
99 102
 	 *
100 103
 	 * @param string $extension The extension basename.
101 104
 	 * @param string $version   The new version available.
105
+	 * @return void
102 106
 	 */
103 107
 	public function set_new_version( $extension, $version );
104 108
 }
Please login to merge, or discard this patch.
src/classes/installablei.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -57,6 +57,7 @@  discard block
 block discarded – undo
57 57
 	 * @param string $version The version to set. Defaults to the code version.
58 58
 	 * @param bool   $network Whether to set the network version of the entity, or
59 59
 	 *                        just for the current site.
60
+	 * @return void
60 61
 	 */
61 62
 	public function set_db_version( $version = null, $network = false );
62 63
 
@@ -67,6 +68,7 @@  discard block
 block discarded – undo
67 68
 	 *
68 69
 	 * @param bool $network Whether to delete the network version of the entity, or
69 70
 	 *                      just for the current site.
71
+	 * @return void
70 72
 	 */
71 73
 	public function unset_db_version( $network = false );
72 74
 
@@ -88,6 +90,7 @@  discard block
 block discarded – undo
88 90
 	 * Sets this entity's status as network-installed.
89 91
 	 *
90 92
 	 * @since 2.4.0
93
+	 * @return void
91 94
 	 */
92 95
 	public function set_network_installed();
93 96
 
@@ -95,6 +98,7 @@  discard block
 block discarded – undo
95 98
 	 * Deletes this entity's status as network-installed.
96 99
 	 *
97 100
 	 * @since 2.4.0
101
+	 * @return void
98 102
 	 */
99 103
 	public function unset_network_installed();
100 104
 
@@ -102,6 +106,7 @@  discard block
 block discarded – undo
102 106
 	 * Sets that the per-site network installation has been skipped.
103 107
 	 *
104 108
 	 * @since 2.4.0
109
+	 * @return void
105 110
 	 */
106 111
 	public function set_network_install_skipped();
107 112
 
@@ -109,6 +114,7 @@  discard block
 block discarded – undo
109 114
 	 * Deletes the network-install skipped flag for this entity.
110 115
 	 *
111 116
 	 * @since 2.4.0
117
+	 * @return void
112 118
 	 */
113 119
 	public function unset_network_install_skipped();
114 120
 
@@ -119,6 +125,7 @@  discard block
 block discarded – undo
119 125
 	 *
120 126
 	 * @param string $updating_from The version that was being updated from. Defaults
121 127
 	 *                              to the current database version.
128
+	 * @return void
122 129
 	 */
123 130
 	public function set_network_update_skipped( $updating_from = null );
124 131
 
@@ -126,6 +133,7 @@  discard block
 block discarded – undo
126 133
 	 * Deletes the network-update skipped flag for this entity.
127 134
 	 *
128 135
 	 * @since 2.4.0
136
+	 * @return void
129 137
 	 */
130 138
 	public function unset_network_update_skipped();
131 139
 
@@ -154,6 +162,7 @@  discard block
 block discarded – undo
154 162
 	 * @since 2.4.0
155 163
 	 *
156 164
 	 * @param int $id The ID of the site to add. Defaults to the current site's ID.
165
+	 * @return void
157 166
 	 */
158 167
 	public function add_installed_site_id( $id = null );
159 168
 
@@ -161,6 +170,7 @@  discard block
 block discarded – undo
161 170
 	 * Deletes the list of sites where this installable is installed.
162 171
 	 *
163 172
 	 * @since 2.4.0
173
+	 * @return void
164 174
 	 */
165 175
 	public function delete_installed_site_ids();
166 176
 
Please login to merge, or discard this patch.
src/classes/installables.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
 	 * @param string $version      The version of the installable. Only used if $un_installer is passed.
212 212
 	 * @param string $un_installer The path to the un/installer file.
213 213
 	 *
214
-	 * @return WordPoints_Un_Installer_Base|false The installer.
214
+	 * @return WordPoints_Un_Installer_Base The installer.
215 215
 	 */
216 216
 	public static function get_installer( $type, $slug, $version = null, $un_installer = null ) {
217 217
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 			'module' === $type ? 'extension' : $type
103 103
 			, $slug
104 104
 			, 'WordPoints_Installables::installer_loader'
105
-			, $data['version']
106
-			, ! empty( $data['network_wide'] )
105
+			, $data[ 'version' ]
106
+			, ! empty( $data[ 'network_wide' ] )
107 107
 		);
108 108
 
109 109
 		return true;
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
 				return false;
222 222
 			}
223 223
 
224
-			$version      = self::$registered[ $type ][ $slug ]['version'];
225
-			$un_installer = self::$registered[ $type ][ $slug ]['un_installer'];
224
+			$version      = self::$registered[ $type ][ $slug ][ 'version' ];
225
+			$un_installer = self::$registered[ $type ][ $slug ][ 'un_installer' ];
226 226
 		}
227 227
 
228 228
 		if ( ! isset( self::$installers[ $type ][ $slug ] ) ) {
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 		return new WordPoints_Installable_Legacy(
272 272
 			$type
273 273
 			, $slug
274
-			, self::$registered[ $type ][ $slug ]['version']
274
+			, self::$registered[ $type ][ $slug ][ 'version' ]
275 275
 		);
276 276
 	}
277 277
 }
Please login to merge, or discard this patch.
src/classes/modules.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
 	 * @param string $module The full path to one of the module's files.
110 110
 	 * @param string $data   The slug of the piece of data to get.
111 111
 	 *
112
-	 * @return string[]|string|false The data, or false if it isn't registered.
112
+	 * @return string The data, or false if it isn't registered.
113 113
 	 */
114 114
 	public static function get_data( $module, $data = null ) {
115 115
 
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 
151 151
 		self::$registered[ $slug ] = self::parse_headers( $data );
152 152
 
153
-		self::$registered[ $slug ]['raw']      = $data;
154
-		self::$registered[ $slug ]['raw_file'] = wp_normalize_path( $file );
153
+		self::$registered[ $slug ][ 'raw' ]      = $data;
154
+		self::$registered[ $slug ][ 'raw_file' ] = wp_normalize_path( $file );
155 155
 
156 156
 		self::register_installable( $slug, $file );
157 157
 		self::maybe_load_textdomain( $slug, $file );
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
 
185 185
 			$parts = explode( ':', $line, 2 );
186 186
 
187
-			$data_slug = trim( $parts[0] );
187
+			$data_slug = trim( $parts[ 0 ] );
188 188
 
189
-			if ( isset( self::$default_headers[ $parts[0] ] ) ) {
190
-				$data_slug = self::$default_headers[ $parts[0] ];
189
+			if ( isset( self::$default_headers[ $parts[ 0 ] ] ) ) {
190
+				$data_slug = self::$default_headers[ $parts[ 0 ] ];
191 191
 			}
192 192
 
193
-			$parsed[ $data_slug ] = trim( $parts[1] );
193
+			$parsed[ $data_slug ] = trim( $parts[ 1 ] );
194 194
 		}
195 195
 
196 196
 		return $parsed + array_fill_keys( self::$default_headers, '' );
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 			'extension'
211 211
 			, $slug
212 212
 			, 'WordPoints_Modules::get_installable'
213
-			, self::$registered[ $slug ]['version']
213
+			, self::$registered[ $slug ][ 'version' ]
214 214
 			, is_wordpoints_module_active_for_network( $file )
215 215
 		);
216 216
 	}
@@ -225,18 +225,18 @@  discard block
 block discarded – undo
225 225
 	 */
226 226
 	private static function maybe_load_textdomain( $slug, $file ) {
227 227
 
228
-		if ( empty( self::$registered[ $slug ]['text_domain'] ) ) {
228
+		if ( empty( self::$registered[ $slug ][ 'text_domain' ] ) ) {
229 229
 			return;
230 230
 		}
231 231
 
232 232
 		$path = false;
233 233
 
234
-		if ( ! empty( self::$registered[ $slug ]['domain_path'] ) ) {
235
-			$path = wordpoints_module_basename( $file ) . self::$registered[ $slug ]['domain_path'];
234
+		if ( ! empty( self::$registered[ $slug ][ 'domain_path' ] ) ) {
235
+			$path = wordpoints_module_basename( $file ) . self::$registered[ $slug ][ 'domain_path' ];
236 236
 		}
237 237
 
238 238
 		wordpoints_load_module_textdomain(
239
-			self::$registered[ $slug ]['text_domain']
239
+			self::$registered[ $slug ][ 'text_domain' ]
240 240
 			, $path
241 241
 		);
242 242
 	}
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
 			WordPoints_Installables::get_installer(
265 265
 				'module'
266 266
 				, $slug
267
-				, self::$registered[ $slug ]['version']
268
-				, dirname( self::$registered[ $slug ]['raw_file'] ) . '/includes/class-un-installer.php'
267
+				, self::$registered[ $slug ][ 'version' ]
268
+				, dirname( self::$registered[ $slug ][ 'raw_file' ] ) . '/includes/class-un-installer.php'
269 269
 			)
270 270
 				->install( $network_wide );
271 271
 
@@ -296,14 +296,14 @@  discard block
 block discarded – undo
296 296
 
297 297
 		$module = self::$registered[ $slug ];
298 298
 
299
-		$uninstaller = dirname( $module['raw_file'] ) . '/includes/class-un-installer.php';
299
+		$uninstaller = dirname( $module[ 'raw_file' ] ) . '/includes/class-un-installer.php';
300 300
 
301 301
 		if (
302
-			$module['namespace']
303
-			&& class_exists( "WordPoints_{$module['namespace']}_Installable" )
302
+			$module[ 'namespace' ]
303
+			&& class_exists( "WordPoints_{$module[ 'namespace' ]}_Installable" )
304 304
 		) {
305 305
 
306
-			$class       = "WordPoints_{$module['namespace']}_Installable";
306
+			$class       = "WordPoints_{$module[ 'namespace' ]}_Installable";
307 307
 			$installable = new $class( $slug );
308 308
 
309 309
 		} elseif ( file_exists( $uninstaller ) ) {
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 			$installable = new WordPoints_Installable_Legacy(
312 312
 				'module'
313 313
 				, $slug
314
-				, $module['version']
314
+				, $module[ 'version' ]
315 315
 			);
316 316
 		}
317 317
 
Please login to merge, or discard this patch.
src/classes/routinei.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -18,6 +18,7 @@
 block discarded – undo
18 18
 	 * Runs the routine.
19 19
 	 *
20 20
 	 * @since 2.4.0
21
+	 * @return null|boolean
21 22
 	 */
22 23
 	public function run();
23 24
 }
Please login to merge, or discard this patch.
src/classes/un/installer/base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -701,7 +701,7 @@
 block discarded – undo
701 701
 	 * @since 2.0.0
702 702
 	 *
703 703
 	 * @param string $option The name of the option to set.
704
-	 * @param mixed  $value  The value of the option.
704
+	 * @param string  $value  The value of the option.
705 705
 	 */
706 706
 	private function set_option( $option, $value = true ) {
707 707
 
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
 		$option_name = "{$this->option_prefix}installed_sites";
894 894
 
895 895
 		$sites   = wordpoints_get_array_option( $option_name, 'site' );
896
-		$sites[] = $id;
896
+		$sites[ ] = $id;
897 897
 
898 898
 		update_site_option( $option_name, $sites );
899 899
 	}
@@ -997,8 +997,8 @@  discard block
 block discarded – undo
997 997
 			'wordpoints_data'
998 998
 		);
999 999
 
1000
-		if ( empty( $wordpoints_data['components'][ $component ]['version'] ) ) {
1001
-			$wordpoints_data['components'][ $component ]['version'] = $version;
1000
+		if ( empty( $wordpoints_data[ 'components' ][ $component ][ 'version' ] ) ) {
1001
+			$wordpoints_data[ 'components' ][ $component ][ 'version' ] = $version;
1002 1002
 		}
1003 1003
 
1004 1004
 		wordpoints_update_maybe_network_option( 'wordpoints_data', $wordpoints_data );
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
 		$this->custom_caps_keys = array_keys( $this->custom_caps );
1020 1020
 
1021 1021
 		if ( 'uninstall' === $this->action ) {
1022
-			$this->uninstall['local']['custom_caps'] = true;
1022
+			$this->uninstall[ 'local' ][ 'custom_caps' ] = true;
1023 1023
 		}
1024 1024
 	}
1025 1025
 
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
 	 */
1069 1069
 	public function get_db_schema() {
1070 1070
 
1071
-		if ( ! isset( $this->schema[ $this->context ]['tables'] ) ) {
1071
+		if ( ! isset( $this->schema[ $this->context ][ 'tables' ] ) ) {
1072 1072
 			return '';
1073 1073
 		}
1074 1074
 
@@ -1084,7 +1084,7 @@  discard block
 block discarded – undo
1084 1084
 			$prefix = $wpdb->base_prefix;
1085 1085
 		}
1086 1086
 
1087
-		foreach ( $this->schema[ $this->context ]['tables'] as $table_name => $table_schema ) {
1087
+		foreach ( $this->schema[ $this->context ][ 'tables' ] as $table_name => $table_schema ) {
1088 1088
 
1089 1089
 			$table_name   = str_replace( '`', '``', $table_name );
1090 1090
 			$table_schema = trim( $table_schema );
@@ -1114,18 +1114,18 @@  discard block
 block discarded – undo
1114 1114
 		// Add any tables to uninstall based on the db schema.
1115 1115
 		foreach ( $this->schema as $context => $schema ) {
1116 1116
 
1117
-			if ( ! isset( $schema['tables'] ) ) {
1117
+			if ( ! isset( $schema[ 'tables' ] ) ) {
1118 1118
 				continue;
1119 1119
 			}
1120 1120
 
1121
-			if ( ! isset( $this->uninstall[ $context ]['tables'] ) ) {
1122
-				$this->uninstall[ $context ]['tables'] = array();
1121
+			if ( ! isset( $this->uninstall[ $context ][ 'tables' ] ) ) {
1122
+				$this->uninstall[ $context ][ 'tables' ] = array();
1123 1123
 			}
1124 1124
 
1125
-			$this->uninstall[ $context ]['tables'] = array_unique(
1125
+			$this->uninstall[ $context ][ 'tables' ] = array_unique(
1126 1126
 				array_merge(
1127
-					$this->uninstall[ $context ]['tables']
1128
-					, array_keys( $schema['tables'] )
1127
+					$this->uninstall[ $context ][ 'tables' ]
1128
+					, array_keys( $schema[ 'tables' ] )
1129 1129
 				)
1130 1130
 			);
1131 1131
 		}
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 	 */
1166 1166
 	protected function prepare_uninstall_list_tables() {
1167 1167
 
1168
-		if ( ! isset( $this->uninstall['list_tables'] ) ) {
1168
+		if ( ! isset( $this->uninstall[ 'list_tables' ] ) ) {
1169 1169
 			return;
1170 1170
 		}
1171 1171
 
@@ -1176,14 +1176,14 @@  discard block
 block discarded – undo
1176 1176
 		);
1177 1177
 
1178 1178
 		// Loop through all of the list table screens.
1179
-		foreach ( $this->uninstall['list_tables'] as $screen_id => $args ) {
1179
+		foreach ( $this->uninstall[ 'list_tables' ] as $screen_id => $args ) {
1180 1180
 
1181 1181
 			// Back-compat for pre-2.1.0.
1182
-			if ( isset( $args['parent'] ) && '_page' === substr( $args['parent'], -5 /* _page */ ) ) {
1183
-				$args['parent'] = substr( $args['parent'], 0, -5 );
1182
+			if ( isset( $args[ 'parent' ] ) && '_page' === substr( $args[ 'parent' ], -5 /* _page */ ) ) {
1183
+				$args[ 'parent' ] = substr( $args[ 'parent' ], 0, -5 );
1184 1184
 			}
1185 1185
 
1186
-			$this->uninstall['universal']['list_tables'][ $screen_id ] = $args;
1186
+			$this->uninstall[ 'universal' ][ 'list_tables' ][ $screen_id ] = $args;
1187 1187
 		}
1188 1188
 
1189 1189
 		$this->prepare_uninstall_non_per_site_items( 'list_tables' );
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
 			}
1280 1280
 
1281 1281
 			foreach ( $this->uninstall[ $type ][ $shortcut ] as $slug ) {
1282
-				$this->uninstall[ $type ][ $canonical ][] = $args['prefix'] . $slug;
1282
+				$this->uninstall[ $type ][ $canonical ][ ] = $args[ 'prefix' ] . $slug;
1283 1283
 			}
1284 1284
 		}
1285 1285
 	}
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
 			$prefix = $wpdb->prefix;
1393 1393
 		}
1394 1394
 
1395
-		foreach ( $this->schema[ $type ]['tables'] as $table_name => $schema ) {
1395
+		foreach ( $this->schema[ $type ][ 'tables' ] as $table_name => $schema ) {
1396 1396
 			maybe_convert_table_to_utf8mb4( $prefix . $table_name );
1397 1397
 		}
1398 1398
 	}
@@ -1423,35 +1423,35 @@  discard block
 block discarded – undo
1423 1423
 			, $this->uninstall[ $type ]
1424 1424
 		);
1425 1425
 
1426
-		if ( ! empty( $uninstall['custom_caps'] ) ) {
1426
+		if ( ! empty( $uninstall[ 'custom_caps' ] ) ) {
1427 1427
 			$this->uninstall_custom_caps( $this->custom_caps_keys );
1428 1428
 		}
1429 1429
 
1430
-		foreach ( $uninstall['user_meta'] as $meta_key ) {
1430
+		foreach ( $uninstall[ 'user_meta' ] as $meta_key ) {
1431 1431
 			$this->uninstall_metadata( 'user', $meta_key );
1432 1432
 		}
1433 1433
 
1434
-		foreach ( $uninstall['options'] as $option ) {
1434
+		foreach ( $uninstall[ 'options' ] as $option ) {
1435 1435
 			$this->uninstall_option( $option );
1436 1436
 		}
1437 1437
 
1438
-		foreach ( $uninstall['transients'] as $transient ) {
1438
+		foreach ( $uninstall[ 'transients' ] as $transient ) {
1439 1439
 			$this->uninstall_transient( $transient );
1440 1440
 		}
1441 1441
 
1442
-		foreach ( $uninstall['tables'] as $table ) {
1442
+		foreach ( $uninstall[ 'tables' ] as $table ) {
1443 1443
 			$this->uninstall_table( $table );
1444 1444
 		}
1445 1445
 
1446
-		foreach ( $uninstall['comment_meta'] as $meta_key ) {
1446
+		foreach ( $uninstall[ 'comment_meta' ] as $meta_key ) {
1447 1447
 			$this->uninstall_metadata( 'comment', $meta_key );
1448 1448
 		}
1449 1449
 
1450
-		foreach ( $uninstall['meta_boxes'] as $screen_id => $args ) {
1450
+		foreach ( $uninstall[ 'meta_boxes' ] as $screen_id => $args ) {
1451 1451
 			$this->uninstall_meta_boxes( $screen_id, $args );
1452 1452
 		}
1453 1453
 
1454
-		foreach ( $uninstall['list_tables'] as $screen_id => $args ) {
1454
+		foreach ( $uninstall[ 'list_tables' ] as $screen_id => $args ) {
1455 1455
 			$this->uninstall_list_table( $screen_id, $args );
1456 1456
 		}
1457 1457
 	}
@@ -1479,7 +1479,7 @@  discard block
 block discarded – undo
1479 1479
 	protected function uninstall_metadata( $type, $key ) {
1480 1480
 
1481 1481
 		if ( 'user' === $type && 'site' === $this->context ) {
1482
-			$key = $GLOBALS['wpdb']->get_blog_prefix() . $key;
1482
+			$key = $GLOBALS[ 'wpdb' ]->get_blog_prefix() . $key;
1483 1483
 		}
1484 1484
 
1485 1485
 		if ( false !== strpos( $key, '%' ) ) {
@@ -1546,20 +1546,20 @@  discard block
 block discarded – undo
1546 1546
 		);
1547 1547
 
1548 1548
 		$args            = array_merge( $defaults, $args );
1549
-		$args['options'] = array_merge( $defaults['options'], $args['options'] );
1549
+		$args[ 'options' ] = array_merge( $defaults[ 'options' ], $args[ 'options' ] );
1550 1550
 
1551 1551
 		// Each user gets to set the options to their liking.
1552
-		foreach ( $args['options'] as $option ) {
1552
+		foreach ( $args[ 'options' ] as $option ) {
1553 1553
 
1554 1554
 			$this->uninstall_metadata(
1555 1555
 				'user'
1556
-				, "{$option}_{$args['parent']}_page_{$screen_id}"
1556
+				, "{$option}_{$args[ 'parent' ]}_page_{$screen_id}"
1557 1557
 			);
1558 1558
 
1559 1559
 			if ( 'network' === $this->context ) {
1560 1560
 				$this->uninstall_metadata(
1561 1561
 					'user'
1562
-					, "{$option}_{$args['parent']}_page_{$screen_id}-network"
1562
+					, "{$option}_{$args[ 'parent' ]}_page_{$screen_id}-network"
1563 1563
 				);
1564 1564
 			}
1565 1565
 		}
@@ -1606,7 +1606,7 @@  discard block
 block discarded – undo
1606 1606
 
1607 1607
 		$args = array_merge( $defaults, $args );
1608 1608
 
1609
-		$network_parent = $args['parent'];
1609
+		$network_parent = $args[ 'parent' ];
1610 1610
 		$parent         = $network_parent;
1611 1611
 
1612 1612
 		// The parent page is usually the same on a multisite site, but we need to
@@ -1624,20 +1624,20 @@  discard block
 block discarded – undo
1624 1624
 		$meta_keys = array();
1625 1625
 
1626 1626
 		// Each user can hide specific columns of the table.
1627
-		$meta_keys[] = "manage{$parent}_page_{$screen_id}columnshidden";
1627
+		$meta_keys[ ] = "manage{$parent}_page_{$screen_id}columnshidden";
1628 1628
 
1629 1629
 		if ( 'network' === $this->context ) {
1630
-			$meta_keys[] = "manage{$network_parent}_page_{$screen_id}-networkcolumnshidden";
1630
+			$meta_keys[ ] = "manage{$network_parent}_page_{$screen_id}-networkcolumnshidden";
1631 1631
 		}
1632 1632
 
1633 1633
 		// Loop through each of the other options provided by this list table.
1634
-		foreach ( $args['options'] as $option ) {
1634
+		foreach ( $args[ 'options' ] as $option ) {
1635 1635
 
1636 1636
 			// Each user gets to set the options to their liking.
1637
-			$meta_keys[] = "{$parent}_page_{$screen_id}_{$option}";
1637
+			$meta_keys[ ] = "{$parent}_page_{$screen_id}_{$option}";
1638 1638
 
1639 1639
 			if ( 'network' === $this->context ) {
1640
-				$meta_keys[] = "{$network_parent}_page_{$screen_id}_network_{$option}";
1640
+				$meta_keys[ ] = "{$network_parent}_page_{$screen_id}_network_{$option}";
1641 1641
 			}
1642 1642
 		}
1643 1643
 
@@ -1817,7 +1817,7 @@  discard block
 block discarded – undo
1817 1817
 	 */
1818 1818
 	protected function install_site() {
1819 1819
 
1820
-		if ( isset( $this->schema['site'] ) ) {
1820
+		if ( isset( $this->schema[ 'site' ] ) ) {
1821 1821
 			$this->install_db_schema();
1822 1822
 		}
1823 1823
 
@@ -1881,7 +1881,7 @@  discard block
 block discarded – undo
1881 1881
 	 */
1882 1882
 	protected function uninstall_network() {
1883 1883
 
1884
-		if ( ! empty( $this->uninstall['network'] ) ) {
1884
+		if ( ! empty( $this->uninstall[ 'network' ] ) ) {
1885 1885
 			$this->uninstall_( 'network' );
1886 1886
 		}
1887 1887
 
@@ -1899,7 +1899,7 @@  discard block
 block discarded – undo
1899 1899
 	 */
1900 1900
 	protected function uninstall_site() {
1901 1901
 
1902
-		if ( ! empty( $this->uninstall['site'] ) ) {
1902
+		if ( ! empty( $this->uninstall[ 'site' ] ) ) {
1903 1903
 			$this->uninstall_( 'site' );
1904 1904
 		}
1905 1905
 
@@ -1917,7 +1917,7 @@  discard block
 block discarded – undo
1917 1917
 	 */
1918 1918
 	protected function uninstall_single() {
1919 1919
 
1920
-		if ( ! empty( $this->uninstall['single'] ) ) {
1920
+		if ( ! empty( $this->uninstall[ 'single' ] ) ) {
1921 1921
 			$this->uninstall_( 'single' );
1922 1922
 		}
1923 1923
 
Please login to merge, or discard this patch.