• Resolved studio4

    (@studio4)


    Hello,

    Great plugin – I do have a suggestion though:

    It would be very useful if you could choose, from within the carousel settings, if you wish to control the carousel with data-attributes or the script block. In the theme we are working on the script block found on line 746 of cpt-bootstrap-carousel.php causes a javascript error since bootstrap is loaded in the footer:

    <script type="text/javascript">
    jQuery(document).ready(function() {
    jQuery('#cptbc_<?php echo $id; ?>').carousel({
    	interval: <?php echo $atts['interval']; ?>
    	});
    });
    </script>

    As it’s possible to set the interval with a data attribute e.g. data-interval=”” http://getbootstrap.com/javascript/#carousel-options I would propose it is either replaced with a data attribute or at least controlled from within the settings page.

    Many thanks

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

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

    (@tallphil)

    Hi studio4,

    Thanks for the feedback – you’ll be pleased to hear that I have actually already implemented exactly this feature! It’s in the beta version of the next release, available on github: https://github.com/ewels/cpt-bootstrap-carousel

    In that version there is an option in the settings as to whether to use the javascript or not.. I really need to release it soon, I keep telling people to use the beta. I’ll try to find time when I can 🙂

    Phil

    Plugin Author Phil Ewels

    (@tallphil)

    To follow up – I just released an update on wordpress.org, so you can update through normal procedures to get this now.

    Phil

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

The topic ‘Make script block optional via settings’ is closed to new replies.