Can anyone help with this query please?
I have been writing a plugin that will let you manage your dashboard widgets for different roles. It is not done yet but I will hopefully be releasing it in the next couple of months. The way that I get the list of registered dashboard widgets is this little snippet.
function manage_dash_setup($arg1) {
global $wp_meta_boxes, $wpdb;
if (current_user_can('administrator') && is_array($wp_meta_boxes['dashboard'])) {
update_option($wpdb->prefix.'dash_widget_manager_registered_widgets', $wp_meta_boxes['dashboard']);
}
}
add_action('wp_dashboard_setup', 'manage_dash_setup', 100);
Put this in your functions.php file or a plugin and it will set an option called $wpdb->prefix.’dash_widget_manager_registered_widgets’ that will contain the array of registered dashboard widgets. It will get updated whenever you go to the dashboard as an admin user and you can use it anywhere you’d like. This is the best solution Ive been able to find.
I decided to move my plugin along after needing it for something last week and have published it to the plugin directory. You can find it here: http://wordpress.org/extend/plugins/dash-widget-manager/. Don’t know if this will help with what you are trying to do but it will give you a working example of the snippet I posted above.