[wp-hackers] Semantic changes to list_pages and list_categories
in 2.4-bleeding
James R Whitehead
james at interconnectit.com
Thu Feb 14 13:12:19 GMT 2008
Hi,
A very simple solution would be to add
$output = preg_replace("/<\/ul>[\t\n\r ]*<ul>/","",$output);
to wp_list_pages and wp_list_categories in post-template just before the
apply filter. It might be considered a little crude but it would be more
efficient than having a whole load of conditional checks in the walker
class and keeps the walker easier to read.
Just my thoughts on things.
Thanks,
James R Whitehead
email: James at interconnectit.com
URL: http://www.interconnectit.com
Phone: +44 (0)151 709 79 77
Lloyd Budd wrote:
> On Feb 13, 2008 4:49 AM, James R Whitehead <james at interconnectit.com> wrote:
>> Hi,
>>
>> I'm wondering why the html generated by wp_list_pages and
>> wp_list_categories has changed in the current 2.4-bleeding. I know
>> things in this are not set in stone so I'm hoping it's not a permanent
>> change as it makes coding CSS menus that work with 2.3 and 2.4 very
>> difficult especially as child item are no longer in a single container.
>> The new structure also makes less sense semantically as each child is
>> now a separate UL.
>
> Thanks for reporting this James! Hailin is working on a fix now.
> http://trac.wordpress.org/ticket/5844
>
> Thanks again,
More information about the wp-hackers
mailing list