Now i have this snippet in my functions.php
/**
* Add rel to links.
*/
function add_rel_to_gallery($link) {
return str_replace('<a href=', '<a data-fancybox="true" rel="group" href=', $link);
}
add_filter( 'wp_get_attachment_link', 'add_rel_to_gallery' );
Every link in gallery has rel="group", but actually i want get something like that:
rel="group-$gallery-id"
How do this?