Changeset 12753 for trunk/wp-admin/themes.php
- Timestamp:
- 01/18/2010 10:21:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/themes.php
r12752 r12753 68 68 69 69 require_once('admin-header.php'); 70 if ( is_multisite() && is_super_admin() ) {70 if ( is_multisite() && current_user_can('edit_themes') ) { 71 71 ?><div id="message0" class="updated fade"><p><?php _e('Administrator: new themes must be activated in the <a href="wpmu-themes.php">Themes Admin</a> page before they appear here.'); ?></p></div><?php 72 72 } … … 127 127 static $themes_update; 128 128 129 if ( is_multisite() && !is_super_admin() )129 if ( !current_user_can('update_themes' ) ) 130 130 return; 131 131 … … 160 160 <div class="wrap"> 161 161 <?php screen_icon(); ?> 162 <h2><?php echo esc_html( $title ); if ( ! is_multisite() || is_super_admin() ) { ?> <a href="theme-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php } ?></h2>162 <h2><?php echo esc_html( $title ); if ( !current_user_can('install_themes') ) { ?> <a href="theme-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php } ?></h2> 163 163 164 164 <h3><?php _e('Current Theme'); ?></h3> … … 171 171 printf(__('%1$s %2$s by %3$s'), $ct->title, $ct->version, $ct->author) ; ?></h4> 172 172 <p class="theme-description"><?php echo $ct->description; ?></p> 173 <?php if ( ( !is_multisite() || is_super_admin()) && $ct->parent_theme ) { ?>173 <?php if ( current_user_can('edit_themes') && $ct->parent_theme ) { ?> 174 174 <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.'), $ct->title, str_replace( WP_CONTENT_DIR, '', $ct->template_dir ), str_replace( WP_CONTENT_DIR, '', $ct->stylesheet_dir ), $ct->title, $ct->parent_theme); ?></p> 175 175 <?php } else { ?> … … 266 266 <p class="description"><?php echo $description; ?></p> 267 267 <span class='action-links'><?php echo $actions ?></span> 268 <?php if ( ( !is_multisite() || is_super_admin()) && $parent_theme ) {268 <?php if ( current_user_can('edit_themes') && $parent_theme ) { 269 269 /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> 270 270 <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.'), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme); ?></p> … … 299 299 // List broken themes, if any. 300 300 $broken_themes = get_broken_themes(); 301 if ( ( !is_multisite() || is_super_admin()) && count( $broken_themes ) ) {301 if ( current_user_can('edit_themes') && count( $broken_themes ) ) { 302 302 ?> 303 303
Note: See TracChangeset
for help on using the changeset viewer.