I was helping out a friend a few days with their fairly complicated WordPress website. Complicated because it had over 40 different page templates, rendered exclusively by PHP. Each page template had something special about it, like a form and form handler, a JavaScript calculator, a list of registered users, the current user profile and more. Page Templates worked pretty well, and the other...
Did the Toolbar (Admin Bar) Render edit_post_link Useless?
I asked this on Twitter yesterday which raised quite some interesting replies from theme developers, the .org themes review crew and other folks. For those of you who don’t know, the edit_post_link function is widely used in WordPress themes, to create an “Edit this post” link as a shortcut to the post edit screen. This was convenient I agree, except that the link was always in...
Get an Expired Transient in WordPress: Good Idea or Crazy Talk?
I wonder if there’s an easy way to get an expired transient in WordPress? Now, for this to make sense I guess I should provide a little more context, so here it goes :) The Transients API is an extremely easy way to cache parts of your WordPress code, that may be CPU/memory intensive, or rely on a third-party server and so on. A great example is grabbing a tweet from Twitter and caching it...
Hey WordPress, How About a WP_Plugin Class?
Okay January is my month of ideas :) Let’s talk about plugins for a moment, shall we? Actions and filters are no secret to WordPress developers, right? Say, how many times do you type something like this in your plugins or theme files: class Some_Plugin { function __construct() { add_action( 'admin_init', array( $this, 'admin_init' ) ); } function admin_init() { ...
Dear WordPress, I Want to "Drop Files Here" in the Visual Editor!
Wouldn’t in be great if we could drag and drop to upload files directly into the visual editor? WordPress 3.3 very well handles drag and drop uploads into the Add Media modal box, in a special area that says “drop files here”: And thank you so much for that, WordPress, but I’m tired of constantly having to open the media manager to insert an image into my post or page...
Every Keyboard Needs A Share Button
I thought of this idea a few days ago and tweeted it out loud too. Today I’m taking it forward and introducing it to you, my dear readers — a brand new keyboard with a share key, conceptually of course. Social media has exploded in the past few years, and what is social media without the ability to share stuff? Blog posts, videos, photos, whatever. Thousands of plugins, widgets and...