Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
without hacking the file itself.
That’s a very good idea, give this article a read. It might help.
http://www.catswhocode.com/blog/how-to-overwrite-wordpress-core-functions
Ended up overriding get_attachment_link instead. There appears to be a filter for it. Don’t 100% understand it but it works!
function custom_get_attachment_link($result='', $id = false) {
//NEW CODE IN HERE///////////////////////////////
return apply_filters('custom_get_attachment_link', $link, $id);
}
add_filter('attachment_link', 'custom_get_attachment_link', 1, 2);
That article doesn’t do anything when applied to this situation.
But, dude – surfgatinho – that works! Dude, I owe you one!!!
How did you figure this out? If you could post how you figured this out – train of thought, and give a little explanation, that would be amazing. And, let me know if there’s any way that I can help you with anything!
Thanks!
JC