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:
parent
595bc10419
commit
6bb085e816
@ -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'] ) ?>
|
||||
|
||||
|
@ -83,7 +83,7 @@ if ( !is_multisite() ) : ?>
|
||||
<?php endif;
|
||||
else : ?>
|
||||
<h2>
|
||||
<?php esc_html_e( $title ); ?>
|
||||
<?php echo esc_html( $title ); ?>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user