Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Converts many cases of theme('table') to '#theme' => 'table' in order that hook_page_alter() implementations may customize the output.
Comment | File | Size | Author |
---|---|---|---|
#10 | Picture 15.png | 23.96 KB | moshe weitzman |
#8 | arrays.diff | 15.01 KB | moshe weitzman |
#5 | arrays.diff | 14.57 KB | moshe weitzman |
#3 | arrays.diff | 15.96 KB | moshe weitzman |
arrays.diff | 14.94 KB | moshe weitzman | |
Comments
Comment #2
dmitrig01 CreditAttribution: dmitrig01 commentedWhy __FUNCTION__? Can't you just write the name of the function?
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedSure you could, but it one more thing that can go out of sync. __FUNCTON__ is a convention used by the drupal_static() system so I thought I would use it here. I don't care that though if people think it is too damn ugly.
New patch tries to fix the test failure.
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedHmm. Lets try again.
Comment #7
kika CreditAttribution: kika commentedMe likes it better without __FUNCTION__
Comment #8
moshe weitzman CreditAttribution: moshe weitzman commentednow without __FUNCTON__ and hopefully passing tests.
Comment #9
kika CreditAttribution: kika commentedLooks good to me, nice followup for reducing #markup = theme() in core.
One thing though:
Instead free-hanging description text we now tie it more closely to the respective table but somehow it still feels as an hack.
Table theme function supports "caption" parameter -- what about using that? (I do not know how it would render in different browsers -- needs testing)
So it will become
Comment #10
moshe weitzman CreditAttribution: moshe weitzman commented@kika. didn't look right in the first browser i tried - ffox 3.5. see attached. odd centering of text. perhaps that can be fixed with css, but then we are working too hard IMO.
Comment #11
kika CreditAttribution: kika commentedYep, afaik caption tag is centered by default. Go figure the html 2.x design.
I'd say: keep it in #prefix for now. Followup with new issue "find all ocurrences of caption-able text in core + fix caption styling".
Comment #12
eaton CreditAttribution: eaton commentedI'm giving a big +1 to this -- like so many other parts of D7, this pushes rendering as late into the cycle as possible where it's easier to cache/optimize/alter/etc.
A great demonstration of how the new tweaks to drupal_render() can improve stuff that was previously inaccessible.
Comment #13
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.