Prevent Lost/Missing Plugins from breaking pages

If a wordpress plugin you are using gets lost corrupted or deactivated and you are calling it directly in your template, you will receive an error output on the page. This will also stop any code loading from that point on.

Fatal error: Call to undefined function: function_name() in /…/index.php on line 321

Using the php function handler ‘function_exists’ you can check to see whether a certain function exists before calling it into your templates. If the function exists it will be loaded else, it will be skipped and the rest of the file will be read as normal. This prevents damaged/missing plugins from breaking your templates.

Example