@@ -84,7 +84,8 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * @return bool True if the module is network only, false otherwise. |
| 86 | 86 | */ |
| 87 | -function is_network_only_wordpoints_module( $module ) { // @codingStandardsIgnoreLine |
|
| 87 | +function is_network_only_wordpoints_module( $module ) { |
|
| 88 | +// @codingStandardsIgnoreLine |
|
| 88 | 89 | |
| 89 | 90 | $module_data = wordpoints_get_module_data( wordpoints_extensions_dir() . '/' . $module ); |
| 90 | 91 | |
@@ -100,7 +101,8 @@ discard block |
||
| 100 | 101 | * |
| 101 | 102 | * @return bool True if the module has an uninstall script, false otherwise. |
| 102 | 103 | */ |
| 103 | -function is_uninstallable_wordpoints_module( $module ) { // @codingStandardsIgnoreLine |
|
| 104 | +function is_uninstallable_wordpoints_module( $module ) { |
|
| 105 | +// @codingStandardsIgnoreLine |
|
| 104 | 106 | |
| 105 | 107 | return ( file_exists( wordpoints_extensions_dir() . '/' . dirname( wordpoints_module_basename( $module ) ) . '/uninstall.php' ) ); |
| 106 | 108 | } |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | foreach ( $recently_activated as $key => $time ) { |
| 174 | 174 | |
| 175 | 175 | if ( $time + WEEK_IN_SECONDS < time() ) { |
| 176 | - unset( $recently_activated[ $key ] ); |
|
| 176 | + unset( $recently_activated[$key] ); |
|
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | |
@@ -212,9 +212,9 @@ discard block |
||
| 212 | 212 | ) { |
| 213 | 213 | |
| 214 | 214 | if ( $show_network_active ) { |
| 215 | - $modules['inactive'][ $module_file ] = $module_data; // WPCS: prefix OK. |
|
| 215 | + $modules['inactive'][$module_file] = $module_data; // WPCS: prefix OK. |
|
| 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 |
||
| 223 | 223 | ) { |
| 224 | 224 | |
| 225 | 225 | if ( $show_network_active ) { |
| 226 | - $modules['active'][ $module_file ] = $module_data; // WPCS: prefix OK. |
|
| 226 | + $modules['active'][$module_file] = $module_data; // WPCS: prefix OK. |
|
| 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 |
||
| 238 | 238 | ) |
| 239 | 239 | ) { |
| 240 | 240 | |
| 241 | - $modules['active'][ $module_file ] = $module_data; // WPCS: prefix OK. |
|
| 241 | + $modules['active'][$module_file] = $module_data; // WPCS: prefix OK. |
|
| 242 | 242 | |
| 243 | 243 | } else { |
| 244 | 244 | |
| 245 | 245 | // Was the module recently activated? |
| 246 | - if ( ! $this->screen->in_admin( 'network' ) && isset( $recently_activated[ $module_file ] ) ) { |
|
| 247 | - $modules['recently_activated'][ $module_file ] = $module_data; // WPCS: prefix OK. |
|
| 246 | + if ( ! $this->screen->in_admin( 'network' ) && isset( $recently_activated[$module_file] ) ) { |
|
| 247 | + $modules['recently_activated'][$module_file] = $module_data; // WPCS: prefix OK. |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | - $modules['inactive'][ $module_file ] = $module_data; // WPCS: prefix OK. |
|
| 250 | + $modules['inactive'][$module_file] = $module_data; // WPCS: prefix OK. |
|
| 251 | 251 | |
| 252 | 252 | } // End if (). |
| 253 | 253 | |
@@ -256,7 +256,7 @@ discard block |
||
| 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 ]; // WPCS: prefix OK. |
|
| 259 | + $modules['upgrade'][$module_file] = $modules['all'][$module_file]; // WPCS: prefix OK. |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | } // End foreach ( modules ). |
@@ -289,21 +289,21 @@ discard block |
||
| 289 | 289 | $totals = array(); |
| 290 | 290 | |
| 291 | 291 | foreach ( $modules as $type => $list ) { |
| 292 | - $totals[ $type ] = count( $list ); |
|
| 292 | + $totals[$type] = count( $list ); |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | - if ( empty( $modules[ $status ] ) && ! in_array( $status, array( 'all', 'search' ), true ) ) { |
|
| 295 | + if ( empty( $modules[$status] ) && ! in_array( $status, array( 'all', 'search' ), true ) ) { |
|
| 296 | 296 | $status = 'all'; |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | $this->items = array(); |
| 300 | 300 | |
| 301 | - foreach ( $modules[ $status ] as $module_file => $module_data ) { |
|
| 301 | + foreach ( $modules[$status] as $module_file => $module_data ) { |
|
| 302 | 302 | |
| 303 | - $this->items[ $module_file ] = wordpoints_get_module_data( wordpoints_extensions_dir() . '/' . $module_file, false ); |
|
| 303 | + $this->items[$module_file] = wordpoints_get_module_data( wordpoints_extensions_dir() . '/' . $module_file, false ); |
|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | - $total_this_page = $totals[ $status ]; |
|
| 306 | + $total_this_page = $totals[$status]; |
|
| 307 | 307 | |
| 308 | 308 | if ( ! $orderby ) { |
| 309 | 309 | $orderby = 'name'; |
@@ -372,8 +372,8 @@ discard block |
||
| 372 | 372 | |
| 373 | 373 | global $orderby, $order; |
| 374 | 374 | |
| 375 | - $a = $module_a[ $orderby ]; |
|
| 376 | - $b = $module_b[ $orderby ]; |
|
| 375 | + $a = $module_a[$orderby]; |
|
| 376 | + $b = $module_b[$orderby]; |
|
| 377 | 377 | |
| 378 | 378 | if ( $a === $b ) { |
| 379 | 379 | return 0; |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | */ |
| 481 | 481 | $text = apply_filters( "wordpoints_modules_status_link_text-{$type}", $text, $count ); |
| 482 | 482 | |
| 483 | - $status_links[ $type ] = sprintf( |
|
| 483 | + $status_links[$type] = sprintf( |
|
| 484 | 484 | "<a href='%s' %s>%s</a>" |
| 485 | 485 | , esc_url( add_query_arg( 'module_status', $type, self_admin_url( 'admin.php?page=wordpoints_extensions' ) ) ) |
| 486 | 486 | , ( $type === $status ) ? ' class="current"' : '' |
@@ -700,7 +700,7 @@ discard block |
||
| 700 | 700 | $module_data['extra']['restricted_network_active'] = $restricted_network_active; |
| 701 | 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 | |