1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
<?php
namespace hji\membership\controllers;
use \hji\membership\Membership;
class CommonScripts
{
const IN_FOOTER = true;
static function register()
{
$require = Membership::getInstance()->requireJs;
if (!is_admin())
{
wp_register_style('hji-bootstrap', Membership::$url . '/third-party/hji-bootstrap/hjitb.min.css', array(), false);
wp_register_script('hji-bootstrap', Membership::$url . '/third-party/hji-bootstrap/hjitb.min.js', array('jquery'), false, true);
}
$require->addPath('hji-membership', Membership::$url . '/resources/scripts/build/');
$require->addPath('hji-common', Membership::$url . '/resources/scripts/build/components');
wp_register_style('hji-common', Membership::$url . '/resources/styles/common.min.css');
wp_register_script('google-maps-api', 'http://maps.googleapis.com/maps/api/js?sensor=true&libraries=drawing&callback=google_maps_loaded', array(), 'latest', self::IN_FOOTER);
$require->addPath('bxslider', Membership::$url . '/third-party/bxslider/jquery.bxslider.min');
$require->addPath('colorbox', Membership::$url . '/third-party/colorbox/jquery.colorbox-min');
wp_register_style('font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), 'latest');
$require->addPath('selectize', Membership::$url . '/third-party/selectize/js/standalone/selectize.min');
}
}