radium-one-click-demo-install icon indicating copy to clipboard operation
radium-one-click-demo-install copied to clipboard

ot_options_id doesn't exist on load

Open branedesign opened this issue 10 years ago • 1 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 avatar Feb 17 '15 21:02 branedesign

@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 );

vburlak avatar Apr 13 '15 10:04 vburlak