Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

 * Adds featherlight data to gallery links
add_filter('wp_get_attachment_link', 'nf_add_rel_attribute');
function nf_add_rel_attribute($link) {
	global $post;
	return str_replace('<a href', '<a data-featherlight="image" href', $link);

One Reply to “Hello world!”

Leave a Reply

Your email address will not be published. Required fields are marked *