function ecs_newpatient_module_content_filter($content)
    {
        $page = get_field('option_newpatient_page', 'option');
        if (is_page($page->ID)) {
            ob_start();
            if (get_field('option_vacation_notice', 'option')) {
                ?>
					
				<div class="info">
					
					<?php 
                the_field('option_vacation_notice_text', 'option');
                ?>

				</div>

				<?php 
            }
            gravity_form_enqueue_scripts(3, true);
            gravity_form(3, false, false, false, '', true, 1);
            return ob_get_clean();
        } else {
            return $content;
        }
    }
Ejemplo n.º 2
0
function theme_enqueue_script()
{
    wp_enqueue_script('jquery-js', get_template_directory_uri() . '/js/jquery-2.1.4.min.js', [], '', true);
    wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', [], '', true);
    wp_enqueue_script('app-js', get_template_directory_uri() . '/js/app.js', [], '', true);
    wp_enqueue_script('parallax-js', get_template_directory_uri() . '/js/parallax.min.js', [], '', true);
    gravity_form_enqueue_scripts(1, true);
}
function gravityforms_admin_page()
{
    echo "<div style='width: 60%'>";
    echo "<h2><span style='font-size: 20px;' class='dashicons dashicons-info'></span> How can we Assist you?</h2>";
    gravity_form_enqueue_scripts(1, true);
    //Enqueue form scripts (only for form with ID of 1)
    gravity_form(1, false, true, false, null, false);
    //Output a form with an ID of 1
    echo "</div>";
}
Ejemplo n.º 4
0
function popmake_enqueue_gravityforms_during_preload($popup_id)
{
    if (function_exists('gravity_form_enqueue_scripts')) {
        $regex = "/\\[gravityform.*id=[\\'\"]?([0-9]*)[\\'\"]?.*/";
        $popup = get_post($popup_id);
        preg_match_all($regex, $popup->post_content, $matches);
        foreach ($matches[1] as $form_id) {
            add_filter("gform_confirmation_anchor_{$form_id}", create_function("", "return false;"));
            gravity_form_enqueue_scripts($form_id, true);
        }
    }
}
Ejemplo n.º 5
0
 public function preload_modals($modal)
 {
     if (function_exists('gravity_form_enqueue_scripts')) {
         $regex = "/\\[gravityform.*id=[\\'\"]?([0-9]*)[\\'\"]?.*/";
         preg_match_all($regex, $modal->content, $matches);
         foreach ($matches[1] as $form_id) {
             add_filter("gform_confirmation_anchor_{$form_id}", create_function("", "return false;"));
             gravity_form_enqueue_scripts($form_id, true);
         }
     }
     return $modal;
 }
function theme_scripts()
{
    wp_enqueue_style('style', get_stylesheet_uri());
    wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css');
    wp_enqueue_script("jquery");
    /*
     * Optional! - You need this if you are using gravityforms and want to be able to use conditional logic
     */
    include_once ABSPATH . 'wp-admin/includes/plugin.php';
    if (is_plugin_active('gravityforms/gravityforms.php')) {
        gravity_form_enqueue_scripts(1, true);
    }
}
Ejemplo n.º 7
0
 /**
  * Load the form scripts outside of the loop.
  */
 function enqueue_scripts()
 {
     global $post;
     if (!is_a($post, 'WP_Post')) {
         return;
     }
     if ('resume' == $post->post_type) {
         $form = get_option('job_manager_resume_apply');
     } else {
         $form = get_option('job_manager_job_apply');
     }
     gravity_form_enqueue_scripts($form, true);
 }
 function woocommerce_gravityform_enqueue_scripts()
 {
     global $post;
     if (is_product()) {
         $gravity_form_data = get_post_meta($post->ID, '_gravity_form_data', true);
         if ($gravity_form_data && is_array($gravity_form_data)) {
             //wp_enqueue_script("gforms_gravityforms", GFCommon::get_base_url() . "/js/gravityforms.js", array("jquery"), GFCommon::$version, false);
             gravity_form_enqueue_scripts($gravity_form_data['id'], false);
             wp_enqueue_script('wc-gravityforms-product-addons', woocommerce_gravityforms::plugin_url() . '/assets/js/gravityforms-product-addons.js', array('jquery'), true);
         }
     } elseif ($this->shortcode_product_id) {
         $gravity_form_data = get_post_meta($this->shortcode_product_id, '_gravity_form_data', true);
         if ($gravity_form_data && is_array($gravity_form_data)) {
             //wp_enqueue_script("gforms_gravityforms", GFCommon::get_base_url() . "/js/gravityforms.js", array("jquery"), GFCommon::$version, false);
             gravity_form_enqueue_scripts($gravity_form_data['id'], false);
             wp_enqueue_script('wc-gravityforms-product-addons', woocommerce_gravityforms::plugin_url() . '/assets/js/gravityforms-product-addons.js', array('jquery'), true);
         }
     }
 }
function displayGravityForm($form_object)
{
    //displays the form selected in Page and created in Forms
    gravity_form_enqueue_scripts($form_object['id'], true);
    gravity_form($form_object['id'], true, true, false, '', true, 1);
}
Ejemplo n.º 10
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;
    }
}
?>
              <div class="fs-cell fs-lg-5 fs-lg-push-1 fs-md-full fs-sm-3">
                <h4 class="section-title"><span>Open Positions</span></h4>
                <?php 
the_field('open_positions');
?>
              </div>
            </div>
          </div>

          <div class="fs-cell fs-lg-10 fs-md-6 fs-sm-3 fs-centered">
            <div class="fs-row">
              <div class="fs-cell fs-lg-half fs-md-full fs-sm-3">
                <?php 
$form_object = get_field('contact_form');
gravity_form_enqueue_scripts($form_object['id'], true);
gravity_form($form_object['id'], false, false, false, '', true, 1);
?>
              </div>
              <div class="fs-cell fs-lg-5 fs-lg-push-1 fs-md-full fs-sm-3">
                <div class="fs-row">
                  <?php 
include locate_template('parts/jobs.php');
?>
                </div>
              </div>
            </div>
          </div>

          
Ejemplo n.º 12
0
    <!-- =================================== -->
    <meta charset="<?php 
bloginfo('charset');
?>
">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Typekit -->
    <!-- =================================== -->
    <script src="https://use.typekit.net/las1vox.js"></script>
    <script>try{Typekit.load({ async: true });}catch(e){}</script>

    <!-- Enqueue Gravity Forms Scripts For BYOB Form -->
    <?php 
gravity_form_enqueue_scripts(3, true);
?>

    <!-- Wordpress Generated -->
    <!-- =================================== -->
		<?php 
wp_head();
?>

    <!-- Facebook SDK -->
    <!-- =================================== -->
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
 /**
  * Function that runs the different checks to see if social is enqueue or not
  * @since   1.3
  */
 private function enqueue_social_shortcodes()
 {
     global $wpdb, $spuvar_social;
     $opts = $this->spu_settings;
     $spuvar_social = '';
     // Check if defined or remove js in options
     if (!defined('SPU_UNLOAD_FB_JS') && empty($opts['facebook'])) {
         // Check if any popup have facebook, then enqueue js
         if ($fb = $wpdb->get_var("SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = 'spu_fb' ")) {
             wp_enqueue_script('spu-facebook');
             $spuvar_social['facebook'] = true;
         }
     }
     if (!defined('SPU_UNLOAD_TW_JS') && empty($opts['twitter'])) {
         if ($fb = $wpdb->get_var("SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key ='spu_tw' ")) {
             wp_enqueue_script('spu-twitter');
             $spuvar_social['twitter'] = true;
         }
     }
     if (!defined('SPU_UNLOAD_GO_JS') && empty($opts['google'])) {
         if ($fb = $wpdb->get_var("SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key ='spu_google' ")) {
             wp_enqueue_script('spu-google');
             $spuvar_social['google'] = true;
         }
     }
     wp_localize_script('spu-public', 'spuvar_social', $spuvar_social);
     //also include gravity forms if needed
     if ($gf = $wpdb->get_var("SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key ='spu_gravity' ")) {
         if (function_exists('gravity_form_enqueue_scripts')) {
             gravity_form_enqueue_scripts($gf, true);
         }
     }
 }
Ejemplo n.º 14
0
 public static function enqueue_action($block_id)
 {
     $block = HeadwayBlocksData::get_block($block_id);
     return gravity_form_enqueue_scripts(parent::get_setting($block, 'form-id', null), parent::get_setting($block, 'use-ajax', false));
 }
Ejemplo n.º 15
0
 function cap_person_bio($style, $person = null)
 {
     /**
      * Note from Seth:
      * I'm not happy with the css trickery and markup I've produced here. Eventually cleanup. This
      * was a quick and dirty implentation that would work across sites.
      */
     if (empty($person)) {
         global $wp_query;
         $person = $wp_query->get_queried_object();
     }
     $person_photo = get_field('person_photo', 'person_' . $person->term_id);
     $person_photo_hi_res = get_field('person_photo_hi_res', 'person_' . $person->term_id);
     // This field is only being used by ThinkProgress post ACF migration.
     // The field itself is registered only in the TP theme in fields.php
     $person_photo_legacy = get_field('person_photo_legacy', 'person_' . $person->term_id);
     $person_title = get_field('person_title', 'person_' . $person->term_id);
     $person_email = get_field('person_email', 'person_' . $person->term_id);
     $person_twitter_handle = get_field('person_twitter_handle', 'person_' . $person->term_id);
     if (!empty($person_photo)) {
         $person_photo_output = wp_get_attachment_image($person_photo, 'medium');
         $person_photo_hi_res_output = wp_get_attachment_image_src($person_photo_hi_res, 'full');
     }
     $markup = '<div class="person ' . $style . '">';
     // if the "full" style is being displayed then add the person name and title atop the bio
     if ('full' == $style) {
         $markup .= '<div class="person-title"><h1>' . $person->name . '<br><small>' . $person_title . '</small></h1></div>';
     }
     // begin the actual bio area
     $markup .= '<div class="person-bio">';
     if (!empty($person_photo)) {
         $markup .= '<div class="bio-pic">' . $person_photo_output;
         // optional hi res photo
         if (!empty($person_photo_hi_res_output)) {
             $markup .= '<div class="bio-pic-hi-res"><a href="' . $person_photo_hi_res_output[0] . '">' . __('Download hi-res', 'cap-byline') . '</a></div>';
         }
         $markup .= '</div>';
     } elseif (!empty($person_photo_legacy)) {
         $markup .= '<div class="bio-pic"><img src="' . $person_photo_legacy . '"></div>';
     }
     // get the bio and add it to $markup
     $markup .= '<div class="bio">';
     if (empty($style)) {
         $markup .= '<strong>' . $person->name . '</strong> ';
     }
     $markup .= $person->description;
     // if either an email addy or twitter handle are present lets add a hard line break for spacing
     if (!empty($person_email) || !empty($person_twitter_handle)) {
         $markup .= '<div id="contact-button-seperator"></div>';
     }
     // if the bio has an email associated add a contact modal form to $markup also check the form ID is present
     if (!empty($person_email)) {
         $markup .= '<a id="contact-modal-link" class="cap-contact-modal-link" href="javascript:void(0);"><img src="' . plugin_dir_url('cap-byline.php') . '/cap-byline/mail.png" width="18px"> ' . __('Contact', 'cap-byline') . ' ' . $person->name . '</a>';
         $markup .= '
         <script>
         jQuery(document).ready(function(){
             jQuery("#contact-modal-link").click(function(){
                     jQuery("#contact-modal").addClass("active");
             });
             jQuery("#contact-modal .close-modal").click(function(){
                     jQuery("#contact-modal").removeClass("active");
             });
         });
         </script>
         ';
         $markup .= '<div id="contact-modal" class="modal"><div class="modal-wrapper"><div class="close-modal"><img src="' . plugin_dir_url('cap-byline.php') . '/cap-byline/close_circle.png"></div><div class="modal-window">';
         $markup .= gravity_form(get_field('author_contact_form_id', 'options'), false, false, false, array('author_contact_email' => '' . $person->term_id . ''), true, 25, false);
         gravity_form_enqueue_scripts(get_field('author_contact_form_id', 'options'), true);
         $markup .= '</div></div></div>';
         $markup .= '
         <style>
         div.modal {
             display: none;
             position: fixed;
             top: 0;
             left: 0;
             height: 100%;
             width: 100%;
             background-color: rgba(0,0,0,0.6);
             z-index: 999;
         }
         div.modal.active {
             display: table;
         }
         div.modal-wrapper {
             display: table-cell;
             vertical-align: middle;
             z-index: 9999;
             text-align: center;
         }
         div.modal-window {
             text-align: left;
             display: inline-block;
             min-width: 50%;
             background-color: #fff;
             padding: 2em;
         }
         div.close-modal {
             position: relative;
             bottom: -20px;
             text-align: right;
             width: 52%;
             margin: 0 auto;
         }
         #contact-modal-link {
             color: #000;
             font-weight: bold;
             position: relative;
             top: -4px;
         }
         #contact-modal-link img {
             position: relative;
             top: 3px;
         }
         span#twitter-follow {
             margin-left: 5px;
         }
         #contact-button-seperator {
             height: 15px;
         }
         </style>
         ';
     }
     // if the bio has a twitter handle associated add the follow button to $markup
     if (!empty($person_twitter_handle)) {
         $markup .= '<span id="twitter-follow"><a href="https://twitter.com/' . $person_twitter_handle . '" class="twitter-follow-button" data-show-count="false" data-lang="en">' . __('Follow', 'cap-byline') . ' @' . $person_twitter_handle . '</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></span>';
     }
     $markup .= '</div>';
     // close out .bio
     $markup .= '</div>';
     // close out .person-bio
     $markup .= '</div>';
     // close out .person .$style
     echo $markup;
 }
Ejemplo n.º 16
0
 function add_to_twig($twig)
 {
     $twig->addExtension(new Twig_Extension_StringLoader());
     $gravityfunction = new Twig_SimpleFunction('displayform', function ($id) {
         gravity_form_enqueue_scripts($id, false);
         $form = gravity_form($id, false, false, false, false, false);
         return $form;
     });
     $twig->addFunction($gravityfunction);
     return $twig;
 }
		<?php 
}
?>

		<?php 
if ($form = get_sub_field('form')) {
    ?>

		<div class="form<?php 
    echo $business_information != NULL ? ' small-12 medium-8 column' : ' small-12 large-9 large-centered column';
    echo $form_animation != NULL ? ' wow ' . $form_animation : '';
    ?>
">

		<?php 
    gravity_form_enqueue_scripts($form->id, true);
    ?>
		<?php 
    gravity_form($form->id, false, false, false, '', true, 1);
    ?>

		</div>
    	<!-- end .form -->

		<?php 
}
?>

	</div>
	<!-- end .wrap -->
 function woocommerce_gravityform_enqueue_scripts()
 {
     global $post;
     if (is_product()) {
         $gravity_form_data = get_post_meta($post->ID, '_gravity_form_data', true);
         if ($gravity_form_data && is_array($gravity_form_data)) {
             //wp_enqueue_script("gforms_gravityforms", GFCommon::get_base_url() . "/js/gravityforms.js", array("jquery"), GFCommon::$version, false);
             gravity_form_enqueue_scripts($gravity_form_data['id'], false);
             $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
             wp_register_script('accounting', WC()->plugin_url() . '/assets/js/admin/accounting' . $suffix . '.js', array('jquery'), '0.4.2');
             wp_enqueue_script('wc-gravityforms-product-addons', woocommerce_gravityforms::plugin_url() . '/assets/js/gravityforms-product-addons.js', array('jquery', 'accounting'), true);
             $product = wc_get_product();
             $prices = array($product->id => $product->get_display_price());
             if ($product->has_child()) {
                 foreach ($product->get_children() as $variation_id) {
                     $variation = $product->get_child($variation_id);
                     $prices[$variation_id] = $variation->get_display_price();
                 }
             }
             // Accounting
             wp_localize_script('accounting', 'accounting_params', array('mon_decimal_point' => wc_get_price_decimal_separator()));
             $wc_gravityforms_params = array('currency_format_num_decimals' => wc_get_price_decimals(), 'currency_format_symbol' => get_woocommerce_currency_symbol(), 'currency_format_decimal_sep' => esc_attr(wc_get_price_decimal_separator()), 'currency_format_thousand_sep' => esc_attr(wc_get_price_thousand_separator()), 'currency_format' => esc_attr(str_replace(array('%1$s', '%2$s'), array('%s', '%v'), get_woocommerce_price_format())), 'prices' => $prices);
             wp_localize_script('wc-gravityforms-product-addons', 'wc_gravityforms_params', $wc_gravityforms_params);
         }
     } elseif (is_object($post) && isset($post->post_content) && !empty($post->post_content)) {
         $enqueue = false;
         $forms = array();
         $prices = array();
         if (preg_match_all('/\\[product_page[s]? +.*?((id=.+?)|(name=.+?))\\]/is', $post->post_content, $matches, PREG_SET_ORDER)) {
             $ajax = false;
             foreach ($matches as $match) {
                 //parsing shortcode attributes
                 $attr = shortcode_parse_atts($match[1]);
                 $product_id = isset($attr['id']) ? $attr['id'] : false;
                 if (!empty($product_id)) {
                     $gravity_form_data = get_post_meta($product_id, '_gravity_form_data', true);
                     if ($gravity_form_data && is_array($gravity_form_data)) {
                         $enqueue = true;
                         gravity_form_enqueue_scripts($gravity_form_data['id'], false);
                         $product = wc_get_product($product_id);
                         $prices[$product->id] = $product->get_display_price();
                         if ($product->has_child()) {
                             foreach ($product->get_children() as $variation_id) {
                                 $variation = $product->get_child($variation_id);
                                 $prices[$variation_id] = $variation->get_display_price();
                             }
                         }
                     }
                 }
             }
             if ($enqueue) {
                 $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
                 wp_register_script('accounting', WC()->plugin_url() . '/assets/js/admin/accounting' . $suffix . '.js', array('jquery'), '0.4.2');
                 wp_enqueue_script('wc-gravityforms-product-addons', woocommerce_gravityforms::plugin_url() . '/assets/js/gravityforms-product-addons.js', array('jquery', 'accounting'), true);
                 // Accounting
                 wp_localize_script('accounting', 'accounting_params', array('mon_decimal_point' => wc_get_price_decimal_separator()));
                 $wc_gravityforms_params = array('currency_format_num_decimals' => wc_get_price_decimals(), 'currency_format_symbol' => get_woocommerce_currency_symbol(), 'currency_format_decimal_sep' => esc_attr(wc_get_price_decimal_separator()), 'currency_format_thousand_sep' => esc_attr(wc_get_price_thousand_separator()), 'currency_format' => esc_attr(str_replace(array('%1$s', '%2$s'), array('%s', '%v'), get_woocommerce_price_format())), 'prices' => $prices);
                 wp_localize_script('wc-gravityforms-product-addons', 'wc_gravityforms_params', $wc_gravityforms_params);
             }
         }
     }
 }
Ejemplo n.º 19
0
 public static function form($form_id)
 {
     gravity_form_enqueue_scripts($form_id);
     gravity_form($form_id);
 }
Ejemplo n.º 20
0
 function woocommerce_gravityform_enqueue_scripts()
 {
     global $post;
     if (is_product()) {
         $gravity_form_data = get_post_meta($post->ID, '_gravity_form_data', true);
         if ($gravity_form_data && is_array($gravity_form_data)) {
             //wp_enqueue_script("gforms_gravityforms", GFCommon::get_base_url() . "/js/gravityforms.js", array("jquery"), GFCommon::$version, false);
             gravity_form_enqueue_scripts($gravity_form_data['id'], false);
             wp_enqueue_script('wc-gravityforms-product-addons', woocommerce_gravityforms::plugin_url() . '/assets/js/gravityforms-product-addons.js', array('jquery'), true);
         }
     } else {
         $enqueue = false;
         $forms = array();
         if (preg_match_all('/\\[product_page[s]? +.*?((id=.+?)|(name=.+?))\\]/is', $post->post_content, $matches, PREG_SET_ORDER)) {
             $ajax = false;
             foreach ($matches as $match) {
                 //parsing shortcode attributes
                 $attr = shortcode_parse_atts($match[1]);
                 $product_id = isset($attr['id']) ? $attr['id'] : false;
                 if (!empty($product_id)) {
                     $gravity_form_data = get_post_meta($product_id, '_gravity_form_data', true);
                     if ($gravity_form_data && is_array($gravity_form_data)) {
                         $enqueue = true;
                         gravity_form_enqueue_scripts($gravity_form_data['id'], false);
                     }
                 }
             }
             if ($enqueue) {
                 wp_enqueue_script('wc-gravityforms-product-addons', woocommerce_gravityforms::plugin_url() . '/assets/js/gravityforms-product-addons.js', array('jquery'), true);
             }
         }
     }
 }