Skip to content

Commit

Permalink
Only logged-in user sshould see Follow button.
Browse files Browse the repository at this point in the history
See #7.
  • Loading branch information
boonebgorges committed Nov 8, 2015
1 parent c471698 commit 3c20c0e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/hooks-buddypress-follow.php
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,11 @@ function cacsp_follow_add_follow_button_to_single_paper() {
return;
}

// Only logged-in users can follow papers.
if ( ! is_user_logged_in() ) {
return;
}

// Authors shouldn't see a follow button for their own papers.
if ( bp_loggedin_user_id() === (int) get_post()->post_author ) {
return;
Expand Down

0 comments on commit 3c20c0e

Please sign in to comment.