src/Potter/PotterCore.php
protected function loadWidgets()
    {
        $widgets_folder = apply_filters('potter_widgets_folder', $this->widgetsFolder);

        $pattern = $this->themeDIR . $widgets_folder . "/*.php";

        foreach (glob($pattern) as $file): // Load File
            require_once($file);

            $widget = basename($file, '.php');

            // Register
            if (class_exists($widget)):
                $this->widgets->push($widget);
            endif;
        endforeach;
    }
protected function loadWidgets()
    {
        $widgets_folder = apply_filters('potter_widgets_folder', $this->widgetsFolder);

        $pattern = $this->themeDIR . $widgets_folder . "/*.php";

        foreach (glob($pattern) as $file): // Load File
            require_once($file);

            $widget = basename($file, '.php');

            // Register
            if (class_exists($widget)):
                $this->widgets->push($widget);
            endif;
        endforeach;
    }
Load and register widgets