General “best-practice” type post for WordPress users. When including template tags provided by a plugin or theme, it’s good practice to precede the tag with a conditional check to make sure that the function exists.

For example..

Instead of calling a function directly, for example by writing this:

<?php echo usp_get_images(); ?>

..we can (and should) check if the called function actually exists. This can be done with a conditional check, for example:

<?php if (function_exists("usp_get_images")) echo usp_get_images(); ?>

The first method works fine, but PHP will throw a 500 level error if the plugin is not installed or otherwise available. So to avoid the site-breaking error, the second method always is preferred.