[buddypress-trac] [BuddyPress Trac] #5567: Nested activity comments do not show when logged out
buddypress-trac
noreply at wordpress.org
Fri Apr 18 18:18:31 UTC 2014
#5567: Nested activity comments do not show when logged out
-----------------------------------+------------------
Reporter: r-a-y | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.1
Component: Template Pack | Version: 1.5
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch |
-----------------------------------+------------------
Changes (by boonebgorges):
* milestone: Awaiting Review => 2.1
Comment:
Weird. I assume that `bp_activity_can_comment()` was a poor-man's way of
checking whether comments could exist for the given activity item. (The
commit message is not very explicit and there is no linked ticket :-/)
IMO, the proper logic is something like: show the activity section if one
of the following is true:
- there are existing comments (which anyone would be able to see, whether
logged in or not)
- the current user is logged in + commenting on this activity item is
permitted (in which case we need to show the comment form)
In other words:
`if ( bp_activity_get_comment_count() || ( is_user_logged_in() &&
bp_activity_can_comment() ) )`
Does that seem right?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5567#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list