Skip to content
Browse files

Fixing a few spacing issues

  • Loading branch information...
1 parent d59ce6f commit 38e9e979758e1df6369e21a801e335c325f44574 @chrisguitarguy committed Mar 9, 2012
Showing with 9 additions and 6 deletions.
  1. +7 −4 inc/admin.php
  2. +2 −2 inc/core.php
View
11 inc/admin.php
@@ -17,6 +17,11 @@ class CD_APD_Admin
*/
protected $all_count = 0;
+ /**
+ * constructor
+ *
+ * @since 0.1
+ */
function __construct()
{
add_action( 'load-plugins.php', array( &$this, 'init' ) );
@@ -67,7 +72,6 @@ function init()
add_filter( 'plugin_action_links', array( &$this, 'action_links' ), 10, 2 );
add_action( 'admin_enqueue_scripts', array( &$this, 'scripts' ) );
}
-
}
/**
@@ -86,7 +90,7 @@ function views( $views )
foreach( $wp_plugin_directories as $key => $info )
{
if( ! count( $this->plugins[$key] ) ) continue;
- $class = isset( $_REQUEST['plugin_status'] ) && $key == $_REQUEST['plugin_status'] ? ' class="current" ' : '';
+ $class = $this->get_plugin_status() == $key ? ' class="current" ' : '';
$views[$key] = sprintf(
'<a href="%s"' . $class . '>%s <span class="count">(%d)</span></a>',
add_query_arg( 'plugin_status', $key, 'plugins.php' ),
@@ -111,10 +115,9 @@ function views_again( $views )
*/
function filter_plugins( $plugins )
{
- $this->all_count = count( $plugins );
-
if( $key = $this->get_plugin_status() )
{
+ $this->all_count = count( $plugins );
$plugins = $this->plugins[$key];
}
return $plugins;
View
4 inc/core.php
@@ -39,7 +39,7 @@ function cd_apd_load_more()
{
if( file_exists( $wp_plugin_directories[$key]['dir'] . '/' . $a ) )
{
- require_once( $wp_plugin_directories[$key]['dir'] . '/' . $a );
+ include_once( $wp_plugin_directories[$key]['dir'] . '/' . $a );
}
}
}
@@ -111,7 +111,7 @@ function cd_apd_get_plugins( $dir_key )
if ( empty ( $plugin_data['Name'] ) )
continue;
- $wp_plugins[plugin_basename( $plugin_file )] = $plugin_data;
+ $wp_plugins[trim( $plugin_file )] = $plugin_data;
}
uasort( $wp_plugins, '_sort_uname_callback' );

0 comments on commit 38e9e97

Please sign in to comment.
Something went wrong with that request. Please try again.