Celtic Knot Generator – A HTML5 Canvas Experiment

May 17th, 2012

I wanted to familiarize myself with the much-touted canvas element, so I used it to build an interactive celtic knot generator/editor. Give it a try.

Launch the celtic knot generator.

Note: Requires a fairly modern browser.
Instructions
When you first load up the knot generator, you will see a 10×10 grid filled with […] Continue Reading…


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
	);
	add_dashboard_page(
		'Example Menu',
		'Example Menu' . $bubble,
		'read',
		'example-menu-item'
	);
}
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…