Skip to content

Commit

Permalink
Merge pull request #294 from sudar/274-enhancement/license-invalid
Browse files Browse the repository at this point in the history
Show "license invalid" message only to admins
  • Loading branch information
sudar committed May 16, 2018
2 parents 10c7691 + 490ee65 commit 630b44b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions include/license/class-bd-license-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,15 @@ private function hook_updater( $license_code ) {
* @since 5.5
*/
public function show_admin_notices() {
if ( '' != $this->notice_msg ) {
printf( '<div class="error"><p><strong>%s</strong></p></div>', $this->notice_msg );
/**
* Check if user have admin rights.
*
* @since 6.0
*/
if ( current_user_can( 'manage_options' ) ) {
if ( '' != $this->notice_msg ) {
printf( '<div class="error"><p><strong>%s</strong></p></div>', $this->notice_msg );
}
}
}

Expand Down

0 comments on commit 630b44b

Please sign in to comment.