<?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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>CodeHooligans</title>
	
	<link>http://www.codehooligans.com</link>
	<description>I'm the Devil in the code!</description>
	<lastBuildDate>Tue, 24 Jan 2012 00:33:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/codehooligans" /><feedburner:info uri="codehooligans" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><link>http://creativecommons.org/licenses/by-sa/2.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><feedburner:emailServiceId>codehooligans</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Simply Exclude plugin version 2.0…finally!</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/wku8Uf0X4T0/</link>
		<comments>http://www.codehooligans.com/2012/01/23/simply-exclude-plugin-version-2-0-finally/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 00:27:07 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Beta]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Simply Exclude]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=666</guid>
		<description><![CDATA[<p>I&#8217;m formally announcing the release of the first best of the popular Simply-Exclude plugin. You can download the beta version plugin from this site below. </p>
<blockquote><p>NOTE: THIS IS A BETA VERSION AND SHOULD NOT BE USED ON A PRODUCTION SITE. </p>&#8230;</blockquote>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m formally announcing the release of the first best of the popular Simply-Exclude plugin. You can download the beta version plugin from this site below. </p>
<blockquote><p>NOTE: THIS IS A BETA VERSION AND SHOULD NOT BE USED ON A PRODUCTION SITE. PLEASE ONLY TEST ON A DEVELOPMENT SITE. YOU HAVE BEEN WARNED
</p></blockquote>
<p>Some interesting points regarding the new 2.0 release:</p>
<ol>
<li>The plugin has been rewritten from the ground up. This means the old crappy code from 3 years ago have been replaced with newer crappy code. <img src='http://www.codehooligans.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Taxonomies and Post Types. The prior version of the plugin only supported the built-in Taxonomies and Post Types. The new version supports any Taxonomy and Post Type. Some Post Types like nav menus and links are purposely excluded. Oh My!</li>
<li>New interfaces. In the prior version of the plugin I build screens for each supported Taxonomy and Post Type. Over the years I had reports that when the site contains 3000 tags loading the Tag Exclude screen would take forever. Well good news. All those screens are history. In the new version of the plugin I&#8217;ve added columns to the Taxonomy, Post Type and User listing to allow management within a more natural interface. </li>
<li>I&#8217;ve updated the Settings/Options screen to by a simply listing of the Taxonomies and Post Types and what actions you are allowed to filter on.</li>
<li>I&#8217;ve removed support for third-party plugins. In the previous version of the plugin I supported integration with two plugins, Google XML Sitemaps an Search Unleashed. Over the years these plugins have changed such that my backdoor method of interfacing with them kept breaking. This became a headache. So decided to drop the support. Sorry for anyone who relies on this. </li>
<li>Finally all those who have tried to use this plugin to Exclude Pages now will have a working solution. The new version of this plugin now properly filters Pages on Search. Also, I&#8217;ve added support for the WordPress Pages Widget.</li>
<li>I&#8217;ve compiled a Help panel to assit those having trouble or just needing to get unstuck</li>
</ol>
<p>Still todo. I need to make sure this new code works under a Multisite installation. I&#8217;ve tested on my local development site using the default WordPress theme and settings. From what I can tell it works. But would really like to get someone who is heavy into Multisite give it a review. </p>
<blockquote><p><a href="http://www.codehooligans.com/wp-content/uploads/simply-exclude-v2.0-Beta-01-20120123.zip">Download Simply Exclude version 2.0 Beta 1</a></p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=wku8Uf0X4T0:JkF5HbgbnfA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=wku8Uf0X4T0:JkF5HbgbnfA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=wku8Uf0X4T0:JkF5HbgbnfA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=wku8Uf0X4T0:JkF5HbgbnfA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=wku8Uf0X4T0:JkF5HbgbnfA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=wku8Uf0X4T0:JkF5HbgbnfA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=wku8Uf0X4T0:JkF5HbgbnfA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=wku8Uf0X4T0:JkF5HbgbnfA:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/wku8Uf0X4T0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2012/01/23/simply-exclude-plugin-version-2-0-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2012/01/23/simply-exclude-plugin-version-2-0-finally/</feedburner:origLink></item>
		<item><title>Links for 2012-01-07 [del.icio.us]</title><link>http://feedproxy.google.com/~r/codehooligans/~3/LT5XpykEB6s/codehooligans</link><pubDate>Sun, 08 Jan 2012 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/codehooligans#2012-01-07</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.iforce2d.net/b2dtut/introduction"&gt;Box2D tutorials - Introduction - iforce2d&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/codehooligans/~4/LT5XpykEB6s" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/codehooligans#2012-01-07</feedburner:origLink></item><item><title>Links for 2012-01-05 [del.icio.us]</title><link>http://feedproxy.google.com/~r/codehooligans/~3/BTkV_B-GyhA/codehooligans</link><pubDate>Fri, 06 Jan 2012 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/codehooligans#2012-01-05</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/"&gt;CS 193P iPhone Application Development&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/codehooligans/~4/BTkV_B-GyhA" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/codehooligans#2012-01-05</feedburner:origLink></item><item><title>Links for 2011-12-25 [del.icio.us]</title><link>http://feedproxy.google.com/~r/codehooligans/~3/RkGcSqJySlA/codehooligans</link><pubDate>Mon, 26 Dec 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/codehooligans#2011-12-25</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://readandtrust.com/"&gt;Read &amp;amp; Trust&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://beta.crashlytics.com/"&gt;The most powerful, yet lightest weight crash reporting solution for iOS and Android developers. | Crashlytics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/codehooligans/~4/RkGcSqJySlA" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/codehooligans#2011-12-25</feedburner:origLink></item><item><title>Links for 2011-11-29 [del.icio.us]</title><link>http://feedproxy.google.com/~r/codehooligans/~3/UE_NjF7mAQo/codehooligans</link><pubDate>Wed, 30 Nov 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/codehooligans#2011-11-29</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.renownedmedia.com/blog/install-wget-on-os-x-lion/"&gt;Install wget on OS X Lion &amp;laquo; Renowned Media&lt;/a&gt;&lt;br/&gt;
./configure --with-ssl=openssl&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/codehooligans/~4/UE_NjF7mAQo" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/codehooligans#2011-11-29</feedburner:origLink></item><item>
		<title>My compare of Windows 7 Operating System</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/b44fZdR1moM/</link>
		<comments>http://www.codehooligans.com/2011/11/16/my-compare-of-windows-7-operating-system/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 15:52:59 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=652</guid>
		<description><![CDATA[<p>I&#8217;m purchasing a new <a title="Apple MacBook Pro" href="http://store.apple.com/us/browse/home/shop_mac/family/macbook_pro">Apple MacBook Pro</a> laptop for my end of the year tax credit. Plus since my current laptop is more than three years old and I depend on it for my business I wanted something with a &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m purchasing a new <a title="Apple MacBook Pro" href="http://store.apple.com/us/browse/home/shop_mac/family/macbook_pro">Apple MacBook Pro</a> laptop for my end of the year tax credit. Plus since my current laptop is more than three years old and I depend on it for my business I wanted something with a warranty. Since this new laptop will have almost triple the drive space (750G) as my current one (200G) I&#8217;m looking to also purchase Windows 7 to run under a virtual engine like VMWare or Parallels.</p>
<p>So I jumped to the Microsoft site. Found the Windows 7 part of the site. I was looking for some quick comparison between the three different versions of the operating system. But was not able to find anything. This really makes me appreciate OS X which is really just one version. And damn cheaper!</p>
<p>So I decided to Google for more information. Found the BestBuy.com site. As this will probably be the store I make the purchase from I drilled through to the website page. The BestBuy.com site does have a nice popup comparison chart on the differences between Home Premium, Professional and Ultimate version of Windows 7.</p>
<div id="attachment_656" class="wp-caption aligncenter" style="width: 370px"><a href="http://www.codehooligans.com/wp-content/uploads/win7comparechart.gif" rel="lightbox[652]"><img class="size-full wp-image-656 " title="Windows 7 compare chart" src="http://www.codehooligans.com/wp-content/uploads/win7comparechart.gif" alt="" width="95%" /></a><p class="wp-caption-text">Chart from BestBuy.com showing differences between Windows 7 versions</p></div>
<p>What I find really strange (and the reason I&#8217;m taking the time to write this) is some of the descriptions. Like the first line &#8220;Manage the things you do every day with improved desktop navigation&#8221;. Um, I&#8217;m sorry but should&#8217;t that actually be a given? Or the 5th line &#8220;Easy to create a home network and connect your PCs to a printer with HomeGroup&#8221;. Again I&#8217;m stunned. No thanks I would like the other version of your operating system which does not make setting up a home network easy. Thank You sir, Can I have another?</p>
<p>Give me a break. Maybe I&#8217;m just a Apple snob (don&#8217;t call me a fanboy). Over the last 6 years I&#8217;ve really come to appreciate the streamline marketing done for Apple. No hype and no marketing double-speak.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=b44fZdR1moM:sF3Bpe8p_ag:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=b44fZdR1moM:sF3Bpe8p_ag:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=b44fZdR1moM:sF3Bpe8p_ag:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=b44fZdR1moM:sF3Bpe8p_ag:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=b44fZdR1moM:sF3Bpe8p_ag:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=b44fZdR1moM:sF3Bpe8p_ag:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=b44fZdR1moM:sF3Bpe8p_ag:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=b44fZdR1moM:sF3Bpe8p_ag:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/b44fZdR1moM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2011/11/16/my-compare-of-windows-7-operating-system/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2011/11/16/my-compare-of-windows-7-operating-system/</feedburner:origLink></item>
		<item><title>Links for 2011-11-07 [del.icio.us]</title><link>http://feedproxy.google.com/~r/codehooligans/~3/GgTyPwDVIFw/codehooligans</link><pubDate>Tue, 08 Nov 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://del.icio.us/codehooligans#2011-11-07</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml"&gt;Google C++ Style Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/codehooligans/~4/GgTyPwDVIFw" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/codehooligans#2011-11-07</feedburner:origLink></item><item><title>Links for 2011-11-04 [del.icio.us]</title><link>http://feedproxy.google.com/~r/codehooligans/~3/y4-oAGLDn44/codehooligans</link><pubDate>Sat, 05 Nov 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://del.icio.us/codehooligans#2011-11-04</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.fontspace.com/george-williams/parisian"&gt;Parisian font by George Williams - FontSpace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/codehooligans/~4/y4-oAGLDn44" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/codehooligans#2011-11-04</feedburner:origLink></item><item><title>Links for 2011-11-03 [del.icio.us]</title><link>http://feedproxy.google.com/~r/codehooligans/~3/ntlRGXW1gcc/codehooligans</link><pubDate>Fri, 04 Nov 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://del.icio.us/codehooligans#2011-11-03</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://ottopress.com/2011/random-post-snippet/"&gt;Random Post snippet &amp;raquo; Otto on WordPress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://flexibits.com/fantastical"&gt;Flexibits | Fantastical | Meet your Mac's new calendar.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/codehooligans/~4/ntlRGXW1gcc" height="1" width="1"/&gt;</description><feedburner:origLink>http://del.icio.us/codehooligans#2011-11-03</feedburner:origLink></item><item>
		<title>This is getting annoying…iPhone 4S predictions and disappointments</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/SAZkF86v5Hw/</link>
		<comments>http://www.codehooligans.com/2011/10/05/this-is-getting-annoying-iphone-4s-predictions-and-disappointments/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 22:04:11 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[lies]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[predictions]]></category>
		<category><![CDATA[speculation]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=649</guid>
		<description><![CDATA[<p>Dear Tech Media industry leaders. Please STOP building up rumors for weeks months about new technologies then act so disappointed when the company&#8217;s released item does not live up to your expectations. </p>
<p>Case in point the newly released Apple iPhone &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Dear Tech Media industry leaders. Please STOP building up rumors for weeks months about new technologies then act so disappointed when the company&#8217;s released item does not live up to your expectations. </p>
<p>Case in point the newly released Apple iPhone 4S. For weeks and months I&#8217;ve been pretty much spammed by repeated speculation on the upcoming new iPhone 4S/5 but most of the tech centric media engines. Plus, as is standard acceptable form these days, a story posted on one tech media site will be pilfered and repeated verbatim by another source as new news. Hate the fact that my feed reader think these are separate stories. </p>
<p>Now the day has come that Apple has finally revealed the new iPhone 4S. Hooray! Now, acting like petulant children the day after Christmas, you seem fit to slam Apple that they have lost their innovative edge. Really? Let me see you actually produce something you F*CKS. Really in my own opinion Apple couple have gone the path of lesser companies and given you a newly designed package so it is at least different than the previous iPhone 4 model and not change a thing about the internals of the device. But no Apple did the right thing and kept the outside aesthetics of the device the same but upgrade and improved the internals making it a step better than the current model. Boo for you that you speculation and constant spinning of lies didn&#8217;t pan out. </p>
<p>For the record I&#8217;m not disappointed in the new iPhone 4S. Will I upgrade to the new device? Probably not since I just upgraded to the iPhone 4 this past summer due to my contract cycle. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=SAZkF86v5Hw:vN0XAwBfZ4M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=SAZkF86v5Hw:vN0XAwBfZ4M:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=SAZkF86v5Hw:vN0XAwBfZ4M:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=SAZkF86v5Hw:vN0XAwBfZ4M:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=SAZkF86v5Hw:vN0XAwBfZ4M:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=SAZkF86v5Hw:vN0XAwBfZ4M:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=SAZkF86v5Hw:vN0XAwBfZ4M:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=SAZkF86v5Hw:vN0XAwBfZ4M:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/SAZkF86v5Hw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2011/10/05/this-is-getting-annoying-iphone-4s-predictions-and-disappointments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2011/10/05/this-is-getting-annoying-iphone-4s-predictions-and-disappointments/</feedburner:origLink></item>
		<item>
		<title>Adding Custom Columns to WordPress Post listing</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/rXhGpFjD-hc/</link>
		<comments>http://www.codehooligans.com/2011/07/13/adding-custom-columns-to-wordpress-post-listing/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 15:43:32 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[actions]]></category>
		<category><![CDATA[custom columns]]></category>
		<category><![CDATA[filters]]></category>
		<category><![CDATA[hooks]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=641</guid>
		<description><![CDATA[<p>In a reader <a href="http://www.codehooligans.com/2010/08/29/adding-custom-meta-headers-to-taxonomy-table-columns-in-wordpress-3-0/#comment-106901" title="comment on adding custom meta columns">comment</a> one of my previous <a href="http://www.codehooligans.com/2010/08/29/adding-custom-meta-headers-to-taxonomy-table-columns-in-wordpress-3-0/">posts</a> about &#8220;Adding columns to Taxonomy tables&#8221;. The commenter asks how to add columns to a normal Posts listing. </p>
<p>Well, readers here is the simple solutions. There are basically 2 hooks. One &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>In a reader <a href="http://www.codehooligans.com/2010/08/29/adding-custom-meta-headers-to-taxonomy-table-columns-in-wordpress-3-0/#comment-106901" title="comment on adding custom meta columns">comment</a> one of my previous <a href="http://www.codehooligans.com/2010/08/29/adding-custom-meta-headers-to-taxonomy-table-columns-in-wordpress-3-0/">posts</a> about &#8220;Adding columns to Taxonomy tables&#8221;. The commenter asks how to add columns to a normal Posts listing. </p>
<p>Well, readers here is the simple solutions. There are basically 2 hooks. One is a filter. The other an action. Below are examples of how to setup these hooks. I explain the details below the code listing.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_filter( 'manage_edit-post_columns', 'admin_post_header_columns', 10, 1);<br />
add_action( 'manage_posts_custom_column', 'admin_post_data_row', 10, 2);<br />
<br />
function admin_post_header_columns($columns)<br />
{<br />
&nbsp; &nbsp; if (!isset($columns['note']))<br />
&nbsp; &nbsp; &nbsp; &nbsp; $columns['note'] = &quot;Notes&quot;;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; return $columns;<br />
}<br />
<br />
function admin_post_data_row($column_name, $post_id)<br />
{<br />
&nbsp; &nbsp; switch($column_name)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; case 'note':&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Logic to display post 'Note' field information here.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // $post_note = get_post_meta($post_id, 'note', true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //if ($post_note) &nbsp; echo $post_note;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; default:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; }<br />
}</div></td></tr></tbody></table></div>
<p>So what are these filters/actions function? </p>
<p>The first line, add_filter( &#8216;manage_edit-post_columns&#8217;&#8230; sets up a filter. This filter adds the new column to the listing. This filter is called only once when the page is loaded. Since this is a Filter WordPress will call our function &#8216;admin_post_header_columns&#8217; and pass in a parameter. In this case the parameter is an array of columns. As part of our function we can change/add/delete items from the array then we MUST return the array. In our simple example all we are doing is adding an item to the array for our &#8216;Notes&#8217; columns. As with any PHP array we assign a key to be &#8216;note&#8217; and the column label &#8216;Notes&#8217;. Then return the array back to WP.</p>
<p>A note about the filter name. Notice we setup the filter as using the first parameter &#8216;manage_edit-post_columns&#8217;. Keep in mind this filter is specific to Posts. If you wanted to do this same thing for Pages you would instead use &#8216;manage_pages_columns&#8217;. Or if you were using a custom post type the value would be &#8216;manage_{$post_type}_posts_columns&#8217; where &#8216;{$post_type}&#8217; is your post_type. For example if we register a new post_type Products with the key &#8216;products&#8217; then the filter would use the parameter of &#8216;manage_products_posts_columns&#8217;. On to the second hook. The action. </p>
<p>The second line of our code registers an action. While the previous filter added the column to the listing. This action gets called for each row of the displayed posts to display the contents in the row cell for that column. In WordPress an action is different than a filter in that your function may be passed some optional parameters but you are not expected to return any values. For our purpose we setup an action to the hook &#8216;manage_posts_custom_column&#8217; which will call our function &#8216;admin_post_data_row&#8217;. </p>
<p>Inside our function we setup a case statement to switch on the column name. In our instance we only want to effect the &#8216;note&#8217; column. This &#8216;note&#8217; value is the array &#8216;key&#8217; we defined in our previous filter function. </p>
<p>Back to the action hook registration. Notice the third and fourth parameters on this action registration call. The third parameter tells WordPress the priority of this hook o when to process it in relation to other hooks. A lower number means sooner a higher number means later. We set this to &#8217;10&#8242; which is a default value. The fourth parameter tells WordPress how many arguments to pass to our function. By default there will be only one argument, the column name. But since each row (post item) will have different values we need the second parameter which in this case is the ID of the post so we can look up the related custom field.</p>
<p>Also, like the filter hook where we setup the column there are different filters to call based on if you are using this on Pages, Posts or some custom post_type. In our case we are adding the column to the Posts listing so the first parameter of our hook is &#8216;manage_posts_custom_column&#8217;. If we were adding a column to Pages the parameter would instead be &#8216;manage_pages_custom_column&#8217;. And if we were adding this column to a custom post_type the parameter would be &#8216;manage_{$post->post_type}_posts_custom_column&#8217; where &#8216;{$post->post_type}&#8217; is the key to our registered post_type. </p>
<p>I hope this helps with a deeper understanding of WordPress and an appreciation of the wonderful world of WordPress actions and filters. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=rXhGpFjD-hc:KImv0inviWI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=rXhGpFjD-hc:KImv0inviWI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=rXhGpFjD-hc:KImv0inviWI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=rXhGpFjD-hc:KImv0inviWI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=rXhGpFjD-hc:KImv0inviWI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=rXhGpFjD-hc:KImv0inviWI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=rXhGpFjD-hc:KImv0inviWI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=rXhGpFjD-hc:KImv0inviWI:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/rXhGpFjD-hc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2011/07/13/adding-custom-columns-to-wordpress-post-listing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2011/07/13/adding-custom-columns-to-wordpress-post-listing/</feedburner:origLink></item>
		<item>
		<title>Pages-Children 1.5 released</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/BtqoM5--1zQ/</link>
		<comments>http://www.codehooligans.com/2011/07/03/pages-children-1-5-released/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 16:44:43 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[hierarchical]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[post types]]></category>
		<category><![CDATA[taxonomies]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=634</guid>
		<description><![CDATA[<p>Over the last week I&#8217;ve released 3 versions of my popular <a href="http://wordpress.org/extend/plugins/pages-children/">Pages-Children</a> plugin.</p>
<p>Here is a breakdown of the changes. </p>
<p>1.3.1 &#8211; Fixed issues is plugin which were effecting the Media Library listing. As far as I can tell this &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Over the last week I&#8217;ve released 3 versions of my popular <a href="http://wordpress.org/extend/plugins/pages-children/">Pages-Children</a> plugin.</p>
<p>Here is a breakdown of the changes. </p>
<p>1.3.1 &#8211; Fixed issues is plugin which were effecting the Media Library listing. As far as I can tell this was related to the update in WordPress 3.1.3</p>
<p>1.4 &#8211; Added support for any hierarchical post type. Previous versions of the plugin only worked for the default Pages. Now if you have any custom post type defined hierarchical you can have better formatting of the output. </p>
<p>1. 5 &#8211; In the previous version (1.4) I added support for custom post types. In this latest version I&#8217;ve added support for hierarchical taxonomies as well. Here is an example of a terms listing showing the breadcrumbs and navigation to &#8216;children&#8217;. </p>
<p>To comment or report an issue regarding this plugin please see the main project page for <a href="/projects/wordpress/pages-children/">Pages-Children</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=BtqoM5--1zQ:u3dyRUvZs-8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=BtqoM5--1zQ:u3dyRUvZs-8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=BtqoM5--1zQ:u3dyRUvZs-8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=BtqoM5--1zQ:u3dyRUvZs-8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=BtqoM5--1zQ:u3dyRUvZs-8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=BtqoM5--1zQ:u3dyRUvZs-8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=BtqoM5--1zQ:u3dyRUvZs-8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=BtqoM5--1zQ:u3dyRUvZs-8:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/BtqoM5--1zQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2011/07/03/pages-children-1-5-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2011/07/03/pages-children-1-5-released/</feedburner:origLink></item>
		<item>
		<title>Out of 1000 WordPress plugin developers I’m now ranked 372!</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/h_uwgL3Jl2M/</link>
		<comments>http://www.codehooligans.com/2011/02/02/out-of-1000-wordpress-plugin-developers-im-now-ranked-372/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 14:57:29 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[ranking]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=629</guid>
		<description><![CDATA[<p>Thanks to <a href="http://w-shadow.com">W-Shadow</a> for putting together this nice page, <a href="http://w-shadow.com/files/top-1000-plugin-authors.html">http://w-shadow.com/files/top-1000-plugin-authors.html</a>.</p>
<p>The page appears to be a mashup (do people still use that term) taken form wordpress.org plugin repository. The ranking on the page appears to be based on plugin &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://w-shadow.com">W-Shadow</a> for putting together this nice page, <a href="http://w-shadow.com/files/top-1000-plugin-authors.html">http://w-shadow.com/files/top-1000-plugin-authors.html</a>.</p>
<p>The page appears to be a mashup (do people still use that term) taken form wordpress.org plugin repository. The ranking on the page appears to be based on plugin downloads. Still out of 1000 plugin authors it&#8217;s nice to be in the top half. Though would be grateful to placement anywhere on the list. Thanks W-Shadow. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=h_uwgL3Jl2M:P7LteT0kego:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=h_uwgL3Jl2M:P7LteT0kego:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=h_uwgL3Jl2M:P7LteT0kego:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=h_uwgL3Jl2M:P7LteT0kego:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=h_uwgL3Jl2M:P7LteT0kego:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=h_uwgL3Jl2M:P7LteT0kego:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=h_uwgL3Jl2M:P7LteT0kego:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=h_uwgL3Jl2M:P7LteT0kego:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/h_uwgL3Jl2M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2011/02/02/out-of-1000-wordpress-plugin-developers-im-now-ranked-372/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2011/02/02/out-of-1000-wordpress-plugin-developers-im-now-ranked-372/</feedburner:origLink></item>
		<item>
		<title>Media-Tags 3.0 plugin for WordPress Released</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/2ASU9OT-h1M/</link>
		<comments>http://www.codehooligans.com/2010/12/09/media-tags-3-0-plugin-for-wordpress-released/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 21:31:01 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[plugin media-tags]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=612</guid>
		<description><![CDATA[<p>I&#8217;m proud to say I&#8217;ve finally released Media-Tags 3.0 to the general public and it is available via the WordPress plugin repository <a href="http://wordpress.org/extend/plugins/media-tags/">http://wordpress.org/extend/plugins/media-tags/</a>. Thanks to all who contributed ideas, bug reports and support in this milestone development. And my &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m proud to say I&#8217;ve finally released Media-Tags 3.0 to the general public and it is available via the WordPress plugin repository <a href="http://wordpress.org/extend/plugins/media-tags/">http://wordpress.org/extend/plugins/media-tags/</a>. Thanks to all who contributed ideas, bug reports and support in this milestone development. And my apologies for taking so long to get this out. </p>
<p>This plugin contains many new features. Some highlighted items are:</p>
<ul>
<li><strong>Bulk Administration of media items</strong> This feature on both the Media > Library and Media Upload popup for the Post admin screen allow you to assign/remove Media-Tags to a selected group of media items. In previous versions you would need to edit each media item.</li>
<li><strong>Roles management</strong> Under the Media-Tags Settings panel is a new Roles management panel. This panel allows you to fine tune the access by individual users.</li>
<li><strong>Internationalization</strong> This is a much needed and requested features. Now all text handled by the plugin are using the WordPress i18n hooks to support translation into other languages.</li>
<li><strong>Removed over 1000 lines of custom code</strong> This old code was used to provide basic functionality for the tagging and URL rewrites. Since WordPress core functions have progressed over the last two years this custom code is no longer needed. This means the plugin will run cleaner and is more stable than previous releases.</li>
<li><strong>Better support for WordPress standard Taxonomy templates</strong> In the past the plugin has supported a custom theme template, mediatag.php. The plugin now support the more standard WordPress templates taxonomy-media-tags.php.</li>
<li><strong>A new Help section</strong> This new Help section provides many topics from general use to shortcodes tricks to template files support questions. Check it out.</li>
<li>Many other features have been added. Too many to mention here.</li>
</ul>
<p>Please leave all comments on the <a href="/projects/wordpress/media-tags/">Media-Tags project</a> page. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=2ASU9OT-h1M:dofvKwVZ4kI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=2ASU9OT-h1M:dofvKwVZ4kI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=2ASU9OT-h1M:dofvKwVZ4kI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=2ASU9OT-h1M:dofvKwVZ4kI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=2ASU9OT-h1M:dofvKwVZ4kI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=2ASU9OT-h1M:dofvKwVZ4kI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=2ASU9OT-h1M:dofvKwVZ4kI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=2ASU9OT-h1M:dofvKwVZ4kI:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/2ASU9OT-h1M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2010/12/09/media-tags-3-0-plugin-for-wordpress-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2010/12/09/media-tags-3-0-plugin-for-wordpress-released/</feedburner:origLink></item>
		<item>
		<title>Adding Custom Meta Headers To Taxonomy Table Columns in WordPress 3.0</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/9QIv1QRwExk/</link>
		<comments>http://www.codehooligans.com/2010/08/29/adding-custom-meta-headers-to-taxonomy-table-columns-in-wordpress-3-0/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 20:21:15 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[taxonomy]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=593</guid>
		<description><![CDATA[<p>This is part 2 of a series on digging deeper into the new WordPress Custom Taxonomies. In the previous article, &#8220;<a href="http://www.codehooligans.com/2010/07/07/custom-meta-for-new-taxonomies-in-wordpress-3-0/">Custom Meta for new Taxonomies in WordPress 3.0</a>&#8220;, I walked you through setting up the custom meta tables &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>This is part 2 of a series on digging deeper into the new WordPress Custom Taxonomies. In the previous article, &#8220;<a href="http://www.codehooligans.com/2010/07/07/custom-meta-for-new-taxonomies-in-wordpress-3-0/">Custom Meta for new Taxonomies in WordPress 3.0</a>&#8220;, I walked you through setting up the custom meta tables and the Taxonomy term editor form. In this part of the series I&#8217;ll show you how to add your new taxonomy meta fields to the taxonomy listing page. </p>
<h2>Background</h2>
<p>To bring everyone up to speed on the project I&#8217;m developing a simple product management system (e-Commerce) for a client. I wanted to take advantage of the new Custom Post Types and Taxonomies in the WordPress 3.0 system. I setup a new Post Type &#8216;Products&#8217;. As part of Products I&#8217;m defining a new Taxonomy &#8216;Product Packages&#8217;. A &#8216;Package&#8217; is how a product is sold to the user. Think of <a target="_blank" href="http://www.threadless.com">threadless.com</a> or some product site where you must select options like size or color. In our case each package has a number of extra &#8216;meta&#8217; fields associated with it. In the case of my product packages some of these meta fields are unit price, shipping price, package active. </p>
<p>The goal of this article is to modify the default columns displayed on the taxonomy listing. These default columns are Name, Description and Slug. While these are sufficient for other taxonomies like post categories or post tags they don&#8217;t exactly work for my product package needs. What we will be building is some more like the following which includes meta field from part I. The column headers we will be added are &#8216;Active&#8217; to show when a Product Package is on or off and the column header &#8216;Price&#8217; which is the unit Price for a given package. These columns were chosen because the let the administrator visually see the information in the table form without needing to access each package detail.  </p>
<div id="attachment_570" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.codehooligans.com/wp-content/uploads/codehooligans_wp_taxonomy_meta_list.png" rel="lightbox[593]" rel="lightbox[553]"><img src="http://www.codehooligans.com/wp-content/uploads/codehooligans_wp_taxonomy_meta_list-300x258.png" alt="" title="codehooligans_wp_taxonomy_meta_list" width="300" height="258" class="size-medium wp-image-570" /></a>
<p class="wp-caption-text">WordPress Taxonomy meta listing</p>
</div>
<p>So lets get started. </p>
<h2>Adding Taxonomy Column Headers</h2>
<p>We will start with adding the filter to modify the column headers. When I click on the &#8216;Product Packages&#8217; I noted that URL for the taxonomy listing is </p>
<p>http://local.localsite.com/wp-admin/edit-tags.php?taxonomy=product_packages&#038;post_type=products</p>
<p>After doing some digging I found that the edit-tags.php code calls a number of functions to build out the page structure. One of these function is &#8216;get_column_headers()&#8217; The get_column_headers function is located in the /wp-admin/includes/template.php file line 674. Inside this function there are various checks to see if we are dealing with a normal build-in screen like for post categories or post tags. If not the logic falls down to line 761 there a filter is executed. The filename key or name is dynamic and is based on the taxonomy name. The filter key is &#8216;manage_&#8217; . $screen->id . &#8216;_columns&#8217;. The screen->id value is the taxonomy name we used &#8216;product_packages&#8217;. The filter we will be setting up will be &#8216;manage_product_packages_columns&#8217;. So in our code&#8217;s init function we to subscribe to this filter and add a function to handle the processing. Below is the code. The init function you may recognize from part I.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_action( 'init', 'product_init' );<br />
function product_init()<br />
{<br />
&nbsp; &nbsp; register_taxonomy( 'product_packages', 'products',<br />
&nbsp; &nbsp; &nbsp; &nbsp; array( &nbsp;'hierarchical' =&gt; true,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'label' =&gt; __('Product Packages'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'query_var' =&gt; false<br />
&nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; );<br />
<br />
&nbsp; &nbsp; // Added from Part II. <br />
&nbsp; &nbsp; // This filter sets up a call to your function which will handle <br />
&nbsp; &nbsp; // adding (and removing) items from the columns array. This <br />
&nbsp; &nbsp; // filter passes up only one argument. The array of default headers. &nbsp;<br />
&nbsp; &nbsp; add_filter( 'manage_product_packages_columns', <br />
&nbsp; &nbsp; &nbsp; &nbsp; 'admin_product_packages_column_headers, 10, 1);<br />
}<br />
<br />
<br />
// Add this to your code's init function. This filter passes up <br />
// only one argument. The array of default headers. &nbsp;<br />
add_filter( 'manage_product_packages_columns', <br />
&nbsp; &nbsp; 'admin_product_packages_column_headers, 10, 1);<br />
<br />
// Add this function somewhere else in your plugin or functions file.<br />
function admin_product_packages_column_headers($columns)<br />
{<br />
&nbsp; &nbsp; // We are going to create a new array to hold the headers. <br />
&nbsp; &nbsp; // Below we take the checkbox column and the name column <br />
&nbsp; &nbsp; // and add to the new column array. Removing unwanted columns<br />
&nbsp; &nbsp; // and adding new one is trivial. The below method has <br />
&nbsp; &nbsp; // room form much improvement. <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; $columns_local = array();<br />
<br />
&nbsp; &nbsp; if (isset($columns['cb']))&nbsp; <br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $columns_local['cb'] = $columns['cb'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; unset($columns['cb']);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; if (isset($columns['name']))&nbsp; &nbsp; <br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $columns_local['name'] = $columns['name'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; unset($columns['name']);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; // We add the Package Active to the second column <br />
&nbsp; &nbsp; if (!isset($columns_local['product_package_active'])) &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; $columns_local['product_package_active'] = &quot;Active&quot;;<br />
<br />
&nbsp; &nbsp; if (isset($columns['posts']))<br />
&nbsp; &nbsp; &nbsp; &nbsp; $columns['posts'] = &quot;Used&quot;;<br />
<br />
&nbsp; &nbsp; &nbsp;$columns_local = array_merge($columns_local, $columns);<br />
<br />
&nbsp; &nbsp; if (!isset($columns_local['product_package_unit_price'])) &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; $columns_local['product_package_unit_price'] = &quot;Price&quot;;<br />
<br />
&nbsp; &nbsp; return array_merge($columns_local, $columns);<br />
}</div></td></tr></tbody></table></div>
<p>This should get the new columns added to the display table. You can save your code and verify. The table headers will be displayed. But the row content will be empty. </p>
<h2>Adding Taxonomy Column Data</h2>
<p>The table row content is added using another filter hook. Again, once of the function called from within edit_tags.php is the core function tag_rows(); This function in turn calls other functions. Eventually, the flow ends up in _tag_row() in template.php line 398. Much like the header logic various checks are made to see if we are dealing with a built-in taxonomy. If not then a dynamic filter hook is executed at line 483. This dynamic filter like the header filter uses the taxonomy to name the filter key unique. The filter key is<br />
&#8216;manage_${taxonomy}_custom_column&#8217;. Again placing in our taxonomy key &#8216;product_packages&#8217; the complete filter key will be &#8216;manage_product_packages_custom_column&#8217;.</p>
<p>So back to our code we add another add_filter command to out init function. Then we add a new function to process the filter request.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_action( 'init', 'product_init' );<br />
function product_init()<br />
{<br />
&nbsp; &nbsp; // From Part I<br />
&nbsp; &nbsp; register_taxonomy( 'product_packages', 'products',<br />
&nbsp; &nbsp; &nbsp; &nbsp; array( &nbsp;'hierarchical' =&gt; true,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'label' =&gt; __('Product Packages'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'query_var' =&gt; false<br />
&nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; );<br />
<br />
&nbsp; &nbsp; // Added from Part II. <br />
&nbsp; &nbsp; // This filter sets up a call to your function which will handle adding (and removing) items <br />
&nbsp; &nbsp; // from the columns array. This filter passes up only one argument. The array of default headers. &nbsp;<br />
&nbsp; &nbsp; add_filter( 'manage_product_packages_columns', 'admin_product_packages_column_headers, 10, 1);<br />
<br />
&nbsp; &nbsp; // This filter sets up a call to display the contents of a Product Package row column. <br />
&nbsp; &nbsp; // The filter passes up 3 argument. We only use the second and third arguments. <br />
&nbsp; &nbsp; add_filter( 'manage_product_packages_custom_column', 'admin_product_packages_column_row', 10, 3 );<br />
}<br />
<br />
// This function we check the column name then pull in the row data using get_metadata()<br />
function admin_product_packages_column_row( $row_content, $column_name, $term_id ) <br />
{<br />
&nbsp; &nbsp; switch($column_name)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; case 'product_package_active':<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $product_package_active = get_metadata('product_packages', $term_id, 'product_package_active', true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!$product_package_active)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $product_package_active = &quot;yes&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ucfirst($product_package_active);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; case 'product_package_unit_price':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return get_metadata('product_packages', $term_id, 'product_package_unit_price', true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; default:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; }<br />
}</div></td></tr></tbody></table></div>
<p>And that is it. At this point you should now see your taxonomy custom meta fields display in new column when listing your taxonomy items. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=9QIv1QRwExk:oasO1C-UwTY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=9QIv1QRwExk:oasO1C-UwTY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=9QIv1QRwExk:oasO1C-UwTY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=9QIv1QRwExk:oasO1C-UwTY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=9QIv1QRwExk:oasO1C-UwTY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=9QIv1QRwExk:oasO1C-UwTY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=9QIv1QRwExk:oasO1C-UwTY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=9QIv1QRwExk:oasO1C-UwTY:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/9QIv1QRwExk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2010/08/29/adding-custom-meta-headers-to-taxonomy-table-columns-in-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2010/08/29/adding-custom-meta-headers-to-taxonomy-table-columns-in-wordpress-3-0/</feedburner:origLink></item>
		<item>
		<title>Custom Meta for new Taxonomies in WordPress 3.0</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/9c9Z42mZhu0/</link>
		<comments>http://www.codehooligans.com/2010/07/07/custom-meta-for-new-taxonomies-in-wordpress-3-0/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 14:32:33 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[Custom Taxonomy]]></category>
		<category><![CDATA[Custom Taxonomy Meta]]></category>
		<category><![CDATA[get_metadata]]></category>
		<category><![CDATA[register_taxonomy]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress 3.0]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=553</guid>
		<description><![CDATA[<p>I&#8217;ve been playing around with the new options in WordPress 3.0 like the new Menu system and Custom Post types. These are fantastic additions to the WordPress engine. The guys who work on WordPress core really deserve a big hand. &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with the new options in WordPress 3.0 like the new Menu system and Custom Post types. These are fantastic additions to the WordPress engine. The guys who work on WordPress core really deserve a big hand. </p>
<p>One other item which gets less attention are Taxonomies. When you initiate a new Taxonomy you are basically cloning the existing Post Category or Post Tags logic. With Post Categories you are provided an additional field for parent because post categories are hierarchal. But what if you want to add additional fields to the interface?  This is what I intent to disclose in this article.<br />
<span id="more-553"></span><br />
Before we get into the code example let me provide some background. I&#8217;m working on a custom shopping cart for a client. I intent to support the shopping cart system using a Custom Post Type and 3 Custom Taxonomies. The Custom Post Type will be called &#8216;Products&#8217;. Within Product we have at least 3 new Taxonomies. These are &#8216;Product Categories&#8217;, &#8216;Product Tags&#8217; and &#8216;Product Packages&#8217;. The &#8216;Product Categories&#8217; and &#8216;Product Tags&#8217; function similar to the Post Categories and Post Tags but are used for the Products. The third Taxonomy, &#8216;Product Packages&#8217;, is a little more special. A &#8216;Package&#8217; in terms of the shopping cart functionality will contain information related to the product configurations. For the client a Product is a photograph and is sold in different formats as in 8 x 10 Print, 8 x 10 Matted and Framed Print, Xmas Cards, etc. You may be thinking these are are just categories and you would be correct. The WordPress Taxonomies support 4 basic fields of information Name, Slug, Parent and Description. For the &#8216;Product Packages&#8217; Taxonomy I also need to store extra fields such as Active status, Unit Sale Price, Unit Ship Price and Unit Quantity. </p>
<p>Here is a screenshot of the actual Product Package detail. </p>
<div id="attachment_569" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.codehooligans.com/wp-content/uploads/codehooligans_wp_taxonomy_meta_detail.png" rel="lightbox[553]"><img src="http://www.codehooligans.com/wp-content/uploads/codehooligans_wp_taxonomy_meta_detail-300x183.png" alt="" title="codehooligans_wp_taxonomy_meta_detail" width="300" height="183" class="size-medium wp-image-569" /></a><p class="wp-caption-text">WordPress Taxonomy Meta fields</p></div>
<p>Here is the simple code to define the new Taxonomy &#8216;Product Packages&#8217;. I&#8217;ve wrapped this in my init function to make it easier to use.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_action( 'init', 'product_init' );<br />
function product_init()<br />
{<br />
&nbsp; &nbsp; register_taxonomy( 'product_packages', 'products',<br />
&nbsp; &nbsp; &nbsp; &nbsp; array(&nbsp; 'hierarchical' =&gt; true,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'label' =&gt; __('Product Packages'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'query_var' =&gt; false<br />
&nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; );<br />
}</div></td></tr></tbody></table></div>
<p>Now we want to hook into some actions created by WordPress when the new Taxonomy is registered. The first action is used to insert extra fields to the Taxonomy item edit form. Note that all Taxonomies offer the quick edit and the full edit form. This is for the full edit form only.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_action( 'product_packages_edit_form_fields', 'edit_product_packages', 10, 2);<br />
function edit_product_packages($tag, $taxonomy)<br />
{<br />
&nbsp; &nbsp; $product_package_active = get_metadata($tag-&gt;taxonomy, $tag-&gt;term_id, 'product_package_active', true);<br />
<br />
&nbsp; &nbsp; // Check/Set the default value<br />
&nbsp; &nbsp; if (!$product_package_active)<br />
&nbsp; &nbsp; &nbsp; &nbsp; $product_package_active = &quot;Yes&quot;;<br />
<br />
&nbsp; &nbsp; $product_package_unit_price = get_metadata($tag-&gt;taxonomy, $tag-&gt;term_id, 'product_package_unit_price', true);<br />
&nbsp; &nbsp; $product_package_ship_price = get_metadata($tag-&gt;taxonomy, $tag-&gt;term_id, 'product_package_ship_price', true);<br />
<br />
&nbsp; &nbsp; // Check/Set the default value<br />
&nbsp; &nbsp; $product_package_ship_unit = get_metadata($tag-&gt;taxonomy, $tag-&gt;term_id, 'product_package_ship_unit', true);<br />
&nbsp; &nbsp; if (!$product_package_ship_unit)<br />
&nbsp; &nbsp; &nbsp; &nbsp; $product_package_ship_unit = 1;<br />
<br />
&nbsp; &nbsp; ?&gt;<br />
&nbsp; &nbsp; &lt;tr class=&quot;form-field&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;th scope=&quot;row&quot; valign=&quot;top&quot;&gt;&lt;label for=&quot;product_package_active&quot;&gt;Package Active?&lt;/label&gt;&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;select name=&quot;product_package_active&quot; id=&quot;product_package_active&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&quot;Yes&quot; selected=&quot;selected&quot;&gt;Yes&lt;/option&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=&quot;No&quot; &lt;?php <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($product_package_active == &quot;No&quot;) echo ' selected=&quot;selected&quot;;'; ?&gt;&gt;No&lt;/option&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/select&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;description&quot;&gt;Marking a Package to 'No' will hide all items in that package.&lt;/p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br />
&nbsp; &nbsp; &lt;/tr&gt;<br />
<br />
&nbsp; &nbsp; &lt;tr class=&quot;form-field&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;th scope=&quot;row&quot; valign=&quot;top&quot;&gt;&lt;label for=&quot;product_package_unit_price&quot;&gt;Package Unit Price?&lt;/label&gt;&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;product_package_unit_price&quot; id=&quot;product_package_unit_price&quot; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value=&quot;&lt;?php echo $product_package_unit_price; ?&gt;&quot;/&gt;&lt;br /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;description&quot;&gt;This is the unit price for the items in this 'package'.&lt;/p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br />
&nbsp; &nbsp; &lt;/tr&gt;<br />
&nbsp; &nbsp; &lt;tr class=&quot;form-field&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;th scope=&quot;row&quot; valign=&quot;top&quot;&gt;&lt;label for=&quot;product_package_ship_price&quot;&gt;Package Shipping Price?&lt;/label&gt;&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;product_package_ship_price&quot; id=&quot;product_package_ship_price&quot; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value=&quot;&lt;?php echo $product_package_ship_price; ?&gt;&quot;/&gt;&lt;br /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;description&quot;&gt;This is the cost per unit to ship the products in this package.&lt;/p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br />
&nbsp; &nbsp; &lt;/tr&gt;<br />
&nbsp; &nbsp; &lt;tr class=&quot;form-field&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;th scope=&quot;row&quot; valign=&quot;top&quot;&gt;&lt;label for=&quot;product_package_ship_price&quot;&gt;Package Shipping Unit&lt;/label&gt;&lt;/th&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;product_package_ship_unit&quot; id=&quot;product_package_ship_unit&quot; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value=&quot;&lt;?php echo $product_package_ship_unit; ?&gt;&quot;/&gt;&lt;br /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;description&quot;&gt;This is the quantity of product items. Normally this will be 1. For cards this number may be 6 or 8.&lt;/p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br />
&nbsp; &nbsp; &lt;/tr&gt;<br />
&nbsp; &nbsp; &lt;?php<br />
}</div></td></tr></tbody></table></div>
<p>Let&#8217;s break down the code some. The &#8216;add_action&#8217; is a built-in WordPress function. The first parameter &#8216;product_packages_edit_form_fields&#8217; is a dynamic action key which is created based on the Taxonomy key + &#8216;_edit_form_fields&#8217;. In our case the Taxonomy key is &#8216;product_packages&#8217;. This action is executed from the WordPress file wp-admin/edit-tag-form.php line 68. There is also another action on line 67 which is more generic &#8216;edit_tag_form_fields&#8217;. But we are only concerned with the edits for our Taxonomy. From edit-tag-form.php line 68 you can see the action will pass your function two argument the Tag being edited and the Taxonomy. So our function &#8216;edit_product_package&#8217; also supports two arguments passed into it. Though we really don&#8217;t need or do anything with the second argument since we know this is our specific Taxonomy &#8216;product_packages&#8217;. </p>
<p>Inside the function we call the new WordPress function &#8216;get_metadata&#8217; to load in the meta items we will be adding to the bottom of the item edit form. This function replaces the get_post_meta function. Actually if you review the get_post_meta function in wp-includes/post.php line 1196 you will see if calls the get_metadata function. The new get_metadata function takes the same basic arguments. The big difference is the first parameter which needs to be a valid Taxonomy. In our case we pass in the Taxonomy &#8216;product_packages&#8217;. Once we have loaded all the item meta information we then display the table row which contain our new form fields. PRetty simply. </p>
<p>Next we add another action hook. This one will activate when the user saves the Taxonomy item. Here is the action code.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_action( 'edited_product_packages', 'save_product_packages', 10, 2);<br />
function save_product_packages($term_id, $tt_id)<br />
{<br />
&nbsp; &nbsp; if (!$term_id) return;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; if (isset($_POST['product_package_active']))<br />
&nbsp; &nbsp; &nbsp; &nbsp; update_metadata($_POST['taxonomy'], $term_id, 'product_package_active', <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $_POST['product_package_active']);<br />
<br />
&nbsp; &nbsp; if (isset($_POST['product_package_unit_price']))<br />
&nbsp; &nbsp; &nbsp; &nbsp; update_metadata($_POST['taxonomy'], $term_id, 'product_package_unit_price', <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sprintf(&quot;%01.2f&quot;, $_POST['product_package_unit_price']));<br />
<br />
&nbsp; &nbsp; if (isset($_POST['product_package_ship_price']))<br />
&nbsp; &nbsp; &nbsp; &nbsp; update_metadata($_POST['taxonomy'], $term_id, 'product_package_ship_price', <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sprintf(&quot;%01.2f&quot;, $_POST['product_package_ship_price']));<br />
<br />
&nbsp; &nbsp; if (!isset($_POST['product_package_ship_unit']))<br />
&nbsp; &nbsp; &nbsp; &nbsp; $_POST['product_package_ship_unit'] = 1;<br />
&nbsp; &nbsp; update_metadata($_POST['taxonomy'], $term_id, 'product_package_ship_unit', <br />
&nbsp; &nbsp; &nbsp; &nbsp; $_POST['product_package_ship_unit']);<br />
}</div></td></tr></tbody></table></div>
<p>This action is similar to the previous action we discussed. But one gets initiated from wp-includes/taxonomy.php line 1970 and is called after the Taxonomy item has been updated in the database. The action key &#8216;edited_product_packages&#8217; is again made up of &#8216;edited_&#8217; + our Taxonomy key &#8216;product_packages&#8217;. Also like the previous action we tell the action we want to accept the maximum two arguments though we only really care about the first on. Inside the function &#8216;save_product_packages&#8217; we check to make sure the &#8216;term_id&#8217; was not empty. The rest of the function code simple checked if the $_POST variable was passed in from the form. And if it was the WordPress function &#8216;update_metadata&#8217; is called with the Taxonomy key &#8216;product_packages&#8217; and the updated value. Again the function &#8216;update_metadata&#8217; replaced the function and works similar to &#8216;update_post_meta&#8217;.</p>
<p>That is pretty much it for the WordPress coding part. (keep reading)</p>
<p>Not quite. There is one other important topic to discuss. We need to create a new database table to contain out &#8216;product_packages&#8217; term meta information. Let me explain why. You might have a guess that our &#8216;update_metadata&#8217; function would store the fields into the wp_postmeta table. Well you would be a close guess but wrong. The function &#8216;get_metadata&#8217; and &#8216;update&#8217;metadata&#8217; use the Taxonomy key provided via the first function argument to interact with a specific database table. The name of the database is again determined based on the name of the Taxonomy from the first argument. In our case the table name will be something like &#8216;wp_product_packagesmeta&#8217;. Note this depends on your table prefix as defined in your site&#8217;s wp_config.php. See the similarity in the tables &#8216;wp_postmeta&#8217; and our table named &#8216;wp_product_packagesmeta&#8217;? It is simply &#8216;wp_&#8217; + Taxonomy key + &#8216;meta&#8217;. Again the &#8216;wp_&#8217; table prefix will be different depending on your settings in your wp_config.php file for the variable &#8216;$table_prefix&#8217;. </p>
<p>Next we need to define the table structure. Again there is a similar pattern for the column names. If you examine the wp_postmeta table columns you will see the 4 columns meta_id, post_id, meta_key and meta_value. For our table the only change is the name of the second column. Instead of &#8216;post_id&#8217; our column will be named &#8216;product_packages_id&#8217;. See the pattern? Taxonomy key + &#8216;_id&#8217;. </p>
<p>Instead of providing the exact SQL CREATE TABLE command I am only going to suggest you copy the wp_postmeta table of your current site. </p>
<p><strong><em>My reasoning for not providing the SQL CREATE TABLE command are I don&#8217;t want some people to take this literal SQL command and breaking their system then blaming me. </em></strong></p>
<p>Copy the table structure only and name the copy &#8216;wp_product_packagesmeta&#8217;. Then edit the table structure and rename the second column from &#8216;post_id&#8217; to &#8216;product_packages_id&#8217;. Once you have the table created and ready you need to tell WordPress where to use it. In the init function &#8216;product_init&#8217; we need to make two changes. At the top inside the function add the line &#8216;global $wpdb;&#8217;. Then at the very bottom of the function add the line &#8216;$wpdb->product_packagesmeta = $wpdb->prefix.&#8221;product_packagesmeta&#8221;;&#8217;. your final &#8216;product_init&#8217; function should look like this</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_action( 'init', 'product_init' );<br />
function product_init()<br />
{<br />
&nbsp; &nbsp; global $wpdb;<br />
<br />
&nbsp; &nbsp; register_taxonomy( 'product_packages', 'products',<br />
&nbsp; &nbsp; &nbsp; &nbsp; array(&nbsp; 'hierarchical' =&gt; true,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'label' =&gt; __('Product Packages'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'query_var' =&gt; false<br />
&nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; );<br />
&nbsp; &nbsp; $wpdb-&gt;product_packagesmeta = $wpdb-&gt;prefix.&quot;product_packagesmeta&quot;;<br />
}</div></td></tr></tbody></table></div>
<p>Hope you enjoy this little tip. I&#8217;m already working on the next article which will build upon this one. The next article will show you how to customize the table list column when you list out the Product Packages items (see image below). Look for it soon. </p>
<div id="attachment_570" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.codehooligans.com/wp-content/uploads/codehooligans_wp_taxonomy_meta_list.png" rel="lightbox[553]"><img src="http://www.codehooligans.com/wp-content/uploads/codehooligans_wp_taxonomy_meta_list-300x258.png" alt="" title="codehooligans_wp_taxonomy_meta_list" width="300" height="258" class="size-medium wp-image-570" /></a><p class="wp-caption-text">WordPress Taxonomy meta listing</p></div>
<p>You can download all the code used in the article below:<br />
<a href='http://www.codehooligans.com/wp-content/uploads/codehooligans_wordpress_taxonomy_meta.zip'>codehooligans_wordpress_taxonomy_meta.zip</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=9c9Z42mZhu0:Qo9GWv-2Koo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=9c9Z42mZhu0:Qo9GWv-2Koo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=9c9Z42mZhu0:Qo9GWv-2Koo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=9c9Z42mZhu0:Qo9GWv-2Koo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=9c9Z42mZhu0:Qo9GWv-2Koo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=9c9Z42mZhu0:Qo9GWv-2Koo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=9c9Z42mZhu0:Qo9GWv-2Koo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=9c9Z42mZhu0:Qo9GWv-2Koo:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/9c9Z42mZhu0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2010/07/07/custom-meta-for-new-taxonomies-in-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>51</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2010/07/07/custom-meta-for-new-taxonomies-in-wordpress-3-0/</feedburner:origLink></item>
		<item>
		<title>Disable WordPress Plugins update indicator for inactive plugins</title>
		<link>http://feedproxy.google.com/~r/codehooligans/~3/GgUEoKYGIhE/</link>
		<comments>http://www.codehooligans.com/2009/08/30/disable-wordpress-plugins-update-indicator-for-inactive-plugins/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 01:13:01 +0000</pubDate>
		<dc:creator>Paul Menard</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.codehooligans.com/?p=463</guid>
		<description><![CDATA[<p>I have to really tip my hat to the guys that work hard on the core WordPress code at Automatic. In the last 12 months they taken the system to new heights with a complete redo of the admin interface. &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I have to really tip my hat to the guys that work hard on the core WordPress code at Automatic. In the last 12 months they taken the system to new heights with a complete redo of the admin interface. Adding many features to extend the core so that developers like myself can extend things even further. </p>
<p>Take for example the nice little number displayed on the Plugins menu item when some of your installed plugins are out of date. What a nice little feature. There is also an update display on the actual Plugins page the little yellow-ish box below a plugin row to indicate there is an update and the user needs to take action. From a usability stand point I think this sort of forward thinking is the reason I keep hacking in WordPress instead of other CMS-type systems like Drupal, Joomla, eZ Publish, etc. </p>
<p><a href="http://www.codehooligans.com/wp-content/uploads/wp-plugin-list-update-indicator.png" rel="lightbox[463]"><img src="http://www.codehooligans.com/wp-content/uploads/wp-plugin-list-update-indicator-300x73.png" alt="wp-plugin-list-update-indicator" title="wp-plugin-list-update-indicator" width="300" height="73" class="aligncenter size-medium wp-image-481" /></a></p>
<p><a href="http://www.codehooligans.com/wp-content/uploads/wp-plugin-nav-update-indicator.png" rel="lightbox[463]"><img src="http://www.codehooligans.com/wp-content/uploads/wp-plugin-nav-update-indicator.png" alt="WordPress Nav Update Indicator" title="WordPress Nav Update Indicator" width="143" height="31" class="size-full wp-image-478" /></a></p>
<p>But I do have a major annoyance with this &#8216;feature&#8217;. Like many other WordPress users I have man plugins installed. At any given time I will have a third of the plugins disabled maybe because I was testing things or maybe I deactivated the plugin but didn&#8217;t want to  uninstall it. My annoyance is that the plugin update indicators work on all plugins even those you don&#8217;t have active. Not good. Worse on the client sites I support I really don&#8217;t want the client to need to worry about updating inactive plugins. </p>
<p>Sure I know there are at least half a dozen plugins that will completely turn off the plugin and WordPress core update nag indicators. But I really don&#8217;t want that. I just don&#8217;t want to see update nag on those plugins I&#8217;m not currently using. </p>
<p>So I did some research on this lazy Sunday afternoon and figured out how to hide the update indicator on those inactive plugins. The code below will hide these inactive plugin from the update counter. When the plugin is re-activated the plugin update indicator will once again show in the sidebar menu and on the plugins listing. </p>
<h2>The Code</h2>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> update_active_plugins<span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/*<br />
&nbsp; &nbsp; The $value array passed in contains the list of plugins with time <br />
&nbsp; &nbsp; marks when the last time the groups was checked for version match<br />
&nbsp; &nbsp; The $value-&gt;reponse node contains an array of the items that are <br />
&nbsp; &nbsp; out of date. This response node is use by the 'Plugins' menu<br />
&nbsp; &nbsp; for example to indicate there are updates. Also on the actual <br />
&nbsp; &nbsp; plugins listing to provide the yellow box below a given plugin <br />
&nbsp; &nbsp; to indicate action is needed by the user. <br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Get the list cut current active plugins</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$active_plugins</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'active_plugins'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$active_plugins</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// &nbsp;Here we start to compare the $value-&gt;response </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//&nbsp; items checking each against the active plugins list. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$plugin_idx</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$plugin_item</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// If the response item is not an active plugin then remove it. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// This will prevent WordPress from indicating the plugin needs update actions. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$plugin_idx</span><span style="color: #339933;">,</span> <span style="color: #000088;">$active_plugins</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/unset"><span style="color: #990000;">unset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$plugin_idx</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// If no active plugins then ignore the inactive out of date ones. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$plugin_idx</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$plugin_item</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/unset"><span style="color: #990000;">unset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">response</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'transient_update_plugins'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'update_active_plugins'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Hook for 2.8.x</span><br />
<span style="color: #666666; font-style: italic;">//add_filter( 'option_update_plugins', 'update_active_plugins');&nbsp; &nbsp; // Hook for 2.7.x</span></div></td></tr></tbody></table></div>
<p>A note on the &#8216;add_filter&#8217; lines just above. Seems there are two different hooks depending your the WordPress version. If you are running version 2.8.x or newer you should be safe to use the first add_filter line. If however you are still using 2.7.x then comment out the first add_filter an use the second one. </p>
<h2>Installation</h2>
<p>I really don&#8217;t plan to turn this into an official plugin for WordPress. So the simplest method of installation is to add it to your theme&#8217;s functions.php file. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/codehooligans?a=GgUEoKYGIhE:vBw34HsZ7iw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=GgUEoKYGIhE:vBw34HsZ7iw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=GgUEoKYGIhE:vBw34HsZ7iw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=GgUEoKYGIhE:vBw34HsZ7iw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=GgUEoKYGIhE:vBw34HsZ7iw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=GgUEoKYGIhE:vBw34HsZ7iw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/codehooligans?i=GgUEoKYGIhE:vBw34HsZ7iw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/codehooligans?a=GgUEoKYGIhE:vBw34HsZ7iw:5BYXUcS8iBU"><img src="http://feeds.feedburner.com/~ff/codehooligans?d=5BYXUcS8iBU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/codehooligans/~4/GgUEoKYGIhE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.codehooligans.com/2009/08/30/disable-wordpress-plugins-update-indicator-for-inactive-plugins/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><feedburner:origLink>http://www.codehooligans.com/2009/08/30/disable-wordpress-plugins-update-indicator-for-inactive-plugins/</feedburner:origLink></item>
	</channel>
</rss>

