[wp-hackers] do_favicon equivalent to do_robotstxt?
Andrew Nacin
wp at andrewnacin.com
Mon Nov 1 22:32:33 UTC 2010
On Mon, Nov 1, 2010 at 6:11 PM, Ken (WraithKenny)
<ken.adcstudio at gmail.com>wrote:
> I was attempting an "apple-touch-icon" and favicon functionality for a
> theme, but evidently, "apple-touch-icon" needs to reside at root; The
> meta tag in head doesn't work. (Also, there was a discussion on
> [theme-reviewers] Themes and Favicons.) This is problematic because as
> far as I know, plugins and themes can't/shouldn't be writing there.
>
> Then I came across the do_robotstxt and it occured to me that a
> version for favicons or sitemaps or anything else would be rather
> useful for those cases, as then when a plugin or theme is no longer
> active, there effects would disappear. From what I gather,
> do_robotstxt simulates the file rather then creating a real file in
> root.
>
> Should something like do_robotstxt for favicons/sitemaps/etc be
> implemented in core for general convienence or is this still something
> belonging to plugins/themes and that plugin/theme devs should work out
> for themselves?
<link rel="apple-touch-icon" href="/images/ios.png" /> has worked fine for
me in the past.
That said, I don't know if this is something for core, necessarily -- this
sounds like something that could be latched onto at template_redirect
provided a rewrite rule offers a query variable.
Favicon requests are actually killed really early in the process, that way
we're not unnecessarily loading WordPress twice. (See wp_favicon_request()).
More information about the wp-hackers
mailing list