Changeset 2568
- Timestamp:
- 04/21/2005 01:35:52 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r2560 r2568 1594 1594 if (empty($template_dir)) $template_dir = '/'; 1595 1595 if (empty($stylesheet_dir)) $stylesheet_dir = '/'; 1596 1597 // Check for theme name collision. This occurs if a theme is copied to 1598 // a new theme directory and the theme header is not updated. Whichever 1599 // theme is first keeps the name. Subsequent themes get a suffix applied. 1600 // The Default and Classic themes always trump their pretenders. 1601 if ( isset($themes[$name]) ) { 1602 if ( ('WordPress Default' == $name || 'WordPress Classic' == $name) && 1603 ('default' == $stylesheet || 'classic' == $stylesheet) ) { 1604 // If another theme has claimed to be one of our default themes, move 1605 // them aside. 1606 $suffix = $themes[$name]['Stylesheet']; 1607 $new_name = "$name/$suffix"; 1608 $themes[$new_name] = $themes[$name]; 1609 $themes[$new_name]['Name'] = $new_name; 1610 } else { 1611 $name = "$name/$stylesheet"; 1612 } 1613 } 1596 1614 1597 1615 $themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Stylesheet' => $stylesheet, 'Template Files' => $template_files, 'Stylesheet Files' => $stylesheet_files, 'Template Dir' => $template_dir, 'Stylesheet Dir' => $stylesheet_dir, 'Status' => $theme_data['Status']); … … 1633 1651 $current_template = get_settings('template'); 1634 1652 $current_stylesheet = get_settings('stylesheet'); 1635 $current_theme = ' Default';1653 $current_theme = 'WordPress Default'; 1636 1654 1637 1655 if ($themes) { … … 1640 1658 $themes[$theme_name]['Template'] == $current_template) { 1641 1659 $current_theme = $themes[$theme_name]['Name']; 1660 break; 1642 1661 } 1643 1662 }
Note: See TracChangeset
for help on using the changeset viewer.