Update
-
Hi sators,
A better implementation would be by subscribing to the “post_gallery” filter:
function gallery_link_none($output, $attr = array()) { if (isset($attr["link"]) && $attr["link"] == "none") return preg_replace(array('/<a[^>]*>(<img[^>]*>)<\/a>/'), '$1', $output); return $output; } add_filter('post_gallery', 'gallery_link_none', 10001, 2);
This way it works with custom gallery plugins and also addresses the issue found by “livesimplybyannie”.
Can you please update the plugin?
Cheers,
Kasparshttps://www.ads-software.com/extend/plugins/gallery-linknone/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Update’ is closed to new replies.