コード例 #1
0
function seed_cspv4_mymail_head($output)
{
    require_once SEED_CSPV4_PLUGIN_PATH . 'lib/seed_cspv4_lessc.inc.php';
    global $seed_cspv4;
    extract($seed_cspv4);
    $css = "\n  @primaryColor: {$button_font['color']};\n  @secondaryColor: darken(@primaryColor, 15%);\n  .mymail-wrapper label{\n    font-weight:normal;\n  }\n  .seed-csp4 input{\n    border-width:1px;\n    border-radius: 4px;\n  }\n  .submit-button:hover{\n    background:@secondaryColor !important;\n  }\n  .submit-button{\n    border-radius: 4px;\n  }\n  .mymail-form-info p{\n    color: #fff !important;\n  }\n  .mymail-wrapper{\n    margin-bottom:10px;\n  }\n\n  ";
    ob_start();
    $less = new seed_cspv4_lessc();
    $style = $less->parse($css);
    echo $style;
    $new_output = ob_get_clean();
    $output .= '<style>' . $new_output . '</style>';
    return $output;
}
コード例 #2
0
function seed_cspv4_head($echo = true)
{
    require_once SEED_CSPV4_PLUGIN_PATH . 'lib/seed_cspv4_lessc.inc.php';
    global $seed_cspv4;
    $seed_cspv4 = get_option('seed_cspv4');
    extract($seed_cspv4);
    $output = '';
    // Enable wp_head if GF is the selected list
    $enable_wp_head_footer_list = apply_filters('seed_cspv4_enable_wp_head_footer_list', array());
    if (in_array($emaillist, $enable_wp_head_footer_list)) {
        $enable_wp_head_footer = '1';
    }
    // Check if wp_head is enabled
    if (!empty($enable_wp_head_footer)) {
        $output .= "<!-- wp_head() -->\n";
        ob_start();
        if ($emaillist == 'gravityforms') {
            if (class_exists('RGFormsModel')) {
                gravity_form_enqueue_scripts($gravityforms_form_id, false);
            }
        }
        wp_enqueue_script('jquery');
        wp_head();
        $output = ob_get_clean();
    }
    // Facebook Thumbnail
    if (!empty($seo_title)) {
        $seo_title = esc_html($seo_title);
    } else {
        $seo_title = get_bloginfo('name', 'display');
    }
    if (empty($seo_description)) {
        $seo_description = '';
    }
    $output .= '<meta property="og:url"           content="' . seed_cspv4_ref_link() . '" />';
    $output .= '<meta property="og:type"          content="website" />';
    $output .= '<meta property="og:title"         content="' . $seo_title . '" />';
    $output .= '<meta property="og:description"   content="' . $seo_description . '" />';
    if (!empty($facebook_thumbnail)) {
        $output .= '<meta property="og:image" content="' . esc_url($facebook_thumbnail['url']) . '" />' . "\n";
    }
    // Output Google Font Links
    $output .= seed_cspv4_get_google_font_css(array($text_font, $headline_font, $button_font));
    // Output Font Awesome
    $output .= "<!-- Font Awesome CSS -->" . PHP_EOL;
    $output .= '<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">' . PHP_EOL;
    // Boostrap and default Styles
    $output .= "<!-- Bootstrap and default Style -->\n";
    $output .= '<link rel="stylesheet" href="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/bootstrap/css/bootstrap.min.css">' . "\n";
    $output .= apply_filters('seed_cspv4_default_stylesheet', '<link rel="stylesheet" href="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/style.css">' . "\n");
    if (is_rtl()) {
        $output .= '<link rel="stylesheet" href="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/rtl.css">' . "\n";
    }
    // Animate
    if (!empty($container_effect_animation)) {
        $output .= '<link rel="stylesheet" href="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/css/animate.min.css">' . "\n";
    }
    // Calculated CSS
    $output .= '<!-- Calculated Styles -->' . PHP_EOL;
    $output .= '<style type="text/css">' . PHP_EOL;
    ob_start();
    $css = "\n\t@primaryColor: {$button_font['color']};\n\t@secondaryColor: darken(@primaryColor, 15%);\n\t#gradient {\n\t\t.vertical(@startColor: #555, @endColor: #333) {\n\t\t    background-color: mix(@startColor, @endColor, 60%);\n\t\t    background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+\n\t\t    background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10\n\t\t    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+\n\t\t    background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+\n\t\t    background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10\n\t\t    background-image: linear-gradient(top, @startColor, @endColor); // The standard\n\t\t    background-repeat: repeat-x;\n\t\t    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",@startColor,@endColor)); // IE9 and down\n\t\t}\n\t}\n\n\t.seed-csp4 .progress-bar{\n\t\t#gradient > .vertical(@primaryColor, @secondaryColor);\n\t}\n\n\t";
    try {
        if ($progressbar_effect == 'basic') {
            $less = new seed_cspv4_lessc();
            $style = $less->parse($css);
            echo $style;
        }
    } catch (Exception $e) {
        _e('An error has occured. Please make sure you have entered the Button Color correctly.', 'seedprod');
        die;
    }
    $css = "\n\t@primaryColor: {$button_font['color']};\n\t@secondaryColor: darken(@primaryColor, 15%);\n\t#gradient {\n\t\t.vertical(@startColor: #555, @endColor: #333) {\n\t\t    background-color: mix(@startColor, @endColor, 60%);\n\t\t    background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+\n\t\t    background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10\n\t\t    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+\n\t\t    background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+\n\t\t    background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10\n\t\t    background-image: linear-gradient(top, @startColor, @endColor); // The standard\n\t\t    background-repeat: repeat-x;\n\t\t    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",@startColor,@endColor)); // IE9 and down\n\t\t}\n\t}\n\n\t.countdown_section{\n\t\t#gradient > .vertical(@primaryColor, @secondaryColor);\n\t}\n\n\t";
    try {
        if (isset($enable_countdown) && $enable_countdown) {
            $less = new seed_cspv4_lessc();
            $style = $less->parse($css);
            echo $style;
        }
    } catch (Exception $e) {
        _e('An error has occured. Please make sure you have entered the Button Color correctly.', 'seedprod');
    }
    $output .= ".progress-striped .progress-bar, .progress.active .progress-bar{background-color:{$button_font['color']}}";
    ?>

	/* Background Style */
	html{
		height:100%;
		<?php 
    if (!empty($background['background-image'])) {
        ?>
				background: <?php 
        echo $background['background-color'];
        ?>
 url('<?php 
        echo $background['background-image'];
        ?>
') <?php 
        echo $background['background-repeat'];
        ?>
 <?php 
        echo $background['background-position'];
        ?>
 <?php 
        echo $background['background-attachment'];
        ?>
;
				<?php 
        if (!empty($background['background-size'])) {
            ?>
					-webkit-background-size: <?php 
            echo $background['background-size'];
            ?>
;
					-moz-background-size: <?php 
            echo $background['background-size'];
            ?>
;
					-o-background-size: <?php 
            echo $background['background-size'];
            ?>
;
					background-size: <?php 
            echo $background['background-size'];
            ?>
;
				<?php 
        }
        ?>
	    <?php 
    } else {
        ?>
	    	background: <?php 
        echo $background['background-color'];
        ?>
;
		<?php 
    }
    ?>
	}

	.seed-csp4 body{
    	<?php 
    if (is_array($bg_effects) && in_array('noise', $bg_effects)) {
        ?>
			height:100%;
			background: transparent url('<?php 
        echo SEED_CSPV4_PLUGIN_URL . 'themes/default/images/bg-noise.png';
        ?>
') repeat;
		<?php 
    } else {
        ?>
			background: transparent;
		<?php 
    }
    ?>
	}

    /* Text Styles */
    <?php 
    if (!empty($text_font['font-family'])) {
        ?>
	    .seed-csp4 body, .seed-csp4 body p{
	        font-family: <?php 
        echo $text_font['font-family'];
        ?>
;
	        font-weight: <?php 
        echo $text_font['font-weight'];
        ?>
;
	        font-size: <?php 
        echo $text_font['font-size'];
        ?>
;
	        line-height: <?php 
        echo $text_font['line-height'];
        ?>
;
	        <?php 
        if (!empty($text_font['color'])) {
            ?>
	        	color:<?php 
            echo $text_font['color'];
            ?>
;
	        <?php 
        }
        ?>
	    }


		::-webkit-input-placeholder { font-family:<?php 
        echo $text_font['font-family'];
        ?>
; }
		::-moz-placeholder { font-family:<?php 
        echo $text_font['font-family'];
        ?>
; } /* firefox 19+ */
		:-ms-input-placeholder { font-family:<?php 
        echo $text_font['font-family'];
        ?>
; } /* ie */
		input:-moz-placeholder { font-family:<?php 
        echo $text_font['font-family'];
        ?>
; }


    <?php 
    }
    ?>


    <?php 
    if (!empty($headline_font['font-family'])) {
        ?>
	    .seed-csp4 h1, .seed-csp4 h2, .seed-csp4 h3, .seed-csp4 h4, .seed-csp4 h5, .seed-csp4 h6{
	        font-family: <?php 
        echo $headline_font['font-family'];
        ?>
;
	        <?php 
        if (!empty($headline_font['color'])) {
            ?>
	        	color:<?php 
            echo $headline_font['color'];
            ?>
;
	        <?php 
        }
        ?>
	    }
		#cspv4-headline{
			font-size: <?php 
        echo $headline_font['font-size'];
        ?>
;
			font-weight: <?php 
        echo $headline_font['font-weight'];
        ?>
;
		}
    <?php 
    }
    ?>

    <?php 
    if (!empty($button_font['font-family'])) {
        ?>
	    .seed-csp4 button{
	        font-family: <?php 
        echo $button_font['font-family'];
        ?>
;
	        font-weight: <?php 
        echo $button_font['font-weight'];
        ?>
;
	        font-size: <?php 
        echo $button_font['font-size'];
        ?>
;
	    }
    <?php 
    }
    ?>

    /* Link Styles */
    <?php 
    if (!empty($button_font['color'])) {
        ?>
		.seed-csp4 a, .seed-csp4 a:visited, .seed-csp4 a:hover, .seed-csp4 a:active{
			color:<?php 
        echo $button_font['color'];
        ?>
;
		}

		<?php 
        $css = "\n\n\t\t   #cspv4-socialprofiles a{\n\t\t\tcolor: {$text_font['color']};\n\t\t  }\n\n\t\t  .buttonBackground(@startColor, @endColor) {\n\t\t  // gradientBar will set the background to a pleasing blend of these, to support IE<=9\n\t\t  .gradientBar(@startColor, @endColor);\n\t\t  *background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */\n\t\t  .reset-filter();\n\n\t\t  // in these cases the gradient won't cover the background, so we override\n\t\t  &:hover, &:active, &.active, &.disabled, &[disabled] {\n\t\t    background-color: @endColor;\n\t\t    *background-color: darken(@endColor, 5%);\n\t\t  }\n\n\t\t  // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves\n\t\t  &:active,\n\t\t  &.active {\n\t\t    background-color: darken(@endColor, 10%) e(\"\\9\");\n\t\t  }\n\t\t}\n\n\t\t.reset-filter() {\n\t\t  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n\t\t}\n\n\t\t.gradientBar(@primaryColor, @secondaryColor) {\n\t\t  #gradient > .vertical(@primaryColor, @secondaryColor);\n\t\t  border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);\n\t\t  border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);\n\t\t}\n\n\t\t#gradient {\n\t\t\t.vertical(@startColor: #555, @endColor: #333) {\n\t\t    background-color: mix(@startColor, @endColor, 60%);\n\t\t    background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+\n\t\t    background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10\n\t\t    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+\n\t\t    background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+\n\t\t    background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10\n\t\t    background-image: linear-gradient(top, @startColor, @endColor); // The standard\n\t\t    background-repeat: repeat-x;\n\t\t    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",@startColor,@endColor)); // IE9 and down\n\t\t  }\n\t\t}\n\t\t.lightordark (@c) when (lightness(@c) >= 65%) {\n\t\t\tcolor: black;\n\t\t\ttext-shadow: 0 -1px 0 rgba(256, 256, 256, 0.3);\n\t\t}\n\t\t.lightordark (@c) when (lightness(@c) < 65%) {\n\t\t\tcolor: white;\n\t\t\ttext-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);\n\t\t}\n\t\t@btnColor: {$button_font['color']};\n\t\t@btnDarkColor: darken(@btnColor, 15%);\n\t\t.seed-csp4 .btn-primary, .seed-csp4 .btn-primary:focus, .gform_button, #mc-embedded-subscribe, .mymail-wrapper .submit-button {\n\t\t  .lightordark (@btnColor);\n\t\t  .buttonBackground(@btnColor, @btnDarkColor);\n\t\t  border-color: darken(@btnColor, 0%);\n\t\t}\n\n\t\t#cspv4-progressbar span,.countdown_section{\n\t\t\t.lightordark (@btnColor);\n\t\t}\n\n\t\t.seed-csp4 .btn-primary:hover,.seed-csp4 .btn-primary:active {\n\t\t  .lightordark (@btnColor);\n\t\t  border-color: darken(@btnColor, 10%);\n\t\t}\n\n\t\t.seed-csp4 input[type='text']{\n\t\t\tborder-color: @btnDarkColor @btnDarkColor darken(@btnDarkColor, 15%);\n\t\t}\n\n\t\t@hue: hue(@btnDarkColor);\n\t\t@saturation: saturation(@btnDarkColor);\n\t\t@lightness: lightness(@btnDarkColor);\n\t\t.seed-csp4 input[type='text']:focus {\n\t\t\tborder-color: hsla(@hue, @saturation, @lightness, 0.8);\n\t\t\twebkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px hsla(@hue, @saturation, @lightness, 0.6);\n\t\t\t-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px hsla(@hue, @saturation, @lightness, 0.6);\n\t\t\tbox-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px hsla(@hue, @saturation, @lightness, 0.6);\n\n\t\t}\n\n\t\t";
        try {
            $less = new seed_cspv4_lessc();
            $style = $less->parse($css);
            echo $style;
        } catch (Exception $e) {
            _e('An error has occured. Please make sure you have entered the Text Color correctly.', 'seedprod');
            die;
        }
        ?>
    <?php 
    }
    //Text Effects
    if (is_array($text_effects) && in_array('inset', $text_effects)) {
        $css = "\n\t\t    \t\t.lightordarkshadow (@c) when (lightness(@c) >= 65%) {\n\t\t\t\t\t\ttext-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8);\n\t\t\t\t\t}\n\t\t\t\t\t.lightordarkshadow (@c) when (lightness(@c) < 65%) {\n\t\t\t\t\t\ttext-shadow: 0 -1px 0 rgba(256, 256, 256, 0.8);\n\t\t\t\t\t}\n    \t\t\t\t@text_color: {$text_font['color']};\n    \t\t\t\tbody{\n    \t\t\t\t\t.lightordarkshadow (@text_color);\n    \t\t\t\t}\n    \t\t\t\t@headline_color: {$headline_font['color']};\n    \t\t\t\th1, h2, h3, h4, h5, h6{\n    \t\t\t\t\t.lightordarkshadow (@headline_color);\n    \t\t\t\t}\n    \t\t\t\t@link_color: {$button_font['color']};\n    \t\t\t\ta, a:visited, a:hover, a:active{\n    \t\t\t\t\t.lightordarkshadow (@link_color);\n    \t\t\t\t}\n    \t\t\t\t";
        try {
            $less = new seed_cspv4_lessc();
            $style = $less->parse($css);
            echo $style;
        } catch (Exception $e) {
            _e('An error has occured. Please make sure you have entered the Text Color correctly.', 'seedprod');
            die;
        }
    }
    //Container
    $enable_container = true;
    if (!empty($enable_container)) {
        $dropshadow = 0;
        if (is_array($container_effects) && in_array('dropshadow', $container_effects)) {
            $dropshadow = 1;
        }
        $glow = 0;
        if (is_array($container_effects) && in_array('glow', $container_effects)) {
            $glow = 1;
        }
        $border = 0;
        $thickness = 0;
        $border_color = 0;
        if (!empty($container_border)) {
            $border = 1;
            $thickness = $container_border['border-top'];
            $border_style = $container_border['border-style'];
            if (empty($container_border['border-color'])) {
                $border_color = $link_color['color'];
            } else {
                $border_color = $container_border['border-color'];
            }
        }
        $roundedcorners = 0;
        $radius = 0;
        if (!empty($container_radius)) {
            $roundedcorners = 1;
            $radius = $container_radius . 'px';
        }
        $opacity = 1;
        if (empty($container_color['color'])) {
            $container_color['color'] = "#000000";
        }
        if (empty($container_color['alpha'])) {
            $container_color['alpha'] = "0";
        }
        $container_color['alpha'] = $container_color['alpha'] * 100;
        $css = "\n    \t@dropshadow: {$dropshadow};\n\t\t.dropshadow() when (@dropshadow = 1){\n\t\t\t-moz-box-shadow:    0px 11px 15px -5px rgba(69, 69, 69, 0.8);\n\t\t\t-webkit-box-shadow: 0px 11px 15px -5px rgba(69, 69, 69, 0.8);\n\t\t\tbox-shadow: 0px 11px 15px -5px rgba(69, 69, 69, 0.8);\n  \t\t}\n  \t\t@glow: {$glow};\n\t\t.glow() when (@glow = 1){\n\t\t\t-moz-box-shadow:    0px 0px 50px 5px {$container_color['color']};\n\t\t\t-webkit-box-shadow: 0px 0px 50px 5px {$container_color['color']};\n\t\t\tbox-shadow: 0px 0px 50px 15px {$container_color['color']};\n  \t\t}\n  \t\t@border: {$border};\n  \t\t@thickness: {$thickness};\n\t\t.border() when (@border = 1){\n\t\t\tborder: @thickness {$border_style} {$border_color};\n  \t\t}\n  \t\t@roundedcorners: {$roundedcorners};\n  \t\t@radius: {$radius};\n\t\t.roundedcorners() when (@roundedcorners = 1){\n\t\t\t-webkit-border-radius: {$radius};\n\t\t\tborder-radius: {$radius};\n\t\t\t-moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;\n  \t\t}\n  \t\t@opacity: {$opacity};\n\t\t.opacity() when (@opacity = 1){\n\t\t\tbackground-color: fade({$container_color['color']},{$container_color['alpha']});\n  \t\t}\n    \t#cspv4-content{\n  \t\t\tmax-width: {$container_width['width']};\n    \t\tbackground-color: {$container_color['color']};\n    \t\tfloat: {$container_position};\n    \t\ttext-align: {$container_position};\n    \t\t.dropshadow(); /* dropshadow */\n    \t\t.glow(); /* glow */\n    \t\t.border(); /* border */\n    \t\t.roundedcorners(); /* rounded corners */\n    \t\t.opacity(); /* opacity */\n\t\t}";
        try {
            $less = new seed_cspv4_lessc();
            $style = $less->parse($css);
            echo $style;
        } catch (Exception $e) {
            _e('An error has occured. Please make sure you have entered the Border Color correctly.', 'seedprod');
            die;
        }
    }
    $output .= ob_get_clean();
    ob_start();
    if ($container_flat) {
        $css = "\n\t\t@primaryColor: {$button_font['color']};\n\t\t.seed-csp4 .progress-bar, .countdown_section, .seed-csp4 .btn-primary, .btn-primary:focus, .gform_button{\n\t\t\tbackground-image:none;\n\t\t\ttext-shadow:none;\n\t\t}\n\n\t\t.countdown_section, .seed-csp4 .progress-bar{\n\t\t-webkit-box-shadow:none;\n\t\tbox-shadow:none;\n\t\t}\n\n\t\t.seed-csp4 input, .seed-csp4 input:focus {\n\t\t\tborder-color:@primaryColor !important;\n\t\t\t-webkit-box-shadow:none !important;\n\t\t\tbox-shadow:none !important;\n\t\t}\n\n\t\t";
        $less = new seed_cspv4_lessc();
        $style = $less->parse($css);
        echo $style;
        $output .= ob_get_clean();
    }
    // Set background to black if a video is being used
    if (!empty($bg_video)) {
        $output .= 'html{background-color:#000 ;}';
    }
    $output .= '</style>' . PHP_EOL;
    if (!empty($theme)) {
        if ($theme != 'default') {
            if ($theme != 'wp') {
                $output .= '<link rel="stylesheet" href="' . apply_filters('seed_cspv4_themes_url', SEED_CSPV4_PLUGIN_URL) . 'style.css">' . "\n";
            }
        }
    }
    // Typekit
    if (!empty($typekit_id)) {
        $output .= "<!-- Typekit -->" . PHP_EOL;
        $output .= '<script type="text/javascript" src="//use.typekit.com/' . $typekit_id . '.js"></script>' . PHP_EOL;
        $output .= '<script type="text/javascript">try{Typekit.load();}catch(e){}</script>' . PHP_EOL;
    }
    // Include JS
    $output .= "<!-- JS -->" . PHP_EOL;
    $include_url = trailingslashit(includes_url());
    //Include jQuery
    if (empty($enable_wp_head_footer)) {
        $output .= '<script src="' . $include_url . 'js/jquery/jquery.js"></script>' . "\n";
    }
    $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/bootstrap/js/bootstrap.min.js"></script>' . "\n";
    //Include fitvid
    if (!empty($enable_fitvidjs)) {
        $output .= "<!-- FitVid -->\n";
        $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/js/jquery.fitvids.js"></script>' . "\n";
    }
    //Include Retina JS
    if (!empty($enable_retinajs)) {
        $output .= "<!-- RetinaJS -->\n";
        $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/js/retina.min.js"></script>' . "\n";
    }
    // Background video
    if (!empty($bg_video)) {
        $output .= "<!-- Background Video -->\n";
        $bg_video_url_arr = '';
        parse_str(parse_url($bg_video_url, PHP_URL_QUERY), $bg_video_url_arr);
        if (strpos($bg_video_url, 'mp4') !== false) {
            $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/js/video.js"></script>' . "\n";
            $output .= '<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>' . "\n";
            $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/js/bigvideo.js"></script>' . "\n";
        } elseif (!empty($bg_video_url_arr['v'])) {
            $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/js/jquery.tubular.1.0.js"></script>' . "\n";
        } else {
            $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/js/okvideo.js"></script>' . "\n";
        }
    }
    // Scripts
    $output .= "<!-- Scripts -->\n";
    $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/js/script.js"></script>' . "\n";
    // Header Scripts
    if (!empty($header_scripts)) {
        $output .= "<!-- Header Scripts -->\n";
        $output .= $header_scripts;
    }
    // GA
    if (!empty($ga_analytics)) {
        $output .= "<!-- Google Analytics -->\n";
        $output .= $ga_analytics;
    }
    $output .= "<!-- Modernizr -->\n";
    $output .= '<script src="' . SEED_CSPV4_PLUGIN_URL . 'themes/default/js/modernizr.min.js"></script>' . "\n";
    $output = apply_filters('seed_cspv4_head', $output);
    if ($echo) {
        echo $output;
    } else {
        return $output;
    }
}