[wp-hackers] Proposed: the_category() - improved separator flexibilty

BoBB rjorgy at gmail.com
Mon Oct 11 22:18:57 UTC 2004


The version of wordpress I have, 1.2.1(but also worked with 1.2) can
already do that, I use the following code ...

<?php the_category(' &amp; '); ?>

and it works fine, always has. or in addition you could do

<?php the_category('&nbsp;&amp;&nbsp;'); ?>


On Mon, 11 Oct 2004 17:21:08 -0400, Mark Jaquith
<mark.wordpress at txfx.net> wrote:
> Dennis Williamson wrote:
> 
> > I've attached a diff that makes some changes to the_category() in
> > template-functions-category.php CVS revision 1.39..
> >
> > It changes the handling of $seperator to improve flexibility to the
> > user. Calls to the_category() can specify a separator including spaces
> > or not.
> >
> > Examples:
> >
> >     the_category('/'); produces Blog/Category
> >
> >     the_category(" / "); produces Blog / Category
> >
> > Before, the spaces were hard-coded in the function and couldn't be
> > overridden.
> 
> Good call!  That was one of the first WP hacks I ever did... I wanted to
> display:    "Category1" :: "Category2" :: "Category3"           but
> couldn't, because of the spaces.
> 
> I think that in general, spaces shouldn't be assumed.  It is far too
> limiting.
> 
> 
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
/* BoBB
 * AIM: Jodokast49 ICQ: 151495596
 * Jabber: BoBB at jabber.com
 * http://myeurotrip.org
 */



More information about the hackers mailing list