0

Similar to Wordpress - Adding to Redux Theme Options using Child Theme

I'm am looking to control Redux sections with current_theme_supports($feature), so that if a theme supports a feature, a section won't be displayed. Eg if colors are managed by the theme (and the theme declares support), don't display the color section, but if not, display it.

I have got the filter working great with redux/options/option_name/sections, but at the point the filter is run global $_wp_theme_features is null.

Any tips on the best way to implement this?

Community
  • 1
  • 1
user2985710
  • 113
  • 4

1 Answers1

0

Lead dev of Redux here. Delay the loading of your option panel to the init hook. Basically your panel is loading before $_wp_theme_features is populated. The earliest you can run it is after_setup_theme. That's when the theme files (functions.php) has loaded.

Once you do that, all should be gravy. :)

Dovy
  • 1,210
  • 9
  • 18
  • Super awesome, Dovy, thanks. I used after_theme_setup as recommended and a priority of 100 (10 didn't seem to cut it). – user2985710 Feb 26 '15 at 15:54