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

Mark Rickert mrickert at trone.com
Sun Dec 14 14:45:25 GMT 2008


I DO want my users writing posts  and if I'm not mistaken, my code doesn't
remove the quickpress widget.

I'm not worried about a user activating the widgets with firebug because: 1.
They're using IE7, and 2. If they're sophisticated enough to do this more
power to them. I'm not trying to completely hide the software we're using,
but make it so that users don't get overwhelmed by information that they
don't necessarily need to see.


On 12/14/08 7:24 AM, "Viper007Bond" <viper at viper007bond.com> wrote:

> 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
>> 
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~
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