public function getPlugin($name)
    {
        foreach (array_keys(get_plugins()) as $file) {
            // Logic taken from WP-CLI.
            if ($file === "{$name}.php" || ($name && $file === $name) || (dirname($file) === $name && $name !== '.')) {
                return $file;
            }
        }

        return '';
    }
public function getPlugin($name)
    {
        foreach (array_keys(get_plugins()) as $file) {
            // Logic taken from WP-CLI.
            if ($file === "{$name}.php" || ($name && $file === $name) || (dirname($file) === $name && $name !== '.')) {
                return $file;
            }
        }

        return '';
    }
public function getPlugin ( $ name ) { foreach ( array_keys ( get_plugins ( ) ) as $ file ) { // Logic taken from WP-CLI. if ( $ file === "{$name}.php" || ( $ name && $ file === $ name ) || ( dirname ( $ file ) === $ name && $ name !== '.' ) ) { return $ file ; } } return '' ; }
Get information about a plugin.

@param string $name

@return string Plugin filename and path.
Get information about a plugin .