@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | protected function get_for_context( $context ) { |
96 | 96 | |
97 | - if ( empty( $this->screens[ $context ] ) ) { |
|
97 | + if ( empty( $this->screens[$context] ) ) { |
|
98 | 98 | return array(); |
99 | 99 | } |
100 | 100 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | 'options' => array( 'per_page' ), |
105 | 105 | ); |
106 | 106 | |
107 | - foreach ( $this->screens[ $context ] as $screen_id => $args ) { |
|
107 | + foreach ( $this->screens[$context] as $screen_id => $args ) { |
|
108 | 108 | |
109 | 109 | $args = array_merge( $defaults, $args ); |
110 | 110 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | protected function get_for_context( $context ) { |
98 | 98 | |
99 | - if ( empty( $this->screens[ $context ] ) ) { |
|
99 | + if ( empty( $this->screens[$context] ) ) { |
|
100 | 100 | return array(); |
101 | 101 | } |
102 | 102 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | 'options' => array(), |
108 | 108 | ); |
109 | 109 | |
110 | - foreach ( $this->screens[ $context ] as $screen_id => $args ) { |
|
110 | + foreach ( $this->screens[$context] as $screen_id => $args ) { |
|
111 | 111 | |
112 | 112 | $args = array_merge( $defaults, $args ); |
113 | 113 | $args['options'] = array_merge( $options, $args['options'] ); |
@@ -70,9 +70,9 @@ |
||
70 | 70 | |
71 | 71 | $routines = array(); |
72 | 72 | |
73 | - if ( ! empty( $this->db_tables[ $context ] ) ) { |
|
73 | + if ( ! empty( $this->db_tables[$context] ) ) { |
|
74 | 74 | $routines[] = new WordPoints_Uninstaller_DB_Tables( |
75 | - $this->db_tables[ $context ] |
|
75 | + $this->db_tables[$context] |
|
76 | 76 | , 'site' === $context ? 'site' : 'base' |
77 | 77 | ); |
78 | 78 | } |
@@ -70,10 +70,10 @@ |
||
70 | 70 | |
71 | 71 | $routines = array(); |
72 | 72 | |
73 | - if ( isset( $this->transients[ $context ] ) ) { |
|
73 | + if ( isset( $this->transients[$context] ) ) { |
|
74 | 74 | $routines[] = new WordPoints_Uninstaller_Callback( |
75 | 75 | 'network' === $context ? 'delete_site_transient' : 'delete_transient' |
76 | - , $this->transients[ $context ] |
|
76 | + , $this->transients[$context] |
|
77 | 77 | ); |
78 | 78 | } |
79 | 79 |
@@ -76,11 +76,11 @@ |
||
76 | 76 | |
77 | 77 | $routines = array(); |
78 | 78 | |
79 | - if ( empty( $this->uninstallers[ $context ] ) ) { |
|
79 | + if ( empty( $this->uninstallers[$context] ) ) { |
|
80 | 80 | return $routines; |
81 | 81 | } |
82 | 82 | |
83 | - foreach ( $this->uninstallers[ $context ] as $data ) { |
|
83 | + foreach ( $this->uninstallers[$context] as $data ) { |
|
84 | 84 | |
85 | 85 | if ( is_string( $data ) ) { |
86 | 86 | $class = $data; |
@@ -137,7 +137,7 @@ |
||
137 | 137 | // So we get all of the per-site versions. |
138 | 138 | foreach ( $this->installable->get_installed_site_ids() as $site_id ) { |
139 | 139 | switch_to_blog( $site_id ); |
140 | - $versions[ $site_id ] = $this->installable->get_db_version(); |
|
140 | + $versions[$site_id] = $this->installable->get_db_version(); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | $ms_switched_state->restore(); |
@@ -194,11 +194,11 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function get_component( $slug ) { |
196 | 196 | |
197 | - if ( ! isset( $this->registered[ $slug ] ) ) { |
|
197 | + if ( ! isset( $this->registered[$slug] ) ) { |
|
198 | 198 | return false; |
199 | 199 | } |
200 | 200 | |
201 | - return $this->registered[ $slug ]; |
|
201 | + return $this->registered[$slug]; |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | */ |
229 | 229 | public function is_registered( $slug ) { |
230 | 230 | |
231 | - return isset( $this->registered[ $slug ] ); |
|
231 | + return isset( $this->registered[$slug] ); |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | /** |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | return false; |
285 | 285 | } |
286 | 286 | |
287 | - $this->registered[ $component['slug'] ] = array_intersect_key( $component, $defaults ); |
|
287 | + $this->registered[$component['slug']] = array_intersect_key( $component, $defaults ); |
|
288 | 288 | |
289 | 289 | if ( |
290 | 290 | ! isset( $component['installable'] ) |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | */ |
316 | 316 | public function deregister( $slug ) { |
317 | 317 | |
318 | - if ( isset( $this->registered[ $slug ] ) ) { |
|
318 | + if ( isset( $this->registered[$slug] ) ) { |
|
319 | 319 | |
320 | 320 | /** |
321 | 321 | * Component being deregistered. |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | */ |
325 | 325 | do_action( "wordpoints_component_deregister-{$slug}" ); |
326 | 326 | |
327 | - unset( $this->registered[ $slug ] ); |
|
327 | + unset( $this->registered[$slug] ); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | return true; |
@@ -356,17 +356,17 @@ discard block |
||
356 | 356 | // If this component isn't already active, activate it. |
357 | 357 | if ( ! $this->is_active( $slug ) ) { |
358 | 358 | |
359 | - $this->active[ $slug ] = 1; |
|
359 | + $this->active[$slug] = 1; |
|
360 | 360 | |
361 | 361 | if ( ! wordpoints_update_maybe_network_option( 'wordpoints_active_components', $this->active ) ) { |
362 | 362 | return false; |
363 | 363 | } |
364 | 364 | |
365 | - require_once $this->registered[ $slug ]['file']; |
|
365 | + require_once $this->registered[$slug]['file']; |
|
366 | 366 | |
367 | - if ( isset( $this->registered[ $slug ]['installable'] ) ) { |
|
367 | + if ( isset( $this->registered[$slug]['installable'] ) ) { |
|
368 | 368 | |
369 | - $installable = $this->registered[ $slug ]['installable']; |
|
369 | + $installable = $this->registered[$slug]['installable']; |
|
370 | 370 | $installable = new $installable( $slug ); |
371 | 371 | |
372 | 372 | $installer = new WordPoints_Installer( |
@@ -381,8 +381,8 @@ discard block |
||
381 | 381 | WordPoints_Installables::get_installer( |
382 | 382 | 'component' |
383 | 383 | , $slug |
384 | - , $this->registered[ $slug ]['version'] |
|
385 | - , $this->registered[ $slug ]['un_installer'] |
|
384 | + , $this->registered[$slug]['version'] |
|
385 | + , $this->registered[$slug]['un_installer'] |
|
386 | 386 | ) |
387 | 387 | ->install( is_wordpoints_network_active() ); |
388 | 388 | } |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | if ( $this->is_active( $slug ) ) { |
422 | 422 | |
423 | - unset( $this->active[ $slug ] ); |
|
423 | + unset( $this->active[$slug] ); |
|
424 | 424 | |
425 | 425 | if ( ! wordpoints_update_maybe_network_option( 'wordpoints_active_components', $this->active ) ) { |
426 | 426 | return false; |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | |
454 | 454 | $this->get_active(); |
455 | 455 | |
456 | - $is_active = isset( $this->active[ $slug ] ); |
|
456 | + $is_active = isset( $this->active[$slug] ); |
|
457 | 457 | |
458 | 458 | /** |
459 | 459 | * Is a component active? |
@@ -602,7 +602,7 @@ |
||
602 | 602 | return false; |
603 | 603 | } |
604 | 604 | |
605 | - $current_context[ $slug ] = $id; |
|
605 | + $current_context[$slug] = $id; |
|
606 | 606 | |
607 | 607 | $slug = $context->get_parent_slug(); |
608 | 608 | } |
@@ -454,7 +454,7 @@ |
||
454 | 454 | $the_guid = $entity->get_the_guid(); |
455 | 455 | |
456 | 456 | if ( $the_guid ) { |
457 | - $the_guids[ $arg_slug ] = $the_guid; |
|
457 | + $the_guids[$arg_slug] = $the_guid; |
|
458 | 458 | } |
459 | 459 | } |
460 | 460 |