Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ot_options_id doesn't exist on load #12

Open
branedesign opened this issue Feb 17, 2015 · 1 comment
Open

ot_options_id doesn't exist on load #12

branedesign opened this issue Feb 17, 2015 · 1 comment

Comments

@branedesign
Copy link

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 branedesign changed the title ot_options_id dont exists on load ot_options_id doesn't exist on load Feb 17, 2015
@vburlak
Copy link
Contributor

vburlak commented Apr 13, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants