<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bavotasan.com &#187; Dashboard</title>
	<atom:link href="http://bavotasan.com/tag/dashboard/feed/" rel="self" type="application/rss+xml" />
	<link>http://bavotasan.com</link>
	<description>by c.bavota</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:42:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hiding the WordPress Dashboard for Non-Admin Users</title>
		<link>http://bavotasan.com/2008/hiding-the-wordpress-dashboard-for-non-admin-users/</link>
		<comments>http://bavotasan.com/2008/hiding-the-wordpress-dashboard-for-non-admin-users/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 20:33:21 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Authors]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[Custom Themes]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[everything]]></category>
		<category><![CDATA[Free WordPress Plugins]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[minor changes]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Plugin Code]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[something]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=112</guid>
		<description><![CDATA[There are two plugins out there that I have found that help customize your WordPress install by removing the dashboard. Why would you want to do this? Well, perhaps you have installed and customized WordPress for a client who really doesn&#8217;t need the dashboard, or you don&#8217;t want users who login to see the dashboard. [...]]]></description>
			<content:encoded><![CDATA[<p>There are two plugins out there that I have found that help customize your WordPress install by removing the dashboard. Why would you want to do this? Well, perhaps you have installed and customized WordPress for a client who really doesn&#8217;t need the dashboard, or you don&#8217;t want users who login to see the dashboard. Either way, there are options. Something like this is best left to a plugin so that when you upgrade is still functions and you don&#8217;t have to go in and change everything.<br />
<span id="more-112"></span><br />
<a href="http://www.deepwave.net/articles/hide_dashboard/">Deep Wave</a> has created a plugin called Hide Dashboard. It allows Admins to see the dashboard and removes it for regular users. There are a few options like allowing Authors and Editors to see the dashboard. I tried using this plugin on WordPress 2.7 and it did remove the dashboard for non-Admin users, but when they logged in it brought them straight to the dashboard even though the link was removed. Not really what you want.</p>
<p><a href="http://www.ilfilosofo.com/blog/2006/05/24/plugin-remove-the-wordpress-dashboard/">Il Filosofo</a> created a small plugin called Remove the Dashboard which worked great but hasn&#8217;t yet been updated for 2.7. I went in and made a few changes to get it to do what I wanted.  Here is the original plugin code written by <a href="http://www.ilfilosofo.com/blog/">Austin Matzko</a> and full credit is given to him for figuring it all out.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
Plugin Name: Filosofo Remove Dashboard
Plugin URI: http://www.ilfilosofo.com/blog/
Description: Make the Dashboard, that page that takes forever to load when you log in, disappear.
Version: 1.0
Author: Austin Matzko
Author URI: http://www.ilfilosofo.com/blog/
*/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*  Copyright 2006  Austin Matzko  (email : if.website at gmail.com)
&nbsp;
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
&nbsp;
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
&nbsp;
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> remove_the_dashboard <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$menu</span><span style="color: #339933;">,</span> <span style="color: #000088;">$submenu</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_ID</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$the_user</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_User<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">reset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Dashboard'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">next</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Dashboard'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">reset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$the_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">has_cap</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">next</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wp-admin/?(index.php)?$#'</span><span style="color: #339933;">,</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'index.php'</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
wp_redirect<span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-admin/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'remove_the_dashboard'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>I made some minor changes so that now it works in WordPress 2.7 and Admins have the ability to view the dashboard when they login.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
Plugin Name: Filosofo Remove Dashboard
Plugin URI: http://www.ilfilosofo.com/blog/
Description: Make the Dashboard, that page that takes forever to load when you log in, disappear.
Version: 1.0
Author: Austin Matzko
Author URI: http://www.ilfilosofo.com/blog/
*/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*  Copyright 2006  Austin Matzko  (email : if.website at gmail.com)
&nbsp;
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
&nbsp;
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
&nbsp;
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
&nbsp;
*/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*	
&nbsp;
Update 12/12/2008
&nbsp;
Modified by c.bavota of http://bavotasan.com for WordPress 2.7 and to allow the dashboard for Admins.
&nbsp;
*/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> remove_the_dashboard <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_10'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$menu</span><span style="color: #339933;">,</span> <span style="color: #000088;">$submenu</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_ID</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$the_user</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_User<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">reset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Dashboard'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">next</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Dashboard'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">reset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$the_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">has_cap</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">next</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wp-admin/?(index.php)?$#'</span><span style="color: #339933;">,</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'index.php'</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$menu</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                wp_redirect<span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-admin/post-new.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'remove_the_dashboard'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2008/hiding-the-wordpress-dashboard-for-non-admin-users/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
	</channel>
</rss>

