Changeset 2757 for trunk/wp-admin/themes.php
- Timestamp:
- 08/07/2005 10:11:30 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/themes.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/themes.php
r2756 r2757 40 40 $current_template = $themes[$current_theme]['Template']; 41 41 $current_stylesheet = $themes[$current_theme]['Stylesheet']; 42 $current_screenshot = $themes[$current_theme]['Screenshot']; 42 43 ?> 43 44 … … 45 46 <h2><?php _e('Current Theme'); ?></h2> 46 47 <div id="currenttheme"> 48 <?php if ( $current_screenshot ) : ?> 49 <img src="<?php echo get_option('siteurl') . '/' . $current_stylesheet_dir . '/' . $current_screenshot; ?>" alt="Current theme preview" /> 50 <?php endif; ?> 47 51 <h3><?php printf(__('%1$s %2$s by %3$s'), $current_title, $current_version, $themes[$current_theme]['Author']) ; ?></h3> 48 52 <p><?php echo $themes[$current_theme]['Description']; ?></p> 49 53 <?php if ($current_parent_theme) { ?> 50 <p><?php printf(__('The active theme is <strong>%1$s</strong>. Thetemplate files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$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>54 <p><?php printf(__('The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$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> 51 55 <?php } else { ?> 52 <p><?php printf(__(' The active theme is <strong>%1$s</strong>. The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>.'), $current_theme, $current_template_dir, $current_stylesheet_dir); ?></p>56 <p><?php printf(__('All of this theme’s files are located in <code>%2$s</code>.'), $current_theme, $current_template_dir, $current_stylesheet_dir); ?></p> 53 57 <?php } ?> 54 58 </div> … … 56 60 <h2><?php _e('Available Themes'); ?></h2> 57 61 <?php if ( 1 < count($themes) ) { ?> 58 <table width="100%" cellpadding="3" cellspacing="3"> 59 <tr> 60 <th><?php _e('Name'); ?></th> 61 <th><?php _e('Author'); ?></th> 62 <th><?php _e('Description'); ?></th> 63 <th></th> 64 </tr> 62 65 63 <?php 66 $style = '';64 $style = ''; 67 65 68 $theme_names = array_keys($themes);69 natcasesort($theme_names);66 $theme_names = array_keys($themes); 67 natcasesort($theme_names); 70 68 71 foreach ($theme_names as $theme_name) { 72 $template = $themes[$theme_name]['Template']; 73 $stylesheet = $themes[$theme_name]['Stylesheet']; 74 $title = $themes[$theme_name]['Title']; 75 $version = $themes[$theme_name]['Version']; 76 $description = $themes[$theme_name]['Description']; 77 $author = $themes[$theme_name]['Author']; 78 69 foreach ($theme_names as $theme_name) { 70 if ( $theme_name == $current_theme ) 71 continue; 72 $template = $themes[$theme_name]['Template']; 73 $stylesheet = $themes[$theme_name]['Stylesheet']; 74 $title = $themes[$theme_name]['Title']; 75 $version = $themes[$theme_name]['Version']; 76 $description = $themes[$theme_name]['Description']; 77 $author = $themes[$theme_name]['Author']; 78 $screenshot = $themes[$theme_name]['Screenshot']; 79 $stylesheet_dir = $themes[$theme_name]['Stylesheet Dir']; 80 ?> 81 <div class="available-theme"> 82 <h3><a href="<?php echo "themes.php?action=activate&template=$template&stylesheet=$stylesheet"; ?>"><?php echo "$title $version"; ?> 83 <span> 84 <?php if ( $screenshot ) : ?> 85 <img src="<?php echo get_option('siteurl') . '/' . $stylesheet_dir . '/' . $screenshot; ?>" alt="" /> 86 <?php endif; ?> 87 </span> 88 </a></h3> 89 <p><?php echo $description; ?></p> 90 </div> 91 <?php 92 /* 79 93 if ($template == $current_template && $stylesheet == $current_stylesheet) { 80 94 $action = '<strong>' . __('Active Theme') . '</strong>'; 81 95 $current = true; 82 96 } else { 83 $action = "<a href=' themes.php?action=activate&template=$template&stylesheet=$stylesheet' title='" . __('Select this theme') . "' class='edit'>" . __('Select') . '</a>';97 $action = "<a href='' title='" . __('Select this theme') . "' class='edit'>" . __('Select') . '</a>'; 84 98 $current = false; 85 99 } … … 94 108 echo "<td><strong>$title $version</strong></td>"; 95 109 else 96 echo "<td> $title $version</td>";110 echo "<td></td>"; 97 111 echo " 98 112 <td class=\"auth\">$author</td> … … 100 114 <td class=\"togl\">$action</td> 101 115 </tr>"; 116 */ 102 117 } 118 103 119 ?> 104 120 105 </table>106 121 <?php 107 122 }
Note:
See TracChangeset
for help on using the changeset viewer.