2

I'm going to use redux framework for my plugin options, it is showing in admin panel and i can save the settings,

I used the sample config file for option panel,

So the problem is that i m not getting the option values by printing the global opt_name variable.

If I add the redux framework config file to theme functions.php then it worked, but not working in plugin,

Please help me if some one know about the problem.

2 Answers 2

2

Lead dev of Redux here.

The issue is Redux hasn't had a chance to run yet!

If you're using the new Redux API just run: Redux::init('opt_name') and it will suddenly work. :)

Sign up to request clarification or add additional context in comments.

2 Comments

Another option is to run your config, and then delay the rest of your plugin until plugins_loaded priority 2. ;)
Hi, Dovy Thanks you your reply, I put Redux::init('opt_name') in my initSettings function but it did not work, By the way what do you mean by New Redux API? i m using the latest redux plugin, Also can you please explain the 2nd option little more, how to run config and delay plugin until plugin_loaded priority 2, i did this add_action( 'plugins_loaded', array( $this, 'initSettings' ), 2 ); but this did not work too.
1

If you try to run Redux in plugin, just run :

Redux::init("opt_name"); // opt_name is your opt_name

before using it

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.