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

Viper007Bond viper at viper007bond.com
Sun Dec 14 12:24:27 GMT 2008


If you don't want users writing posts, then you shouldn't give them the
capability to do so. Removing the dashboard widget won't stop them from
going to the Write Post screen.

On Sun, Dec 14, 2008 at 4:07 AM, Frank Bueltge <frank at bueltge.de> wrote:

> Yes, this is a possibility.
> A i think this not a good idea. Example: the widget Quickpress give
> the users rights to write a post and maybe i dont like this. Also load
> you with this possibility all code and the you deactivate via css.
> WIth a little bid informatin about firebug oder Webdeveloper-toolbar
> in Firefox it is possible to active the widgets.
>
>
>
> On Sat, Dec 13, 2008 at 4:24 PM, Mark Rickert <mrickert at trone.com> wrote:
> > 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.
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/


More information about the wp-hackers mailing list