I want to preset some widgets using functions included in my theme ONLY after a site is initially created (my theme is the default for all new sites in my instance of WordPress).
I DO NOT want my preset widgets to replace existing widgets when a user activates my theme UNLESS their existing widget areas are different from those in my theme.
I've modelled my widgets_init function on the one found in the Thematic theme framework. Thematic adds preset widgets using the following conditional:
if ( isset( $_GET['activated'] ) )
Thus when Thematic is activated, it wipes out existing widgets and adds its own preset widgets... I want my theme to use existing widgets if they are in widget areas my theme supports (i.e. a user switches from one child theme to another, both of which use my theme as their parent)
I know there is register_activation_hook but that seems to be designed for plugin functions and not functions included in themes... Here are questions:
Is there an action that is run ONLY after a site has been initially created?
Alternatively are their conditions I can check to determine whether a site has just been created?