New WordPress Podcast: WP Late Night Starts Tonight!


There’s a new WordPress Podcast in town: WP Late Night. Hosted by yours truly, along with Dre Armeda (Sucuri.net) and Ryan Imel (WPCandy.com), WP Late Night will be a bi-weekly live streaming video podcast all about WordPress!

I’ve been itching to get involved with another WordPress podcast for some time now. I had such a great time on the WordPress Weekly show with Jeffro that I knew it was only a matter of time until it happened. The show will be live streaming tonight (Wednesday) at 8pm EST. You can watch the show live on the WPCandy Stream page.

For more information on the show, and ways to participate, make sure you check out the WPCandy.com announcement post.

I’m Speaking at WordCamp Las Vegas 2011!


This weekend I will be speaking at WordCamp Las Vegas!

I’ll be giving a WordPress for Beginners presentation, showing new WP users just how easy it is to write and manage content in WordPress. I’m also going to cover basic plugin and theme installation and recommendations.

This will be my first time attending this WordCamp, but I’ve heard great things about it. The event is being organized by one of my good WordPress friends John Hawkins. I’m really looking forward to seeing a lot of my West Coast WordPress friends this weekend!

If you plan on attending make sure to track me down and say hi!

I Survived WordCamp Philly 2011!


Last weekend was WordCamp Philly 2011, the second WordCamp to be held in the City of Brotherly Love!

I had the pleasure of organizing the event this year with Doug Stewart, Reed Gustow, and Anthony Bubel. The event was a huge success!

Saturday we had an amazing lineup of speakers covering four tracks and a classroom with all sorts of awesome WordPress related topics. Saturday ended with an epic after party at National Mechanics. Sunday we held a Developer Day with more hands on hacking, which is always a fun time!

Overall it was an awesome event and one I am extremely proud to have been a part of. The Philly WordPress Community really stepped up and helped put on an amazing event.

I gave a classroom style presentation titled “Creating Your First WordPress Plugin”. The slides are embedded below:

Be sure to check out the other great presentations on the official WordCamp Philly 2011 SlideShare group.

How To: Display Gravity Form Error Messages in a JavaScript Popup


Gravity Forms is an extremely popular contact form plugin for WordPress. One of the reasons Gravity Forms is so popular is the ease in which you can customize it. Much like WordPress, Gravity Forms features various action and filter hooks for developers to use to easily tweak how GF functions.

Working on a client site recently I needed to customize how error messages were displayed in Gravity Forms. By default GF will display an error message above the form if any field values aren’t validated (ie a required field is left empty). On this particular website I wanted the error message to display in a simple JavaScript popup, instead of on the page. Below is the code I used to do just that:

add_filter( 'gform_validation_message', 'sw_gf_validation_message', 10, 2 );

function sw_gf_validation_message( $validation_message ) {

	//display error JS popup
	add_action( 'wp_footer', 'sw_gf_js_error' );

}

function sw_gf_js_error() {
	?>
	<script type="text/javascript">
		alert( "Please fill out all required fields indicated by a *" );
	</script>
	<?php
}

As you can see I’m using the gform_validation_message filter to customize how the error message is processed. The PHP variable $validation_message stores the original error message GF was going to display. In this example I didn’t use the original error message, but you could easily pass that to your JS popup if needed.

This is a pretty simple example of customizing the Gravity Forms error message. Enjoy!

I’m Speaking at WordCamp San Francisco 2011 This Weekend!


This weekend I’m attending, and speaking at, WordCamp San Francisco 2011!

I’ll be a part of the Security Showdown panel with Mark Jaquith and Jon Cave. We’ll be performing live plugin security audits on submitted plugins and discussing best practices for securing your plugins and themes.

WordCamp SF is the biggest WordCamp of the year. It’s literally a who’s who of the WordPress Community and I can’t wait to be back this year!

If you plan on attending make sure you track me down and say hi, I might even have a couple items to give away! :)

Summer WordCamps 2011


It’s summer and that means time for summer WordCamps! I’ll be hitting two WordCamps this summer: WordCamp Boston and WordCamp San Francisco.

WordCamp Boston will be held on July 23rd-24th in Boston, MA. This year’s event looks to be jam packed with great speakers and sessions. The event will feature three tracks each day. On Saturday the speaker tracks will range from Development to Education and How-To. On Sunday the tracks will range from Advanced Development to Strategy and even some Design sessions.

WordCamp San Francisco will be held on August 12th-14th in San Francisco, CA. WordCamp SF really is the essential WordCamp of the year. The original WordCamp was held in SF in 2006 and has grown ever since. I had a blast last year and can’t wait to see all of my community friends again this year. I can only hope a dance off breaks out again at the after party!

I actually won’t be speaking at either event, which will be a change for me. I’m going to hang up my speaker hat until WordCamp Philly 2011 later this year. I do, however, plan on helping out at the Happiness Bar at both events.

If you plan on attending either event make sure you track me down and say hi! :)

How To: Add A Link to the WordPress Multisite Network Admin Sites List


The other day I was working on a plugin for a client when I needed to add a link to the WordPress Multisite Network Admin Sites list. This is the list of sites in your WordPress Multisite network. The links I am referring to are the action links that appear when you hover over a site in the list as shown below.

WordPress Multisite Network Sites ListTo add a link, or modify any of the existing action links, we’re going to use the manage_sites_action_links action filter in WordPress. This filter will allow us to modify the action links before they are displayed on the screen. This means you can add, or remove, any links you want.

Let’s look at the code:

add_filter( 'manage_sites_action_links', 'my_plugin_network_list_action', null, 2 );

function my_plugin_network_list_action( $actions, $blog_id ) {

    $actions = array_merge( $actions, array(
	'custom_link' => '<a href="'. network_admin_url( 'sites.php' ).'">My Custom Link</a>'
    ));

    return $actions;

}

First we call the manage_sites_action_links filter hook which executes our custom function my_plugin_network_list_action(). Our function accepts two parameters: The $actions array which contains all action links and the $blog_id which stores the site ID of the site we are hovering in the list.

To add a link we are going to use the PHP function array_merge() to merge our link into the array of existing links. In this example I added a link named “My Custom Link” which links to the Network Admin sites list. The final step is to return the $actions variable. Simple as that!

For more awesome WordPress plugin goodies check out my new book: Professional WordPress Plugin Development

Professional WordPress Plugin Development Has Hit The Shelves!


My latest book, Professional WordPress Plugin Development, has left the warehouse and is in stock and ready to order! The book is also available in DRM-Free PDF and Kindle formats. I co-authored this book with two amazing developers, Ozh Richard and Justin Tadlock.

Pro WP Plugin Dev BookI am really happy with how the book turned out and know it will be a valuable resource for anyone wanting to learn, or expand, their knowledge on WordPress plugin development. The book includes 80+ fully functional plugin examples and tutorials for download. I find myself consulting the book on a daily basis for code snippets and examples.

Professional WordPress Plugin Development covers a wide range of plugin dev topics including plugin foundation, creating widgets and shortcodes, custom post types and taxonomies, users and roles, coding standard and styles, and action and filter hooks. The book also dives into some more advanced topics like the HTTP API, JavaScript and Ajaz, Cron event scheduling, the Rewrite API, and even an entire chapter dedicated to Multisite plugin development! For more information check out the post Ozh wrote that details everything the book covers.

Want to win a FREE copy of the book? I’m giving away three free copies to three random fans of the Professional WordPress Plugin Development Facebook page. Simply like the page and you’re entered to win! I’ll pick the winners on Monday.

My Professional WordPress Plugin Development Video Interview


Last October I attended BlogWorld & New Media Expo in Las Vegas. During the event I did an interview with Wiley/WROX to talk about my new upcoming book Professional WordPress Plugin Development. The video interview is now featured on the Amazon page for the book! Check out the video below (ignore my derp face):

WordCamp Phoenix 2011 Recap


Last weekend I attended one of the best WordCamps I have ever been to, WordCamp Phoenix 2011! I was joined by April, Brian, and Scott of WebDevStudios. The event was hosted in the beautiful town of Chandler, AZ by some amazing organizers.

During our time in Phoenix I had the opportunity to check out Gangplank. I can’t speak highly enough about the amazing setup they have and was truly inspired. Gangplank is a collaborative coworking space with a major twist, there are no fees to work. Just show up, plug in and start working.

At the event I gave a presentation on WordPress End-User Security with Dre Armeda. Dre is the co-founder of Sucuri.net and truly passionate about security so it was great to collaborate with him on the presentation. Check out the slides from our presentation below:

I also had the pleasure of doing a video interview with Ryan Imel of WPCandy.com. We discussed WebDevStudios, working with WordPress, my new plugin development book, and more! Check out the interview below:

The event was a huge success and I couldn’t believe how many of my friends in the WordPress community attended. Attendees included Lisa Sabin-Wilson, Dre Armeda and Toni Perez of CubicTwo, Ptah Dunbar, Matt Danner and Cory Miller of iThemes, Amanda Blum, Michael Torbert, Steve Mortiboy, Josh and Sally Strebel of Page.ly, the 9seeds crew of John Hawkins, Shayne Sanderson, and Todd Huesh, Grant and Clay Griffiths of Headway, Boone Gorges, John James Jacoby, Ryan and Crystal Duff, Matt Martz, Mark Jaquith, Andrew Nacin, Pete Mall, Danielle Morrill, Jonathan Davis of the Shopp plugin, Ryan Imel of WPCandy.com, Stephanie Leary, Brandon Dove, Andrew Norcross, and many more I’m sure I forgot.

I had an amazing time at WordCamp Phoenix, hung out with some great WordPress addicts like myself, and enjoyed the sweet January Phoenix weather. This will certainly be an event I plan on attending again in the future!

And now for the chaos: