[wp-hackers] changing a theme via wpdb class

Christopher Ross cross at thisismyurl.com
Sun Apr 29 19:51:29 UTC 2012


oops, I forgot an arg.

add_action( 'template_redirect' , 'change_theme_manually' );
function change_theme_manually() {

    if ( 'twentyeleven' != get_current_theme() )
        switch_theme( 'twentyeleven', 'style.css' );

}


--
Christopher Ross
cross at thisismyurl.com
http://thisismyurl.com

http://facebook.com/christopher.f.ross/
http://twitter.com/thisismyurl/
http://pinterest.com/thisismyurl/



More information about the wp-hackers mailing list