How to write the “else” statement for If Function Exists for deactivated plugin?
-
This question is based on the advice in the Codex here:
https://codex.www.ads-software.com/Managing_Plugins#Hiding_Plugins_When_DeactivatedI see how to do the “IF FUNCTION EXISTS”. How do I add some kind of “ELSE IF FUNCTION DOES NOT EXIST Then Do This Other Thing Instead”?
Here’s my example. I’m using TTF Title Plugin to replace my post headlines with graphics. I set it up with “IF FUNCTION EXISTS” like this:
<?php if (function_exists('the_ttftitle')) { the_ttftitle($before="", $after="", $echo=true, $style="INSERT-YOUR-TTF-STYLE-HERE"); } ?>
I would like to make it display regular-old php the_title(), if the_ttftitle() does not exist. (If the plugin is deactivated).
Probably something with the word “else” but I don’t know how to write it. Who can show me the code?
Thanks Support Forum
- The topic ‘How to write the “else” statement for If Function Exists for deactivated plugin?’ is closed to new replies.