[wp-hackers] Disabling Feeds
Carthik Sharma
carthik at gmail.com
Tue Sep 13 18:47:33 GMT 2005
Forgive me for top-posting, but it would be a better fix to make the feed
files also behave like, say the blog main page does - there is no reason for
them not to, since they deliver content too. Adding some of the hooks that
exist in the header for a normal page would be all that is needed for this
(like 'init').
Carthik.
On 9/12/05, Sam Angove <peasant at gmail.com> wrote:
>
> On 9/13/05, Trevor Turk <trevorturk at yahoo.com> wrote:
> > I was looking into plugins, and I think I have
> > something here that would work. Here's the content of
> > it:
>
> I haven't tested this at all either, but I'm pretty sure it's a better
> place to hook the plugin in. :)
>
> function disable_feed() {
> if (is_feed()) {
> // authenticate, set a 403/404, die() or whatever
> }
> }
> add_action('template_redirect', 'disable_feed');
>
> Authentication probably isn't worth the trouble.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
When nothing is done, nothing is left undone -- 老子 Lǎozi
University of Central Florida
Homepage: http://carthik.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-hackers/attachments/20050913/71c7c887/attachment.htm
More information about the wp-hackers
mailing list