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

Mark Shields laebshade at gmail.com
Mon Oct 11 22:31:52 UTC 2004


Except that   isn't the same size as a real space (in most
cases).  Plus,   takes up more code than just " ".  And, spaces
make it much easier to read.  Picky, yes, but technically correct.


On Mon, 11 Oct 2004 15:18:57 -0700, BoBB <rjorgy at gmail.com> wrote:
> 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
>  */
> 
> 
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
- Mark Shields



More information about the hackers mailing list