Quality Work Make Your Dream Come True
WordPress BuddyPress bbPress Developer

How to avoid wordpress plugin functions break your theme after upgrade?

Hi Friends,

A friend told me that he upgrade his plugin and then…, his wordpress theme shown something like this:

Fatal error: Call to undefined function functionname() in /home/somefolder/public_html/yourdomainhere.com/ wp-content/themes/mytheme/single.php on line 15

his site messed up and he do not know how this happened. I do a check for him and I found he hired a guy call a plugin’s function in his theme, and he have a good habit that always upgrade his plugin and theme to the newest version, but this time his plugin have a big change and the naked call function is not existed in the lasted plugin, so….

Dears, if you hope call a function form a plugin, please remember use this kind of method:

< ?php
if ( function_exists( 'yourfunctionname' ) ) {

So if this function do not existed, your theme will works normaly yet, is this helpful? Happy day.

Best Regards,

  1. Thanks for the great tooltip plugin. I found your tooltips_list_shortcode($atts) function, and was wondering is there was a way to modify this to render a sorted list of the definitions on a page. I cant edit the file in Admin.

Leave a Reply