I'm using option tree from within the "Stratus" Wordpress theme.
I'm setting up my Wordpress site using WP CLI (http://wp-cli.org) but it doesn't work because of the following error:
PHP Fatal error: Call to undefined function ot_decode() in /srv/www/themes/stratus/option-tree/theme-options-defaults.php on line 16
Hi there,
I'm using option tree from within the "Stratus" Wordpress theme. I'm setting up my Wordpress site using WP CLI (http://wp-cli.org) but it doesn't work because of the following error:
The problem comes from this line: https://github.com/valendesigns/option-tree/blob/master/ot-loader.php#L361
Within WP CLI, is_admin will be false but some code loaded by the theme or Option Tree itself needs those admin functions. So I replaced:
with:
and it works.
Another solution is to call WP CLI with this theme disabled:
but I'm guessing this solution won't work if Option Tree is enabled as a plugin.
Should I create a pull request for this?
Regards,