WP_Logging is a general use logging system that I have written for WordPress. It was first written for my Easy Digital Downloads but I have adapted it for general use. The main idea behind the class it to provide a simple solution for logging events, actions, errors, etc, inside of your WordPress plugins or themes.
View PostI Wrote Some Really Dangerous Code
Sometimes when looking back at something I wrote in the past, perhaps two years ago, I discover some really terrible code I’ve written. Some of it is simply poor quality with really bad formatting, and some of it is outright dangerous from a security point. This evening I discovered some of that “dangerous” code inside [...]
View PostEnsure Your Scripts and Styles Are Not Cached with Updates
Have you ever pushed out an update that included modifications to scripts or styles and then later had to tell someone to clear their cache or do a hard refresh in order to see the updates? There is actually a very simple way to avoid this scenario and force the browser to display the updated [...]
View Post wp_enqueue_script, wp_enqueue_styleMaking PHP Variables Available to Your JS
If you have ever written a plugin that uses any form of Javascript, you will probably have come across the problem of passing configuration options from PHP to Javascript. Take an image slider plugin, such as Soliloquy for example: most likely there is a settings page of some kind that lets the user set the [...]
View Post wp_localize_scriptUser Follow System – Part 3
In the previous part of Creating a User Follow System, we looked at the basic shell functions that we need to write for our plugin to function. Now we are going to get into actually writing those functions. We will go one by one and write each one from scratch. Also note that we will [...]
View Post get_user_meta, update_user_metaUser Follow System – Part 2
Part 1 of the User Follow System series looked at laying out the main structure of the plugin. For part 2, we’re going to continue that and lay out the main skeleton functions that we need for our plugin. These will include the functions for following a user, unfollowing a user, checking if a user [...]
View Post add_user_meta, add_user_option, get_user_meta, get_user_option, update_user_meta, update_user_optionUse TidyPHP with Sublime Text 2 for Lightning Fast Formatting
Writing clean code is something you should always strive for in your WordPress projects, and you should always do what you can to adhere to the WordPress Coding Standards. I tested out a really awesome tool today that you should seriously consider adding to your workflow if you are a Sublime Text 2 user.
View Post Sublime Text 2Writing a Simple Google Maps Short Code

In this advanced tutorial we’re going to walk through the process of creating a simple short code to display Google Maps. The concept is simple, but we’ll be using advanced techniques and tools for displaying our maps. All maps will be cached using transients and all requests to Google’s API services will be done with [...]
View Post get_transient, Google Maps, set_transient, wp_remote_get, wp_remote_retrieve_bodyDeliver Automatic Updates for Your WordPress Products

If you are selling WordPress themes or plugins, one of the number one things you should absolutely consider implementing into your products is automatic upgrades. If avoidable, there is no reason a user should be forced to manually log into your site and download a new version, then log into their own site and upload [...]
View Post Brian Krogsgard, easy digital downloadsStripe Integration Part 7 – Creating and Storing Customers

The Stripe customer system let’s us keep track of people that have signed up for our subscriptions or purchased our products. Anytime a user signs up for a subscription, a customer is created for them in Stripe. Once a customer has been created, we can see all payments that customer has made, add or subtract [...]
View Post Stripe