Options for Widgets and Menu Items
The same way we can extend posts and terms, it would be nice if we could also, as easily, add fields to widgets and menu items. This way we could add a "widget_class" field, or "column_width", "color", "menu_item_type", or whatever.
I think it's a logical evolution to the framework, to add the same customization capabilities to other Wordpress objects. Widgets and menu_items are clear candidates, since they are individual entries in the database, like posts and terms.
Since menu locations and sidebars are usually theme dependant, options for menus and sidebars can be implemented in other ways, with theme options, the customizer, etc. so they aren't as necessary.
It would be nice though, if the framework also provided a streamlined way of adding menu settings that appeared directly in the menu edit screen (like the auto-add-pages option). And the same for sidebars, like the Sidebars extension does.
This functionality should be part of the framework core, and extensions like the MegaMenu and Sidebars should based from it. At the moment it's the other way around. The extensions solve most of the problem, just applied to a very specific case. This functionality should be extracted, generalized and moved to the core.
Following the same principles as with the other options, the framework should look in:
theme/options/menus.php
theme/options/menu-items.php
theme/options/widgets.php
theme/options/sidebars.php
and have the helper functions:
fw_get_db_menu_option()
fw_get_db_menu_item_option()
fw_get_db_widget_option()
fw_get_db_sidebar_option()
As I said, menus and sidebars aren't as important, but menu_items and widgets would be much more useful this way. Right now everybody has its own implementation of this, but it would be nice if Unyson standardized the thing. What do you think? :)
Do you know where the Megamenu is? I can nt activate it?
http://manual.unyson.io/en/latest/extension/megamenu/index.html#contents
- MegaMenu items options
- Widget Options (not official)