Make WordPress Core


Ignore:
Timestamp:
11/13/2007 05:07:44 AM (17 years ago)
Author:
ryan
Message:

Add switch_theme(). Cache current theme in options to avoid calling get_themes(). fixes #5346

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/themes.php

    r6033 r6334  
    66
    77    if ('activate' == $_GET['action']) {
    8         if ( isset($_GET['template']) )
    9             update_option('template', $_GET['template']);
    10 
    11         if ( isset($_GET['stylesheet']) )
    12             update_option('stylesheet', $_GET['stylesheet']);
    13 
    14         do_action('switch_theme', get_current_theme());
    15 
     8        switch_theme($_GET['template'], $_GET['stylesheet']);
    169        wp_redirect('themes.php?activated=true');
    1710        exit;
Note: See TracChangeset for help on using the changeset viewer.