A New Year, a new you, a new coat of paint on the old website

Testing…TESTING! Is this thing (still) on? Why yes it is. I know there has been exaggerated reports of my demise. I’m still here. Still kicking. Still coding.

I’ve decided to start off 2015 with a fresh design for the site. And maybe get back into writing about some of the cool projects I’ve been working on for the past few years. The new look is based on the WordPress Free Theme Flat. I’ve added some tweaks of my own to a child theme. More functionality to come over the next few weeks.

So where have I been? What have I been doing with my time? Over the past few years I’ve gone deep into WordPress plugin development. I was working for a major WordPress plugin vendor (not going to name them here but you can check out my LinkedIn profile if you are curious). During my tenor there I was responsible for development and supported for up to 26 plugins. I learned so much about how to write plugins to work across the wide range of hosting environments. How to be efficient with coding and how to get along with site running many dozen other plugins. I learned some valuable knowledge about WordPress Multisite as well as BuddyPress. So really want to bring that back to my own plugins.

Speaking of my own plugin. I’m in the process of rewriting parts of my Media-Tags WordPress plugin to work better within the new Backbone.js Media system used with WordPress. Lots of good changes coming soon.

In other WordPress directions I’ve fallen in love with WooCommerce. Thinking back to the early days of WordPress commerce engines (again not going to name names). I can remember having to literally hack the plugin to get things to work per the client needs. And hoping the client never ever upgraded. With the new WooCommerce 2.x it feels more like BuddyPress. Lots of way to override even the smaller elements. Not to mention tons of template files you can add to the theme to override the default action. There is one area I tend to dislike related to Variable Products managements. I’m working on an add-on of my own. Hope to announce it soon.

Besides my fallback WordPress projects, I’ve been working some in Swift, the new Apple language. As many have stated it does remind one of JavaScript in some of the syntax. But yet it is very powerful for creating apps. Speaking of JavaScript I’ve also been playing with Node.js. I’m very very excited about the potential there. First thing I thought of when playing with the modules is “someone ought to write a CMS in Node.js”. Well a few have started. The most promising is PencilBlue. They actually state in the documentation they want to replace WordPress. Lofty goal. I’ll need to find some time and join the development group. See if I can bring in some of my WordPress knowledge.

Other than coding related things. We are still discovering parts of North Carolina. Still have not made the road trip to Asheville. We both miss Texas and especially our friends in Austin. I miss all the friends and contacts from the Refresh Austin and WordPress Austin groups. As well as SXSW Interactive being in my backyard. I’ve tried getting into the local WordPress group as well as other groups in the Triangle. They just seem a little too cliche-ish to me. I’ll try again this year.

On a personal note we moved into a beautiful home last year. The new neighborhood is great as well as the neighbors who actually come over and visit. Unlike the previous neighborhood where we were renting. The neighbors just could not be bothered to say hello to you. We even have a neighborhood book club I joined last year. I’m the only male in the group and was apprehensive. I thought I would be getting into some Harlequin Romance and Jane Austen type reads. But we have read some very interesting books. So I’m looking forward to some nice reading outside of my own tracks this new year.

Well that is about all for the update. I hope to be posting regular. I already have some other posts in the queue I’ve worked on. Just need to polish and publish.

Simply Exclude version 2.0 officially released

I’ve decided to finally commit the version 2.0 code base to the WordPress.org plugin repository. You can download or update your existing version http://wordpress.org/extend/plugins/simply-exclude/

You can read all the details of the update via the main plugin page on this site.

My compare of Windows 7 Operating System

I’m purchasing a new Apple MacBook Pro 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’m looking to also purchase Windows 7 to run under a virtual engine like VMWare or Parallels.

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!

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.

Chart from BestBuy.com showing differences between Windows 7 versions

What I find really strange (and the reason I’m taking the time to write this) is some of the descriptions. Like the first line “Manage the things you do every day with improved desktop navigation”. Um, I’m sorry but should’t that actually be a given? Or the 5th line “Easy to create a home network and connect your PCs to a printer with HomeGroup”. Again I’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?

Give me a break. Maybe I’m just a Apple snob (don’t call me a fanboy). Over the last 6 years I’ve really come to appreciate the streamline marketing done for Apple. No hype and no marketing double-speak.

This is getting annoying…iPhone 4S predictions and disappointments

Dear Tech Media industry leaders. Please STOP building up rumors for weeks months about new technologies then act so disappointed when the company’s released item does not live up to your expectations.

Case in point the newly released Apple iPhone 4S. For weeks and months I’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.

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’t pan out.

For the record I’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.

Adding Custom Columns to WordPress Post listing

In a reader comment one of my previous posts about “Adding columns to Taxonomy tables”. The commenter asks how to add columns to a normal Posts listing.

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.

So what are these filters/actions function?

The first line, add_filter( ‘manage_edit-post_columns’… 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 ‘admin_post_header_columns’ 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 ‘Notes’ columns. As with any PHP array we assign a key to be ‘note’ and the column label ‘Notes’. Then return the array back to WP.

A note about the filter name. Notice we setup the filter as using the first parameter ‘manage_edit-post_columns’. Keep in mind this filter is specific to Posts. If you wanted to do this same thing for Pages you would instead use ‘manage_pages_columns’. Or if you were using a custom post type the value would be ‘manage_{$post_type}_posts_columns’ where ‘{$post_type}’ is your post_type. For example if we register a new post_type Products with the key ‘products’ then the filter would use the parameter of ‘manage_products_posts_columns’. On to the second hook. The action.

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 ‘manage_posts_custom_column’ which will call our function ‘admin_post_data_row’.

Inside our function we setup a case statement to switch on the column name. In our instance we only want to effect the ‘note’ column. This ‘note’ value is the array ‘key’ we defined in our previous filter function.

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 ’10’ 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.

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 ‘manage_posts_custom_column’. If we were adding a column to Pages the parameter would instead be ‘manage_pages_custom_column’. And if we were adding this column to a custom post_type the parameter would be ‘manage_{$post->post_type}_posts_custom_column’ where ‘{$post->post_type}’ is the key to our registered post_type.

I hope this helps with a deeper understanding of WordPress and an appreciation of the wonderful world of WordPress actions and filters.