Plugin Development 101 – An Intro to Filters

In this part of Plugin Development 101 we take a look at one of the most important tools plugin developers use every day: filters. The presence of filters throughout WordPress are one of the elements that make plugin development possible, so having a good understanding of what they are and how they work is extremely…

Introduction to the gettext Filter in WordPress

The gettext filter gives us a really easy way to change text anywhere in our WordPress install, including plugins and themes, without ever changing any of the original code. It is a great way to easily customize labels, headings, button text, and any other text we wish to change.

Let’s Talk Extensible Code

A few weeks ago, I gave a presentation at WordCamp Kansas City titled “Modular Plugins”. The talk was focused on the idea of writing extensible code when building plugins. I’d like to continue a discussion of the same topic here.

Playing Nice with the “the_content” Filter

One of the very first things people tend to learn when writing plugins is how to attach custom HTML to the bottom of their WordPress posts using the filter called “the_content”. This is good, as it is an extremely useful filter, but rarely do tutorials really explain how to use this filter well, and how…

Adding Custom Fields to the Easy Digital Downloads Checkout

Easy Digital Downloads is a plugin I have been building for selling digital downloads through WordPress. It is completely free and very flexible. Due to a large number of actions hooks and filters, there are many ways that you can customize the plugin to best suit your needs. This tutorial will walk you through the…

Add Custom Links to User Row Actions

While working on a user badge system for the CG Cookie network, I came across the need to add a custom link to the action links, such as Edit and Delete, present for each user on the WordPress Users page. After a quick google search, I was able to find a simple filter than can…

Add Screen Options Tab to Your WordPress Plugin

You have probably noticed the Screen Options tab in the top right corner of many WordPress admin pages. This tab brings down a configuration panel that you can generally use to control what elements are displayed on the current amin page. One of the really great things about the Screen Options tab is that which…

Get the Name of the Current Action or Filter

After watching a Twitter discussion this morning (shown in the image below), Helen Hou-Sandi, a WordPress developer and core-committer mentioned a function I had never heard of that can be used for finding the name of the current action or filter hook. It is called current_filter() and is extremely useful. Check out the snippets below…

User Submitted Image Gallery – Part 6

Part 6 of User Submitted Image Galleries will show you how to setup the single image page that shows the details for a particular image. This section is not very complex, but it covers a few very important techniques that are really good to know when it comes to modifying information on post templates via…

Using Filters to Alter HTML Output

Filter hooks in WordPress provide a very powerful way to “alter” the output of functions. Using filters we can easily add extra HTML to some functions, and strip HTML from other functions. Some filters, such as the “body_class” filter, allow us to modify the class names of an HTML element, and some filters have nothing…

A Quick Introduction to Using Filters

Filter hooks are one of the the more powerful WordPress features that help to provide a huge amount of flexibility when it comes to modifying WordPress, including custom themes and plugins. There could easily be hundreds of different unique tutorials on how to use filters in themes and plugins, simply because of the huge array of…