Make WordPress Core


Ignore:
Timestamp:
01/18/2010 10:21:36 PM (15 years ago)
Author:
ryan
Message:

Use cap checks instead of multisite and super admin checks. Add some new caps. Merge cleanup. see #11644.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugins.php

    r12752 r12753  
    232232
    233233$help = '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>';
    234 if ( !is_multisite() || is_super_admin() ) {
     234if ( current_user_can('edit_plugins') ) {
    235235$help .= '<p>' . sprintf(__('If something goes wrong with a plugin and you can&#8217;t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.'), WP_PLUGIN_DIR) . '</p>';
    236236$help .= '<p>' . sprintf(__('You can find additional plugins for your site by using the new <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> directly and installing manually.  To <em>manually</em> install a plugin you generally just need to upload the plugin file into your <code>%2$s</code> directory.  Once a plugin has been installed, you may activate it here.'), 'plugin-install.php', WP_PLUGIN_DIR) . '</p>';
     
    285285<div class="wrap">
    286286<?php screen_icon(); ?>
    287 <h2><?php echo esc_html( $title ); if ( !is_multisite() || is_super_admin() ) { ?> <a href="plugin-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a><?php } ?></h2>
     287<h2><?php echo esc_html( $title ); if ( current_user_can('install_plugins') ) { ?> <a href="plugin-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a><?php } ?></h2>
    288288
    289289<?php
     
    326326}
    327327
    328 if ( is_multisite() && !is_super_admin() ) {
    329     $upgrade_plugins = false;
    330 }
     328if ( !current_user_can('update_plugins') )
     329    $upgrade_plugins = array();
    331330
    332331$total_all_plugins = count($all_plugins);
Note: See TracChangeset for help on using the changeset viewer.