I read the core code and it seems that adding a new custom category in addition to “Basic” and “Advanced” is not straightforward.
Do you suggest a way to do that? or;
Do you have future plans for adding this feature?
I think this feature is very important for someone extending modules.
In our case, it is very important, and the last thing I want to do is to add a JS code to reorder modules in the browser.
The category comes from the module’s constructor function as in the example below. You can’t change the category for core modules, but you can add different categories for the custom modules you create. Let me know if you have any questions about that.
/**
* @class FLAccordionModule
*/
class FLAccordionModule extends FLBuilderModule {
/**
* @method __construct
*/
public function __construct()
{
parent::__construct(array(
'name' => __('Accordion', 'fl-builder'),
'description' => __('Display a collapsible accordion of items.', 'fl-builder'),
'category' => __('Advanced Modules', 'fl-builder')
));
$this->add_css('font-awesome');
}
}