Lazyest Gallery
[resolved] want null title/alt when caption is blank (3 posts)

  1. kchayka
    Posted 4 years ago #

    I have LG set to use captions instead of folder or file names. On images, if a caption is blank LG is automatically using the file name in the <img> title and alt attributes. I would rather have these as null values instead of showing a meaningless file name. It is most noticeable in the lightbox plugin I'm using (Easy Fancybox). The in-built slide show honors a blank caption but the lightbox doesn't.


  2. Marcel Brinkkemper
    Plugin Author

    Posted 4 years ago #

    please read http://brimosoft.nl/2011/11/28/on-click-do-something-else/
    test if ( '' == $thumb->caption )
    and set $onclick['title'] = '';

  3. kchayka
    Posted 4 years ago #

    Thanks--this works well.

    function my_slide_onclick( $onclick, $slide ) {
    	if ($slide->caption == '') {
    		$onclick['title'] = '';
    	return $onclick;
    add_filter( 'lazyest_slide_onclick', 'my_slide_onclick', 10, 2 );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Lazyest Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.