Make WordPress Core


Ignore:
Timestamp:
05/12/2010 07:19:57 PM (14 years ago)
Author:
nacin
Message:

Use the edit_theme_options capability. fixes #13290.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r14407 r14581  
    357357        $num = number_format_i18n( $num_widgets );
    358358
    359         if ( current_user_can( 'switch_themes' ) ) {
     359        $switch_themes = $ct->title;
     360        if ( current_user_can( 'switch_themes') ) {
    360361            echo '<a href="themes.php" class="button rbutton">' . __('Change Theme') . '</a>';
    361             printf(_n('Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $ct->title, $num);
     362            $switch_themes = '<a href="themes.php">' . $switch_themes . '</a>';
     363        }
     364        if ( current_user_can( 'edit_theme_options' ) ) {
     365            printf(_n('Theme <span class="b">%1$s</span> with <span class="b"><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span class="b">%1$s</span> with <span class="b"><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $switch_themes, $num);
    362366        } else {
    363             printf(_n('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $ct->title, $num);
     367            printf(_n('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $switch_themes, $num);
    364368        }
    365369    } else {
Note: See TracChangeset for help on using the changeset viewer.