I wrote a WordPress plugin that creates an admin page for deciding what posts go in a feature slider on the front page. Everything works fine and I’m simply calling to the function inside the plugin with
<?php uwffs_display(); ?>
in the home.php file.
The issue is that if I were to deactivate the plugin, the home page breaks at the point the
<?php uwffs_display(); ?>
function call occurs and stops rendering the rest of the page.
What is a more graceful way I can call this plugin’s function so that, if deactivated, it will load the rest of the page?
One thought is I could write it as:
<?php if(function_exists('uwffs_display'))
{
uwffs_display();
}
?>
Is that the best way?