WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. kchayka
    Member
    Posted 2 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.

    http://wordpress.org/extend/plugins/lazyest-gallery/

  2. Marcel Brinkkemper
    Member
    Plugin Author

    Posted 2 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
    Member
    Posted 2 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

About this Topic

Tags

No tags yet.