<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>wpLifeGuard</title>
	
	<link>http://wplifeguard.com</link>
	<description>Learn How to Use WordPress</description>
	<lastBuildDate>Tue, 15 May 2012 23:40:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/wplifeguard" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="wplifeguard" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">wplifeguard</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>WordPress App Store – Making Plugin Purchases Easy</title>
		<link>http://wplifeguard.com/wordpress-app-store-making-plugin-purchases-easy/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-app-store-making-plugin-purchases-easy</link>
		<comments>http://wplifeguard.com/wordpress-app-store-making-plugin-purchases-easy/#comments</comments>
		<pubDate>Tue, 15 May 2012 23:38:53 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[Premium]]></category>
		<category><![CDATA[WordPress Plugin]]></category>
		<category><![CDATA[WordPress Themes]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2251</guid>
		<description><![CDATA[The WP App Store is now open for business! The WordPress App Store is a quick and easy way to purchase and install premium WordPress themes and plugins all in one place. It&#8217;s that simple! With brands like Woo Themes and ThemeJam or plugins like Gravity Forms – there isn&#8217;t much of a reason not<a href="http://wplifeguard.com/wordpress-app-store-making-plugin-purchases-easy/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><iframe width="585" height="327" src="http://www.youtube.com/embed/FPATOT5RRRQ?rel=0" frameborder="0" allowfullscreen></iframe></p>
<h4>The <a href="http://wpappstore.com/">WP App Store</a> is now open for business!</h4>
<p>The WordPress App Store is a quick and easy way to purchase and install premium WordPress themes and plugins all in one place. It&#8217;s that simple! With brands like <a href="http://www.woothemes.com/woomember/go?r=101213&#038;i=l16">Woo Themes</a> and <a href="http://themejam.com/">ThemeJam</a> or plugins like <a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&#038;c=ib&#038;aff=198006">Gravity Forms</a> – there isn&#8217;t much of a reason not to use the WP App Store.</p>
<p><img src="http://wplifeguard.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-15-at-6.18.21-PM.png" alt="WP App Store" /></p>
<p>Don&#8217;t know how to install WordPress plugins? Check out our video tutorial showing <a href="http://wplifeguard.com/videos/plugins-101-installing-removing-and-updating-plugins/">how to use WordPress plugins</a>.</p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/day-9-wordpress-contact-forms/" rel="bookmark">Day 9: WordPress Contact Forms</a></li>
		<li><a href="http://wplifeguard.com/day-10-3-ways-to-let-visitors-submit-guest-posts/" rel="bookmark">Day 10: 3 Ways to Let Visitors Submit Guest Posts</a></li>
		<li><a href="http://wplifeguard.com/learn-more-about-your-visitors-with-the-google-analytics-for-wordpress-plugin/" rel="bookmark">Learn More About Your Visitors with the Google Analytics for WordPress Plugin</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=RpFxZJRBPW8:4bomglvVJQw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=RpFxZJRBPW8:4bomglvVJQw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=RpFxZJRBPW8:4bomglvVJQw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=RpFxZJRBPW8:4bomglvVJQw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=RpFxZJRBPW8:4bomglvVJQw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/wordpress-app-store-making-plugin-purchases-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Giveaway: Receive a Full Refund on your wpLifeGuard Membership</title>
		<link>http://wplifeguard.com/giveaway-receive-a-full-refund-on-your-wplifeguard-membership/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=giveaway-receive-a-full-refund-on-your-wplifeguard-membership</link>
		<comments>http://wplifeguard.com/giveaway-receive-a-full-refund-on-your-wplifeguard-membership/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 11:00:07 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[wpLifeGuard]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Giveaway]]></category>
		<category><![CDATA[WordPress Video Tutorials]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2225</guid>
		<description><![CDATA[As a thanks to all of our members, we would like to give a full refund to two lucky people. It&#8217;s easy! Simply submit a testimonial telling us what you like about your wpLifeGuard membership and you&#8217;ll be entered to win. On Tuesday, April 17th we will randomly select two members to win a full<a href="http://wplifeguard.com/giveaway-receive-a-full-refund-on-your-wplifeguard-membership/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><big>As a thanks to all of our members, we would like to give a full refund to two lucky people.</big></p>
<p>It&#8217;s easy! Simply <a href="http://wplifeguard.com/submit-a-testimonial/">submit a testimonial</a> telling us what you like about your wpLifeGuard membership and you&#8217;ll be entered to win. On Tuesday, April 17th we will randomly select two members to win a full refund.</p>
<h4>How to Enter to Receive a Refund</h4>
<ol>
<li>Have an Active wpLifeGuard Membership</li>
<li><a href="http://wplifeguard.com/submit-a-testimonial/">Submit a Testimonial</a></li>
<li>Done!</li>
</ol>
<p><del>Entries will be accepted until Tuesday, April 17th noon central time.</del> Giveaway is closed.</p>
<h3>Congrats to the Winners!</h3>
<p>Congrats to <a href="http://wplifeguard.com/testimonials/newton-king/">Newton</a> and <a href="http://wplifeguard.com/testimonials/brian/">Brian</a> for winning!</p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/welcome-to-wplifeguard/" rel="bookmark">Welcome to wpLifeGuard</a></li>
		<li><a href="http://wplifeguard.com/day-3-offer-a-giveaway/" rel="bookmark">Day 3: Offer a Giveaway</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=fY1xAuDbS1o:T69g3OyMc1M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=fY1xAuDbS1o:T69g3OyMc1M:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=fY1xAuDbS1o:T69g3OyMc1M:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=fY1xAuDbS1o:T69g3OyMc1M:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=fY1xAuDbS1o:T69g3OyMc1M:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/giveaway-receive-a-full-refund-on-your-wplifeguard-membership/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep WordPress from Compressing JPGs</title>
		<link>http://wplifeguard.com/keep-wordpress-from-compressing-jpgs/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=keep-wordpress-from-compressing-jpgs</link>
		<comments>http://wplifeguard.com/keep-wordpress-from-compressing-jpgs/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 14:39:44 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[JPG]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Speed up WordPress]]></category>
		<category><![CDATA[WordPress Plugin]]></category>
		<category><![CDATA[WordPress Shortcode]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2205</guid>
		<description><![CDATA[A little known WordPress feature is WordPress&#8217; image compression. While this is a handy feature to help increase the speed of your website, not all website owners want their images compressed – like photographers for example. Thankfully, turning off this feature is quick and easy. Simply add the following to your WordPress theme&#8217;s functions.php file. add_filter&#40;'jpeg_quality',<a href="http://wplifeguard.com/keep-wordpress-from-compressing-jpgs/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>A little known WordPress feature is WordPress&#8217; image compression. While this is a handy feature to help increase the speed of your website, not all website owners want their images compressed – like photographers for example. Thankfully, turning off this feature is quick and easy. Simply add the following to your WordPress theme&#8217;s functions.php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jpeg_quality'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$arg</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Source: <a href="http://www.skidoosh.co.uk/php/wordpress-jpeg-thumbnail-image-quality-setting-and-adjustment/">WordPress JPEG Thumbnail Image Quality Setting and Adjustment</a></p>
<h4>Increase WordPress Site Speed with JPG Compression</h4>
<p>Need to squeeze a few extra kilobytes off your images to speed up your WordPress website? This handy snippet can be used to compress your JPGs to speed up your WordPress website. As long as you&#8217;re fine with lower quality images for the sake of smaller file sizes, less data transfer, and faster load time, then use the following snippet to compress uploaded JPG images.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jpeg_quality'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$arg</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>Keep WordPress from Compressing JPGs with a WordPress Plugin</h4>
<p>Don&#8217;t want to mess with WordPress code? No problem. The WordPress Plugin <a href="http://wordpress.org/extend/plugins/photojar-base/">PhotoJAR: Base</a> keeps WordPress from compressing JPGs as well as provide a few other nifty features, like dynamic resizing and caching of thumbnails, custom image sizes, gallery of galleries, maximum size setting for full size images, an [image] shortcode, and more.</p>
<p>Don&#8217;t know how to install WordPress plugins? Check out our video tutorial showing <a href="http://wplifeguard.com/videos/plugins-101-installing-removing-and-updating-plugins/">how to use WordPress plugins</a>.</p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/day-22-7-code-snippets-to-improve-wordpress-security/" rel="bookmark">Day 22: 7 Code Snippets to Improve WordPress Security</a></li>
		<li><a href="http://wplifeguard.com/how-to-use-wordpress-shortcode/" rel="bookmark">The Simplicity of Using WordPress Shortcode</a></li>
		<li><a href="http://wplifeguard.com/day-8-speed-up-your-wordpress-site-with-w3-total-cache/" rel="bookmark">Day 8: Speed Up your WordPress Site with W3 Total Cache</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=lhOlJipXejI:Ze9H6tdJNtU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=lhOlJipXejI:Ze9H6tdJNtU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=lhOlJipXejI:Ze9H6tdJNtU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=lhOlJipXejI:Ze9H6tdJNtU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=lhOlJipXejI:Ze9H6tdJNtU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/keep-wordpress-from-compressing-jpgs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easily Create Galleries and Slideshows with WordPress</title>
		<link>http://wplifeguard.com/easily-create-galleries-and-slideshows-with-wordpress/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=easily-create-galleries-and-slideshows-with-wordpress</link>
		<comments>http://wplifeguard.com/easily-create-galleries-and-slideshows-with-wordpress/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 12:00:29 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[Galleries]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Slideshow]]></category>
		<category><![CDATA[The Post]]></category>
		<category><![CDATA[WordPress Dashboard]]></category>
		<category><![CDATA[WordPress Plugin]]></category>
		<category><![CDATA[WordPress Shortcode]]></category>
		<category><![CDATA[WYSIWYG]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2184</guid>
		<description><![CDATA[Showcase by Dev7studios makes the whole process of uploading, ordering and editing your images as simple as it can be. Then it makes your gallery look stunning by automatically showing your gallery in a beautiful &#8220;lightbox&#8221; slideshow. Built in features like dynamic image resizing and simple lightbox theme changing just make it all the better.<a href="http://wplifeguard.com/easily-create-galleries-and-slideshows-with-wordpress/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2012/03/wordpress-showcase-gallery.png" alt="WordPress Plugin – Showcase: Create Galleries and Slideshows" /></p>
<p><a href="http://showcase.dev7studios.com/">Showcase</a> by <a href="http://dev7studios.com/">Dev7studios</a> makes the whole process of uploading, ordering and editing your images as simple as it can be. Then it makes your gallery look stunning by automatically showing your gallery in a beautiful &#8220;lightbox&#8221; slideshow. Built in features like dynamic image resizing and simple lightbox theme changing just make it all the better.</p>
<p>Check out the demo video to see how truly easy it is to create galleries and slideshows on your WordPress website.</p>
<p><iframe width="585" height="327" src="http://www.youtube.com/embed/QTiKIVlRyeM?rel=0" frameborder="0" allowfullscreen></iframe></p>
<h4>Key Features</h4>
<ul>
<li>Quickly create slideshows or galleries with ease</li>
<li>Drag and drop gallery and slideshow organization</li>
<li>Built in lightbox</li>
<li>Create unlimited slideshows or galleries with unlimited photos</li>
</ul>
<p><img src="/wp-content/uploads/2012/03/showcase-features.png" alt="Showcase Features" /></p>
<p>Don&#8217;t know how to install WordPress plugins? Check out our video tutorial showing <a href="http://wplifeguard.com/videos/plugins-101-installing-removing-and-updating-plugins/">how to use WordPress plugins</a>.</p>
<p><a href="http://showcase.dev7studios.com/" class="green-button ml">Create a WordPress Gallery Today!</a></p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/day-28-use-jetpack-to-boost-your-wordpress-site-to-the-next-level/" rel="bookmark">Day 28: Use Jetpack to Boost Your WordPress site to the Next Level</a></li>
		<li><a href="http://wplifeguard.com/day-9-wordpress-contact-forms/" rel="bookmark">Day 9: WordPress Contact Forms</a></li>
		<li><a href="http://wplifeguard.com/day-24-check-your-theme-for-all-the-latest-wordpress-standards-and-practices/" rel="bookmark">Day 24: Check Your Theme for All the Latest WordPress Standards and Practices</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=aDK57gqlwWI:XnOiI00FH_c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=aDK57gqlwWI:XnOiI00FH_c:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=aDK57gqlwWI:XnOiI00FH_c:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=aDK57gqlwWI:XnOiI00FH_c:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=aDK57gqlwWI:XnOiI00FH_c:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/easily-create-galleries-and-slideshows-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Links to WordPress 3.3′s Admin Bar</title>
		<link>http://wplifeguard.com/how-to-add-links-to-wordpress-3-3s-admin-bar/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-add-links-to-wordpress-3-3s-admin-bar</link>
		<comments>http://wplifeguard.com/how-to-add-links-to-wordpress-3-3s-admin-bar/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 12:10:56 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[Efficiency]]></category>
		<category><![CDATA[Admin B]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Power User]]></category>
		<category><![CDATA[WordPress 3.3]]></category>
		<category><![CDATA[WordPress Dashboard]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2174</guid>
		<description><![CDATA[One of the great additions to WordPress 3.3 is the updated admin bar. Not only does the admin bar add some nifty quick links – but you and plugins can add links of your own to it. It&#8217;s pretty simple and straightforward. How to Add a Single Link to the WordPress Admin Bar &#60;?php add_action&#40;'admin_bar_menu', 'add_toolbar_items',<a href="http://wplifeguard.com/how-to-add-links-to-wordpress-3-3s-admin-bar/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>One of the great <a href="http://wplifeguard.com/whats-new-in-wordpress-3-3/">additions to WordPress 3.3</a> is the updated admin bar. Not only does the admin bar add some nifty quick links – but you and plugins can add links of your own to it. It&#8217;s pretty simple and straightforward.</p>
<h4>How to Add a Single Link to the WordPress Admin Bar</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_bar_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_toolbar_items'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> add_toolbar_items<span style="color: #009900;">&#40;</span><span style="color: #000088;">$admin_bar</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'id'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my-item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'My Item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'href'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'#'</span><span style="color: #339933;">,</span>	
		<span style="color: #0000ff;">'meta'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My Item'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>			
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h4>How to Add a Dropdown Menu to the WordPress Admin Bar</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_bar_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_toolbar_items'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> add_toolbar_items<span style="color: #009900;">&#40;</span><span style="color: #000088;">$admin_bar</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'id'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my-item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'My Item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'href'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'#'</span><span style="color: #339933;">,</span>	
		<span style="color: #0000ff;">'meta'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My Item'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>			
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'id'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my-sub-item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my-item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'My Sub Menu Item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'href'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'#'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'meta'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My Sub Menu Item'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'target'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'_blank'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my_menu_item_class'</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'id'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my-second-sub-item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my-item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'My Second Sub Menu Item'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'href'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'#'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'meta'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My Second Sub Menu Item'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'target'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'_blank'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my_menu_item_class'</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Source: <a href="http://wp-snippets.com/add-links-to-wordpress-3-3-new-toolbar/">Add Links to WordPress 3.3 New Toolbar</a></p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/how-to-remove-move-or-style-the-wordpress-admin-bar/" rel="bookmark">How to Remove, Move, or Style the WordPress Admin Bar</a></li>
		<li><a href="http://wplifeguard.com/whats-new-in-wordpress-3-3/" rel="bookmark">What&#8217;s New in WordPress 3.3?</a></li>
		<li><a href="http://wplifeguard.com/how-to-add-custom-alerts-to-a-wordpress-dashboard/" rel="bookmark">How to Add Custom Alerts to a WordPress Dashboard</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=Z_4ueHsjd5s:n9_QA5EnRQ8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=Z_4ueHsjd5s:n9_QA5EnRQ8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=Z_4ueHsjd5s:n9_QA5EnRQ8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=Z_4ueHsjd5s:n9_QA5EnRQ8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=Z_4ueHsjd5s:n9_QA5EnRQ8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/how-to-add-links-to-wordpress-3-3s-admin-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boost Your Restaurant with Quality Restaurant Focused WordPress Themes and Hosting</title>
		<link>http://wplifeguard.com/boost-your-restaurant-with-quality-restaurant-wordpress-themes-and-hosting/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=boost-your-restaurant-with-quality-restaurant-wordpress-themes-and-hosting</link>
		<comments>http://wplifeguard.com/boost-your-restaurant-with-quality-restaurant-wordpress-themes-and-hosting/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 22:21:35 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[Calendar]]></category>
		<category><![CDATA[Galleries]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Hosted WordPress]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[Restaurant]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Social]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2088</guid>
		<description><![CDATA[Restaurant Engine is a new service that offers &#8220;a turnkey, hosted website solution designed specifically for Restaurants.&#8221; If you&#8217;re a restaurant owner that needs a WordPress website and can&#8217;t afford a custom design, Restaurant Engine is for you. Restaurant Engine&#8217;s quick and easy restaurant web hosting service makes it a cinch to setup a feature<a href="http://wplifeguard.com/boost-your-restaurant-with-quality-restaurant-wordpress-themes-and-hosting/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://restaurantengine.com/"><img src="/wp-content/uploads/2012/02/restaurant-engine.png" alt="Restaurant Engine - WordPress Hosting for Restaurants" /></a></p>
<p><a href="http://restaurantengine.com/">Restaurant Engine</a> is a new service that offers &#8220;a turnkey, hosted website solution designed specifically for Restaurants.&#8221; If you&#8217;re a restaurant owner that needs a WordPress website and can&#8217;t afford a custom design, Restaurant Engine is for you.</p>
<p>Restaurant Engine&#8217;s quick and easy restaurant web hosting service makes it a cinch to setup a feature rich, well designed, effective website that will accomplish all your needs. </p>
<h3>Key Features</h3>
<ul class="big">
<li>Go live in minutes</li>
<li>Beautiful responsive designs</li>
<li>Online menus</li>
<li>Locations with Google Maps</li>
<li>Social Media Integration</li>
<li>Events Calendar</li>
<li>SEO Optimized</li>
<li>Online Orders and Reservations</li>
<li>Photo and Video Galleries</li>
<li>Fast and Reliable Web Hosting</li>
<li>Expert Support</li>
</ul>
<p>Check out the <a href="http://restaurantengine.com/tour/">Restaurant Engine Tour</a> or <a href="http://restaurantengine.com/design-templates/">Restaurant Engine Designs</a> for a more detailed overview.</p>
<h3>Quality Designs</h3>
<p class="image"><img src="/wp-content/uploads/2012/03/restaurant-engine-templates.png" alt="WordPress Restaurant Templates" /><br />
Restaurant Engine&#8217;s <a href="http://restaurantengine.com/design-templates/">restaurant website templates</a> in action.</p>
<p>Restaurant Engine&#8217;s excellent templates cover any restaurant&#8217;s needs and can even enhance the overal dining experience. With the easy ability to check out your menu, make a reservation, browse the restaurant&#8217;s events calendar, rate your restaurant, and more. All of this can be done through a gorgeous fully mobile compatible design.</p>
<h3>Setup in Minutes</h3>
<p>Restaurant Engine is unlike most other WordPress template services – Restaurant Entine is fully hosted and supported. The simple setup process allows you to get a website for your restaurant up in running in mere minutes with little to no technical knowledge required! </p>
<h3>Get in for Free</h3>
<p>Restaurant Engine is currently in beta, so that means you can <a href="https://restaurantengine.com/signup-beta/">sign up for free</a> and get locked into a lifetime discount.</p>
<p>So be sure to check out Restaurant Engine to get some quality hosted <a href="https://restaurantengine.com/">restaurant website templates</a> for your restaurant. </p>
<p><a href="https://restaurantengine.com/" class="green-button ml">Check out Restaurant Engine</a></p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/day-30-excellent-places-to-get-quality-wordpress-themes/" rel="bookmark">Day 30: Excellent Places to Get Quality WordPress Themes</a></li>
		<li><a href="http://wplifeguard.com/wpmu-quality-wordpress-themes-wordpress-plugins/" rel="bookmark">WPMU – Quality WordPress Themes &#038; WordPress Plugins</a></li>
		<li><a href="http://wplifeguard.com/day-15-automatically-generate-xml-sitemaps-to-boost-search-engine-rankings/" rel="bookmark">Day 15: Automatically Generate XML Sitemaps to Boost Search Engine Rankings</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=YH8DaohYJhc:YUY3dmy8OFQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=YH8DaohYJhc:YUY3dmy8OFQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=YH8DaohYJhc:YUY3dmy8OFQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=YH8DaohYJhc:YUY3dmy8OFQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=YH8DaohYJhc:YUY3dmy8OFQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/boost-your-restaurant-with-quality-restaurant-wordpress-themes-and-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Custom Alerts to a WordPress Dashboard</title>
		<link>http://wplifeguard.com/how-to-add-custom-alerts-to-a-wordpress-dashboard/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-add-custom-alerts-to-a-wordpress-dashboard</link>
		<comments>http://wplifeguard.com/how-to-add-custom-alerts-to-a-wordpress-dashboard/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 14:39:12 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Alert]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Levels]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Users]]></category>
		<category><![CDATA[WordPress Dashboard]]></category>
		<category><![CDATA[WordPress Multisite]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2146</guid>
		<description><![CDATA[There are many different ways to reach out to your users – email newsletter, Facebook, Twitter, Google+, etc. The problem with these communication mediums is that users must opt in to receive these notifications. With this simple code snippet you can now place alerts in the WordPress dashboard without your users opting in to receive notifications.<a href="http://wplifeguard.com/how-to-add-custom-alerts-to-a-wordpress-dashboard/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2012/02/alerts-wordpress-dashboard.png" alt="How to Add Custom Alerts to a WordPress Dashboard" /></p>
<p>There are many different ways to reach out to your users – email newsletter, Facebook, Twitter, Google+, etc. The problem with these communication mediums is that users must opt in to receive these notifications. With this simple code snippet you can now place alerts in the WordPress dashboard without your users opting in to receive notifications. It&#8217;s even WordPress Multisite compatible.</p>
<p class="image"><img src="/wp-content/uploads/2012/02/alert-example.png" alt="How to Add Custom Alerts to a WordPress Dashboard" /><br />
Here is an example of a WordPress Dashboard Alert that we will be making.</p>
<h3>How to Add Alerts to a WordPress Dashboard</h3>
<p>Add the following code snippet to your WordPress theme&#8217;s functions.php file and change the text within the div to whatever you want.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">function addAlert() { ?&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$j = jQuery;
$j().ready(function(){
	$j('.wrap &gt; h2').parent().prev().after('&lt;div class=&quot;update-nag&quot;&gt;This is a test alert. Do with it what you want.&lt;/div&gt;');
});
&lt;/script&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_head'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'addAlert'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>How to Add an Alert to the WordPress Dashboard Home Only</h3>
<p>Add the following code snippet to your WordPress theme&#8217;s functions.php file to add an alert to the WordPress Dashboard Home – not all WordPress Dashboard pages.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">function addDashboardAlert() { ?&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$j = jQuery;
$j().ready(function(){
	$j('h2:contains(&quot;Dashboard&quot;)').parent().prev().after('&lt;div class=&quot;update-nag&quot;&gt;This is a test alert for the dashboard home only. Do with it what you want.&lt;/div&gt;');
});
&lt;/script&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_head'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'addDashboardAlert'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>How to Add an Alert to the WordPress Dashboard Based on User Level</h3>
<p>If you only want to display a message to your Contributors or Editors, no problem. Use the following code snippet in your WordPress theme&#8217;s functions.php to display an alert on the WordPress Dashboard to administrators. If you want to change it to a different user level, check out <a href="http://codex.wordpress.org/User_Levels">User Levels on the WordPress Codex</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">if (current_user_can('administrator')) {
	function addDashboardAlert() { ?&gt;
	&lt;script type=&quot;text/javascript&quot;&gt;
	$j = jQuery;
	$j().ready(function(){
		$j('.wrap &gt; h2').parent().prev().after('&lt;div class=&quot;update-nag&quot;&gt;This is a test alert for admins only. Do with it what you want.&lt;/div&gt;');
	});
	&lt;/script&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_head'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'addDashboardAlert'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>Conclusion</h3>
<p>Creating an alert in the WordPress Dashboard is extremely easy – not only is it easy, but it&#8217;s a great way to convey an important message to your WordPress site&#8217;s users be it on a standard WordPress install or on WordPress Multisite.</p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/how-to-disable-theme-switching-from-the-wordpress-dashboard/" rel="bookmark">How to Disable Theme Switching from the WordPress Dashboard</a></li>
		<li><a href="http://wplifeguard.com/how-to-stop-receiving-new-user-email-notifications/" rel="bookmark">How to Stop Receiving New User Email Notifications</a></li>
		<li><a href="http://wplifeguard.com/how-to-disable-wordpress-plugin-deactivation/" rel="bookmark">How to Disable WordPress Plugin Deactivation</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=lsoNhJnIf8o:TdtkuiYUAPs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=lsoNhJnIf8o:TdtkuiYUAPs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=lsoNhJnIf8o:TdtkuiYUAPs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=lsoNhJnIf8o:TdtkuiYUAPs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=lsoNhJnIf8o:TdtkuiYUAPs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/how-to-add-custom-alerts-to-a-wordpress-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Remove 16,000+ Comments and Combat SPAM on your WordPress Blog</title>
		<link>http://wplifeguard.com/how-to-remove-16000-comments-and-combat-spam-on-your-wordpress-blog/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-remove-16000-comments-and-combat-spam-on-your-wordpress-blog</link>
		<comments>http://wplifeguard.com/how-to-remove-16000-comments-and-combat-spam-on-your-wordpress-blog/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 12:00:02 +0000</pubDate>
		<dc:creator>Vineet Dhanawat</dc:creator>
				<category><![CDATA[The Post]]></category>
		<category><![CDATA[Comments]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Facebook Comments]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Site Speed]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Speed up WordPress]]></category>
		<category><![CDATA[WordPress Plugin]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2107</guid>
		<description><![CDATA[Recently One of my WordPress blogs received 16000+ SPAM Comments in a span of just over a month. Statistics / Graphs Notice the spike in bandwidth (green) and then the drop when the spam techniques were implemented. Again, notice how much bandwidth is used before and after spam techniques were implemented. The Damage Spam Can<a href="http://wplifeguard.com/how-to-remove-16000-comments-and-combat-spam-on-your-wordpress-blog/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2012/02/16127-Comments_555px.png" alt="Over 16,000 Spam Comments" /></p>
<p>Recently One of my WordPress blogs received 16000+ SPAM Comments in a span of just over a month.</p>
<h3>Statistics / Graphs</h3>
<p class="image"><img src="/wp-content/uploads/2012/02/web-stats-traffic-graph_583px.png" alt="Traffic Count" /><br />
Notice the spike in bandwidth (green) and then the drop when the spam techniques were implemented.</p>
<p class="image"><img src="/wp-content/uploads/2012/02/web-stats-traffic-dount_583px.png" alt="Trafic Stats" /><br />
Again, notice how much bandwidth is used before and after spam techniques were implemented.</p>
<h3>The Damage Spam Can Do</h3>
<p>Clearly it’s a case of spam bots / links exchange programs. Nearly 100% of comments were genuine-looking with a single purpose of obtaining links, even though they&#8217;re &#8220;nofollow&#8221; links. </p>
<p>The WordPress installation was default with no comments related WordPress plugins. Each comment was automatically approved. Within days, the number of comments increased, so did the size of each post, accounting for huge daily data transfer. As you can see the Traffic (Hits) increased nearly 5 times, whereas Traffic (Bandwidth) increased nearly 50 times! That can cause an serious increase in server load.</p>
<h3>1. How to Remove 16,000+ Comments</h3>
<p>Well the <strong>million dollar question</strong> is – &#8220;What will you do with 16000+ approved comments (spam)?&#8221;</p>
<p><strong>DO NOT</strong> install a plugin like <a title="Disqus" href="http://www.disqus.com/" target="_blank">Disqus</a>. It will retrieve all the existing comments and upload, making them almost impossible to remove. You must get rid of them before proceeding.</p>
<p>As of now WordPress does not allow to delete all blog comments at once.</p>
<p>Login to your cPanel phpMyAdmin SQL. Execute the following queries there.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">delete from wp_comments where comment_approved<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">;</span>
delete from wp_comments where comment_approved<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;spam&quot;</span><span style="color: #339933;">;</span>
delete from wp_comments where comment_approved<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now, you will face one more issue. The displayed comments count on each of your posts will not change. You need to <a href="http://www.ankurb.info/2008/11/16/reseting-post-and-comment-count-in-wordpress/">reset the comment count in WordPress</a>. Create a new php file and name it whatever you want, like updatecount.php. Paste the following code into this new file and place it in your WordPress&#8217; root then navigate to the file and delete the file when done.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-config.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Needed for login details to WordPress database to make necessary changes</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> updateCount<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$posts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_row</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT ID FROM wp_posts ORDER BY ID DESC LIMIT 1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Fetch row in WordPress database containing information about post data</span>
        <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
&nbsp;
     <span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT SQL_CALC_FOUND_ROWS comment_ID FROM wp_comments WHERE comment_post_ID = '<span style="color: #006699; font-weight: bold;">$i</span>' AND comment_approved = 1;&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Failed to calculate number of approved comments&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Calculate the number of approved comments for a post and store in a variable. If unsuccessful, end program.</span>
&nbsp;
     <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UPDATE wp_posts SET comment_count = '&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' WHERE id = '<span style="color: #006699; font-weight: bold;">$i</span>';&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Failed to update the number of comments calculated&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Update the comment count using the comment number fetched earlier. If unsuccessful, end program</span>
&nbsp;
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Updated Post #<span style="color: #006699; font-weight: bold;">$i</span> - &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; comments &lt;br /&gt;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Display message to user for each post comment count successfully updated</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
updateCount<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>2. Reduce Spam with WordPress Plugins</h3>
<p>WordPress Plugins are an excellent way to stop comment spam.</p>
<ul>
<li><a title="Akismet" href="http://akismet.com/" target="_blank">Akismet</a> – The Best one ever! Installed by default, but you need to register before actually start using it. This plugin track backs all the spam on various Blogs and blocks it globally.</li>
<li><a title="Disqus" href="http://www.disqus.com/" target="_blank">Disqus</a>, <a title="IntenseDebate" href="http://www.intensedebate.com/" target="_blank">IntenseDebate</a>, <a title="Facebook Comments" href="https://developers.facebook.com/docs/reference/plugins/comments/" target="_blank">Facebook Comments</a> are good alternate comments system. These load the comment dynamically from their server, thereby reducing the load from database / your hosting server.</li>
<li><a title="Captcha" href="http://bestwebsoft.com/plugin/" target="_blank">Math Captcha</a>, <a title="reCaptcha" href="http://wordpress.org/extend/plugins/wp-recaptcha/" target="_blank">reCaptcha</a> are worth considering in case you want to stick to WP Native Commenting system. Not all comments are from Bots, but few are actually done by Human Farms for backlinks, Nevertheless it will reduce SPAM drastically.</li>
</ul>
<h3>3. Other Measures to Reduce Spam</h3>
<ul>
<li><strong>Require an approved comment</strong>. While it will require more time and effort to manage your blog, requiring users to have at least one approved comment will further reduce the number of spam comments that get through.</li>
<li><strong>Close comments on Older Articles – </strong> You can choose to block comments on all posts (say 30 days old). Go to <em>wp-admin</em> &gt;&gt; <em>Settings</em> &gt;&gt; <em>Discussion</em> &gt;&gt; <em>Automatically close comments on articles older than (tick).</em></li>
<li><strong>Ban IP Address</strong> – This should be your Last Option. You can either see the stats for Hits v/s IP log via Awstats in your cPanel or you can directly see most common IPs in your Comments Logs. You can now Block certain IPs directly from cPanel or in case you love using WordPress Plugins use <a href="http://lesterchan.net/wordpress/readme/wp-ban.html">WP-Ban</a> or <a href="http://perishablepress.com/5g-blacklist-2012/">Perishable Press 5G Blacklist</a></li>
</ul>
<h3>4. Conclusion</h3>
<p>While these techniques did not reduce the number of hits on my blog. the number of spam comments getting through reduced drastically after installing Akisment. But it still let through roughly 5% of the SPAMs. After installing Math Captcha, the number of comments reduced to roughly 10% of post-akismet-installation spam. Number of daily hits are still the same. I guess the bots havent learnt yet! It will take time, definitely. Meanwhile it just messes up your Google Analytics.</p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/using-htaccess-to-fight-spam-on-your-wordpress-site/" rel="bookmark">Use .htaccess to Fight Spam on your WordPress Site</a></li>
		<li><a href="http://wplifeguard.com/day-26-fighting-wordpress-comment-spam/" rel="bookmark">Day 26: Fighting WordPress Comment Spam</a></li>
		<li><a href="http://wplifeguard.com/day-27-clean-up-and-optimize-your-wordpress-mysql-database/" rel="bookmark">Day 27: Clean Up and Optimize your WordPress mySQL Database</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=iied8mcUZhI:Zf5SCKTwM1I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=iied8mcUZhI:Zf5SCKTwM1I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=iied8mcUZhI:Zf5SCKTwM1I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=iied8mcUZhI:Zf5SCKTwM1I:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=iied8mcUZhI:Zf5SCKTwM1I:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/how-to-remove-16000-comments-and-combat-spam-on-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Easter Egg</title>
		<link>http://wplifeguard.com/wordpress-post-revisions-easter-egg/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-post-revisions-easter-egg</link>
		<comments>http://wplifeguard.com/wordpress-post-revisions-easter-egg/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 08:05:18 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Automattic]]></category>
		<category><![CDATA[Easter Egg]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Post Revisions]]></category>
		<category><![CDATA[WordPress Dashboard]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=2091</guid>
		<description><![CDATA[The creators of WordPress, Automattic, really are a fantastic group who not only made the greatest CMS currently available, they also take time to have a little fun. This is evident by this WordPress Easter Egg. What&#8217;s an Easter Egg? Well, aside from those plastic eggs filled with delicous chocolate, an Easter Egg is an<a href="http://wplifeguard.com/wordpress-post-revisions-easter-egg/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><iframe width="584" height="426" src="http://www.youtube.com/embed/GLd8Cz2Jl5E?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p>The creators of WordPress, <a href="http://automattic.com/" rel="nofollow">Automattic</a>, really are a fantastic group who not only made the greatest CMS currently available, they also take time to have a little fun. This is evident by this WordPress Easter Egg.</p>
<p>What&#8217;s an Easter Egg? Well, aside from those plastic eggs filled with delicous chocolate, an Easter Egg is an inside joke by developers. Sometimes they&#8217;re un-intrusive and only funny if you know the backstory, some are more obvious, if you can find them, like this WordPress Easter Egg.</p>
<h3>WordPress Easter Egg</h3>
<p>Here is a fun WordPress Easter Egg that occurs whenever you compare WordPress post revisions. You&#8217;ll see an animated series of events that calls you out by your author name or WordPress username and then proceeds to re-create events from the classic movie – The Matrix. Give it a try yourself or watch the video.</p>
<h4>How to Remove the WordPress Easter Egg</h4>
<p>If you have a non-technical client who would freak out and be rather upset about this WordPress Easter Egg (it&#8217;s happened), then the following code snippet will hide the WordPress Easter Egg. Simply paste it in your WordPress theme&#8217;s functions.php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> prevent_matrix_easter_egg<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$left</span> <span style="color: #339933;">=</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'left'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'left'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">''</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'left'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'left'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$right</span> <span style="color: #339933;">=</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'right'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'right'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">''</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'right'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'right'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$left</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$right</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$redirect</span> <span style="color: #339933;">=</span> get_edit_post_link<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$left</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        wp_die<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error: Cannot compare a revision to itself.&lt;br /&gt;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$redirect</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Go Back&lt;/a&gt;&quot;</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_action_diff'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'prevent_matrix_easter_egg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Whoops. This is unexpected. No related posts.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=tFMrKTKDML0:tyckvI000IM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=tFMrKTKDML0:tyckvI000IM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=tFMrKTKDML0:tyckvI000IM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=tFMrKTKDML0:tyckvI000IM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=tFMrKTKDML0:tyckvI000IM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/wordpress-post-revisions-easter-egg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Disable Theme Switching from the WordPress Dashboard</title>
		<link>http://wplifeguard.com/how-to-disable-theme-switching-from-the-wordpress-dashboard/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-disable-theme-switching-from-the-wordpress-dashboard</link>
		<comments>http://wplifeguard.com/how-to-disable-theme-switching-from-the-wordpress-dashboard/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 12:00:38 +0000</pubDate>
		<dc:creator>administrator</dc:creator>
				<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[Administrator]]></category>
		<category><![CDATA[Appearance]]></category>
		<category><![CDATA[Clients]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Users]]></category>

		<guid isPermaLink="false">http://wplifeguard.com/?p=1164</guid>
		<description><![CDATA[Sometimes clients can mess with or even break their WordPress site. One of the ways they&#8217;ll do this is by changing their WordPress theme &#8211; this can easily be prevented with a little PHP. How to Disable WordPress Theme Switching Paste the following code in your WordPress Theme&#8217;s functions.php to completely disable WordPress theme switching<a href="http://wplifeguard.com/how-to-disable-theme-switching-from-the-wordpress-dashboard/" class="read-more">&#160; Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes clients can mess with or even break their WordPress site. One of the ways they&#8217;ll do this is by changing their WordPress theme &#8211; this can easily be prevented with a little PHP.</p>
<h4>How to Disable WordPress Theme Switching</h4>
<p>Paste the following code in your <a href="http://wplifeguard.com/category/wordpress-themes/">WordPress Theme&#8217;s</a> <a href="http://wplifeguard.com/tag/functions-php/">functions.php</a> to completely disable WordPress theme switching and save clients from themselves.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// disable theme switching</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wplg_lock_theme'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> wplg_lock_theme<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;">$submenu</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$submenu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'themes.php'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$submenu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'themes.php'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">15</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h4>How to Disable WordPress Theme Switching &#8211; Except for Whoever Setup the Site</h4>
<p>Paste the following code in your WordPress Theme&#8217;s functions.php to only let the user with the ID #1 change themes &#8211; and the user with the ID #1 is the person who setup the site, which is usually the developer. If you have a different user ID, simply change the number to your user ID so you&#8217;re the only one who can change the theme.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// disable theme switching</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wplg_lock_theme'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #000000; font-weight: bold;">function</span> wplg_lock_theme<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;">$submenu</span><span style="color: #339933;">,</span> <span style="color: #000088;">$userdata</span><span style="color: #339933;">;</span>
	get_currentuserinfo<span style="color: #009900;">&#40;</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: #000088;">$userdata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$submenu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'themes.php'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$submenu</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'themes.php'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">15</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It&#8217;s also worth noting that only users with the &#8220;Administrator&#8221; level can change the theme. So it&#8217;s also perfectly valid to give clients the &#8220;Editor&#8221; capability. <a href="http://wplifeguard.com/videos/users-103-user-roles-and-permissions/">More info on WordPress&#8217; user levels.</a></p>
<p><a href="http://sltaylor.co.uk/blog/disabling-wordpress-plugin-deactivation-theme-changing/">Code Snippet via Steve Taylor</a></p>
<h4>Related Posts</h4>
<ul>
		<li><a href="http://wplifeguard.com/how-to-disable-wordpress-plugin-deactivation/" rel="bookmark">How to Disable WordPress Plugin Deactivation</a></li>
		<li><a href="http://wplifeguard.com/theme-review-tweet-archive-theme/" rel="bookmark">Theme Review: Tweet Archive Theme</a></li>
		<li><a href="http://wplifeguard.com/how-to-use-wordpress-to-display-content-depending-on-a-users-level/" rel="bookmark">How to Use WordPress to Display Content Depending on a User&#8217;s Level</a></li>
	</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wplifeguard?a=kposquQGo-8:NTTlITo9r_g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=kposquQGo-8:NTTlITo9r_g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=kposquQGo-8:NTTlITo9r_g:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wplifeguard?i=kposquQGo-8:NTTlITo9r_g:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wplifeguard?a=kposquQGo-8:NTTlITo9r_g:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wplifeguard?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://wplifeguard.com/how-to-disable-theme-switching-from-the-wordpress-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: wplifeguard.com @ 2012-05-15 18:41:20 -->

