Fatal when Genesis Not Enabled [Has Patch]
-
Currently the plugin uses
register_activation_hookto check for the required version of Genesis is installed. However, it’s possible to activate Genesis, then the Genesis Tab plugin and then switch to another theme (say Twenty Sixteen). If you’re not using the thumbnail view the tabs continue to work. However, if you are then you’ll get the following error:PHP Fatal error: Uncaught Error: Call to undefined function genesis_get_image() in /wp-content/plugins/genesis-tabs/plugin.php:148I’ve put together a series of patches to fix this:
1) Check for
genesis_get_image()before the function call:
https://gist.github.com/BandonRandon/96341f371dd555d40ffdb7a02d6f6d1b2) Also run
register_activation_hookonafter_switch_theme
https://gist.github.com/BandonRandon/599590d8a6b59ec71ccdbad166491791/fac08fdd40e887d639c009421f5ad8d840caa8b43) Change
wp_dietoadmin_noticethis is a friendly message and works wherewp_dieis being filtered by the host/platform
https://gist.github.com/BandonRandon/599590d8a6b59ec71ccdbad166491791/e9b63a1b2c8101cc60f5c7d28208e60f56b1863a3.1) Same thing but without
after_switch_themecode:
https://gist.github.com/BandonRandon/a51978a14ebb27cbc583a2b6bba79c9aHopefully this can help others in the same situation of having trouble switching themes with the plugin in use.
The topic ‘Fatal when Genesis Not Enabled [Has Patch]’ is closed to new replies.