@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function get( $slug, array $args = array() ) { |
53 | 53 | |
54 | - if ( ! isset( $this->objects[ $slug ] ) ) { |
|
54 | + if ( ! isset( $this->objects[$slug] ) ) { |
|
55 | 55 | |
56 | 56 | $object = parent::get( $slug, $args ); |
57 | 57 | |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | return false; |
60 | 60 | } |
61 | 61 | |
62 | - $this->objects[ $slug ] = $object; |
|
62 | + $this->objects[$slug] = $object; |
|
63 | 63 | } |
64 | 64 | |
65 | - return $this->objects[ $slug ]; |
|
65 | + return $this->objects[$slug]; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function register( $slug, $class, array $args = array() ) { |
72 | 72 | |
73 | - unset( $this->objects[ $slug ] ); |
|
73 | + unset( $this->objects[$slug] ); |
|
74 | 74 | |
75 | 75 | return parent::register( $slug, $class, $args ); |
76 | 76 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | parent::deregister( $slug ); |
84 | 84 | |
85 | - unset( $this->objects[ $slug ] ); |
|
85 | + unset( $this->objects[$slug] ); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | foreach ( $this->classes as $parent_slug => $classes ) { |
62 | - $items[ $parent_slug ] = WordPoints_Class_Registry::construct_with_args( |
|
62 | + $items[$parent_slug] = WordPoints_Class_Registry::construct_with_args( |
|
63 | 63 | $classes |
64 | 64 | , $this->settings['pass_slugs'] ? array( $parent_slug ) + $args : $args |
65 | 65 | , $this->settings |
@@ -83,14 +83,14 @@ discard block |
||
83 | 83 | |
84 | 84 | $items = array(); |
85 | 85 | |
86 | - if ( isset( $this->classes[ $parent_slug ] ) ) { |
|
86 | + if ( isset( $this->classes[$parent_slug] ) ) { |
|
87 | 87 | |
88 | 88 | if ( $this->settings['pass_slugs'] ) { |
89 | 89 | array_unshift( $args, $parent_slug ); |
90 | 90 | } |
91 | 91 | |
92 | 92 | $items = WordPoints_Class_Registry::construct_with_args( |
93 | - $this->classes[ $parent_slug ] |
|
93 | + $this->classes[$parent_slug] |
|
94 | 94 | , $args |
95 | 95 | , $this->settings |
96 | 96 | ); |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | |
107 | 107 | $slugs = array(); |
108 | 108 | |
109 | - if ( isset( $this->classes[ $parent_slug ] ) ) { |
|
110 | - $slugs = array_keys( $this->classes[ $parent_slug ] ); |
|
109 | + if ( isset( $this->classes[$parent_slug] ) ) { |
|
110 | + $slugs = array_keys( $this->classes[$parent_slug] ); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | return $slugs; |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function get( $parent_slug, $slug, array $args = array() ) { |
120 | 120 | |
121 | - if ( ! isset( $this->classes[ $parent_slug ][ $slug ] ) ) { |
|
121 | + if ( ! isset( $this->classes[$parent_slug][$slug] ) ) { |
|
122 | 122 | return false; |
123 | 123 | } |
124 | 124 | |
125 | - $class = $this->classes[ $parent_slug ][ $slug ]; |
|
125 | + $class = $this->classes[$parent_slug][$slug]; |
|
126 | 126 | |
127 | 127 | if ( empty( $args ) ) { |
128 | 128 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function register( $parent_slug, $slug, $class, array $args = array() ) { |
149 | 149 | |
150 | - $this->classes[ $parent_slug ][ $slug ] = $class; |
|
150 | + $this->classes[$parent_slug][$slug] = $class; |
|
151 | 151 | |
152 | 152 | return true; |
153 | 153 | } |
@@ -156,14 +156,14 @@ discard block |
||
156 | 156 | * @since 2.1.0 |
157 | 157 | */ |
158 | 158 | public function deregister( $parent_slug, $slug ) { |
159 | - unset( $this->classes[ $parent_slug ][ $slug ] ); |
|
159 | + unset( $this->classes[$parent_slug][$slug] ); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
163 | 163 | * @since 2.1.0 |
164 | 164 | */ |
165 | 165 | public function deregister_children( $parent_slug ) { |
166 | - unset( $this->classes[ $parent_slug ] ); |
|
166 | + unset( $this->classes[$parent_slug] ); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -172,9 +172,9 @@ discard block |
||
172 | 172 | public function is_registered( $parent_slug, $slug = null ) { |
173 | 173 | |
174 | 174 | if ( isset( $slug ) ) { |
175 | - return isset( $this->classes[ $parent_slug ][ $slug ] ); |
|
175 | + return isset( $this->classes[$parent_slug][$slug] ); |
|
176 | 176 | } else { |
177 | - return isset( $this->classes[ $parent_slug ] ); |
|
177 | + return isset( $this->classes[$parent_slug] ); |
|
178 | 178 | } |
179 | 179 | } |
180 | 180 | } |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | |
113 | 113 | $classes = $this->get_deep( $this->classes, $parent_slugs ); |
114 | 114 | |
115 | - if ( ! $classes || ! isset( $classes['_classes'][ $slug ] ) ) { |
|
115 | + if ( ! $classes || ! isset( $classes['_classes'][$slug] ) ) { |
|
116 | 116 | return false; |
117 | 117 | } |
118 | 118 | |
119 | - $class = $classes['_classes'][ $slug ]; |
|
119 | + $class = $classes['_classes'][$slug]; |
|
120 | 120 | |
121 | 121 | if ( empty( $args ) ) { |
122 | 122 | |
@@ -150,14 +150,14 @@ discard block |
||
150 | 150 | |
151 | 151 | foreach ( $parent_slugs as $parent_slug ) { |
152 | 152 | |
153 | - if ( ! isset( $classes[ $parent_slug ] ) ) { |
|
154 | - $classes[ $parent_slug ] = array(); |
|
153 | + if ( ! isset( $classes[$parent_slug] ) ) { |
|
154 | + $classes[$parent_slug] = array(); |
|
155 | 155 | } |
156 | 156 | |
157 | - $classes =& $classes[ $parent_slug ]; |
|
157 | + $classes = & $classes[$parent_slug]; |
|
158 | 158 | } |
159 | 159 | |
160 | - $classes['_classes'][ $slug ] = $class; |
|
160 | + $classes['_classes'][$slug] = $class; |
|
161 | 161 | |
162 | 162 | return true; |
163 | 163 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | return; |
174 | 174 | } |
175 | 175 | |
176 | - unset( $classes['_classes'][ $slug ] ); |
|
176 | + unset( $classes['_classes'][$slug] ); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -222,11 +222,11 @@ discard block |
||
222 | 222 | |
223 | 223 | foreach ( $indexes as $index ) { |
224 | 224 | |
225 | - if ( ! isset( $array[ $index ] ) ) { |
|
225 | + if ( ! isset( $array[$index] ) ) { |
|
226 | 226 | return $false_reference; |
227 | 227 | } |
228 | 228 | |
229 | - $array = &$array[ $index ]; |
|
229 | + $array = &$array[$index]; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | return $array; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | , 'WordPoints_Installables_App::register' |
95 | 95 | ); |
96 | 96 | |
97 | - self::$registered[ $type ][ $slug ] = $data; |
|
97 | + self::$registered[$type][$slug] = $data; |
|
98 | 98 | |
99 | 99 | /** @var WordPoints_Installables_App $installables */ |
100 | 100 | $installables = wordpoints_apps()->get_sub_app( 'installables' ); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | _deprecated_function( __METHOD__, '2.4.0' ); |
127 | 127 | |
128 | - if ( ! isset( self::$registered[ $type ][ $slug ] ) ) { |
|
128 | + if ( ! isset( self::$registered[$type][$slug] ) ) { |
|
129 | 129 | return false; |
130 | 130 | } |
131 | 131 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | _deprecated_function( __METHOD__, '2.4.0' ); |
157 | 157 | |
158 | - if ( ! isset( self::$registered[ $type ][ $slug ] ) ) { |
|
158 | + if ( ! isset( self::$registered[$type][$slug] ) ) { |
|
159 | 159 | return false; |
160 | 160 | } |
161 | 161 | |
@@ -217,24 +217,24 @@ discard block |
||
217 | 217 | |
218 | 218 | if ( ! isset( $un_installer ) ) { |
219 | 219 | |
220 | - if ( ! isset( self::$registered[ $type ][ $slug ] ) ) { |
|
220 | + if ( ! isset( self::$registered[$type][$slug] ) ) { |
|
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 | - if ( ! isset( self::$installers[ $type ][ $slug ] ) ) { |
|
228 | + if ( ! isset( self::$installers[$type][$slug] ) ) { |
|
229 | 229 | |
230 | 230 | if ( ! file_exists( $un_installer ) ) { |
231 | 231 | return false; |
232 | 232 | } |
233 | 233 | |
234 | - self::$installers[ $type ][ $slug ] = require $un_installer; |
|
234 | + self::$installers[$type][$slug] = require $un_installer; |
|
235 | 235 | } |
236 | 236 | |
237 | - return new self::$installers[ $type ][ $slug ]( $slug, $version ); |
|
237 | + return new self::$installers[$type][$slug]( $slug, $version ); |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | /** |
@@ -271,7 +271,7 @@ discard block |
||
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 | } |
@@ -115,19 +115,19 @@ discard block |
||
115 | 115 | |
116 | 116 | $slug = self::get_slug( $module ); |
117 | 117 | |
118 | - if ( ! isset( self::$registered[ $slug ] ) ) { |
|
118 | + if ( ! isset( self::$registered[$slug] ) ) { |
|
119 | 119 | return false; |
120 | 120 | } |
121 | 121 | |
122 | 122 | if ( $data ) { |
123 | - if ( ! isset( self::$registered[ $slug ][ $data ] ) ) { |
|
123 | + if ( ! isset( self::$registered[$slug][$data] ) ) { |
|
124 | 124 | return false; |
125 | 125 | } |
126 | 126 | |
127 | - return self::$registered[ $slug ][ $data ]; |
|
127 | + return self::$registered[$slug][$data]; |
|
128 | 128 | } |
129 | 129 | |
130 | - return self::$registered[ $slug ]; |
|
130 | + return self::$registered[$slug]; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
@@ -144,14 +144,14 @@ discard block |
||
144 | 144 | |
145 | 145 | $slug = self::get_slug( $file ); |
146 | 146 | |
147 | - if ( isset( self::$registered[ $slug ] ) ) { |
|
147 | + if ( isset( self::$registered[$slug] ) ) { |
|
148 | 148 | return false; |
149 | 149 | } |
150 | 150 | |
151 | - self::$registered[ $slug ] = self::parse_headers( $data ); |
|
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 ); |
@@ -186,11 +186,11 @@ discard block |
||
186 | 186 | |
187 | 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 |
||
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 |
||
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 |
||
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 | |
@@ -290,11 +290,11 @@ discard block |
||
290 | 290 | |
291 | 291 | $installable = false; |
292 | 292 | |
293 | - if ( ! isset( self::$registered[ $slug ] ) ) { |
|
293 | + if ( ! isset( self::$registered[$slug] ) ) { |
|
294 | 294 | return $installable; |
295 | 295 | } |
296 | 296 | |
297 | - $module = self::$registered[ $slug ]; |
|
297 | + $module = self::$registered[$slug]; |
|
298 | 298 | |
299 | 299 | $uninstaller = dirname( $module['raw_file'] ) . '/includes/class-un-installer.php'; |
300 | 300 |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | version_compare( $this->updating_from, $version, '<' ) |
535 | 535 | && version_compare( $this->updating_to, $version, '>=' ) |
536 | 536 | ) { |
537 | - $updates[ str_replace( array( '.', '-' ), '_', $version ) ] = $types; |
|
537 | + $updates[str_replace( array( '.', '-' ), '_', $version )] = $types; |
|
538 | 538 | } |
539 | 539 | } |
540 | 540 | |
@@ -997,8 +997,8 @@ discard block |
||
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 ); |
@@ -1068,7 +1068,7 @@ discard block |
||
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 |
||
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 ); |
@@ -1118,13 +1118,13 @@ discard block |
||
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'] |
|
1127 | + $this->uninstall[$context]['tables'] |
|
1128 | 1128 | , array_keys( $schema['tables'] ) |
1129 | 1129 | ) |
1130 | 1130 | ); |
@@ -1183,7 +1183,7 @@ discard block |
||
1183 | 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' ); |
@@ -1214,21 +1214,21 @@ discard block |
||
1214 | 1214 | |
1215 | 1215 | foreach ( $map as $from => $to ) { |
1216 | 1216 | |
1217 | - if ( isset( $this->uninstall[ $from ][ $items_key ] ) ) { |
|
1217 | + if ( isset( $this->uninstall[$from][$items_key] ) ) { |
|
1218 | 1218 | |
1219 | 1219 | foreach ( $to as $context ) { |
1220 | 1220 | |
1221 | - if ( ! isset( $this->uninstall[ $context ][ $items_key ] ) ) { |
|
1222 | - $this->uninstall[ $context ][ $items_key ] = array(); |
|
1221 | + if ( ! isset( $this->uninstall[$context][$items_key] ) ) { |
|
1222 | + $this->uninstall[$context][$items_key] = array(); |
|
1223 | 1223 | } |
1224 | 1224 | |
1225 | - $this->uninstall[ $context ][ $items_key ] = array_merge( |
|
1226 | - $this->uninstall[ $context ][ $items_key ] |
|
1227 | - , $this->uninstall[ $from ][ $items_key ] |
|
1225 | + $this->uninstall[$context][$items_key] = array_merge( |
|
1226 | + $this->uninstall[$context][$items_key] |
|
1227 | + , $this->uninstall[$from][$items_key] |
|
1228 | 1228 | ); |
1229 | 1229 | } |
1230 | 1230 | |
1231 | - unset( $this->uninstall[ $from ][ $items_key ] ); |
|
1231 | + unset( $this->uninstall[$from][$items_key] ); |
|
1232 | 1232 | } |
1233 | 1233 | } |
1234 | 1234 | } |
@@ -1274,12 +1274,12 @@ discard block |
||
1274 | 1274 | |
1275 | 1275 | foreach ( $types as $type ) { |
1276 | 1276 | |
1277 | - if ( ! isset( $this->uninstall[ $type ][ $shortcut ] ) ) { |
|
1277 | + if ( ! isset( $this->uninstall[$type][$shortcut] ) ) { |
|
1278 | 1278 | continue; |
1279 | 1279 | } |
1280 | 1280 | |
1281 | - foreach ( $this->uninstall[ $type ][ $shortcut ] as $slug ) { |
|
1282 | - $this->uninstall[ $type ][ $canonical ][] = $args['prefix'] . $slug; |
|
1281 | + foreach ( $this->uninstall[$type][$shortcut] as $slug ) { |
|
1282 | + $this->uninstall[$type][$canonical][] = $args['prefix'] . $slug; |
|
1283 | 1283 | } |
1284 | 1284 | } |
1285 | 1285 | } |
@@ -1318,9 +1318,9 @@ discard block |
||
1318 | 1318 | |
1319 | 1319 | foreach ( $map as $shortcut => $canonicals ) { |
1320 | 1320 | foreach ( $canonicals as $canonical ) { |
1321 | - $this->{$type}[ $canonical ] = array_merge_recursive( |
|
1322 | - $this->{$type}[ $canonical ] |
|
1323 | - , $this->{$type}[ $shortcut ] |
|
1321 | + $this->{$type}[$canonical] = array_merge_recursive( |
|
1322 | + $this->{$type}[$canonical] |
|
1323 | + , $this->{$type}[$shortcut] |
|
1324 | 1324 | ); |
1325 | 1325 | } |
1326 | 1326 | } |
@@ -1392,7 +1392,7 @@ discard block |
||
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 | } |
@@ -1406,7 +1406,7 @@ discard block |
||
1406 | 1406 | */ |
1407 | 1407 | protected function uninstall_( $type ) { |
1408 | 1408 | |
1409 | - if ( empty( $this->uninstall[ $type ] ) ) { |
|
1409 | + if ( empty( $this->uninstall[$type] ) ) { |
|
1410 | 1410 | return; |
1411 | 1411 | } |
1412 | 1412 | |
@@ -1420,7 +1420,7 @@ discard block |
||
1420 | 1420 | 'meta_boxes' => array(), |
1421 | 1421 | 'list_tables' => array(), |
1422 | 1422 | ) |
1423 | - , $this->uninstall[ $type ] |
|
1423 | + , $this->uninstall[$type] |
|
1424 | 1424 | ); |
1425 | 1425 | |
1426 | 1426 | if ( ! empty( $uninstall['custom_caps'] ) ) { |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | return $wordpoints_data['version']; |
64 | 64 | } |
65 | 65 | |
66 | - } elseif ( isset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] ) ) { |
|
67 | - return $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version']; |
|
66 | + } elseif ( isset( $wordpoints_data["{$this->type}s"][$this->slug]['version'] ) ) { |
|
67 | + return $wordpoints_data["{$this->type}s"][$this->slug]['version']; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | return false; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | if ( 'wordpoints' === $this->slug ) { |
88 | 88 | $wordpoints_data['version'] = $version; |
89 | 89 | } else { |
90 | - $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] = $version; |
|
90 | + $wordpoints_data["{$this->type}s"][$this->slug]['version'] = $version; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | wordpoints_update_maybe_network_option( |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | if ( 'wordpoints' === $this->slug ) { |
111 | 111 | unset( $wordpoints_data['version'] ); |
112 | 112 | } else { |
113 | - unset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] ); |
|
113 | + unset( $wordpoints_data["{$this->type}s"][$this->slug]['version'] ); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | wordpoints_update_maybe_network_option( |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | , 'site' |
131 | 131 | ); |
132 | 132 | |
133 | - return isset( $network_installed[ $this->type ][ $this->slug ] ); |
|
133 | + return isset( $network_installed[$this->type][$this->slug] ); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | , 'site' |
196 | 196 | ); |
197 | 197 | |
198 | - $data[ $this->type ][ $this->slug ] = $value; |
|
198 | + $data[$this->type][$this->slug] = $value; |
|
199 | 199 | |
200 | 200 | update_site_option( "wordpoints_{$option}", $data ); |
201 | 201 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | , 'site' |
215 | 215 | ); |
216 | 216 | |
217 | - unset( $data[ $this->type ][ $this->slug ] ); |
|
217 | + unset( $data[$this->type][$this->slug] ); |
|
218 | 218 | |
219 | 219 | update_site_option( "wordpoints_{$option}", $data ); |
220 | 220 | } |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | |
72 | 72 | $routines = array(); |
73 | 73 | |
74 | - if ( ! isset( $this->options[ $context ] ) ) { |
|
74 | + if ( ! isset( $this->options[$context] ) ) { |
|
75 | 75 | return $routines; |
76 | 76 | } |
77 | 77 | |
78 | - $options = $this->options[ $context ]; |
|
78 | + $options = $this->options[$context]; |
|
79 | 79 | |
80 | 80 | foreach ( $options as $index => $option ) { |
81 | 81 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $routines[] = new WordPoints_Uninstaller_Options_Wildcards( $option ); |
90 | 90 | } |
91 | 91 | |
92 | - unset( $options[ $index ] ); |
|
92 | + unset( $options[$index] ); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | if ( ! empty( $options ) ) { |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | |
102 | 102 | $routines = array(); |
103 | 103 | |
104 | - if ( ! isset( $this->keys[ $context ] ) ) { |
|
104 | + if ( ! isset( $this->keys[$context] ) ) { |
|
105 | 105 | return $routines; |
106 | 106 | } |
107 | 107 | |
108 | - $keys = $this->keys[ $context ]; |
|
108 | + $keys = $this->keys[$context]; |
|
109 | 109 | |
110 | 110 | foreach ( $keys as $index => $key ) { |
111 | 111 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | , $this->prefix_for_site && 'site' === $context |
120 | 120 | ); |
121 | 121 | |
122 | - unset( $keys[ $index ] ); |
|
122 | + unset( $keys[$index] ); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | if ( ! empty( $keys ) ) { |