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:

function add_menu_with_notification_bubble() {
	$bubble = sprintf(
		' <span class="update-plugins"><span class="update-count">%d</span></span>',
		42 //bubble contents
		'Example Menu',
		'Example Menu' . $bubble,
add_action('admin_menu', 'add_menu_with_notification_bubble');

The resulting […] 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 […] 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 […] Continue Reading…

WordPress Spring Cleaning – The Master List For Cleaning Up Your Blog

April 10th, 2012

Now that spring has arrived (at least in the Northern Hemisphere), it is an excellent time to clean up and decruft your WordPress site. In this post I will show you a number of plugins and techniques that you can use to do just that.

Note: Back up your database […] Continue Reading…

Automatic Updates For Private And Commercial Themes

June 2nd, 2011

Update 2017-06-20: This library has been deprecated. Please use PUC instead. It’s more current and it supports both themes and plugins.

This is a PHP library that lets you add automatic update notifications and single-click updates to any WordPress theme. It’s purpose is to be easy to integrate for developers […] Continue Reading…