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

git-svn-id: http://svn.automattic.com/wordpress/trunk@16919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-12-14 16:46:45 +00:00
parent 15ebb1f893
commit 9fbd8c032e
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>