WordPress.org

Make WordPress Core

Ticket #4515: theme.php.patch

File theme.php.patch, 608 bytes (added by pishmishy, 8 years ago)

Patch to display error message under these conditions.

  • wp-includes/theme.php

     
    460460                do_action('switch_theme', 'Default'); 
    461461                return false; 
    462462        } 
    463  
     463        if ( get_stylesheet() == 'default' && !file_exists(get_template_directory() . '/index.php')){ 
     464                wp_die('WordPress cannot find the default theme. You may have chosen to use this theme or WordPress may have selected it since the chosen theme could not be found. Please make sure that the default theme is installed.'); 
     465        } 
    464466        return true; 
    465467} 
    466468