gambitph / Titan-Framework

The easiest to use WordPress option framework.
http://www.titanframework.net
377 stars 137 forks source link

after_setup_theme vs wp_head #391

Closed davidsneighbour closed 4 years ago

davidsneighbour commented 7 years ago

Hi, not sure if this is a bug or I understand it wrong. I have a function

function dnb_finetuning_setup()
{
  // getting options via titanframework
}

The following add_action code works:

add_action('wp_head', 'dnb_finetuning_setup');

The following code does not work.

add_action('after_setup_theme', 'dnb_finetuning_setup');

meaning, if eg. a checkbox variable is set it returns false in after_setup_theme.

http://www.titanframework.net/placing-codes-in-titan-framework/ states that after_setup_theme is the point to use to get options.

(version used is 1.11, at least thats what titan-framework.php says)

codeclinic commented 5 years ago

HI,

I've noticed that to use after_theme_setup you have to set the priority quite low (eg 20 or higher) otherwise Titan Framework isn't quite ready.

codeclinic commented 4 years ago

@davidsneighbour Did you resolve this yourself? If so please provide details so that I and others can work around this issue. Thanks.