Make WordPress Core

Ticket #2305: template_no_exist.diff

File template_no_exist.diff, 499 bytes (added by markjaquith, 21 years ago)

Cleaned up version

  • wp-includes/functions.php

     
    16811681}
    16821682
    16831683function get_template() {
     1684        if ( !file_exists(get_theme_root() . '/' . get_settings('template')) ) { // works for dirs too
     1685                update_option('template', 'default');
     1686                update_option('stylesheet', 'default');
     1687        }
    16841688        return apply_filters('template', get_settings('template'));
    16851689}
    16861690