public static function memberOf($file, $exclude='plugins')
    {
        $file = realpath($file);
        $sep = DIRECTORY_SEPARATOR;

        $dirs = explode($sep, $file);
        for($i=0;$i<count($dirs);$i++) {
            if ($dirs[$i] == $exclude && isset($dirs[$i+1])) {
                return $dirs[$i+1];
            }
        }

        return false;
    }
public static function memberOf($file, $exclude='plugins')
    {
        $file = realpath($file);
        $sep = DIRECTORY_SEPARATOR;

        $dirs = explode($sep, $file);
        for($i=0;$i<count($dirs);$i++) {
            if ($dirs[$i] == $exclude && isset($dirs[$i+1])) {
                return $dirs[$i+1];
            }
        }

        return false;
    }
public static function memberOf ( $ file , $ exclude = 'plugins' ) { $ file = realpath ( $ file ) ; $ sep = DIRECTORY_SEPARATOR ; $ dirs = explode ( $ sep , $ file ) ; for ( $ i = 0 ; $ i < count ( $ dirs ) ; $ i ++ ) { if ( $ dirs [ $ i ] == $ exclude && isset ( $ dirs [ $ i + 1 ] ) ) { return $ dirs [ $ i + 1 ] ; } } return false ; }
Find the plugin containing a given file
@param $file string filename
@return plugin name or boolean False
Find the plugin containing a given file