Plugin Directory

Changeset 1036838


Ignore:
Timestamp:
12/02/2014 04:37:07 PM (11 years ago)
Author:
FoolsRun
Message:

Release version 3.3.1

Location:
bootstrap-3-shortcodes/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bootstrap-3-shortcodes/trunk/bootstrap-shortcodes.php

    r1035086 r1036838  
    44Plugin URI: http://wp-snippets.com/freebies/bootstrap-shortcodes or https://github.com/filipstefansson/bootstrap-shortcodes
    55Description: The plugin adds a shortcodes for all Bootstrap elements.
    6 Version: 3.3
     6Version: 3.3.1
    77Author: Filip Stefansson, Simon Yeldon, and Michael W. Delaney
    88Author URI:
     
    3838    add_action( 'init', array( $this, 'add_shortcodes' ) );
    3939    add_action( 'wp_enqueue_scripts', array( $this, 'bootstrap_shortcodes_scripts' ), 9999 ); // Register this fxn and allow Wordpress to call it automatcally in the header
    40   }
    41 
    42   function bootstrap_shortcodes_scripts()  {
    43 
    44     // Bootstrap tooltip js
    45     wp_enqueue_script( 'bootstrap-shortcodes-tooltip', BS_SHORTCODES_URL . 'js/bootstrap-shortcodes-tooltip.js', array( 'jquery' ), false, true );
    46    
    47     // Bootstrap popover js
    48     wp_enqueue_script( 'bootstrap-shortcodes-popover', BS_SHORTCODES_URL . 'js/bootstrap-shortcodes-popover.js', array( 'jquery' ), false, true );
    49 
    50     // Bootstrap scrollspy js
    51     //wp_enqueue_script( 'bootstrap-shortcodes-scrollspy', BS_SHORTCODES_URL . 'js/bootstrap-shortcodes-scrollspy.js', array( 'jquery' ), false, true );
    52 
     40    add_action( 'the_post', array( $this, 'bootstrap_shortcodes_tooltip_script' ), 9999 ); // Register this fxn and allow Wordpress to call it automatcally in the header
     41    add_action( 'the_post', array( $this, 'bootstrap_shortcodes_popover_script' ), 9999 ); // Register this fxn and allow Wordpress to call it automatcally in the header
     42  }
     43
     44  function bootstrap_shortcodes_tooltip_script()  {
     45      global $post;
     46      if( has_shortcode( $post->post_content, 'tooltip')){
     47          // Bootstrap tooltip js
     48          wp_enqueue_script( 'bootstrap-shortcodes-tooltip', BS_SHORTCODES_URL . 'js/bootstrap-shortcodes-tooltip.js', array( 'jquery' ), false, true );
     49      }
     50  }
     51   
     52  function bootstrap_shortcodes_popover_script()  {
     53      global $post;
     54      if( has_shortcode( $post->post_content, 'popover')){
     55          // Bootstrap popover js
     56          wp_enqueue_script( 'bootstrap-shortcodes-popover', BS_SHORTCODES_URL . 'js/bootstrap-shortcodes-popover.js', array( 'jquery' ), false, true );
     57      }
    5358  }
    5459
  • bootstrap-3-shortcodes/trunk/readme.txt

    r1035086 r1036838  
    44Requires at least: 3.8
    55Tested up to: 4.0
    6 Stable tag: 3.3
     6Stable tag: 3.3.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.