Hi there,
I’ve been trying to automatically activate widgets – I created plugin to work with SO Widgets bundle as framework, in a way that my widgets get activated when user activate my plugin, but no luck.
I tried with instructions from here:
https://siteorigin.com/thread/enable-new-widget-by-default/, like this:
register_activation_hook(__FILE__, 'my_plugin_on_activation'); my_plugin_on_activation() { SiteOrigin_Widgets_Bundle::single()->activate_widget('my-widget-id'); // I used proper id }
and even with hook “siteorigin_widgets_active_widgets” (as instructed in linked thread) …
Any ideas ?
Thanks
Hi,
thanks for thread approval. :)
I still have issues with register_activation_hook (I added this hook in main plugin file).
Tried with this code (no luck):
so then I used simply
add_filter(‘siteorigin_widgets_active_widgets’, ‘mm_nw_activate_widgets’); , without register hook
but this keeps widgets activated, not possible to deactivate …
Cheers
Hi Micemade,
Very sorry for the delay.
I’m going to forward this to the development team.
Thanks, I hope they will come up with some solution. :)