Articles

  • Emailing on Image Attachment Uploads

    Sometimes it’s useful to know when an image or audio attachment is added. Here I’ll outline how to send an emailwhen it happens. How It Works We start by hooking into add_attachment, and grabbing the user IDs of all administrators: // send to admins of the current blog/site $args = array(); $args[0] = ‘user_email’; $wp_user_search…

  • PHP Missing Methods & Levenshtein Distance

    I’m just going to leave this nifty little PHP snippet here, and recommend against it’s use. It could very well be shorter and more concise, probably a bit more performant too, but it works: View the code on Gist. It also encourages bad practices and ambiguity ( should elngth be mapped on to length1 or…

  • WordPress Flow Charts & Diagrams

    There’s a number of WordPress flow charts and diagrams in the community, to which the phrase worth their own weight in gold does no justice. For that adage to be true these charts would be so dense no light would reach them, rendering them utterly useless. So I’ve gathered a few of the more notable…

  • People Who ‘Get’ It

    I’ve noticed something odd.There are people who ‘get’ it, and people who don’t. There’s no real trend to it, my grandparents seem to ‘get’ it, some friends of mine in their 20s don’t. But I have found an easy way of spotting them. Say Hello To Them On Facebook Chat The people who ‘get’ it…

  • Typekit & “BESbswy”

    Perhaps you found a span containing the string ‘BESbswy’ in your content? Maybe your Google results contain the word ‘BESbswy’ repeated many times? Think you’ve been hacked? You haven’t. You’ve fallen prey to a runtime test in the Typekit/Webfontloader! I began noticing this in drafts I’d written while testing old versions of my TinyMCE Typekit…

  • Typekit WP Editor Styles

    Ever tried putting Typekit fonts on a site then trying to style the editor text in the backend? After trying many solutions, such as putting it in the admin header ( didn’t work ), or embedding the JS code in the editor iframe ( typekit security killed this ), I found a solution that worked!…

  • ‘Hacker’ issues WP Pull Request on GitHub for PHP Shell

    At the beginning of September, a user by the name of  ‘maxymax’ forked WordPress, added a PHP Shell to the twentyten theme, and made a pull request to merge back in to the official release. https://github.com/maxymax/WordPress/commit/2fa93590c7881fab043be7b8b51358894dbc1466 Suffice to say the inclusion of Saudi Shell v1.0 in TwentyTen may not have been the best idea, nevermind…

  • New Plugin – Local Indicator

    I was having trouble telling apart development local and production servers, and wanted to prevent mistakes. So I built myself a plugin to help indicate what server I was on! Presenting local indicator, a simple tool to help tell apart local installs of WordPress and remote installs. It adds the IP and server name to…

  • Tracking WordPress Site Updates Install in Google-Docs

    It’s important to keep WordPress up to date, but keeping track of all your sites can be a struggle. I recently had to list and check every site for updates, but I couldn’t use a service such as WP Remote. It had to be locally or private hosted. So I turned to Google Docs! Here…

  • Creating an Attachment for a File Already In Place

    There may come a time when there is a file in your uploads folder with no matching attachment post in the database. As unlikely as this is, it could happen, and when it does, it’s not clear how the upload mechanisms work. I came across a similar problem myself, here’s my code: View the code…

  • WordPress Related Posts & Insanity

    I see a lot of attempts to do Related Posts using WordPress plugins. However, a lot of these plugins are attempting to automate the process by comparing content. This is madness. It’s: Error prone Slow Unreliable It’s also overlooking the glaringly obvious. Related posts are posts that are about the same or similar thing. We…

  • The Fontsplosion & Bread

    Somebody at WordCamp asked a question at Robert O’Rourkes branding talk: Is typography led RWD making web design dull – excessive reliance on type to carry the design? Exactly What fontsplosion would this be? Back in the good old days of Netscape, IE6, tables, and layers, we had to choose from the system fonts for…

  • WordCamp Edinburgh 2012 – Friday

    My first time in Edinburgh and my second WordCamp. Here’s some of the things we got up to on Friday evening The Drive Up While the rest of Interconnect/it dashed around Liverpool finding batteries, myself and the glamorous Lydia Bates took a hire car up to Edinburgh. The plan was she’d drive and I’d work…