WordPress.org

Ready to get started?Download WordPress

Forums

File Gallery
[resolved] Option to set "display caption" to always on by default (6 posts)

  1. jardokraka
    Member
    Posted 3 years ago #

    i wonder if i'm missing a setting somewhere, but what i'd like achieve is to have an option to set "display caption" to always on by default, just as we can set default settings for alignment and other things which can be overridden on a per case basis in the post/page file gallery block.

    in other words, i'm looking for a way to make file gallery always add single images with a caption as long as this particular attachment has caption text.

    thanks for your help. words fail to describe how i love this plugin :).

  2. Aesqe
    Member
    Plugin Author

    Posted 3 years ago #

    @jardokraka: thanks for the compliment :)

    I've just released File Gallery 1.6.5.2 and the 'display caption' option should now be checked by default (and it should've been ever since I've added it, as WordPress adds captions by default).

    I'll add it as a config option on the media settings page in the next version.

  3. jardokraka
    Member
    Posted 3 years ago #

    thanks alot, v1.6.5.2 resolves this issue.

  4. jardokraka
    Member
    Posted 3 years ago #

    actually, not 100% :).

    'display caption' is now checked by default, as per my request, but this results in unwanted behavior (in my view).

    i attach an image, and i do not set any caption in its metadata, the caption field is empty — only the title and alt fields are filled out.

    then when i click 'insert attachment as single image', the inserted code is as follows:

    [caption id="attachment_458" align="aligncenter" width="520" caption=""]<img src="http://www.site.com/wp-content/uploads/2010/12/blah.jpg" alt="blah" title="blah" width="520" height="397" class="aligncenter size-medium wp-image-458" />[/caption]

    it inserts an empty caption, while i believe it shouldn't insert anything caption-related as long as the caption field was left empty in meta settings.

    i'd be interested in hearing your thoughts on the matter :).

    thanks.

  5. Aesqe
    Member
    Plugin Author

    Posted 3 years ago #

    @jardokraka: eh, yes, that shouldn't be happening and I'll correct it in next version :)

    The good news is:
    a) WordPress' editor JavaScript will strip the caption tag if its contents are empty
    b) the caption shorttag function will not display the caption if its contents are empty

  6. Aesqe
    Member
    Plugin Author

    Posted 3 years ago #

    fixed in v1.6.5.3 :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic