[Plugin: FancyBox2] Suggested patch
-
25,26c25,44 < select.attr('rel', 'fancybox'); < select.fancybox(); --- > select.attr('rel', 'fancybox'); > > select.each(function() { > > var attachmentcontainer = $(this).parent(); > var title = ''; > > if (attachmentcontainer.hasClass('wp-caption')) { > title = attachmentcontainer.children('.wp-caption-text').text(); > } else { > title = $(this).children('img').attr('title'); > } > > $(this).attr('title', title); > > }); > > > select.fancybox(); > 39c57 < ?> \ No newline at end of file --- > ?>
Will search if there is a wp-caption container around link and in that case use the text from caption as slide caption, if not will use the text from img title as caption.
- The topic ‘[Plugin: FancyBox2] Suggested patch’ is closed to new replies.