[wp-hackers] user_trailingslashit()?

Austin Matzko if.website at gmail.com
Tue Dec 8 06:02:31 UTC 2009


On Mon, Dec 7, 2009 at 11:57 PM, Mike Schinkel
<mikeschinkel at newclarity.net> wrote:
> So here's another question; what exactly is user_trailingslashit() for and how are they supposed to be used?  Google is decidedly *not* my friend here and reading the code does me little better.

One blog might want the permalink structure to be

/%year%/%monthnum%/%day%/%postname%/  (trailing slash)

another might want instead

/%year%/%monthnum%/%day%/%postname%  (no trailing slash).

user_trailingslashit() makes whatever URL you pass to it consistent
with that preference as set in Settings > Permalinks.

Does that make sense?


More information about the wp-hackers mailing list