Skip to content

Instantly share code, notes, and snippets.

@ddnode
Created May 10, 2013 09:51
Show Gist options
  • Select an option

  • Save ddnode/5553502 to your computer and use it in GitHub Desktop.

Select an option

Save ddnode/5553502 to your computer and use it in GitHub Desktop.

Revisions

  1. ddnode created this gist May 10, 2013.
    20 changes: 20 additions & 0 deletions theme.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    <?php
    /**
    * Implements hook_custom_theme().
    */
    function mysite_custom_theme() {
    // An array of themes for each day of the week.
    // These themes have to be installed and enabled.
    $themes = array();
    $themes[0] = 'garland';
    $themes[1] = 'bartik';
    $themes[2] = 'stark';
    $themes[3] = 'seven';
    $themes[4] = 'mytheme';
    $themes[5] = 'sky';
    $themes[6] = 'danland';
    // Get the current day of the week in numerical form.
    $day = date("w");
    // Override current theme based on day of the week.
    return $themes[$day];
    }