logoAbout Me: I'm a freelance web developer that specializes in WordPress Themes and plugin development. I've written about some of my projects here.
Hire me e-mail

Home / blog / 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.

  • Cool
  • 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?
  • 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.
  • 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.
blog comments powered by Disqus