Support » Plugins » My plugin is choking on bloginfo(url)

  • Ok. Today I’m writing my first plugin. It’s pretty simple: after each post, display a link to a url with the name of the blog, url, and post_ID.

    But it keeps choking when it hits the part for

    <?php bloginfo('url'); ?>

    Here is the complete code:

    function retweet ($content) {
    	$content = $content . '<a>+<?php bloginfo('url'); ?>/?p=<?php the_ID(); ?>">Retweet</a>';
    	return $content;
    }
    
    add_filter('the_content', 'retweet');
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘My plugin is choking on bloginfo(url)’ is closed to new replies.