[wp-hackers] page functions (was $single)

Stephen O'Connor steve at stevarino.com
Mon Jun 21 07:59:26 UTC 2004


An author-specific naming confention is a really good idea. I call "soc_*".
;)

Not only will it avoid conflicts, but it could help identify contributors in
the long run (okay, weak point... just do it to avoid conflicts).

- Stephen.

-----Original Message-----
From: hackers-bounces at wordpress.org
[mailto:hackers-bounces at wordpress.org]On Behalf Of Markku Seguerra
Sent: Monday, June 21, 2004 3:39 AM
To: hackers at wordpress.org
Subject: [wp-hackers] page functions (was $single)


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


_______________________________________________
hackers mailing list
hackers at wordpress.org
http://wordpress.org/mailman/listinfo/hackers_wordpress.org




More information about the hackers mailing list