• Resolved ncsumarit

    (@ncsumarit)


    Love the plugin, thanks!

    I had been using the pervious version with some extra styling to give the .carousel-caption class a background color. This was ideal up to version 1.9 since the .carousel-caption class didn’t pass if there was no slider title or content. The image was left pristine for those who didn’t want to add text.

    However with 1.9.1 the class is being delivered each time. Even when we leave titles and content/caption area blank, and/or when we set the settings for “Show Slide Titles / Captions?” to “Hide” the .carousel-captions class is still passing to the live site.

    Have a site using 1.9 that you can see here: http://dance.arts.ncsu.edu/. This site is using 1.9.1 and I’ve hidden the fields with CSS but they’re still in the code: http://cdc.dasa.ncsu.edu/.

    Thanks.

    https://wordpress.org/plugins/cpt-bootstrap-carousel/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Phil Ewels

    (@tallphil)

    Hi ncsumarit,

    Thanks for the report – I had a quick look at your code and I think that this is happening because you have a link set for the images.

    The code responsible for this decision is here. It’s a bit of a horrible line as it stands, it’s easier to understand with some extra spacing:

    if
      (
        (
          $atts['showtitle'] === 'true' && strlen($image['title']) > 0
        ) || (
          $atts['showcaption'] === 'true' && strlen($image['content']) > 0
        ) || (
          $image['url'] && $atts['link_button'] == 1
        )
      )
    {

    In other words, the caption area is shown if there is a title (and ‘show title’ is turned on), or if there is a caption (and ‘show caption’ is turned on), or if there is an image (and ‘link button’ is switched on).

    Your second link has no title or caption, but it does have a link. So I suspect that if you disable the “Link Buttons” option in the settings, you will go back to having the same behaviour as before. Let me know if this isn’t the case, and I’ll look into it again.

    Cheers,

    Phil

    Plugin Author Phil Ewels

    (@tallphil)

    ..that extra spacing also shows nicely that I have a redundant set of brackets in there!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hide functionality not working’ is closed to new replies.