Stephen Harris
Stephen is a Mathematician, Christian & WordPress developer all rolled into one, oddly human shape. He's the author of the event management plug-in Event Organiser.
Tutorials
  • Code
    Heartbeat API: Using Heartbeat in a PluginHeartbeat api
    In this tutorial we're going to create a simple plugin which uses the Heartbeat API. Our plugin will alert logged in users, via a growl-like notification, whenever another user logs in or out of the site.Read More…
  • Code
    The Heartbeat API: Changing the PulseHeartbeat api
    7 shares
    In the first part of this series we looked at the basics of the Heartbeat API, and how it can be implemented in a plugin. In this tutorial we'll be looking at how you can change the "pulse" of the Heartbeat. By default the WordPress heart beats once every 15 seconds. You can lower that rate to anything down to one beat every minute. Alternatively you can temporarily increase the rate to one beat every 5 seconds – but only temporarily for two and half minutes before it is reset to the the 'standard' beat: "4 BPM".Read More…
  • Code
    The Heartbeat API: Getting StartedHeartbeat api
    9 shares
    With 3.6, aka "Oscar", just released, lets take a look at some of the new features that are available to developers. In particular, in this series I'll be looking at the new heartbeat API, and demonstrating how you can make use of it in your plugins and themes.Read More…
  • Code
    Quick Tip: Add Shortlinks to Custom Post TypesAdd shortlinks to custom post types
    5 shares
    If you use any form of social media, and in particular Twitter, then you have almost certainly come across 'shortlinks' – shortened URLs which act as a label, pointing to a particular page but disguising its lengthier URL. They've been around for over a decade now, but their use really took off with URL shortening services which provided click-through statistics, and character limits on tweets.Read More…
  • Code
    Custom Database Tables: Importing DataCustomdbtables part6
    6 shares
    In the last tutorial we looked at exporting data from a custom table. Of course this is only half the story - we obviously need to provide a way of importing that data. Naturally, WordPress doesn't handle this - so once more we need to roll our own.Read More…
  • Code
    Custom Database Tables: Exporting DataCustomdbtables part5
    3 shares
    As mentioned in the very first article of this series one of the major problems with a custom database tables is the fact that they are not handled by existing import & export handlers. This article aims to address that problem – but it should be noted that currently there is no completely satisfactory solution.Read More…
  • Code
    Custom Database Tables: Maintaining the DatabaseCustomdbtables part4
    7 shares
    Over the lifetime of your custom table you will probably find that you need to make changes to what it stores, or how it stores it. This may be in response to a need to store more (or less) data. It may be that the initial design of your database wasn’t intended to deal (efficiently) with what your user-base is now demanding. Either way, we need to know how to adapt our table to meet our new needs. This is what we’ll be looking at in this tutorial, and we’ll primarily focused on the function dbDelta() that we first met in part one.Read More…
  • Code
    Custom Database Tables: Creating an APICustomdbtables part3
    In the first part of this series we looked at the disadvantages of using a custom table. One of the major ones is the lack of an API: so in this article we'll look at how to create one. The API acts a layer between handling data in your plug-in and the actual interaction with the database table – and is primarily intended to ensure such interactions are safe and to provide a ‘human friendly’ wrapper for your table. As such we’ll require wrapper functions for inserting, updating, deleting and querying data.Read More…
  • Code
    Custom Database Tables: Safety FirstCustomdbtables part2
    16 shares
    This is part two of a series about custom database tables in WordPress. In part one we covered the reasons for, and against, using custom tables. We looked at some of the details that would need to be considered - column naming, column types - as well as how to create the table. Before we go any further we need to cover how to interact with this new table safely. In a previous article I covered general sanitisation and validation – in this tutorial we’ll look at this in more detail in the context of databases.Read More…
  • Code
    Custom Database Tables: Creating the TableCustomdbtables part1
    7 shares
    In this series we'll be looking at using custom database tables. We'll cover how to create, maintain and remove the table, as well as how to safely, and efficiently, add, remove and query data. In this first article we look at when custom tables might be appropriate, the pros and cons of using them and how to create the table.Read More…
  • Code
    Two Ways to Develop WordPress Plugins: Functional ProgrammingTwo ways to develop wordpress plugins   part 2   functional progamming
    10 shares
    This part two of a series looking at two different programming styles (sometimes called programming paradigms) that you can use when writing WordPress plug-ins. In part one Tom McFarlin covered object-oriented programming. In this part we'll be looking at functional programming.Read More…
  • Code
    Integrating With WordPress’ UI: Admin PointersIntegratingwithwordpressadminui admin pointers
    4 shares
    This is part 3 of a series of articles looking at how your plugin or theme can best integrate into the WordPress admin user interface. In this part we are going to look at how you can use WordPress' 'admin pointers' in your plugins.Read More…