[wp-hackers] Semantic changes to list_pages and list_categories
in 2.4-bleeding
James R Whitehead
james at interconnectit.com
Wed Feb 13 17:20:17 GMT 2008
Hi,
I was already looking at the walker class, the problem seems to lie at
line 445. It calls the end level function if the depth is greater than
zero rather than checking that the level is less than the level on last
run through. For eg if the depth on last run though was 3 and the depth
on this run through is also 3 then it should be called, if on the next
run through the depth changes to 2 then we should call it if it goes up
to 4 we should not. I'm not sure if this would cause problems for the
none UL LI version of the page and cat lists.
Thanks,
James R Whitehead
email: James at interconnectit.com
URL: http://www.interconnectit.com
Phone: +44 (0)151 709 7977
Otto wrote:
> This is almost certainly due to one of the changes to the walker
> classes. There have been quite a few.
>
> http://trac.wordpress.org/log/trunk/wp-includes/classes.php
>
>
> On Feb 13, 2008 8:22 AM, Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>
>> James R Whitehead wrote:
>> | 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.
>> |
>> | Changed from:
>> |
>> | <ul>
>> | <li>
>> | Text
>> | <ul>
>> | <li>text</li>
>> | <li>text</li>
>> | <li>text</li>
>> | <ul>
>> | </li>
>> | </ul>
>> |
>> | To:
>> |
>> | <ul>
>> | <li>
>> | Text
>> | <ul>
>> | <li>text</li>
>> | <ul>
>> | <ul>
>> | <li>text</li>
>> | <ul>
>> | <ul>
>> | <li>text</li>
>> | <ul>
>> | </li>
>> | </ul>
>> |
>>
>> I can't think of a technical reason for that change to have been
>> implemented.
>>
>> Could you raise a ticket on trac (and write a patch if you can track
>> down what has changed to cause this)
>>
>> westi
>> - --
>> Peter Westwood
>> http://blog.ftwr.co.uk | http://westi.wordpress.com
>> ~ C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.7 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFHsvqwVPRdzag0AcURAtIWAKCug0nBdG0CCAYpoq16WEpIhzxPYgCfc6CC
>> hIg+ryhwNOHdl5+3mWrKNwE=
>> =ve1o
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list