I want to disable contexts programmatically (for automated updates, where a new release of a website needs a context to be disabled).
I manage contexts using Features, but Features doesn't hold the enabled/disabled status of the context.
I can't find a fucntion to change context status programmatically. There's a support request but the snipet is not working (nothing happends, context remiangs the same status).
After some investigations I come across the context_status variable. It seems to hold an array with context names as key and TRUE as value: each of this context is disabled. If you edit the that variable unsetting one context the context becomes enabled.
So it seems the only way to disable/enable a context programmatically is to edit this conext_status.
Is there a better way to do it?