[wp-hackers] Possible to deactivate Dashboard-Widgets?

Mark Rickert mrickert at trone.com
Sat Dec 13 15:24:16 GMT 2008


I have a lot of users and they don't need to see all the WordPress development stuff in the dashboard, so i'm simply hiding them with a little css that's in an admin_head action:

This is global for all users and doesn't mess with their user_meta options. This will also remove the help and options expandable menus in the dashboard since my users need to come to me instead of to the WordPress forums for help.

<style>
	
	#dashboard_incoming_links, 
	#dashboard_plugins, 
	#dashboard_secondary, 
	#dashboard_primary, 
	#contextual-help-link-wrap, 
	#screen-options-link-wrap,
	#footer-left,
	.turbo-nag,
	.versions{display:none !important;}
</style>

Hope this helps.

-Mark


-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com on behalf of Frank Bueltge
Sent: Sat 12/13/2008 8:25 AM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Possible to deactivate Dashboard-Widgets?
 
this is the code to add the meta box in dashboard:
wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ),
'wp_dashboard_quick_press' );

and in the function wp_add_dashboard_widge was used the function add_meta_box
add_meta_box( $widget_id, $widget_name , $callback, 'dashboard',
$location, 'core' );

now i have write a small test in a plugin:
function mytest() {
	remove_meta_box('dashboard_quick_press', 'dashboard', 'core');
}

add_action( 'admin_menu', 'mytest' );

Thanks, works now, i have test with the false id :(
Best wishes and thank you
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers




~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Rickert
Interactive Programmer, Trone
336.812.2060
mrickert at trone.com
http://www.trone.com/

Confidentiality Notice: This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it from your computer. Thank you.


More information about the wp-hackers mailing list