Permalink
Browse files

adds permission checks for action links

  • Loading branch information...
1 parent 6f9da4a commit 84089f1cd347e243e045978931135b70a14310cf @thomasgriffin thomasgriffin committed Dec 31, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 tgm-plugin-activation/class-tgm-plugin-activation.php
View
4 tgm-plugin-activation/class-tgm-plugin-activation.php
@@ -706,8 +706,8 @@ public function notices() {
$action_links = apply_filters(
'tgmpa_notice_action_links',
array(
- 'install' => $show_install_link,
- 'activate' => $show_activate_link,
+ 'install' => ( current_user_can( 'install_plugins' ) ) ? $show_install_link : '',
+ 'activate' => ( current_user_can( 'activate_plugins' ) ) ? $show_activate_link : '',
'dismiss' => '<a class="dismiss-notice" href="' . add_query_arg( 'tgmpa-dismiss', 'dismiss_admin_notices' ) . '" target="_parent">' . __( 'Dismiss this notice', $this->domain ) . '</a>',
)
);

0 comments on commit 84089f1

Please sign in to comment.