Skip to content

Commit

Permalink
Merge pull request #15 from mistergiri/master
Browse files Browse the repository at this point in the history
Added filters and actions for whoop theme compatibility
NomadDevs authored and NomadDevs committed Sep 14, 2015
2 parents 6e44fb3 + e8039ee commit 0c38628
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 5 additions & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
v0.0.9
Changed textdomain from defined constant to a string - CHANGED
Added filters and actions for whoop theme compatibility - ADDED
Notification not showing properly - FIXED

v0.0.8
Option added to enable/disable activity component - ADDED
Option added to enable/disable notifications component - ADDED
Added placeholder text to message textarea - ADDED
Compliments in activity dropdown filter is ambiguous - FIXED
Undefined property ID notice - FIXED
Changed textdomain from defined constant to a string - CHANGED

v0.0.7
Compliments can be renamed to anything Ex: "Gifts" - ADDED
5 changes: 4 additions & 1 deletion includes/bp-compliments-notifications.php
Original file line number Diff line number Diff line change
@@ -98,7 +98,10 @@ function bp_compliments_format_notifications( $action, $item_id, $secondary_item
*/
return apply_filters( 'bp_compliments_new_compliment_notification', '<a href="' . $link . '">' . $text . '</a>', $total_items, $link, $text, $item_id, $secondary_item_id );
} else {
return false;
return apply_filters( 'bp_compliments_new_toolbar_compliment_notification', array(
'link' => $link,
'text' => $text
), (int) $total_items, $item_id );
}
}

8 changes: 5 additions & 3 deletions includes/templates/buddypress/members/single/compliments.php
Original file line number Diff line number Diff line change
@@ -95,12 +95,14 @@ class='preview-upload'/>
<div class="comp-user-avatar">
<?php
$user = get_user_by('id', $author_id);
$name = $user->display_name;
$user_link = bp_core_get_user_domain($author_id);
$name = apply_filters('bp_compliments_item_user_name', $user->display_name, $user);
$user_link = apply_filters('bp_compliments_item_user_link', bp_core_get_user_domain($author_id), $author_id);
$avatar_size = apply_filters('bp_compliments_item_user_avatar_size', 60);
?>
<?php echo get_avatar($author_id, 60); ?>
<?php echo get_avatar($author_id, $avatar_size); ?>
<div class="comp-username">
<a href="<?php echo $user_link; ?>" class="url"><?php echo $name; ?></a>
<?php do_action('bp_compliments_after_user_name', $author_id); ?>
</div>
</div>
</div>

0 comments on commit 0c38628

Please sign in to comment.