I'm trying to create a Wordpress plugin that adds a button below all posts. The button is a "Like" button that pass some parameters through the URL to a new site.
The parameters are Wordpress permalink, title, and blog name.
Can't make it work.
function add_bloglovin($content) {
$blog_title = get_bloginfo('name');
$link = the_permalink();
$title = the_title();
$bloglovin ="<br><a href=\"http://www.bloglovin.com/like/?b=$blog_title&p=$link&t=$title\" onclick=\"window.open(this.href, 'bloglovin_like', 'width=480,height=320, toolbar=0, location=0, menubar=0, scrollbars=0, status=0'); return false;\"><img src=\"http://www.bloglovin.com/widget/bilder/like.gif\"></a>";
return $content .$bloglovin;
}
add_filter('the_content', add_bloglovin);