i'm trying to create a module that adds a 'new' class to a row based on the date it was published.
So i thought of doing something like
if ($data > 10 days ago){
$this_row addclass new
}
But whats the best way to do this? I would like to put this in a module so i can simply turn it on and off and avoid problems with template files from ds.
I can only find a way using hook_views_pre_render to add a class to all the rows, but nothing about adding it to one specific row. Maybe i need to use another hook?