bp_nouveau_activity_state()
Output the state buttons inside an Activity Loop.
Description
Source
File: bp-templates/bp-nouveau/includes/activity/template-tags.php
function bp_nouveau_activity_state() {
$activity_id = bp_get_activity_id();
$like_text = bp_activity_get_favorite_users_string( $activity_id );
$comment_count = bp_activity_get_comment_count();
$favorited_users = bp_activity_get_favorite_users_tooltip_string( $activity_id );
?>
<div class="activity-state <?php echo $like_text ? 'has-likes' : '' ?> <?php echo $comment_count ? 'has-comments' : '' ?>">
<a href="javascript:void(0);" class="activity-state-likes">
<span class="like-text hint--bottom hint--medium hint--multiline" data-hint="<?php echo $favorited_users; ?>"><?php echo $like_text ?: '' ?></span>
</a>
<span class="ac-state-separator">·</span>
<a href="#" class="activity-state-comments">
<span class="comments-count"><?php echo $comment_count ? sprintf( _n( '%d Comment', '%d Comments', $comment_count, 'buddyboss' ), $comment_count ) : '' ?></span>
</a>
</div>
<?php
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 3.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.