Forked from corsonr/Add rel attribute to wordpress gallery
Last active
December 17, 2015 03:58
-
-
Save gasatrya/5546948 to your computer and use it in GitHub Desktop.
Add rel attribute to WordPress gallery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('wp_get_attachment_link', 'rc_add_rel_attribute'); | |
function rc_add_rel_attribute($link) { | |
global $post; | |
return str_replace('<a href', '<a rel="prettyPhoto[pp_gal]" href', $link); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment