Add WP context functions to add_to_context().

We're using this in a timber project internally, thought it may be worth sharing. It may also be expensive, so if you want this, hey, it's yours.