Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('tribe_event_featured_image', 'tribe_featured_img_link_to_full_size', 10, 4);
- function tribe_featured_img_link_to_full_size($html, $post_id, $size, $image_src) {
- $href_start = strpos($html, '<a href="http');
- $href_end = $href_start ? strpos($html, '"', $href_start + 12) : 0;
- if (false === $href_start) return $html;
- else return substr_replace($html, '<a href="' . $image_src[0], $href_start, $href_end - $href_start);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement