Post Title in RSS comment feed plugin

I just posted a Wordpress plugin that will now include the post title in Comment RSS feed. I talked about this earlier and then Jared sneaked in and made a quick plugin. I wish he hadn’t but it did help me because instead of searching for the code I now just had to look at what he did. But to clarify, I didn’t just rip Jared’s Plugin, I really didn’t; I am using more code from the hack I found then what he wrote, and I improved the formating a little.
So there, thanks Jared, maybe now I can get 80k a month.

About the Author, Dan Cameron:

I'm the owner and solution engineer at Sprout Venture, a web solutions company that specializes in web development including WordPress.

I started my first blog in 2003 and transitioned to WordPress in 2004. Since moving to WordPress I've written a few plugins and themes for public consumption. Lately I'm busy engineering/building/coding and have only been able to share a few code snippets.

If you're in need of some web development, web design or custom WordPress plugins and/or themes contact me, I'll be happy to discuss it with you.

Read More »

  • mine. I'm suing you for copyright violation.

    As for echo vs. return, it is kind of a matter of preference - the WP code itself uses both, kind of randomly. The difference is yours will always output when the code is run, whereas mine returns the string to the calling function, which in this case is the filter method for 'comment_author_rss', which is programed to add anything your filter method returns. Yours will work because even though it's not returning everything, it is echoing (outputting to the browser) as it processes.

    The advantage to doing return instead of echo is that if you want to use that method for something else (just to get the value, not write it) you could just reuse that method without making a new one.
  • I'm using it, thanks guys. I did move the echo (actually I changed it to a return) outside the if statement just in case is_post() and is_single() both return true and we don't execute that chunk of code. I don't know a lick about PHP and very little about wordpress so it might not matter but anyway, thanks.
  • Dan
    Since I was trying to create the plugin exactly how I would have done it without the help of your plugin, I didn't understand one thing; echo and response. You used response to display the output and I used echo (like the hack), is that wrong? What is the difference?
  • Cool
blog comments powered by Disqus