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.
After finally getting around to using hook_views_post_render() as per the example I noticed a horrible error in the example. Instead of the $replace_pairs array parameter being an associative array it is an indexed array, which means any occurrence of the string "0" in $output will be replaced by "
" and likewise for the string "1" by "output for FIELD of nid 1".
Anyway, patch attached.
Comment | File | Size | Author |
---|---|---|---|
Fix-strtr-example-in-views.api_.php_.patch | 867 bytes | mstrelan | |
Comments
Comment #1
tim.plunkettGood catch!
Comment #2
dawehnerLooks perfect, thanks!
Committed to 7.x-3.x