Last active
December 22, 2015 01:09
-
-
Save messaoudi-mounir/6394672 to your computer and use it in GitHub Desktop.
Buddypress Add a Facebook Like/Unlike button to activity stream items.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* bp_like_button() | |
* | |
* Outputs the Facebook 'Like/Unlike' . | |
* | |
*/ | |
function bp_like_button( $id = '', $type = '' ) { | |
$activity_permalink = bp_get_activity_thread_permalink(); | |
; | |
?> | |
<!-- your iframe code, replace href=http://www.link_used_for_generation.com by href=<?php echo echo $activity_permalink; ?> --> | |
<?php | |
} | |
add_filter( 'bp_activity_entry_meta', 'bp_like_button' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment