コード例 #1
0
ファイル: functions.php プロジェクト: BaristaCom/wp-base
 /**
  * Function that generates rgba part of css color property
  * @param $color string hex color
  * @param $transparency float transparency value between 0 and 1
  * @return string generated rgba string
  */
 function qode_rgba_color($color, $transparency)
 {
     if ($color !== '' && $transparency !== '') {
         $rgba_color = '';
         $rgb_color_array = qode_hex2rgb($color);
         $rgba_color .= 'rgba(' . implode(', ', $rgb_color_array) . ', ' . $transparency . ')';
         return $rgba_color;
     }
 }
コード例 #2
0
        echo $qode_options_proya['popup_menu_hover_background_color_2nd'];
        ?>
; <?php 
    }
    ?>
    }

<?php 
}
?>

<?php 
if (isset($qode_options_proya['popup_menu_background_color']) && !empty($qode_options_proya['popup_menu_background_color']) || !empty($qode_options_proya['popup_menu_background_transparency'])) {
    ?>
    <?php 
    $popup_menu_background_color = qode_hex2rgb($qode_options_proya['popup_menu_background_color']);
    if ($qode_options_proya['popup_menu_background_transparency'] != "") {
        $popup_menu_background_transparency = $qode_options_proya['popup_menu_background_transparency'];
    } else {
        $popup_menu_background_transparency = 0.95;
    }
    ?>
    .popup_menu_holder{
        background-color: rgba(<?php 
    echo $popup_menu_background_color[0];
    ?>
,<?php 
    echo $popup_menu_background_color[1];
    ?>
,<?php 
    echo $popup_menu_background_color[2];
コード例 #3
0
ファイル: header.php プロジェクト: k2jysy/wedev
} else {
    if ($header_color_transparency_per_page != "" && get_post_meta($id, "qode_header_color_per_page", true) == "") {
        if (isset($qode_options_theme13['header_top_background_color']) && $qode_options_theme13['header_top_background_color'] != "") {
            $header_top_background_color = qode_hex2rgb($qode_options_theme13['header_top_background_color']);
        } else {
            $header_top_background_color = qode_hex2rgb("#ffffff");
        }
        $header_top_color_per_page .= "background-color:rgba(" . $header_top_background_color[0] . ", " . $header_top_background_color[1] . ", " . $header_top_background_color[2] . ", " . $header_color_transparency_per_page . ");";
    }
}
$header_separator = qode_hex2rgb("#eaeaea");
if (isset($qode_options_theme13['header_separator_color']) && $qode_options_theme13['header_separator_color'] != "") {
    $header_separator = qode_hex2rgb($qode_options_theme13['header_separator_color']);
}
if (get_post_meta($id, "qode_header_border_per_page", true) != "") {
    $header_separator = qode_hex2rgb(get_post_meta($id, "qode_header_border_per_page", true));
}
$header_border_transparency_per_page = "";
if (isset($qode_options_theme13['header_border_transparency_initial']) && $qode_options_theme13['header_border_transparency_initial'] != "") {
    $header_border_transparency_per_page = $qode_options_theme13['header_border_transparency_initial'];
}
if (get_post_meta($id, "qode_header_border_transparency_per_page", true) != "") {
    $header_border_transparency_per_page = get_post_meta($id, "qode_header_border_transparency_per_page", true);
}
$header_borders_color_per_page = "";
if ($header_border_transparency_per_page != "") {
    $header_borders_color_per_page = "<style type='text/css'> \n\t\t\t.header_top .left .inner > div,\n\t\t\t.header_top .left .inner > div:last-child,\n\t\t\t.header_top .right .inner > div:first-child,\n\t\t\t.header_top .right .inner > div,\n\t\t\theader .header_top .q_social_icon_holder,\n\t\t\t.header_menu_bottom\n\t\t\t{ border-color:rgba(" . $header_separator[0] . ", " . $header_separator[1] . ", " . $header_separator[2] . ", " . $header_border_transparency_per_page . "); } \n\t\t\t\n\t\t\t\t</style>";
} elseif ($header_border_transparency_per_page == "" && get_post_meta($id, "qode_header_border_per_page", true) != "") {
    $header_borders_color_per_page = "<style type='text/css'> \n\t\t\t.header_top .left .inner > div,\n\t\t\t.header_top .left .inner > div:last-child,\n\t\t\t.header_top .right .inner > div:first-child,\n\t\t\t.header_top .right .inner > div,\n\t\t\theader .header_top .q_social_icon_holder,\n\t\t\t.header_menu_bottom\n\t\t\t{ border-color:" . get_post_meta($id, "qode_header_border_per_page", true) . "; } \n\t\t\t\n\t\t\t\t</style>";
}
if ($header_border_transparency_per_page != "") {
コード例 #4
0
ファイル: header.php プロジェクト: bunnywong/freshlinker
if (get_post_meta($id, "qode_header_color_per_page", true) != "") {
    if ($header_color_transparency_per_page != "") {
        $header_background_color = qode_hex2rgb(get_post_meta($id, "qode_header_color_per_page", true));
        $header_top_color_per_page .= "background-color:rgba(" . $header_background_color[0] . ", " . $header_background_color[1] . ", " . $header_background_color[2] . ", " . $header_color_transparency_per_page . ");";
    } else {
        $header_top_color_per_page .= "background-color:" . get_post_meta($id, "qode_header_color_per_page", true) . ";";
    }
} else {
    if ($header_color_transparency_per_page != "" && get_post_meta($id, "qode_header_color_per_page", true) == "") {
        $header_background_color = $qode_options_proya['header_top_background_color'] ? qode_hex2rgb($qode_options_proya['header_top_background_color']) : qode_hex2rgb("#ffffff");
        $header_top_color_per_page .= "background-color:rgba(" . $header_background_color[0] . ", " . $header_background_color[1] . ", " . $header_background_color[2] . ", " . $header_color_transparency_per_page . ");";
    }
}
$header_separator = qode_hex2rgb("#eaeaea");
if (isset($qode_options_proya['header_separator_color']) && $qode_options_proya['header_separator_color'] != "") {
    $header_separator = qode_hex2rgb($qode_options_proya['header_separator_color']);
}
$header_color_per_page .= "'";
$header_top_color_per_page .= "'";
//generate header classes based on qode options
$header_classes = '';
if (is_active_sidebar('woocommerce_dropdown')) {
    $header_classes .= 'has_woocommerce_dropdown ';
}
if ($display_header_top == "yes") {
    $header_classes .= ' has_top';
}
if ($header_top_area_scroll == "yes") {
    $header_classes .= ' scroll_top';
}
if ($centered_logo) {
コード例 #5
0
ファイル: shortcodes.php プロジェクト: BaristaCom/wp-base
 function social_icons($atts, $content = null)
 {
     global $qodeIconCollections;
     $args = array("type" => "", "link" => "", "target" => "", "use_custom_size" => "", "custom_size" => "", "custom_shape_size" => "", "size" => "", "border_radius" => "", "icon_color" => "", "icon_hover_color" => "", "background_color" => "", "background_hover_color" => "", "background_color_transparency" => "", "border_width" => "", "border_color" => "", "border_hover_color" => "", "icon_margin" => "");
     $args = array_merge($args, $qodeIconCollections->getShortcodeParams());
     extract(shortcode_atts($args, $atts));
     $html = "";
     $fa_stack_styles = "";
     $icon_styles = "";
     $data_attr = "";
     //        $background_color = $background_color != "" ? $background_color : "#e3e3e3";
     if (!empty($background_color) && !empty($background_color_transparency) && ($background_color_transparency >= 0 && $background_color_transparency <= 1)) {
         $rgb = qode_hex2rgb($background_color);
         $background_color = 'rgba(' . $rgb[0] . ', ' . $rgb[1] . ', ' . $rgb[2] . ', ' . $background_color_transparency . ')';
     }
     if (!empty($background_color)) {
         $fa_stack_styles .= "background-color: {$background_color};";
     }
     if ($type == 'square_social' && $border_radius !== '') {
         $fa_stack_styles .= 'border-radius: ' . $border_radius . 'px;';
         $fa_stack_styles .= '-webkit-border-radius: ' . $border_radius . 'px;';
         $fa_stack_styles .= '-moz-border-radius: ' . $border_radius . 'px;';
     }
     if ($border_color != "") {
         $fa_stack_styles .= "border-color: " . $border_color . ";";
     }
     if ($border_width != "") {
         $fa_stack_styles .= "border-width: " . $border_width . "px;";
     }
     if ($icon_color != "") {
         $icon_styles .= "color: " . $icon_color . ";";
     }
     if ($icon_margin != "") {
         if ($type == 'circle_social' || $type == 'square_social') {
             $fa_stack_styles .= "margin: " . $icon_margin . ";";
         } else {
             $icon_styles .= "margin: " . $icon_margin . ";";
         }
     }
     if ($background_hover_color != "") {
         $data_attr .= "data-hover-background-color=" . $background_hover_color . " ";
     }
     if ($border_hover_color != "") {
         $data_attr .= "data-hover-border-color=" . $border_hover_color . " ";
     }
     if ($icon_hover_color != "") {
         $data_attr .= "data-hover-color=" . $icon_hover_color;
     }
     if ($use_custom_size == 'yes') {
         if ($custom_size !== '') {
             $icon_styles .= 'font-size: ' . $custom_size . "px;";
         }
         if ($custom_shape_size !== '') {
             $fa_stack_styles .= 'font-size: ' . $custom_shape_size . "px;";
         } elseif ($custom_size !== '' && $custom_shape_size == '') {
             $fa_stack_styles .= 'font-size: ' . $custom_size . "px;";
         }
     }
     $html .= "<span class='q_social_icon_holder {$type}' {$data_attr}>";
     if ($link != "") {
         $html .= "<a href='" . $link . "' target='" . $target . "'>";
     }
     //have to set default because of already created shortcodes
     $icon_pack = $icon_pack == '' ? 'font_awesome' : $icon_pack;
     if ($type == "normal_social") {
         $html .= $qodeIconCollections->getIconHTML(${$qodeIconCollections->getIconCollectionParamNameByKey($icon_pack)}, $icon_pack, array('icon_attributes' => array('style' => $icon_styles, 'class' => $size . ' simple_social')));
     } else {
         $html .= "<span class='fa-stack " . $size . "' style='" . $fa_stack_styles . "'>";
         $html .= $qodeIconCollections->getIconHTML(${$qodeIconCollections->getIconCollectionParamNameByKey($icon_pack)}, $icon_pack, array('icon_attributes' => array('style' => $icon_styles, 'class' => '')));
         $html .= "</span>";
         //close fa-stack
     }
     if ($link != "") {
         $html .= "</a>";
     }
     $html .= "</span>";
     //close q_social_icon_holder
     return $html;
 }
コード例 #6
0
if (isset($qode_options_proya['fss_navigation_border_radius']) && $qode_options_proya['fss_navigation_border_radius'] !== '') {
    $sliders_style[] = 'border-radius: ' . $qode_options_proya['fss_navigation_border_radius'] . 'px';
}
if (isset($qode_options_proya['fss_navigation_arrow_size']) && $qode_options_proya['fss_navigation_arrow_size'] !== '') {
    $sliders_style[] = 'font-size: ' . $qode_options_proya['fss_navigation_arrow_size'] . 'px';
}
if (isset($qode_options_proya['fss_navigation_arrow_color']) && $qode_options_proya['fss_navigation_arrow_color'] !== '') {
    $rgb_color = qode_hex2rgb($qode_options_proya['fss_navigation_arrow_color']);
    $rgb_transparency = 1;
    if (isset($qode_options_proya['fss_navigation_arrow_transparency']) && $qode_options_proya['fss_navigation_arrow_transparency'] !== '') {
        $rgb_transparency = $qode_options_proya['fss_navigation_arrow_transparency'];
    }
    $sliders_style[] = 'color: rgba(' . $rgb_color[0] . ',' . $rgb_color[1] . ',' . $rgb_color[2] . ',' . $rgb_transparency . ')';
}
if (isset($qode_options_proya['fss_navigation_arrow_hover_color']) && $qode_options_proya['fss_navigation_arrow_hover_color'] !== '') {
    $rgb_color = qode_hex2rgb($qode_options_proya['fss_navigation_arrow_hover_color']);
    $rgb_transparency = 1;
    if (isset($qode_options_proya['fss_navigation_arrow_hover_transparency']) && $qode_options_proya['fss_navigation_arrow_hover_transparency'] !== '') {
        $rgb_transparency = $qode_options_proya['fss_navigation_arrow_hover_transparency'];
    }
    $sliders_hover_style[] = 'color: rgba(' . $rgb_color[0] . ',' . $rgb_color[1] . ',' . $rgb_color[2] . ',' . $rgb_transparency . ')';
}
if (is_array($sliders_style) && count($sliders_style)) {
    ?>
	.full_screen_navigation_inner a{
	<?php 
    echo esc_attr(implode('; ', $sliders_style));
    ?>
	}
<?php 
}
コード例 #7
0
 function social_icons($atts, $content = null)
 {
     $args = array("type" => "", "icon" => "", "link" => "", "target" => "", "use_custom_size" => "", "custom_size" => "", "size" => "", "icon_color" => "", "icon_hover_color" => "", "background_color" => "", "background_hover_color" => "", "background_color_transparency" => "", "border_width" => "", "border_color" => "", "border_hover_color" => "", "icon_margin" => "");
     extract(shortcode_atts($args, $atts));
     $html = "";
     $fa_stack_styles = "";
     $icon_styles = "";
     $data_attr = "";
     $background_color = $background_color != "" ? $background_color : "#e3e3e3";
     if (!empty($background_color_transparency) && ($background_color_transparency >= 0 && $background_color_transparency <= 1)) {
         $rgb = qode_hex2rgb($background_color);
         $background_color = 'rgba(' . $rgb[0] . ', ' . $rgb[1] . ', ' . $rgb[2] . ', ' . $background_color_transparency . ')';
     }
     $fa_stack_styles .= "background-color: {$background_color};";
     if ($border_color != "") {
         $fa_stack_styles .= "border-color: " . $border_color . ";";
     }
     if ($border_width != "") {
         $fa_stack_styles .= "border-width: " . $border_width . "px;";
     }
     if ($icon_color != "") {
         $icon_styles .= "color: " . $icon_color . ";";
     }
     if ($icon_margin != "") {
         $icon_styles .= "margin: " . $icon_margin . ";";
     }
     if ($background_hover_color != "") {
         $data_attr .= "data-hover-background-color=" . $background_hover_color . " ";
     }
     if ($border_hover_color != "") {
         $data_attr .= "data-hover-border-color=" . $border_hover_color . " ";
     }
     if ($icon_hover_color != "") {
         $data_attr .= "data-hover-color=" . $icon_hover_color;
     }
     if ($use_custom_size == 'yes' && $custom_size != '') {
         $icon_styles .= 'font-size: ' . $custom_size . "px;";
         $fa_stack_styles .= 'font-size: ' . $custom_size . "px;";
     }
     $html .= "<span class='q_social_icon_holder {$type}' {$data_attr}>";
     if ($link != "") {
         $html .= "<a href='" . $link . "' target='" . $target . "'>";
     }
     if ($type == "normal_social") {
         $html .= "<i class='fa " . $icon . " " . $size . " simple_social' style='" . $icon_styles . "'></i>";
     } else {
         $html .= "<span class='fa-stack " . $size . "' style='" . $fa_stack_styles . "'>";
         $html .= "<i class='fa " . $icon . "' style='" . $icon_styles . "'></i>";
         $html .= "</span>";
         //close fa-stack
     }
     if ($link != "") {
         $html .= "</a>";
     }
     $html .= "</span>";
     //close q_social_icon_holder
     return $html;
 }
コード例 #8
0
if (isset($qode_options_proya['single_slider_navigation_border_radius']) && $qode_options_proya['single_slider_navigation_border_radius'] !== '') {
    $single_sliders_style[] = 'border-radius: ' . $qode_options_proya['single_slider_navigation_border_radius'] . 'px';
}
if (isset($qode_options_proya['single_slider_navigation_arrow_size']) && $qode_options_proya['single_slider_navigation_arrow_size'] !== '') {
    $single_sliders_arrow_style[] = 'font-size: ' . $qode_options_proya['single_slider_navigation_arrow_size'] . 'px';
}
if (isset($qode_options_proya['single_slider_navigation_arrow_color']) && $qode_options_proya['single_slider_navigation_arrow_color'] !== '') {
    $rgb_color = qode_hex2rgb($qode_options_proya['single_slider_navigation_arrow_color']);
    $rgb_transparency = 1;
    if (isset($qode_options_proya['single_slider_navigation_arrow_transparency']) && $qode_options_proya['single_slider_navigation_arrow_transparency'] !== '') {
        $rgb_transparency = $qode_options_proya['single_slider_navigation_arrow_transparency'];
    }
    $single_sliders_arrow_style[] = 'color: rgba(' . $rgb_color[0] . ',' . $rgb_color[1] . ',' . $rgb_color[2] . ',' . $rgb_transparency . ')';
}
if (isset($qode_options_proya['single_slider_navigation_arrow_hover_color']) && $qode_options_proya['single_slider_navigation_arrow_hover_color'] !== '') {
    $rgb_color = qode_hex2rgb($qode_options_proya['single_slider_navigation_arrow_hover_color']);
    $rgb_transparency = 1;
    if (isset($qode_options_proya['single_slider_navigation_arrow_hover_transparency']) && $qode_options_proya['single_slider_navigation_arrow_hover_transparency'] !== '') {
        $rgb_transparency = $qode_options_proya['single_slider_navigation_arrow_hover_transparency'];
    }
    $single_sliders_arrow_hover_style[] = 'color: rgba(' . $rgb_color[0] . ',' . $rgb_color[1] . ',' . $rgb_color[2] . ',' . $rgb_transparency . ')';
}
if (is_array($single_sliders_style) && count($single_sliders_style)) {
    ?>
	.flex-direction-nav a,
	.flexslider .flex-prev,
	.portfolio_slider .flex-prev,
	.flexslider .flex-next,
	.portfolio_slider .flex-next,
	body div.pp_default a.pp_next:after,
	body div.pp_default a.pp_previous:after,
コード例 #9
0
    }
    $cf7_custom_style_3_button_hover_styles = '';
    if (isset($qode_options_proya['cf7_custom_style_3_button_font_hover_color']) && $qode_options_proya['cf7_custom_style_3_button_font_hover_color'] !== '') {
        $cf7_custom_style_3_button_hover_styles .= 'color: ' . $qode_options_proya['cf7_custom_style_3_button_font_hover_color'] . ';';
    }
    if (isset($qode_options_proya['cf7_custom_style_3_button_hover_background_color']) && $qode_options_proya['cf7_custom_style_3_button_hover_background_color'] !== '') {
        if (isset($qode_options_proya['cf7_custom_style_3_button_background_transparency']) && $qode_options_proya['cf7_custom_style_3_button_background_transparency'] !== '') {
            $cf7_custom_style_3_button_hover_background_color = qode_hex2rgb($qode_options_proya['cf7_custom_style_3_button_hover_background_color']);
            $cf7_custom_style_3_button_hover_styles .= 'background-color: rgba(' . $cf7_custom_style_3_button_hover_background_color[0] . ',' . $cf7_custom_style_3_button_hover_background_color[1] . ',' . $cf7_custom_style_3_button_hover_background_color[2] . ',' . $qode_options_proya['cf7_custom_style_3_button_background_transparency'] . ');';
        } else {
            $cf7_custom_style_3_button_hover_styles .= 'background-color: ' . $qode_options_proya['cf7_custom_style_3_button_hover_background_color'] . ';';
        }
    }
    if (isset($qode_options_proya['cf7_custom_style_3_button_hover_border_color']) && $qode_options_proya['cf7_custom_style_3_button_hover_border_color'] !== '') {
        if (isset($qode_options_proya['cf7_custom_style_3_button_border_transparency']) && $qode_options_proya['cf7_custom_style_3_button_border_transparency'] !== '') {
            $cf7_custom_style_3_button_hover_border_color = qode_hex2rgb($qode_options_proya['cf7_custom_style_3_button_hover_border_color']);
            $cf7_custom_style_3_button_hover_styles .= 'border-color: rgba(' . $cf7_custom_style_3_button_hover_border_color[0] . ',' . $cf7_custom_style_3_button_hover_border_color[1] . ',' . $cf7_custom_style_3_button_hover_border_color[2] . ',' . $qode_options_proya['cf7_custom_style_3_button_border_transparency'] . ');';
        } else {
            $cf7_custom_style_3_button_hover_styles .= 'border-color: ' . $qode_options_proya['cf7_custom_style_3_button_hover_border_color'] . ';';
        }
    }
    ?>

<?php 
    if ($cf7_custom_style_1_button_styles !== "") {
        ?>
	.cf7_custom_style_1  input.wpcf7-form-control.wpcf7-submit,
	.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-submit:not([disabled]) {
		<?php 
        echo $cf7_custom_style_1_button_styles;
        ?>
コード例 #10
0
$headings_array = array('h2', 'h3', 'h4', 'h5', 'h6');
//get correct heading value. If provided heading isn't valid get the default one
$title_tag = in_array($title_tag, $headings_array) ? $title_tag : $args['title_tag'];
$text_in_circle_tag = in_array($text_in_circle_tag, $headings_array) ? $text_in_circle_tag : $args['text_in_circle_tag'];
$html = '';
$image_src = '';
$image_alt = '';
$circle_style = '';
$border_class = '';
$text_in_circle_style = '';
$icon_style = '';
$title_style = '';
$text_style = '';
if ($background_color != "") {
    if ($background_transparency != "") {
        $bg_color = qode_hex2rgb($background_color);
        $circle_style .= "background-color: rgba(" . $bg_color[0] . "," . $bg_color[1] . "," . $bg_color[2] . "," . $background_transparency . ");";
    } else {
        $circle_style .= "background-color: " . $background_color . ";";
    }
}
if ($border_color != "") {
    $circle_style .= " border-color: " . $border_color . ";";
}
if (intval($border_width) > 5) {
    $border_class = " big_border";
}
if ($border_width != "") {
    $circle_style .= "border-width: " . $border_width . "px;";
}
if ($text_in_circle_color != "") {
コード例 #11
0
		padding: 35px 0 43px;
	}
<?php 
}
?>

<?php 
if (isset($qode_options['portfolio_shader_color']) && !empty($qode_options['portfolio_shader_color'])) {
    ?>
	<?php 
    if (isset($qode_options['portfolio_shader_transparency']) && !empty($qode_options['portfolio_shader_transparency'])) {
        $portfolio_shader_transparency = $qode_options['portfolio_shader_transparency'];
    } else {
        $portfolio_shader_transparency = 1;
    }
    $shader_bg_color = qode_hex2rgb($qode_options['portfolio_shader_color']);
    ?>

    .projects_holder article .portfolio_shader, .projects_masonry_holder article .portfolio_shader, .portfolio_slides .portfolio_shader{
        background-color: rgba(<?php 
    echo $shader_bg_color[0];
    ?>
,<?php 
    echo $shader_bg_color[1];
    ?>
,<?php 
    echo $shader_bg_color[2];
    ?>
,<?php 
    echo $portfolio_shader_transparency;
    ?>
コード例 #12
0
ファイル: style_dynamic.php プロジェクト: k2jysy/wedev
    echo $dropdown_bg_color_initial[0];
    ?>
,<?php 
    echo $dropdown_bg_color_initial[1];
    ?>
,<?php 
    echo $dropdown_bg_color_initial[2];
    ?>
,<?php 
    echo $dropdown_bg_transparency;
    ?>
);
}
<?php 
} else {
    $dropdown_bg_color_initial = qode_hex2rgb("#000");
    if (!empty($qode_options_theme13['dropdown_background_transparency'])) {
        $dropdown_bg_transparency = $qode_options_theme13['dropdown_background_transparency'];
    } else {
        $dropdown_bg_transparency = 0.8;
    }
    ?>

<?php 
}
if (!empty($qode_options_theme13['menu_color']) || !empty($qode_options_theme13['menu_fontsize']) || !empty($qode_options_theme13['menu_fontstyle']) || !empty($qode_options_theme13['menu_fontweight']) || !empty($qode_options_theme13['menu_letter_spacing']) || $qode_options_theme13['menu_google_fonts'] != "-1") {
    ?>
nav.main_menu > ul > li > a{
	<?php 
    if (!empty($qode_options_theme13['menu_color'])) {
        ?>
コード例 #13
0
ファイル: title.php プロジェクト: surreal8/wptheme
    $title_text_style[] = 'color: ' . get_post_meta($id, "qode_page-title-color", true);
}
if (get_post_meta($id, "qode_page-title-text-background-color", true) != '') {
    $original_color = get_post_meta($id, "qode_page-title-text-background-color", true);
    $rgb_color = qode_hex2rgb($original_color);
    if (get_post_meta($id, "qode_page-title-text-background-opacity", true) != '') {
        $opacity = get_post_meta($id, "qode_page-title-text-background-opacity", true);
    } elseif (isset($qode_options['title_text_background_opacity']) && $qode_options['title_text_background_opacity'] != '') {
        $opacity = $qode_options['title_text_background_opacity'];
    } else {
        $opacity = 1;
    }
    $title_text_style[] = 'background-color: rgba(' . $rgb_color[0] . ',' . $rgb_color[1] . ',' . $rgb_color[2] . ',' . $opacity . ')';
} elseif (isset($qode_options['title_text_background_color']) && $qode_options['title_text_background_color'] != '') {
    $original_color = $qode_options['title_text_background_color'];
    $rgb_color = qode_hex2rgb($original_color);
    if (get_post_meta($id, "qode_page-title-text-background-opacity", true) != '') {
        $opacity = get_post_meta($id, "qode_page-title-text-background-opacity", true);
    } elseif (isset($qode_options['title_text_background_opacity']) && $qode_options['title_text_background_opacity'] != '') {
        $opacity = $qode_options['title_text_background_opacity'];
    } else {
        $opacity = 1;
    }
    $title_text_style[] = 'background-color: rgba(' . $rgb_color[0] . ',' . $rgb_color[1] . ',' . $rgb_color[2] . ',' . $opacity . ')';
}
if ($is_title_area_visible) {
    ?>
	<div class="title_outer <?php 
    echo $animate_title_class . $title_text_shadow;
    if ($responsive_title_image == 'yes' && $show_title_image == true && $title_image !== '') {
        echo ' with_image';
コード例 #14
0
 function line_graph($atts, $content = null)
 {
     global $qode_options;
     extract(shortcode_atts(array("type" => "rounded", "custom_color" => "", "labels" => "", "width" => "750", "height" => "350", "scale_steps" => "3", "scale_step_width" => "15"), $atts));
     $id = mt_rand(1000, 9999);
     if ($type == "rounded") {
         $bezierCurve = "true";
     } else {
         $bezierCurve = "false";
     }
     $id = mt_rand(1000, 9999);
     $html = "<div class='q_line_graf_holder'><div class='q_line_graf'><canvas id='lineGraph" . $id . "' height='" . $height . "' width='" . $width . "'></canvas></div><div class='q_line_graf_legend'><ul>";
     $line_graph_array = explode(";", $content);
     for ($i = 0; $i < count($line_graph_array); $i = $i + 1) {
         $line_graph_el = explode(",", $line_graph_array[$i]);
         $html .= "<li><div class='color_holder' style='background-color: " . trim($line_graph_el[0]) . ";'></div><p style='color: " . $custom_color . ";'>" . trim($line_graph_el[1]) . "</p></li>";
     }
     $html .= "</ul></div></div><script>var lineGraph" . $id . " = {labels : [";
     $line_graph_labels_array = explode(",", $labels);
     for ($i = 0; $i < count($line_graph_labels_array); $i = $i + 1) {
         if ($i > 0) {
             $html .= ",";
         }
         $html .= '"' . $line_graph_labels_array[$i] . '"';
     }
     $html .= "],";
     $html .= "datasets : [";
     $line_graph_array = explode(";", $content);
     for ($i = 0; $i < count($line_graph_array); $i = $i + 1) {
         $line_graph_el = explode(",", $line_graph_array[$i]);
         if ($i > 0) {
             $html .= ",";
         }
         $values = "";
         for ($j = 2; $j < count($line_graph_el); $j = $j + 1) {
             if ($j > 2) {
                 $values .= ",";
             }
             $values .= $line_graph_el[$j];
         }
         $color = qode_hex2rgb(trim($line_graph_el[0]));
         $html .= "{fillColor: 'rgba(" . $color[0] . "," . $color[1] . "," . $color[2] . ",0.7)',data:[" . $values . "]}";
     }
     if (!empty($qode_options['text_fontsize'])) {
         $text_fontsize = $qode_options['text_fontsize'];
     } else {
         $text_fontsize = 15;
     }
     if (!empty($qode_options['text_color']) && $custom_color == "") {
         $text_color = $qode_options['text_color'];
     } else {
         if (empty($qode_options['text_color']) && $custom_color != "") {
             $text_color = $custom_color;
         } else {
             if (!empty($qode_options['text_color']) && $custom_color != "") {
                 $text_color = $custom_color;
             } else {
                 $text_color = '#818181';
             }
         }
     }
     $html .= "]};\n\t\t\tvar \$j = jQuery.noConflict();\n\t\t\t\$j(document).ready(function() {\n\t\t\t\tif(\$j('.touch .no_delay').length){\n\t\t\t\t\tnew Chart(document.getElementById('lineGraph" . $id . "').getContext('2d')).Line(lineGraph" . $id . ",{scaleOverride : true,\n\t\t\t\t\tscaleStepWidth : " . $scale_step_width . ",\n\t\t\t\t\tscaleSteps : " . $scale_steps . ",\n\t\t\t\t\tbezierCurve : " . $bezierCurve . ",\n\t\t\t\t\tpointDot : false,\n\t\t\t\t\tscaleLineColor: '#505050',\n\t\t\t\t\tscaleFontColor : '" . $text_color . "',\n\t\t\t\t\tscaleFontSize : " . $text_fontsize . ",\n\t\t\t\t\tscaleGridLineColor : '#e1e1e1',\n\t\t\t\t\tdatasetStroke : false,\n\t\t\t\t\tdatasetStrokeWidth : 0,\n\t\t\t\t\tanimationSteps : 120,});\n\t\t\t\t}else{\n\t\t\t\t\t\$j('#lineGraph" . $id . "').appear(function() {\n\t\t\t\t\t\tnew Chart(document.getElementById('lineGraph" . $id . "').getContext('2d')).Line(lineGraph" . $id . ",{scaleOverride : true,\n\t\t\t\t\t\tscaleStepWidth : " . $scale_step_width . ",\n\t\t\t\t\t\tscaleSteps : " . $scale_steps . ",\n\t\t\t\t\t\tbezierCurve : " . $bezierCurve . ",\n\t\t\t\t\t\tpointDot : false,\n\t\t\t\t\t\tscaleLineColor: '#000000',\n\t\t\t\t\t\tscaleFontColor : '" . $text_color . "',\n\t\t\t\t\t\tscaleFontSize : " . $text_fontsize . ",\n\t\t\t\t\t\tscaleGridLineColor : '#e1e1e1',\n\t\t\t\t\t\tdatasetStroke : false,\n\t\t\t\t\t\tdatasetStrokeWidth : 0,\n\t\t\t\t\t\tanimationSteps : 120,});\n\t\t\t\t\t},{accX: 0, accY: -200});\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t});\n\t\t</script>";
     return $html;
 }
コード例 #15
0
ファイル: shortcodes.php プロジェクト: surreal8/wptheme
    function qode_slider($atts, $content = null)
    {
        global $qode_options;
        extract(shortcode_atts(array("slider" => "", "height" => "", "responsive_height" => "", "background_color" => "", "auto_start" => "", "animation_type" => "", "slide_animation" => "6000", "anchor" => "", "show_navigation" => "yes", "show_control" => "yes", "control_position" => "center"), $atts));
        $html = "";
        if ($slider != "") {
            $args = array('post_type' => 'slides', 'slides_category' => $slider, 'orderby' => "menu_order", 'order' => "ASC", 'posts_per_page' => -1);
            $slider_id = get_term_by('slug', $slider, 'slides_category')->term_id;
            $slider_meta = get_option("taxonomy_term_" . $slider_id);
            $slider_header_effect = $slider_meta['header_effect'];
            if ($slider_header_effect == 'yes') {
                $header_effect_class = 'header_effect';
            } else {
                $header_effect_class = '';
            }
            $slider_css_position_class = '';
            $slider_parallax = 'yes';
            if (isset($slider_meta['slider_parallax_effect'])) {
                $slider_parallax = $slider_meta['slider_parallax_effect'];
            }
            if ($slider_parallax == 'no' || isset($qode_options['paspartu']) && $qode_options['paspartu'] == 'yes') {
                $data_parallax_effect = 'data-parallax="no"';
                $slider_css_position_class = 'relative_position';
            } else {
                $data_parallax_effect = 'data-parallax="yes"';
            }
            $slider_thumbs = 'no';
            if ($slider_thumbs == 'yes') {
                $slider_thumbs_class = 'slider_thumbs';
            } else {
                $slider_thumbs_class = '';
            }
            if ($height == "" || $height == "0") {
                $full_screen_class = "full_screen";
                $responsive_height_class = "";
                $slide_height = "";
                $data_height = "";
            } else {
                $full_screen_class = "";
                if ($responsive_height == "yes") {
                    $responsive_height_class = "responsive_height";
                } else {
                    $responsive_height_class = "";
                }
                $slide_height = "height: " . $height . "px;";
                $data_height = "data-height='" . $height . "'";
            }
            $anchor_data = '';
            if ($anchor != "") {
                $anchor_data .= 'data-q_id = "#' . $anchor . '"';
            }
            $slider_transparency_class = "header_not_transparent";
            if (isset($qode_options['header_background_transparency_initial']) && $qode_options['header_background_transparency_initial'] != "1" && $qode_options['header_background_transparency_initial'] != "") {
                $slider_transparency_class = "";
            }
            if ($background_color != "") {
                $background_color = 'background-color:' . $background_color . ';';
            }
            $auto = "true";
            if ($auto_start != "") {
                $auto = $auto_start;
            }
            if ($auto == "true") {
                $auto_start_class = "q_auto_start";
            } else {
                $auto_start_class = "";
            }
            if ($slide_animation != "") {
                $slide_animation = 'data-slide_animation="' . $slide_animation . '"';
            } else {
                $slide_animation = 'data-slide_animation=""';
            }
            if ($animation_type == 'fade') {
                $animation_type_class = 'fade';
            } else {
                $animation_type_class = '';
            }
            /**************** Count positioning of navigation arrows and preloader depending on header transparency and layout - START ****************/
            global $wp_query;
            $page_id = $wp_query->get_queried_object_id();
            $header_height_padding = 0;
            if ((get_post_meta($page_id, "qode_header_color_transparency_per_page", true) == "" || get_post_meta($page_id, "qode_header_color_transparency_per_page", true) == "1") && ($qode_options['header_background_transparency_initial'] == "" || $qode_options['header_background_transparency_initial'] == "1") && $qode_options['header_bottom_appearance'] != "regular" && ($qode_options['enable_content_top_margin'] != "yes" && get_post_meta($page_id, "qode_enable_content_top_margin", true) != "yes")) {
                $header_bottom_appearance = "";
                if (isset($qode_options['header_bottom_appearance'])) {
                    $header_bottom_appearance = $qode_options['header_bottom_appearance'];
                }
                $header_top = 0;
                if (isset($qode_options['header_top_area']) && $qode_options['header_top_area'] == "yes") {
                    $header_top = 33;
                }
                if (!empty($qode_options['header_height']) && $header_bottom_appearance != "fixed_hiding") {
                    $header_height = $qode_options['header_height'];
                } elseif (!empty($qode_options['header_height']) && $header_bottom_appearance == "fixed_hiding") {
                    $header_height = $qode_options['header_height'] + 50;
                    // 50 is logo height for fixed advanced header type
                } elseif (isset($qode_options['center_logo_image']) && $qode_options['center_logo_image'] == "yes" && $header_bottom_appearance != "stick" || $header_bottom_appearance == "fixed_hiding") {
                    $header_height = 190;
                } else {
                    $header_height = 100;
                }
                if (!empty($qode_options['header_bottom_border_color'])) {
                    $header_height = $header_height + 1;
                }
                if ($header_bottom_appearance == "stick menu_bottom") {
                    $menu_bottom = 60;
                    // border 1px
                    if ($qode_options['center_logo_image'] == "yes") {
                        if (is_active_sidebar('header_fixed_right')) {
                            $menu_bottom = $menu_bottom + 26;
                            // 26 is for right widget in header bottom (line height of text)
                        }
                    }
                } else {
                    $menu_bottom = 0;
                }
                $header_height_padding = $header_height + $menu_bottom + $header_top;
                if (isset($qode_options['center_logo_image']) && $qode_options['center_logo_image'] == "yes") {
                    if (isset($qode_options['logo_image'])) {
                        $logo_width = 0;
                        $logo_height = 0;
                        if (!empty($qode_options['logo_image'])) {
                            $logo_url_obj = parse_url($qode_options['logo_image']);
                            list($logo_width, $logo_height, $logo_type, $logo_attr) = getimagesize($_SERVER['DOCUMENT_ROOT'] . $logo_url_obj['path']);
                        }
                    }
                    if ($header_bottom_appearance == "stick menu_bottom") {
                        $header_height_padding = $logo_height + $menu_bottom + $header_top + 20;
                        // 20 is top and bottom margin of centered logo
                    } else {
                        $header_height_padding = $header_height + $logo_height + $header_top + 20;
                        // 20 is top and bottom margin of centered logo
                    }
                }
            }
            if ($header_height_padding != 0) {
                $navigation_margin_top = 'style="margin-top:' . ($header_height_padding / 2 - 25) . 'px;"';
                // 25 is half height of arrow
                $loader_margin_top = 'style="margin-top:' . $header_height_padding / 2 . 'px;"';
            } else {
                $navigation_margin_top = '';
                $loader_margin_top = '';
            }
            /**************** Count positioning of navigation arrows and preloader depending on header transparency and layout - END ****************/
            $html .= '<div id="qode-' . $slider . '" ' . $anchor_data . ' class="carousel slide ' . $animation_type_class . ' ' . $full_screen_class . ' ' . $responsive_height_class . ' ' . $auto_start_class . ' ' . $header_effect_class . ' ' . $slider_thumbs_class . ' ' . $slider_transparency_class . '" ' . $slide_animation . ' ' . $data_height . ' ' . $data_parallax_effect . ' style="' . $slide_height . ' ' . $background_color . '"><div class="qode_slider_preloader"><div class="ajax_loader" ' . $loader_margin_top . '><div class="ajax_loader_1">' . qode_loading_spinners(true) . '</div></div></div>';
            $html .= '<div class="carousel-inner ' . $slider_css_position_class . '" data-start="transform: translateY(0px);" data-1440="transform: translateY(-500px);">';
            query_posts($args);
            $found_slides = $wp_query->post_count;
            if (have_posts()) {
                $postCount = 0;
                while (have_posts()) {
                    the_post();
                    $active_class = '';
                    if ($postCount == 0) {
                        $active_class = 'active';
                    } else {
                        $active_class = 'inactive';
                    }
                    $slide_type = get_post_meta(get_the_ID(), "qode_slide-background-type", true);
                    $image = get_post_meta(get_the_ID(), "qode_slide-image", true);
                    $image_overlay_pattern = get_post_meta(get_the_ID(), "qode_slide-overlay-image", true);
                    $thumbnail = get_post_meta(get_the_ID(), "qode_slide-thumbnail", true);
                    $thumbnail_animation = get_post_meta(get_the_ID(), "qode_slide-thumbnail-animation", true);
                    $thumbnail_link = "";
                    if (get_post_meta(get_the_ID(), "qode_slide-thumbnail-link", true) != "") {
                        $thumbnail_link = get_post_meta(get_the_ID(), "qode_slide-thumbnail-link", true);
                    }
                    $video_webm = get_post_meta(get_the_ID(), "qode_slide-video-webm", true);
                    $video_mp4 = get_post_meta(get_the_ID(), "qode_slide-video-mp4", true);
                    $video_ogv = get_post_meta(get_the_ID(), "qode_slide-video-ogv", true);
                    $video_image = get_post_meta(get_the_ID(), "qode_slide-video-image", true);
                    $video_overlay = get_post_meta(get_the_ID(), "qode_slide-video-overlay", true);
                    $video_overlay_image = get_post_meta(get_the_ID(), "qode_slide-video-overlay-image", true);
                    $content_animation = get_post_meta(get_the_ID(), "qode_slide-content-animation", true);
                    $content_parallax_animation = get_post_meta(get_the_ID(), "qode_slide-contnet-fading-out", true);
                    $slide_content_style = "";
                    if (get_post_meta(get_the_ID(), "qode_slide-content-background-color", true) != "") {
                        $slide_content_style .= "background-color: " . get_post_meta(get_the_ID(), "qode_slide-content-background-color", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-content-text-padding", true) != "") {
                        $slide_content_style .= "padding: " . get_post_meta(get_the_ID(), "qode_slide-content-text-padding", true) . ";";
                    }
                    $slide_title_style = "";
                    if (get_post_meta(get_the_ID(), "qode_slide-title-color", true) != "") {
                        $slide_title_style .= "color: " . get_post_meta(get_the_ID(), "qode_slide-title-color", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-title-font-size", true) != "") {
                        $slide_title_style .= "font-size: " . get_post_meta(get_the_ID(), "qode_slide-title-font-size", true) . "px;";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-title-line-height", true) != "") {
                        $slide_title_style .= "line-height: " . get_post_meta(get_the_ID(), "qode_slide-title-line-height", true) . "px;";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-title-font-family", true) !== "" && get_post_meta(get_the_ID(), "qode_slide-title-font-family", true) !== "-1") {
                        $slide_title_style .= "font-family: '" . str_replace('+', ' ', get_post_meta(get_the_ID(), "qode_slide-title-font-family", true)) . "';";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-title-font-style", true) != "") {
                        $slide_title_style .= "font-style: " . get_post_meta(get_the_ID(), "qode_slide-title-font-style", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-title-font-weight", true) != "") {
                        $slide_title_style .= "font-weight: " . get_post_meta(get_the_ID(), "qode_slide-title-font-weight", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-title-letter-spacing', true) !== '') {
                        $slide_title_style .= 'letter-spacing: ' . get_post_meta(get_the_ID(), 'qode_slide-title-letter-spacing', true) . 'px;';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-title-text-transform', true) !== '') {
                        $slide_title_style .= 'text-transform: ' . get_post_meta(get_the_ID(), 'qode_slide-title-text-transform', true) . ';';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-hide-shadow', true) == 'yes') {
                        $slide_title_style .= 'text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-title-bottom-margin', true) !== '') {
                        $slide_title_style .= 'margin-bottom: ' . get_post_meta(get_the_ID(), 'qode_slide-title-bottom-margin', true) . 'px;';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-title-background-color', true) !== '') {
                        $original_color = get_post_meta(get_the_ID(), 'qode_slide-title-background-color', true);
                        $color = qode_hex2rgb($original_color);
                        if (get_post_meta(get_the_ID(), 'qode_slide-title-background-opacity', true) !== '') {
                            $opacity = get_post_meta(get_the_ID(), 'qode_slide-title-background-opacity', true);
                            $slide_title_style .= 'background-color: rgba(' . $color[0] . ',' . $color[1] . ',' . $color[2] . ',' . $opacity . ')';
                        } else {
                            $slide_title_style .= 'background-color: rgba(' . $color[0] . ',' . $color[1] . ',' . $color[2] . ')';
                        }
                    }
                    $slide_subtitle_style = "";
                    if (get_post_meta(get_the_ID(), "qode_slide-subtitle-color", true) != "") {
                        $slide_subtitle_style .= "color: " . get_post_meta(get_the_ID(), "qode_slide-subtitle-color", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-subtitle-font-size", true) != "") {
                        $slide_subtitle_style .= "font-size: " . get_post_meta(get_the_ID(), "qode_slide-subtitle-font-size", true) . "px;";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-subtitle-line-height", true) != "") {
                        $slide_subtitle_style .= "line-height: " . get_post_meta(get_the_ID(), "qode_slide-subtitle-line-height", true) . "px;";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-subtitle-font-family", true) !== "" && get_post_meta(get_the_ID(), "qode_slide-subtitle-font-family", true) !== "-1") {
                        $slide_subtitle_style .= "font-family: '" . str_replace('+', ' ', get_post_meta(get_the_ID(), "qode_slide-subtitle-font-family", true)) . "';";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-subtitle-font-style", true) != "") {
                        $slide_subtitle_style .= "font-style: " . get_post_meta(get_the_ID(), "qode_slide-subtitle-font-style", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-subtitle-font-weight", true) != "") {
                        $slide_subtitle_style .= "font-weight: " . get_post_meta(get_the_ID(), "qode_slide-subtitle-font-weight", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-subtitle-letter-spacing', true) !== '') {
                        $slide_subtitle_style .= 'letter-spacing: ' . get_post_meta(get_the_ID(), 'qode_slide-subtitle-letter-spacing', true) . 'px;';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-subtitle-text-transform', true) !== '') {
                        $slide_subtitle_style .= 'text-transform: ' . get_post_meta(get_the_ID(), 'qode_slide-subtitle-text-transform', true) . ';';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-hide-shadow', true) == 'yes') {
                        $slide_subtitle_style .= 'text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-subtile-bottom-margin', true) !== '') {
                        $slide_subtitle_style .= 'margin-bottom: ' . get_post_meta(get_the_ID(), 'qode_slide-subtile-bottom-margin', true) . 'px;';
                    }
                    $slide_text_style = "";
                    $button_style = "";
                    if (get_post_meta(get_the_ID(), "qode_slide-text-color", true) != "") {
                        $slide_text_style .= "color: " . get_post_meta(get_the_ID(), "qode_slide-text-color", true) . ";";
                        $button_style = " style='border-color:" . get_post_meta(get_the_ID(), "qode_slide-text-color", true) . ";color:" . get_post_meta(get_the_ID(), "qode_slide-text-color", true) . ";'";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-text-font-size", true) != "") {
                        $slide_text_style .= "font-size: " . get_post_meta(get_the_ID(), "qode_slide-text-font-size", true) . "px;";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-text-line-height", true) != "") {
                        $slide_text_style .= "line-height: " . get_post_meta(get_the_ID(), "qode_slide-text-line-height", true) . "px;";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-text-font-family", true) !== "" && get_post_meta(get_the_ID(), "qode_slide-text-font-family", true) !== "-1") {
                        $slide_text_style .= "font-family: '" . str_replace('+', ' ', get_post_meta(get_the_ID(), "qode_slide-text-font-family", true)) . "';";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-text-font-style", true) != "") {
                        $slide_text_style .= "font-style: " . get_post_meta(get_the_ID(), "qode_slide-text-font-style", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-text-font-weight", true) != "") {
                        $slide_text_style .= "font-weight: " . get_post_meta(get_the_ID(), "qode_slide-text-font-weight", true) . ";";
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-text-letter-spacing', true) !== '') {
                        $slide_text_style .= 'letter-spacing: ' . get_post_meta(get_the_ID(), 'qode_slide-text-letter-spacing', true) . 'px;';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-text-text-transform', true) !== '') {
                        $slide_text_style .= 'text-transform: ' . get_post_meta(get_the_ID(), 'qode_slide-text-text-transform', true) . ';';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-hide-shadow', true) == 'yes') {
                        $slide_text_style .= 'text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);';
                    }
                    if (get_post_meta(get_the_ID(), 'qode_slide-text-bottom-margin', true) !== '') {
                        $slide_text_style .= 'margin-bottom: ' . get_post_meta(get_the_ID(), 'qode_slide-text-bottom-margin', true) . 'px;';
                    }
                    $graphic_alignment = get_post_meta(get_the_ID(), "qode_slide-graphic-alignment", true);
                    $content_alignment = get_post_meta(get_the_ID(), "qode_slide-content-alignment", true);
                    $separate_text_graphic = get_post_meta(get_the_ID(), "qode_slide-separate-text-graphic", true);
                    if (get_post_meta(get_the_ID(), "qode_slide-content-width", true) != "") {
                        $content_width = "width:" . get_post_meta(get_the_ID(), "qode_slide-content-width", true) . "%;";
                    } else {
                        $content_width = "width:80%;";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-content-left", true) != "") {
                        $content_xaxis = "left:" . get_post_meta(get_the_ID(), "qode_slide-content-left", true) . "%;";
                    } else {
                        if (get_post_meta(get_the_ID(), "qode_slide-content-right", true) != "") {
                            $content_xaxis = "right:" . get_post_meta(get_the_ID(), "qode_slide-content-right", true) . "%;";
                        } else {
                            $content_xaxis = "left: 10%;";
                        }
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-content-top", true) != "") {
                        $content_yaxis_start = "top:" . get_post_meta(get_the_ID(), "qode_slide-content-top", true) . "%;";
                        $content_yaxis_end = "top:" . (get_post_meta(get_the_ID(), "qode_slide-content-top", true) - 10) . "%;";
                    } else {
                        if (get_post_meta(get_the_ID(), "qode_slide-content-bottom", true) != "") {
                            $content_yaxis_start = "bottom:" . get_post_meta(get_the_ID(), "qode_slide-content-bottom", true) . "%;";
                            $content_yaxis_end = "bottom:" . (get_post_meta(get_the_ID(), "qode_slide-content-bottom", true) + 10) . "%;";
                        } else {
                            $content_yaxis_start = "top: 35%;";
                            $content_yaxis_end = "top: 10%;";
                        }
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-graphic-width", true) != "") {
                        $graphic_width = "width:" . get_post_meta(get_the_ID(), "qode_slide-graphic-width", true) . "%;";
                    } else {
                        $graphic_width = "width:50%;";
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-graphic-left", true) != "") {
                        $graphic_xaxis = "left:" . get_post_meta(get_the_ID(), "qode_slide-graphic-left", true) . "%;";
                    } else {
                        if (get_post_meta(get_the_ID(), "qode_slide-graphic-right", true) != "") {
                            $graphic_xaxis = "right:" . get_post_meta(get_the_ID(), "qode_slide-graphic-right", true) . "%;";
                        } else {
                            $graphic_xaxis = "left: 25%;";
                        }
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-graphic-top", true) != "") {
                        $graphic_yaxis_start = "top:" . get_post_meta(get_the_ID(), "qode_slide-graphic-top", true) . "%;";
                        $graphic_yaxis_end = "top:" . (get_post_meta(get_the_ID(), "qode_slide-graphic-top", true) - 10) . "%;";
                    } else {
                        if (get_post_meta(get_the_ID(), "qode_slide-graphic-bottom", true) != "") {
                            $graphic_yaxis_start = "bottom:" . get_post_meta(get_the_ID(), "qode_slide-graphic-bottom", true) . "%;";
                            $graphic_yaxis_end = "bottom:" . (get_post_meta(get_the_ID(), "qode_slide-graphic-bottom", true) + 10) . "%;";
                        } else {
                            $graphic_yaxis_start = "top: 30%;";
                            $graphic_yaxis_end = "top: 10%;";
                        }
                    }
                    $header_style = "";
                    if (get_post_meta(get_the_ID(), "qode_slide-header-style", true) != "") {
                        $header_style = get_post_meta(get_the_ID(), "qode_slide-header-style", true);
                    }
                    $vertical_alignment_class = '';
                    if (get_post_meta(get_the_ID(), "qode_slide-vertical-alignment", true) == "yes") {
                        $vertical_alignment_class = ' vertical_align_middle';
                    }
                    if ($header_height_padding !== 0 && get_post_meta(get_the_ID(), "qode_slide-vertical-alignment", true) == "yes") {
                        $vertical_alignment_top_padding_style = "padding-top:" . $header_height_padding . "px;";
                    } else {
                        $vertical_alignment_top_padding_style = "";
                    }
                    $content_bottom_right_alignment = '';
                    if (get_post_meta(get_the_ID(), "qode_slide-bottom-right-alignment", true) == "yes") {
                        $content_bottom_right_alignment = ' content_bottom_right_alignment';
                    }
                    $title = get_the_title();
                    $html .= '<div class="item ' . $header_style . $vertical_alignment_class . '" style="' . $slide_height . '">';
                    if ($slide_type == 'video') {
                        $html .= '<div class="video"><div class="mobile-video-image" style="background-image: url(' . $video_image . ')"></div><div class="video-overlay';
                        if ($video_overlay == "yes") {
                            $html .= ' active';
                        }
                        $html .= '"';
                        if ($video_overlay_image != "") {
                            $html .= ' style="background-image:url(' . $video_overlay_image . ');"';
                        }
                        $html .= '>';
                        if ($video_overlay_image != "") {
                            $html .= '<img src="' . $video_overlay_image . '" alt="" />';
                        } else {
                            $html .= '<img src="' . get_template_directory_uri() . '/css/img/pixel-video.png" alt="" />';
                        }
                        $html .= '</div><div class="video-wrap">
									
									<video class="video" width="1920" height="800" poster="' . $video_image . '" controls="controls" preload="auto" loop autoplay muted>';
                        if (!empty($video_webm)) {
                            $html .= '<source type="video/webm" src="' . $video_webm . '">';
                        }
                        if (!empty($video_mp4)) {
                            $html .= '<source type="video/mp4" src="' . $video_mp4 . '">';
                        }
                        if (!empty($video_ogv)) {
                            $html .= '<source type="video/ogg" src="' . $video_ogv . '">';
                        }
                        $html .= '<object width="320" height="240" type="application/x-shockwave-flash" data="' . get_template_directory_uri() . '/js/flashmediaelement.swf">
													<param name="movie" value="' . get_template_directory_uri() . '/js/flashmediaelement.swf" />
													<param name="flashvars" value="controls=true&file=' . $video_mp4 . '" />
													<img src="' . $video_image . '" width="1920" height="800" title="No video playback capabilities" alt="Video thumb" />
											</object>
									</video>		
							</div></div>';
                    } else {
                        $html .= '<div class="image" style="background-image:url(' . $image . ');">';
                        if ($slider_thumbs == 'no') {
                            $html .= '<img src="' . $image . '" alt="' . $title . '">';
                        }
                        if ($image_overlay_pattern !== "") {
                            $html .= '<div class="image_pattern" style="background: url(' . $image_overlay_pattern . ') repeat 0 0;"></div>';
                        }
                        $html .= '</div>';
                    }
                    $html_thumb = "";
                    if ($thumbnail != "") {
                        $html_thumb .= '<div class="thumb ' . $thumbnail_animation . '">';
                        if ($thumbnail_link != "") {
                            $html_thumb .= '<a href="' . $thumbnail_link . '" target="_self">';
                        }
                        $html_thumb .= '<img src="' . $thumbnail . '" alt="' . $title . '">';
                        if ($thumbnail_link != "") {
                            $html_thumb .= '</a>';
                        }
                        $html_thumb .= '</div>';
                    }
                    $html_text = "";
                    $title_class = "";
                    if (get_post_meta(get_the_ID(), "qode_slide-title-background-color", true) != '') {
                        $title_class .= ' with_bg_color';
                    }
                    $html_text .= '<div class="text ' . $content_animation . '" style="' . $slide_content_style . '">';
                    if (get_post_meta(get_the_ID(), "qode_slide-subtitle", true) != "") {
                        $html_text .= '<h3 class="q_slide_subtitle" style="' . $slide_subtitle_style . '"><span>' . get_post_meta(get_the_ID(), 'qode_slide-subtitle', true) . '</span></h3>';
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-hide-title", true) != true) {
                        $html_text .= '<h2 class="q_slide_title' . $title_class . '" style="' . $slide_title_style . '"><span>' . get_the_title() . '</span></h2>';
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-text", true) != "") {
                        $html_text .= '<h3 class="q_slide_text" style="' . $slide_text_style . '"><span>' . get_post_meta(get_the_ID(), "qode_slide-text", true) . '</span></h3>';
                    }
                    //check if first button should be displayed
                    $is_first_button_shown = get_post_meta(get_the_ID(), "qode_slide-button-label", true) != "" && get_post_meta(get_the_ID(), "qode_slide-button-link", true) != "";
                    //check if second button should be displayed
                    $is_second_button_shown = get_post_meta(get_the_ID(), "qode_slide-button-label2", true) != "" && get_post_meta(get_the_ID(), "qode_slide-button-link2", true) != "";
                    //does any button should be displayed?
                    $is_any_button_shown = $is_first_button_shown || $is_second_button_shown;
                    if ($is_any_button_shown) {
                        $html_text .= '<div class="slide_buttons_holder">';
                    }
                    $slide_button_target = "_self";
                    if (get_post_meta(get_the_ID(), "qode_slide-button-target", true) != "") {
                        $slide_button_target = get_post_meta(get_the_ID(), "qode_slide-button-target", true);
                    }
                    $slide_button_target2 = "_self";
                    if (get_post_meta(get_the_ID(), "qode_slide-button-target2", true) != "") {
                        $slide_button_target2 = get_post_meta(get_the_ID(), "qode_slide-button-target2", true);
                    }
                    if ($is_first_button_shown) {
                        $html_text .= '<a class="qbutton" href="' . get_post_meta(get_the_ID(), "qode_slide-button-link", true) . '" target="' . $slide_button_target . '">' . get_post_meta(get_the_ID(), "qode_slide-button-label", true) . '</a>';
                    }
                    if ($is_second_button_shown) {
                        $html_text .= '<a class="qbutton white"' . $button_style . 'href="' . get_post_meta(get_the_ID(), "qode_slide-button-link2", true) . '" target="' . $slide_button_target2 . '">' . get_post_meta(get_the_ID(), "qode_slide-button-label2", true) . '</a>';
                    }
                    if ($is_any_button_shown) {
                        $html_text .= '</div>';
                        //close div.slide_button_holder
                    }
                    if (get_post_meta(get_the_ID(), "qode_slide-anchor-button", true) !== '') {
                        $slide_anchor_style = array();
                        if (get_post_meta(get_the_ID(), "qode_slide-text-color", true) !== '') {
                            $slide_anchor_style[] = "color: " . get_post_meta(get_the_ID(), "qode_slide-text-color", true);
                        }
                        if ($slide_anchor_style !== '') {
                            $slide_anchor_style = 'style="' . implode(';', $slide_anchor_style) . '"';
                        }
                        $html_text .= '<div class="slide_anchor_holder"><a ' . $slide_anchor_style . ' class="slide_anchor_button anchor" href="' . get_post_meta(get_the_ID(), "qode_slide-anchor-button", true) . '"><i class="fa fa-angle-down"></i></a></div>';
                    }
                    $html_text .= '</div>';
                    $html .= '<div class="slider_content_outer ' . $content_bottom_right_alignment . '">';
                    if ($separate_text_graphic != 'yes' || get_post_meta(get_the_ID(), "qode_slide-vertical-alignment", true) == "yes") {
                        if ($content_parallax_animation == "fading_out_off") {
                            $html .= '<div class="slider_content ' . $content_alignment . '" style="' . $content_width . $content_xaxis . $content_yaxis_start . $vertical_alignment_top_padding_style . '">';
                        } else {
                            $html .= '<div class="slider_content ' . $content_alignment . '" style="' . $content_width . $content_xaxis . $content_yaxis_start . $vertical_alignment_top_padding_style . '" data-start="' . $content_width . ' opacity:1; ' . $content_xaxis . ' ' . $content_yaxis_start . '" data-300="opacity: 0; ' . $content_xaxis . ' ' . $content_yaxis_end . '">';
                        }
                        $html .= $html_thumb;
                        $html .= $html_text;
                        $html .= '</div>';
                    } else {
                        if ($content_parallax_animation == "fading_out_off") {
                            $html .= '<div class="slider_content ' . $graphic_alignment . '" style="' . $graphic_width . $graphic_xaxis . $graphic_yaxis_start . '">';
                        } else {
                            $html .= '<div class="slider_content ' . $graphic_alignment . '" style="' . $graphic_width . $graphic_xaxis . $graphic_yaxis_start . '" data-start="' . $graphic_width . ' opacity:1; ' . $graphic_xaxis . ' ' . $graphic_yaxis_start . '" data-300="opacity: 0; ' . $graphic_xaxis . ' ' . $graphic_yaxis_end . '">';
                        }
                        $html .= $html_thumb;
                        $html .= '</div>';
                        if ($content_parallax_animation == "fading_out_off") {
                            $html .= '<div class="slider_content ' . $content_alignment . '" style="' . $content_width . $content_xaxis . $content_yaxis_start . '">';
                        } else {
                            $html .= '<div class="slider_content ' . $content_alignment . '" style="' . $content_width . $content_xaxis . $content_yaxis_start . '" data-start="' . $content_width . ' opacity:1; ' . $content_xaxis . ' ' . $content_yaxis_start . '" data-300="opacity: 0; ' . $content_xaxis . ' ' . $content_yaxis_end . '">';
                        }
                        $html .= $html_text;
                        $html .= '</div>';
                    }
                    $html .= '</div>';
                    $html .= '</div>';
                    $postCount++;
                }
            } else {
                $html .= __('Sorry, no slides matched your criteria.', 'qode');
            }
            wp_reset_query();
            $html .= '</div>';
            if ($found_slides > 1) {
                if ($show_control == "yes") {
                    if ($content_parallax_animation == "fading_out_off") {
                        $html .= '<ol class="carousel-indicators">';
                    } else {
                        $html .= '<ol class="carousel-indicators" data-start="opacity: 1;" data-300="opacity:0;">';
                    }
                    query_posts($args);
                    if (have_posts()) {
                        $postCount = 0;
                        while (have_posts()) {
                            the_post();
                            $html .= '<li data-target="#qode-' . $slider . '" data-slide-to="' . $postCount . '"';
                            if ($postCount == 0) {
                                $html .= ' class="active"';
                            }
                            $html .= '></li>';
                            $postCount++;
                        }
                    } else {
                        $html .= __('Sorry, no posts matched your criteria.', 'qode');
                    }
                    wp_reset_query();
                    $html .= '</ol>';
                }
                if ($show_navigation == "yes") {
                    if ($content_parallax_animation == "fading_out_off") {
                        $html .= '<a class="left carousel-control" href="#qode-' . $slider . '" data-slide="prev"><span class="prev_nav" ' . $navigation_margin_top . '><span class="arrow_carrot-left"></span></span></a>';
                        $html .= '<a class="right carousel-control" href="#qode-' . $slider . '" data-slide="next"><span class="next_nav" ' . $navigation_margin_top . '><span class="arrow_carrot-right"></span></span></a>';
                    } else {
                        $html .= '<a class="left carousel-control" href="#qode-' . $slider . '" data-slide="prev" data-start="opacity: 1;" data-300="opacity:0;"><span class="prev_nav" ' . $navigation_margin_top . '><span class="arrow_carrot-left"></span></span></a>';
                        $html .= '<a class="right carousel-control" href="#qode-' . $slider . '" data-slide="next" data-start="opacity: 1;" data-300="opacity:0;"><span class="next_nav" ' . $navigation_margin_top . '><span class="arrow_carrot-right"></span></span></a>';
                    }
                }
            }
            $html .= '</div>';
        }
        return $html;
    }