Hide add new button or link to network/plugin-install on plugins page. Props ocean90. fixes #15785

git-svn-id: https://develop.svn.wordpress.org/trunk@16919 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-12-14 16:46:45 +00:00
parent 595bc10419
commit 6bb085e816
2 changed files with 5 additions and 2 deletions

View File

@ -360,7 +360,10 @@ if ( !empty($invalid) )
<div class="wrap">
<?php screen_icon(); ?>
<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>
<h2><?php echo esc_html( $title );
if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
<a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
<?php } ?></h2>
<?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?>

View File

@ -83,7 +83,7 @@ if ( !is_multisite() ) : ?>
<?php endif;
else : ?>
<h2>
<?php esc_html_e( $title ); ?>
<?php echo esc_html( $title ); ?>
<?php endif; ?>
</h2>