<?xml version="1.0" encoding="UTF-7"?>
<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>Team Webgalli - Blog &#187; wordpress dashboard</title>
	<atom:link href="http://www.webgalli.com/blog/tag/wordpress-dashboard/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webgalli.com/blog</link>
	<description>Elgg &#124; Wordpress &#124; Opensource &#124; PHP &#124; Mobile &#124; iPhone developers, Kerala India</description>
	<lastBuildDate>Mon, 15 Apr 2013 17:35:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>8 important hacks for wordpress dashboard and profile</title>
		<link>http://www.webgalli.com/blog/8-important-hacks-for-wordpress-dashboard-and-profile/</link>
		<comments>http://www.webgalli.com/blog/8-important-hacks-for-wordpress-dashboard-and-profile/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 13:04:34 +0000</pubDate>
		<dc:creator>Sarath C</dc:creator>
				<category><![CDATA[Wordpress tips and plugins]]></category>
		<category><![CDATA[Wordpress Tutorials]]></category>
		<category><![CDATA[add more fields to wordpress]]></category>
		<category><![CDATA[add wordpress widgets]]></category>
		<category><![CDATA[extra widgets for wordpress]]></category>
		<category><![CDATA[remove wordpress profile info]]></category>
		<category><![CDATA[remove wordpress upgrade now]]></category>
		<category><![CDATA[remove wordpress widgets]]></category>
		<category><![CDATA[wordpress dashboard]]></category>
		<category><![CDATA[wordpress hacks]]></category>

		<guid isPermaLink="false">http://webgalli.com/blog/?p=798</guid>
		<description><![CDATA[<p>Friends, In this article we will introduce you to some quick hacks on the WordPress dashboard. When you are developing a site for a client, sometimes they wont like to have the multiple wordpress logos, news, widgets etc in their dashboard. So here are some quick tips on how to customize wordpress dashboard. You need [...]</p><p>The post <a href="http://www.webgalli.com/blog/8-important-hacks-for-wordpress-dashboard-and-profile/">8 important hacks for wordpress dashboard and profile</a> appeared first on <a href="http://www.webgalli.com/blog">Team Webgalli - Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Friends, In this article we will introduce you to some quick hacks on the WordPress dashboard. When you are developing a site for a client, sometimes they wont like to have the multiple wordpress logos, news, widgets etc in their dashboard. So here are some quick tips on how to customize wordpress dashboard. You need to add the following codes to theme&#8217;s functions.php file.</p>
<h2>1]Add custom WordPress dashboard logo</h2>
<p>Inorder to add a custom logo to your wordpress admin panel use the following code</p>
<pre class="brush:php">add_action('login_head', 'my_wordpress_custom_login_logo');
function my_wordpress_custom_logo() {
   echo "&lt;img src='location_to_my_img'&gt;";
}</pre>
<h2>2]Remove wordpress dashboard widgets</h2>
<p>It is not good to show the dashboard widgets like whats happening, blog rolls etc to the users. So to remove that use the following code</p>
<pre class="brush:php">add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
function remove_dashboard_widgets() {
 	global $wp_meta_boxes;
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}</pre>
<h2>3]Add extra widgets to wordpress dashboard</h2>
<p>In some cases we need to have some custom widgets in the wordpress dashboard. We can achieve it by</p>
<pre class="brush:php">function custom_dashboard_widget_function() {
	// Display whatever you want to show
	echo "Hello World, I'm a great Dashboard Widget";
} 

// Create the function use in the action hook
function custom_add_dashboard_widgets() {
	wp_add_dashboard_widget('custom_dashboard_widget', 'Custom Dashboard Widget', 'custom_dashboard_widget_function');
}
// Hoook into the 'wp_dashboard_setup' action to register our functions
add_action('wp_dashboard_setup', 'custom_add_dashboard_widgets' );</pre>
<h2>4]Remove the &#8220;Upgrade now&#8221; notification</h2>
<p>There can be a catastrophic output in some cases when the client upgrades the site. So a better way is to disable the upgrade notification. To disable it</p>
<pre class="brush:php">if ( !current_user_can( 'edit_users' ) ) {
  add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
  add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}</pre>
<h2>5] Remove default fields from the wordpress profile</h2>
<p>In some cases, we need to remove the user profile fileds like bio, aol, jabber etc. Use the following code for that</p>
<pre class="brush:php">function profile_admin_buffer_start() { ob_start("remove_plain_bio"); }
function profile_admin_buffer_end() { ob_end_flush(); }
add_action('admin_head', 'profile_admin_buffer_start');
add_action('admin_footer', 'profile_admin_buffer_end');
add_filter('user_contactmethods','hide_profile_fields',10,1);
add_action('admin_head','hide_personal_options');
function remove_plain_bio($buffer) {
	$titles = array('#&lt;h3&gt;About Yourself&lt;/h3&gt;#','#&lt;h3&gt;About the user&lt;/h3&gt;#');
	$buffer=preg_replace($titles,'&lt;h3&gt;Password&lt;/h3&gt;',$buffer,1);
	$biotable='#&lt;h3&gt;Password&lt;/h3&gt;.+?&lt;table.+?/tr&gt;#s';
	$buffer=preg_replace($biotable,'&lt;h3&gt;Password&lt;/h3&gt; &lt;table&gt;',$buffer,1);
	return $buffer;
}
function hide_profile_fields( $contactmethods ) {
	unset($contactmethods['aim']);
	unset($contactmethods['jabber']);
	unset($contactmethods['yim']);
	unset($contactmethods['url']);
	unset($contactmethods['pre_user_url']);
	return $contactmethods;
}
function hide_personal_options(){
	echo "n" . '&lt;script type="text/javascript"&gt;jQuery(document).ready(function($) { $('form#your-profile &gt; h3:first').hide(); $('form#your-profile &gt; table:first').hide(); $('form#your-profile').show(); });&lt;/script&gt;' . "n";
}</pre>
<p>You can find three more extra hacks in our<a title="How to customize your wordpress login page?" href="http://webgalli.com/blog/how-to-customize-your-wordpress-login-page/"> previous blog</a>.</p>
<p>The post <a href="http://www.webgalli.com/blog/8-important-hacks-for-wordpress-dashboard-and-profile/">8 important hacks for wordpress dashboard and profile</a> appeared first on <a href="http://www.webgalli.com/blog">Team Webgalli - Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.webgalli.com/blog/8-important-hacks-for-wordpress-dashboard-and-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
