function elgg_register_widget_type() isn't apply this param.
Thanks Nikolai. That's what I discovered. Do you have any advice for setting and getting default widget options?
1. You can use widget_settings, <widget_handler> hook:
Triggered when saving a widget settings
$params['params']
for widget$params['widget']
. If handling saving the settings, the handler should return true to prevent the default code from running.
Look at this example.
2. Widget is an entity, so you can use it as the usual object via setting/getting metadata.
Of course, you need to know a GUID for this.
3. Don't forget, you can override the edit form of your widget by setting the default values before the user has done so.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.