Hi Jonathon
I think the standard plugin way to do this would be to create a capability, e.g. ‘ww_assign_widgets’ that would be applied to certain roles by default, e.g. Admin. Then the user has the ability to change/add this capability to whichever role they like (through Members plugin for example).
I did fix this problem for me a while ago using the code below (which took hours!), but yeah a capability for it would be better. Thanks
/*
* Becuase we removed the meta box, we have to manually tell widget wrangler
* what the preset is for this page otherwise no widgets show up on the page,
* plugin filters (look in admin-presets.php & widget-wrangler-admin.php)
*/
add_filter('widget_wrangler_save_widgets_alter', 'widget_wrangler_no_meta_box_fix', 999, 1);
function widget_wrangler_no_meta_box_fix($widgets) {
global $widget_wrangler;
$current_preset_id = get_option('ww_post_preset_id', false);
if (!current_user_can('manage_options')) {
if ($current_preset_id === false) {
$widget_wrangler->presets->new_preset_id = 1;
if ($new_preset = $widget_wrangler->presets->get_preset(1)){
$widgets = serialize($new_preset->widgets);
}
} else {
$widget_wrangler->presets->new_preset_id = false;
$widgets = false;
}
}
return $widgets;
}