Support » Plugins and Hacks » Change Action in RSS

Change Action in RSS

  • I’ve got a plugin that works on the_content of a post. I’m wanting to come up with a way to tell whether or not the_content is being generated for display in an RSS reader so I can prevent the plugin from doing some things it would do in a browser. Is there a good way to tell whether or not the post is being generated for the feed?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Look at the source code of the feed output?

    I have not tested it, but I think you should be able to do:

    function your_function()
    global $doing_rss;
    if ($doing_rss == 1)
    // we're doing RSS
    // we're not

    Now, this does assume that you’re giving people the correct feed links. example.com/blog/feed, example.com/blog/feed/atom and so forth..


    That sounds along the line of what I’m looking for. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change Action in RSS’ is closed to new replies.
Skip to toolbar