WordPress.org

Support

Support » Plugins and Hacks » Bootstrap Shortcodes for WordPress » [Resolved] prevent auto include

[Resolved] prevent auto include

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author MW Delaney

    @foolsrun

    Hi, Anisi,
    If you check out the FAQ (http://wordpress.org/plugins/bootstrap-3-shortcodes/faq/) this plugin actually doesn’t include the Bootstrap files at all on the front end. This plugin actually requires the user to be using a theme built with Bootstrap exactly as you suggest.

    This plugin does include the Bootstrap files in the WordPress back-end so that it can style its documentation.

    Are you having a particular problem or conflict with a theme? I’d be happy to take a look.

    thanks for your response.
    but this code is included in the footer:

    <script type='text/javascript' src='http://ituts.ir/wp-content/plugins/bootstrap-3-shortcodes/includes/js/bootstrap-shortcodes-tooltip.js'></script>
    <script type='text/javascript' src='http://ituts.ir/wp-content/plugins/bootstrap-3-shortcodes/includes/js/bootstrap-shortcodes-popover.js'></script>

    Plugin Author MW Delaney

    @foolsrun

    Ah, I see the confusion. Those files contain the triggering code for Tooltip and Popover (see details here and here). This code is not part of the Bootstrap libraries, and, as noted in the Bootstrap documentation:

    Opt-in functionality
    For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

    Since this additional code must be written specifically for the classes or IDs of the tooltip and popover elements, that additional javascript is included in our plugin to match the way we class those components.

    If your theme already includes customized triggering code for Tooltip and Popover that matches the markup generated by this plugin, I would recommend dequeuing those two scripts in your theme’s functions.php:

    wp_dequeue_script( 'bootstrap-shortcodes-tooltip' );
    wp_dequeue_script( 'bootstrap-shortcodes-popover' );

    Plugin Author MW Delaney

    @foolsrun

    I can add that we are investigating conditionally loading these scripts only when one or both of those shortcodes are used on a particular page, but we don’t have a timeframe for when we’ll be able to ship that functionality.

    thank you so much

    Plugin Author MW Delaney

    @foolsrun

    Thank you for using our plugin! If you like it please consider submitting a review here on WordPres.org.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] prevent auto include’ is closed to new replies.
Skip to toolbar