so-widgets-bundle icon indicating copy to clipboard operation
so-widgets-bundle copied to clipboard

Add more control over widget folders structure

Open NazarkinRoman opened this issue 7 years ago • 2 comments

Would be great to have some control over widget file loading process. For now it just looks for */*.php pattern which is not flexible. For example, I'd like to have next directory structure:

my-first-widget
-- widget.php
-- template.php

my-second-widget
-- widget.php
-- template.php

Current widgets loading process does not allow be to implement this. There is no any filters inside SiteOrigin_Widgets_Bundle->get_widget_objects() and SiteOrigin_Widgets_Bundle->get_widgets_list() functions to control glob pattern.

Different approach without using glob: load only registered widget files from internal storage of SiteOrigin_Widgets_Widget_Manager class.

NazarkinRoman avatar Mar 25 '18 11:03 NazarkinRoman

Unfortunately, this isn't something we're currently interested in doing but I can definitely understand why you would want this. I'm going to put this on our backlog internally and close this one to remove it from the priority list.

AlexGStapleton avatar May 30 '18 07:05 AlexGStapleton

Actually, we've decided to keep this open purely for public future reference as this may have come up one or twice in the past.

Internal Note: Slack

AlexGStapleton avatar May 30 '18 07:05 AlexGStapleton