Replace Default Comment Button on Activity Feed with Font Awesome Icon
-
Hi,
I want to replace the default comment button (.bp-primary-action) on the activity feed with a font awesome icon. I was able to find a function for the delete button (.bp-secondary-action) that is working just fine. However, my attempts to rework this function to apply to the comment button has not worked. I’m hoping someone could take a look and offer some ideas for a solution.
The original WORKING function which for the delete button replacement can be found below with it’s source:
function sc_swap_delete_text( $link ) { $trash = '<i class="icon-trash icon-large"></i>'; $link = str_replace("Delete", $trash, $link); return $link; } add_filter( 'bp_get_activity_delete_link', 'sc_swap_delete_text', 1, 1 );
source: https://buddypress.org/support/topic/font-awesome-breaks-ajax-on-delete-link/
Below is the NON-FUNCTIONING example of the function I’ve been attempting. I’m looking for some ideas on a fix here:
function sc_swap_comment_text( $link ) { $fareply = '<i class="icon-fa fa-reply"></i>'; $link = str_replace("Comment ", $fareply, $link); return $link; } add_filter( 'bp_get_activity_comment_link', 'sc_swap_comment_text', 1, 1 );
Regards,
- You must be logged in to reply to this topic.