Make WordPress Core


Ignore:
Timestamp:
11/20/2013 02:08:17 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Only show "Add New Theme" block on Manage Themes screen if not Multisite and the user can install themes.

props markoheijnen.
see #25948.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/themes.php

    r26282 r26288  
    9292    'themes'   => $themes,
    9393    'settings' => array(
    94         'install_uri'   => admin_url( 'theme-install.php' ),
     94        'canInstall'    => ( ! is_multisite() && current_user_can( 'install_themes' ) ),
     95        'installURI'    => admin_url( 'theme-install.php' ),
    9596        'customizeURI'  => ( current_user_can( 'edit_theme_options' ) ) ? wp_customize_url() : null,
    9697        'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ),
     
    100101    ),
    101102    'i18n' => array(
    102         'add_new'         => __( 'Add New Theme' ),
     103        'addNew'        => __( 'Add New Theme' ),
    103104    ),
    104105) );
Note: See TracChangeset for help on using the changeset viewer.