Problem with updates and meta boxes
-
Hello,
I am having a bit of an issue with updates when using meta boxes inside my theme. I have OptionTree installed as a plugin rather than inside the theme using theme mode so that clients can update OptionTree when a new version comes out. However, if the theme needs meta boxes I am using the code to load the includes/meta-boxes.php file inside the theme.
When I do an update of OptionTree it goes through the normal process but because it gets deactivated during the update process, an error occurs when it tries to reactivate. The error is as follows:
Fatal error: Call to undefined function ot_register_meta_box() in […]\wp-content\themes\seasonal\includes\meta-boxes.php on line 254
The only way to overcome this problem is cancel the loading of the template file in the functions.php file, do the update and reverse the cancelled line. Or, switch to a different theme, update and then switch back. Of course, this is a problem for clients.
I didn’t activate theme mode because the clients do their own maintenance, so I left it in plugins in order for them to do updates when needed, but the only way to use meta boxes is to integrate it into the theme.
Anything I am missing?
Thanks,
Lee
- The topic ‘Problem with updates and meta boxes’ is closed to new replies.