[wp-hackers] page functions (was $single)
Markku Seguerra
markku at rebelpixel.com
Mon Jun 21 07:39:25 UTC 2004
Ryan Boren wrote:
>
> Here's what I have:
>
> is_single()
> is_date()
> is_category()
> is_author()
> is_archive() = date || category || author
> is_search()
> is_feed()
>
> These return true or false.
Nice, nice. I've been doing a plugin for this actually,
which I'm using on my weblog, with functions:
rp_if_frontpage()
rp_if_entry()
rp_if_category()
rp_if_search()
rp_if_monthly()
rp_if_weekly()
rp_if_author()
All of them return true or false, depending on where
you are in your weblog. I'm still sticking to my function
naming convention for WP, by adding prefix *rp_* to all
my functions to avoid collisions with other plugin
writers.
As a side note, I think plugin writers *should* adapt
a naming convention to identify and isolate their
functions from the buit-in ones and those from other
plugins.
--
markku
rebelpixel.com
More information about the hackers
mailing list