I need to set a theme setting via a scripting mechanism (specifically phing). Is it possible to use drush to set a very specific theme setting, without passing JSON?

drush vset {theme_setting} {specific_theme_setting}

I can use drush vget theme_{custom_theme}_settings --filter=json and get the JSON string, but I can't (at least I'm not aware of a way) set a specific key item of that array...?


Drush does not have any facilities for manipulating elements of arrays in the variable table; however, you can use drush php-eval to call variable_get() variable_set(), and include a bit of php to manipulate the json yourself.

It would also be pretty easy to make your own Drush command to manipulate the items you'd like to set regularly. See the drushify tool for a fast way to get started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.