Many WordPress plugins require inserting in your theme files calls to functions they define (examples of this include very useful plugins like Akismet Spam Count, del.icio.us integrator and WP Admin Bar). This causes problems when the corresponding plugin is disabled (for example, as suggested for the WordPress 2.0 upgrade process). Avoiding this problem is extremely easy – instead of simply calling the function, check if it is defined first. For example, instead of inserting
use the following:
That’s it! If the plugin is disabled, the function will simply not be called. I would encourage plugin authors to suggest this syntax instead of the plain calls, as it makes it much easier to experiment with the plugins without having to modify the theme files every time.