FrankM1 / radium-one-click-demo-install

Once Click Install for Wordpress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ot_options_id doesn't exist on load

branedesign opened this issue · comments

Hi, nice plugin

There is a little problem on installation with Option Tree:
function ot_options_id from Option Tree is located on ot-functions.php file, and this file is included by an action hoocked to wp 'after_setup_theme' hook on ot-loader.php file.
I fixed this by requiring your init at same hook like this:
function load_radium_one_click_demo_install(){
require get_template_directory() .'/radium-one-click-demo-install/init.php';
}
add_action( 'after_setup_theme', 'load_radium_one_click_demo_install', 2 );

Hope this helps

Thanks for your awesome work

@branedesign thx fow advice.. haven same issue.
But I think, it will be better to call class init method instead of require file on after_setup_theme..

For example:

require get_template_directory() .'/radium-one-click-demo-install/init.php';

function load_radium_one_click_demo_install(){
    new Radium_Theme_Demo_Data_Importer;
}
add_action( 'after_setup_theme', 'load_radium_one_click_demo_install', 2 );