gambitph / Titan-Framework

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

$titan->setOption() not saving data to database #421

Open shohag121 opened 5 years ago

shohag121 commented 5 years ago

Hey, I want to save the changed value for an option from other function of my plugin. When using setOption() and setting new value; I'm getting the new value (using getOption() ) for that titan instance only but it's not saving the value in the database permanently. When recalling the value from another page, it just returns the default value.

Currently, I'm doing: $titan = TitanFramework::getInstance('my-plugin'); $color = $titan->getOption('theme-color') Getting $color value red. $titan->setOption('theme-color', 'Green') $color = $titan->getOption('theme-color') Getting $color value Green.

But On other page:

$titan = TitanFramework::getInstance('my-plugin'); $color = $titan->getOption('theme-color') Getting $color value still red.

What am I missing here?

Thanks.

RobertoAyala2112 commented 5 years ago

same problem here!