Adding A Notification Bubble To An Admin Menu Item

May 3rd, 2012

You’ve probably seen the small notification bubble that shows up in the Dashboard menu when a new update is available. Here’s how you can add a menu bubble to your own custom menu: The resulting menu will look like this:

Continue Reading...

Security Tip: Block Direct Access To Plugin PHP Files

April 27th, 2012

Plugins are usually loaded and executed along with the rest of WordPress. However, since each plugin is physically just set of .php, .css and .js files, it is also possible for someone to bypass the normal load order and execute the plugin files directly.  They just need to type the right URL in the address [...]

Continue Reading...

Cleaning Up Stale Transients

April 17th, 2012

WordPress transients are very similar to DB options but they also support expiration times. The Transients API documentation states: Our transient will die naturally of old age once $expiration seconds have passed since we last ran set_transient() What you might not know if you haven’t explored the source code of the transients API is that [...]

Continue Reading...

How To Convert Your WordPress Blog To A Static Site

February 2nd, 2011

Recently, I found this old question on WordPress StackExchange: I am starting a new WordPress blog, and no longer updating an old one. [...] How can I lock the installation of WordPress down so I don’t need to maintain it? I have seen someone suggest making a static version, which sounds like a lot of [...]

Continue Reading...

Lazy-Load Avatars

January 31st, 2011

In my previous post, The Quest For Speed, I mentioned that lazy-loading avatars is a good way to improve your site performance: The overwhelming majority of visitors never leave a comment. Chances are, most don’t even scroll down to the comments section. So why waste their time and bandwidth by loading avatars that they’ll never [...]

Continue Reading...

The Quest For Speed

January 18th, 2011

A little more than a month ago, I logged into my Google Webmaster Tools account and to check if Google had detected any crawl errors or any other problems with my site. Finding everything in good order, I was just about to close the browser tab when I noticed a sidebar link that had somehow [...]

Continue Reading...

Where Did That JS/CSS Come From?

December 14th, 2010

If you run a WordPress site, chances are that you use plugins. If you use plugins, chances are that some of those plugins add their JavaScript or CSS files to your pages. And if there’s lots of JS/CSS on your pages, chances are that your site isn’t as fast as it could be, and that [...]

Continue Reading...

Extracting Plugin Metadata

September 15th, 2010

Have you ever dreamed of extracting useful metadata from WordPress plugins? Probably you haven’t. But if you ever need a way to parse a plugin’s readme.txt, or want to simplify metadata generation for the custom update checker, here’s a couple of utility functions that may come in handy. I originally wrote them for internal use, [...]

Continue Reading...

Fixing “Memory Exhausted” Errors In WP-DBManager

August 25th, 2010

WP-DBManager is a handy plugin that can, among other things, make periodic database backups and send them to a specified email address. I installed it on this blog months ago and up until a week ago everything was working perfectly. Then one day the backup emails simply stopped coming. What Went Wrong? A quick check [...]

Continue Reading...

Towards a Better dbDelta

July 29th, 2010

When it comes to creating and updating database tables, WordPress has what appears to be a very handy utility function – dbDelta. In theory, this function can take one or more CREATE TABLE queries, compare them to the tables already in the database and automatically figure out how to bring them up to date, adding [...]

Continue Reading...

Add New Buttons Alongside “Screen Options” And “Help”

June 30th, 2010

Continuing from yesterday’s post about adding custom settings to the “Screen Options” panel in WP, I will now show you how to add your own buttons alongside “Screen Options” and “Help”. But first, here are a few screenshots – to whet your appetite, so to speak. Want those neat buttons in your plugin? Read on. [...]

Continue Reading...

Adding Stuff To WordPress “Screen Options”

June 29th, 2010

The Screen Options pull-down is the perfect place for those “rarely used but nice to have” settings. It’s unobtrusive and saves screen space. Some plugins could even put all of their settings in this panel and avoid cluttering the Dashboard menu with yet another “Settings” page. While Screen Options were already present in older WP [...]

Continue Reading...

How To Filter The Whole Page In WordPress

May 20th, 2010

WordPress has numerous hooks for filtering posts, comments, feed items and more, but no built-in filter that would let you intercept and modify an entire page. However, you can do that fairly easily with PHP’s output buffering functions. Today I’m going to show you how. Crash-Course In Output Buffering As the name implies, output buffering [...]

Continue Reading...

Only 2% Of WordPress Plugins Compatible “For Sure”

March 25th, 2010

Last October, the WordPress.org plugin directory introduced a new “Compatibility” feature that allows users to vote on whether a given plugin version works or doesn’t work with a specific version of WordPress. The idea was to provide a more reliable indicator of plugin compatibility so that you wouldn’t need to worry if upgrading will break [...]

Continue Reading...

The Barest Page Templates Possible

February 25th, 2010

Some WordPress themes include custom page templates that let you add a custom layout or some nifty feature to specific pages. But sometimes you need the exact opposite – a page to be as bare, unadorned, downright plain as possible. No header, no menus, no nothing – just the HTML that you entered in the [...]

Continue Reading...

Most Popular Words In Plugin Names

February 12th, 2010

Behold, I bring you even more WordPress-related statistics! Today : the most popular words in plugin names. Use them to come up with new plugin ideas, figure out which services/features are over- or under-represented in the WP plugin ecosystem, and more. Here’s a tag cloud of the names of all plugins listed in the WordPress.org [...]

Continue Reading...

The Viralogy Offer

February 4th, 2010

In this post I will explain what the “Viralogy.com script” thing mentioned in the Broken Link Checker survey was all about, discuss the user response and attempt to verbalize my rather unclear thoughts on the issue. Viralogy Script About two weeks ago, I received an offer to bundle a social media tracking script from Viralogy [...]

Continue Reading...

Broken Link Checker Survey Results

February 2nd, 2010

Last week I invited everyone who uses my Broken Link Checker plugin to answer a user feedback survey. The survey consisted of 11 questions covering a number of topics from overall user satisfaction to feature suggestions, monetization options and questions about the user’s server configuration. In this post I will summarize the results and maybe [...]

Continue Reading...

Top 10 Plugin Developers Of 2009

December 28th, 2009

The end of a year is a time for reflection. A time to look back on your accomplishments, and also a time to give thanks to the people who helped you along the way. So, once again, I’ve compiled a list of the top WP developers whose plugins have been an immense boon to thousands [...]

Continue Reading...

Reliably Detecting The WordPress Version

December 2nd, 2009

Sometimes you might want to find out if a website is built with WordPress, and which specific version of WP it’s running. In this post I’ll discuss a number of detection techniques, including ways to deal with sites that hide the fact that they’re running WordPress or spoof the version info. For non-programmers : If [...]

Continue Reading...

How To Make WordPress Check For Updates Immediately

October 1st, 2009

WordPress automatically checks for plugin, theme and core updates once every 12 hours. This is normally fine, but it can become annoying when you know there’s an important update or bugfix available yet it won’t show up in your Dashboard until the next time WP gets around to checking for it. Of course, you can [...]

Continue Reading...

Vote For The 2009 Open Source CMS Award Nominations

August 19th, 2009

Packt Publishing is running their 2009 Open Source CMS Award, so go forth and nominate your favorite CMS for one of the award categories! And in case you’re not sure which CMS to vote for, here’s a friendly suggestion: Clik the image to go to the nomination screen with WordPress pre-selected ;) Hat tip to [...]

Continue Reading...

Advanced Spell Checker For WordPress

June 2nd, 2009

After the Deadline is an advanced spell checker plugin for WordPress that was released on Monday. In addition to the standard spell check and suggestions features, it also includes style and grammar checking. The plugin also lets you define custom dictionary of sorts – you can set it to always ignore certain words. Here’s the [...]

Continue Reading...

Spam Killed My Backups

April 21st, 2009

Having up-to-date backups is an essential safeguard in case something goes wrong with your website. So some time ago I installed WP-DBManager and configured it to send a daily backup of my WordPress database to my GMail account. All was well, until last week the backup process failed five times in a row. Upon checking [...]

Continue Reading...

Make Your Plugin Faster With Conditional Tags

February 22nd, 2009

One of the reasons why WordPress can be slow is that it loads all active plugins on each and every page, even if some of those plugins aren’t actually used on that page. For example, an active anti-spam plugin will still be loaded even if the current page doesn’t contain a comment form (e.g. category [...]

Continue Reading...

How To Identify a WordPress Theme

February 15th, 2009

Say you stumble upon a WordPress blog that has a gorgeous design. Amazed, you wonder what theme they’re using. Of course, it would be straightforward to just email the blog’s author and ask, but it might take a few hours (or days) until they get back to you. Here are three simple ways to identify [...]

Continue Reading...

Top WordPress Plugin Niches

February 11th, 2009

As a plugin developer, I sometimes wonder what makes a plugin popular. How come some plugins garner hundreds of comments and thousands of downloads, while others pass quietly into the archives? What kind of plugin do the users want? Obviously the plugin’s niche (what kind of stuff it does) would be a huge factor. For [...]

Continue Reading...

WordPress API Resources

January 14th, 2009

[Here's some list-cliche-filler stuff while I fight off a (hopefully) temporary bout of unproductivity and dentists] WordPress internals are documented pretty well, but sometimes finding the right API/Codex page can take a while. That’s why I’ve decided to put together a comprehensive list of all APIs used by WordPress to serve as a “jump-off point” [...]

Continue Reading...

How To Speed Up Sociable

January 10th, 2009

I’ve always cared about WordPress performance. I’ve optimized my database, tweaked the server’s configuration, used plugin profilers and installed WP Super Cache and PHP Speedy WP – the “heavy artillery” of performance-related plugins. However, only recently did I decide to finally track down and fix all the remaining subtle issues that may cause slow loading [...]

Continue Reading...

Top 10 WordPress Plugin Developers

December 28th, 2008

As the year is coming to an end, perhaps it’s time for a different kind of “Top X” post. Instead of a list of new WP plugins to try out, here are the top plugin authors – the brilliant people who create outstanding tools and share them with the WordPress community. The list is ranked [...]

Continue Reading...