Changeset 1675
- Timestamp:
- 09/16/2004 06:09:32 PM (21 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r1655 r1675 676 676 } 677 677 678 function validate_current_theme() { 679 $theme_loc = 'wp-content/themes'; 680 $theme_root = ABSPATH . $theme_loc; 681 682 $template = get_settings('template'); 683 $stylesheet = get_settings('stylesheet'); 684 685 if (($template != 'default') && (! file_exists("$theme_root/$template/index.php"))) { 686 update_option('template', 'default'); 687 update_option('stylesheet', 'default'); 688 return false; 689 } 690 691 if (($stylesheet != 'default') && (! file_exists("$theme_root/$stylesheet/style.css"))) { 692 update_option('template', 'default'); 693 update_option('stylesheet', 'default'); 694 return false; 695 } 696 697 return true; 698 } 699 678 700 ?> -
trunk/wp-admin/themes.php
r1655 r1675 29 29 ?> 30 30 31 <?php if ( isset($activated) ) : ?> 31 <?php if ( ! validate_current_theme() ) : ?> 32 <div class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div> 33 <?php elseif ( isset($activated) ) : ?> 32 34 <div class="updated"><p><?php _e('New theme activated'); ?></p></div> 33 35 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.