WordPress Function Exists


/ Published in: PHP
Save to your folder(s)

Check to see if your function exists in WordPress before calling it. This is standard php code though, so it works outside of WordPress as well.


Copy this code and paste it in your HTML
  1. <?php if(function_exists('my_function')) { my_function(); } ?>

Report this snippet


Comments


You need to login to view comments.