Changeset 1655
- Timestamp:
- 09/14/2004 12:01:31 PM (20 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r1643 r1655 566 566 567 567 // The default theme always exists. 568 $themes['Default'] = array('Name' => 'Default', 'Title' => ' Default', 'Description' => 'The default theme', 'Author' => '', 'Version' => '1.3', 'Template' => 'default', 'Stylesheet' => 'default', 'Template Files' => $default_template_files, 'Stylesheet Files' => $default_stylesheet_files, 'Template Dir' => '/', 'Stylesheet Dir' => '/', 'Parent Theme' => '');568 $themes['Default'] = array('Name' => 'Default', 'Title' => 'WordPress Default', 'Description' => 'The default theme included with WordPress.', 'Author' => 'Dave Shea', 'Version' => '1.3', 'Template' => 'default', 'Stylesheet' => 'default', 'Template Files' => $default_template_files, 'Stylesheet Files' => $default_stylesheet_files, 'Template Dir' => '/', 'Stylesheet Dir' => '/', 'Parent Theme' => ''); 569 569 570 570 if (!$themes_dir || !$theme_files) { -
trunk/wp-admin/themes.php
r1643 r1655 16 16 } 17 17 18 header('Location: themes.php?activate =true');18 header('Location: themes.php?activated=true'); 19 19 } 20 20 } … … 25 25 require_once('admin-header.php'); 26 26 27 if ($user_level < 9) // Must be at least level 928 die (__('Sorry, you must be at least a level 8user to modify themes.'));27 if ($user_level < 9) 28 die (__('Sorry, you must be at least a level 9 user to modify themes.')); 29 29 ?> 30 31 <?php if ( isset($activated) ) : ?> 32 <div class="updated"><p><?php _e('New theme activated'); ?></p></div> 33 <?php endif; ?> 30 34 31 35 <?php 32 36 $themes = get_themes(); 33 37 $current_theme = get_current_theme(); 38 $current_title = $themes[$current_theme]['Title']; 39 $current_version = $themes[$current_theme]['Version']; 34 40 $current_parent_theme = $themes[$current_theme]['Parent Theme']; 35 41 $current_template_dir = $themes[$current_theme]['Template Dir']; … … 39 45 ?> 40 46 47 <div class="wrap"> 48 <h2><?php _e('Current Theme'); ?></h2> 49 <div id="currenttheme"> 50 <h3><?php printf(__('%s %s by %s'), $current_title, $current_version, $themes[$current_theme]['Author']) ; ?></h3> 51 <p><?php echo $themes[$current_theme]['Description']; ?></p> 41 52 <?php if ($current_parent_theme) { ?> 42 < div class="updated"><p><?php printf(__('The active theme is <strong>%s</strong>. The template files are located in <code>%s</code>. The stylesheet files are located in <code>%s</code>. <strong>%s</strong> uses templates from <strong>%s</strong>. Changes made to the templates will affect both themes.'), $current_theme, $current_template_dir, $current_stylesheet_dir, $current_theme, $current_parent_theme); ?></p></div>53 <p><?php printf(__('The active theme is <strong>%s</strong>. The template files are located in <code>%s</code>. The stylesheet files are located in <code>%s</code>. <strong>%s</strong> uses templates from <strong>%s</strong>. Changes made to the templates will affect both themes.'), $current_theme, $current_template_dir, $current_stylesheet_dir, $current_theme, $current_parent_theme); ?></p> 43 54 <?php } else { ?> 44 < div class="updated"><p><?php printf(__('The active theme is <strong>%s</strong>. The template files are located in <code>%s</code>. The stylesheet files are located in <code>%s</code>.'), $current_theme, $current_template_dir, $current_stylesheet_dir); ?></p></div>55 <p><?php printf(__('The active theme is <strong>%s</strong>. The template files are located in <code>%s</code>. The stylesheet files are located in <code>%s</code>.'), $current_theme, $current_template_dir, $current_stylesheet_dir); ?></p> 45 56 <?php } ?> 57 </div> 46 58 47 <div class="wrap"> 48 <h2><?php _e('Theme Management'); ?></h2> 59 <h2><?php _e('Other Themes'); ?></h2> 49 60 <p><?php _e('Themes are usually downloaded separately from WordPress. To install a theme you generally just need to put the theme file or files into your <code>wp-content/themes</code> directory. Once a theme is installed, you may select it here.'); ?></p> 50 <?php51 61 52 if (empty($themes)) { 53 _e("<p>Couldn't open themes directory or there are no themes available.</p>"); // TODO: make more helpful 54 } else { 55 ?> 62 <?php if ( 1 < count($themes) ) { ?> 56 63 <table width="100%" cellpadding="3" cellspacing="3"> 57 64 <tr> 58 <th><?php _e('Theme'); ?></th> 59 <th><?php _e('Version'); ?></th> 65 <th><?php _e('Name'); ?></th> 60 66 <th><?php _e('Author'); ?></th> 61 67 <th><?php _e('Description'); ?></th> … … 77 83 78 84 if ($template == $current_template && $stylesheet == $current_stylesheet) { 79 $action = "<a href='themes.php' title='" . __('Active theme') . "' class='edit'>" . __('Active Theme') . '</a>';85 $action = __('Active Theme'); 80 86 } else { 81 87 $action = "<a href='themes.php?action=activate&template=$template&stylesheet=$stylesheet' title='" . __('Select this theme') . "' class='edit'>" . __('Select') . '</a>'; … … 85 91 echo " 86 92 <tr $theme> 87 <td>$title</td> 88 <td>$version</td> 89 <td>$author</td> 93 <td>$title $version</td> 94 <td align='center'>$author</td> 90 95 <td>$description</td> 91 <td >$action</td>96 <td align='center'>$action</td> 92 97 </tr>"; 93 98 }
Note: See TracChangeset
for help on using the changeset viewer.