I'm trying to set a variable in a drupal
theme that is readable from PHP code in page content. The reason why I'm doing this is that I'm trying to code the page so that when the theme is activated (at a set time), it displays select content only when the theme is active. I do not want to use CSS
because I don't want people to be able to get the information ahead of time.
Any ideas?
You can add an if statement in your theme that will show the content on the basis of a variable. You can then set this variable in your custom modules or hook functions.
Here is a tutorial how to set a variable in the hook and then print it out in the template: http://purencool.com/drupal-7-preprocess-tutorial-adding-variable-to-template