Beispiel #1
0
 function hooks_with_activation()
 {
     wp_enqueue_script('fotosmail', PL_CHILD_URL . '/assets/js/fotosmail.js', array('jquery'), $this->version, true);
     wp_localize_script('fotosmail', 'fotosmail', array('ajaxurl' => admin_url('admin-ajax.php')));
     if (!function_exists('pl_detect_ie')) {
         return;
     }
     $ie_ver = pl_detect_ie();
     if ($ie_ver < 10) {
         wp_enqueue_script('formalize', PL_CHILD_URL . '/assets/js/formalize.min.js', array('jquery'), $this->version, true);
     }
 }
Beispiel #2
0
 function __construct()
 {
     global $wp_scripts, $dmspro_plugin_url;
     // no dms? OH NOES!
     if (!function_exists('pl_detect_ie')) {
         return false;
     }
     $this->urls = array($dmspro_plugin_url . 'libs/js/html5.min.js', $dmspro_plugin_url . 'libs/js/respond.min.js', $dmspro_plugin_url . 'libs/js/selectivizr-min.js');
     $this->ie_ver = pl_detect_ie();
     $this->useragent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
     $settings = wpsf_get_settings('../settings/settings-general.php');
     if (isset($settings['settingsgeneral_browsercss_css-type']) && 'js' == $settings['settingsgeneral_browsercss_css-type']) {
         wp_register_script('browser-detect', $dmspro_plugin_url . 'libs/js/browser.js', array('jquery'));
         wp_enqueue_script('browser-detect');
         add_action('wp_head', array($this, 'hack_scripts'), 25);
     } else {
         add_filter('body_class', array(&$this, 'body_class'));
         add_action('the_html_tag', array($this, 'add_ie_class'));
         add_action('wp_head', array($this, 'hack_scripts'), 25);
     }
 }
/**
 *
 *  Fix IE to the extent possible
 *
 *  @package PageLines Framework
 *  @subpackage Functions Library
 *  @since 1.3.3
 *
 */
function pagelines_fix_ie()
{
    $ie_ver = pl_detect_ie();
    if (ploption('google_ie') && $ie_ver < 9) {
        $compat = sprintf('//ie7-js.googlecode.com/svn/version/2.1(beta4)/IE%1$s.js', $ie_ver + 1);
        $shiv = '//html5shim.googlecode.com/svn/trunk/html5.js';
        wp_enqueue_script('ie-compat', $compat);
        wp_enqueue_script('html5shiv', $shiv);
    }
    // If IE7 add the Internet Explorer 7 specific stylesheet
    if ($ie_ver == 7) {
        wp_enqueue_style('ie7-style', PL_CSS . '/ie7.css', array(), PL_CORE_VERSION);
    }
}