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

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

Open
shohag121 opened this issue May 12, 2019 · 1 comment
Open

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

shohag121 opened this issue May 12, 2019 · 1 comment

Comments

@shohag121
Copy link

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
Copy link

same problem here!

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