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

Dennis Williamson dennis at netstrata.com
Mon Oct 11 23:05:59 UTC 2004


Look at your "view source". In your first example, you'll see 
ampersand-space-space. In your second, you'll see 
nbsp-ampersand-nbsp-space. Now look at the code for the_category() in the diff:

Original (from CVS):
-            if (0 < $i) $thelist .= $seperator . ' ';

Mine:
+            if (0 < $i) $thelist .= $seperator;

The original concatenates a space onto every separator, no matter what you 
pass to the function.

Dennis

At Monday 10/11/2004 05:18 PM, you 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;'); ?>






More information about the hackers mailing list