Plugin Directory

Changeset 1252004


Ignore:
Timestamp:
09/23/2015 01:08:56 PM (11 years ago)
Author:
Studiofreya
Message:

Bootstrap libraries for themes without bootstrap framework.

Location:
sf-bootstrap-menu/trunk
Files:
16 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • sf-bootstrap-menu/trunk/sf-menu.php

    r1242643 r1252004  
    44 * Plugin URI: http://studiofreya.com/sf-bootstrap-menu
    55 * Description: Responsive menu for pages and posts with Bootstrap 3.0
    6  * Version: 1.0
     6 * Version: 1.1
    77 * Author: Studiofreya AS
    88 * Author URI: http://studiofreya.com
     
    2020
    2121function sf_menu_load_scripts() {
    22     wp_enqueue_style('sf_menu_style', plugins_url() . '/sf-bootstrap-menu/style.css' );
     22    wp_enqueue_style('sf_menu_style', plugins_url() . '/sf-bootstrap-menu/css/style.css' );
     23   
     24    $bootstrap = 'bootstrap';
     25    if( ( ! wp_style_is( $bootstrap, 'queue' ) ) && ( ! wp_style_is( $bootstrap, 'done' ) ) ) {
     26        wp_enqueue_style( $bootstrap, plugins_url() . '/sf-bootstrap-menu/css/bootstrap.min.css' );
     27    }
     28       
     29    $style_font = 'font-awesome';
     30    if( ( ! wp_style_is( $style_font, 'queue' ) ) && ( ! wp_style_is( $style_font, 'done' ) ) ) {
     31        wp_enqueue_style( $style_font, plugins_url() . '/sf-bootstrap-menu/css/font-awesome.min.css' );
     32    }
     33   
     34    if ( (!wp_script_is( $bootstrap, 'queue' ) ) && ( ! wp_script_is( $bootstrap, 'done' ) ) )  {
     35       wp_register_script( 'sf-bootstrap', plugin_dir_url(__FILE__).'js/bootstrap.min.js');
     36       wp_enqueue_script( 'sf-bootstrap' );
     37    }
    2338}
    2439add_action( 'wp_enqueue_scripts', 'sf_menu_load_scripts' );
     
    3146add_action('plugins_loaded', 'sf_bootstrap_menu_load');
    3247
    33 
    3448?>
Note: See TracChangeset for help on using the changeset viewer.