Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
follow up #2009580: Replace theme() with drupal_render() in image module
Need replace theme('image', $variables) with drupal_render() in theme_image_style()
Comment | File | Size | Author |
---|---|---|---|
#18 | image-theme-2010134-18.patch | 1.19 KB | pplantinga |
#11 | 2010134-11.patch | 1.62 KB | alphawebgroup |
#5 | 2010134-4.patch | 1.23 KB | alphawebgroup |
#3 | 2010134-3.patch | 1.22 KB | alphawebgroup |
Comments
Comment #1
alphawebgroupstarting in #CodeSprintUA
Comment #2
alphawebgrouptagging
Comment #3
alphawebgroupComment #4
andypostAdd . at the end of each comment
Comment #5
alphawebgroupComment #6
andypostComment #7
podarok#5 looks good
Comment #8
Samvel CreditAttribution: Samvel commentedMay be i not understand, i see that now alt and title missing in image.
Comment #9
alphawebgroupyep, Samvel is right...
needs work..
Comment #10
alphawebgroupIm preparing the new one as suggested by Samvel and Andypost. Will place new patch soon.
Comment #11
alphawebgroupComment #13
andypost4 tests are broken.
trailing whitespace
this could be too expensive!!! (memory)
Comment #14
Samvel CreditAttribution: Samvel commentedThere are drupal_static. Can you advise, how get specified (only one) theme registry?
Comment #15
thedavidmeister CreditAttribution: thedavidmeister commentedFeel free to re-assign this @alweb if you're still working on this.
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedok taking this one for today
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedAs in the #13 comment that this function
$hooks = theme_get_registry(FALSE);
is too expensive.I also have the same question as in #14.Need help in this.for now I unassign this and continue after suggestions.if anyone interested then feel free to work on it.Comment #18
pplantinga CreditAttribution: pplantinga commentedHere's a new patch.
Comment #19
siccababes CreditAttribution: siccababes commentedI tested this patch by creating an article and uploading an image. Everything went fine. Changing to RTBC.
Comment #20
alexpottWhy are we making so many changes here? We seem to be fixing things as well... if so we need tests and to change the title...
This issue should just convert the theme call to drupal_render and a follow up should be filed if there is a bug.
Comment #21
pplantinga CreditAttribution: pplantinga commentedThere's no bug, it just takes many lines of code in this instance to change theme() to drupal_render() because every variable going to drupal_render() has to be declared explicitly.
$image is the array going to drupal_render(), and every variable previously being passed to theme() through the $variables array needs to be transferred explicitly to $image.
Comment #22
jenlampton@pplantinga can you just reroll one more time? remove these lines:
Comment #23
alexpott@jenlampton actually reading @pplantinga comment makes me realise I'm wrong and he is right.
Comment #24
alexpottIt's the problem with arrays of doom :) ... $variables sucks...
Committed e5b7fb4 and pushed to 8.x. Thanks!