case 'hidden-tablet': $el_class .= ' hidden-sm hidden-md'; break; case 'hidden-pc': $el_class .= ' hidden-lg'; break; case 'visible-phone': $el_class .= ' visible-xs-inline'; break; case 'visible-tablet': $el_class .= ' visible-sm-inline visible-md-inline'; break; case 'visible-pc': $el_class .= ' visible-lg-inline'; break; } global $dh_timeline_color, $dh_timeline_line_color, $dh_timeline_badge_color, $dh_timeline_badge_border_color, $dh_timeline_badge_background_color, $dh_timeline_content_color, $dh_timeline_content_border_color, $dh_timeline_content_background_color; $dh_timeline_color = $color; $dh_timeline_line_color = dh_format_color($line_color); $dh_timeline_badge_color = dh_format_color($badge_color); $dh_timeline_badge_border_color = dh_format_color($badge_border_color); $dh_timeline_badge_background_color = dh_format_color($badge_background_color); $dh_timeline_content_color = dh_format_color($content_color); $dh_timeline_content_border_color = dh_format_color($content_border_color); $dh_timeline_content_background_color = dh_format_color($content_background_color); $output .= '<div class="timeline ' . (!empty($type) && $type != 'none' ? ' timeline-' . $stype : '') . ($color != 'custom' ? ' timeline-' . $color : '') . (!empty($type) && $type != 'none' ? ' timeline-' . $type : '') . ' ' . $columns . '-columns' . ($columns === 'one' ? ' timeline-' . $columns_align : '') . $el_class . '">'; $output .= '<div class="timeline-wrap">'; $output .= wpb_js_remove_wpautop($content); $output .= '</div>'; $output .= '</div>'; echo $output;
case 'visible-phone': $el_class .= ' visible-xs-inline'; break; case 'visible-tablet': $el_class .= ' visible-sm-inline visible-md-inline'; break; case 'visible-pc': $el_class .= ' visible-lg-inline'; break; } $settings = get_option('wpb_js_google_fonts_subsets'); $subsets = ''; if (is_array($settings) && !empty($settings)) { $subsets = '&subset=' . implode(',', $settings); } $heading_type_color = dh_format_color($heading_type_color); if ($heading_type == 'typed_effect') { wp_enqueue_script('vendor-typed'); $el_class .= ' heading-typed'; list($word, $string) = dh_nth_word($text, 'last', false, true, $heading_type_color); $text = $word; } if ($heading_type == 'bold_first_word') { $el_class .= ' heading-bold-first-word'; $text = dh_nth_word($text, 'first', false); } if ($inherit_style != 'yes') { wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets); } $output .= '<' . $font_container_data['values']['tag'] . '' . (!empty($el_class) ? ' class="' . $el_class . '"' : '') . ($heading_type == 'typed_effect' ? ' data-typed-string="' . $string . '" ' : '') . ' style="' . implode(';', $styles) . '">'; $output .= $text;
break; case 'in-from-top': $fade_offset = ' top: -' . $fade_offset . 'px;'; break; case 'in-from-left': $fade_offset = ' left: -' . $fade_offset . 'px;'; break; case 'in-from-right': $fade_offset = ' right: -' . $fade_offset . 'px;'; break; case 'in-from-bottom': $fade_offset = ' bottom: -' . $fade_offset . 'px;'; break; } } else { $fade = ''; $fade_offset = ''; } $style = ''; if (!empty($fade_offset)) { $style = '' . $fade_offset . ';'; } $bg_color = dh_format_color($bg_color); if (!empty($bg_color)) { $style .= 'background-color:' . $bg_color . ';'; } if (!empty($style)) { $style = 'style="' . $style . '"'; } $output[] = "<div class=\"{$class}{$width}\" {$style} {$fade}>" . wpb_js_remove_wpautop($content) . "</div>"; echo implode("\n", $output);
?> <?php $footer_custom_color = array(); $custom_colors = array(); if (dh_get_theme_option('footer-color', 0)) { $footer_custom_color = dh_get_theme_option('footer-custom-color'); } $custom_colors['footer-widget-bg'] = isset($footer_custom_color['footer-widget-bg']) ? dh_format_color($footer_custom_color['footer-widget-bg']) : ''; $custom_colors['footer-widget-color'] = isset($footer_custom_color['footer-widget-color']) ? dh_format_color($footer_custom_color['footer-widget-color']) : ''; $custom_colors['footer-widget-link'] = isset($footer_custom_color['footer-widget-link']) ? dh_format_color($footer_custom_color['footer-widget-link']) : ''; $custom_colors['footer-widget-link-hover'] = isset($footer_custom_color['footer-widget-link-hover']) ? dh_format_color($footer_custom_color['footer-widget-link-hover']) : ''; $custom_colors['footer-bg'] = isset($footer_custom_color['footer-bg']) ? dh_format_color($footer_custom_color['footer-bg']) : ''; $custom_colors['footer-color'] = isset($footer_custom_color['footer-color']) ? dh_format_color($footer_custom_color['footer-color']) : ''; $custom_colors['footer-link-color'] = isset($footer_custom_color['footer-link']) ? dh_format_color($footer_custom_color['footer-link']) : ''; $custom_colors['footer-link-hover'] = isset($footer_custom_color['footer-link-hover']) ? dh_format_color($footer_custom_color['footer-link-hover']) : ''; if (!empty($custom_colors['footer-widget-bg'])) { ?> .footer-widget { background: <?php echo dhecho($custom_colors['footer-widget-bg']); ?> ; } <?php } ?> <?php if (!empty($custom_colors['footer-widget-color'])) { ?>
$target = $target != '' ? ' target="' . $target . '"' : ''; $inline_style = ''; $btn_size = ''; if ($size == 'custom') { $inline_style .= 'padding:' . $padding_top . 'px ' . $padding_right . 'px ' . $padding_bottom . 'px ' . $padding_left . 'px;border-width:' . $border_width . 'px;font-size:' . $font_size . 'px;'; } elseif ($size != 'default') { $btn_size = ' btn-' . $size; } $btn_color = ''; $data_cusotom_color = ''; if ($color == 'custom') { $inline_style .= 'background-color:' . $background_color . ';border-color:' . $border_color . ';color:' . $text_color; $btn_color = ' btn-custom-color'; $hover_background_color = dh_format_color($hover_background_color); $hover_border_color = dh_format_color($hover_border_color); $hover_text_color = dh_format_color($hover_text_color); $data_cusotom_color .= ' data-hover-background-color="' . $hover_background_color . '" data-hover-border-color="' . $hover_border_color . '" data-hover-color="' . $hover_text_color . '"'; } else { $btn_color = ' btn-' . $color; } $btn_style = $style != 'custom' ? ' btn-style-' . $style : ''; $btn_effect = !empty($effect) && $color != 'custom' && $color != 'default' ? ' btn-effect-' . str_replace('_', '-', $effect) : ''; $btn_class = 'btn' . $btn_color . (!empty($icon) ? ' btn-icon-' . $icon_position : '') . (!empty($text_uppercase) ? ' btn-uppercase' : '') . (!empty($block_button) ? ' btn-block' : '') . $btn_size . $btn_style . $btn_effect . (empty($block_button) ? ' btn-align-' . $alignment : ''); $data_el = ''; if (!empty($tooltip)) { $data_toggle = $tooltip; $data_el = ' data-container="body" data-original-title="' . ($tooltip === 'tooltip' ? esc_attr($tooltip_content) : esc_attr($tooltip_title)) . '" data-trigger="' . $tooltip_trigger . '" data-placement="' . $tooltip_position . '" ' . ($tooltip === 'popover' ? ' data-content="' . esc_attr($tooltip_content) . '"' : '') . ''; } if (!empty($data_toggle)) { $data_toggle = ' data-toggle="' . $data_toggle . '"'; }
<?php $output = ''; extract(shortcode_atts(array('recommend' => '', 'color' => '', 'title' => '', 'title_background_color' => '', 'title_color' => '', 'price' => '', 'currency' => '', 'units' => '', 'price_background_color' => '', 'price_color' => '', 'features' => '', 'features_alignment' => '', 'href' => '', 'target' => '', 'btn_title' => '', 'btn_style' => '', 'btn_size' => '', 'btn_icon' => '', 'btn_effect' => ''), $atts)); $title_background_color = dh_format_color($title_background_color); $title_color = dh_format_color($title_color); $price_background_color = dh_format_color($price_background_color); $price_color = dh_format_color($price_color); $title_css = ''; if (!empty($title_background_color) || !empty($title_color)) { $title_css .= ' style="'; if (!empty($title_background_color)) { $title_css .= 'background-color:' . $title_background_color . ';border-color:' . $title_background_color . ';'; } if (!empty($title_color)) { $title_css .= 'color:' . $title_color . ';'; } $title_css .= '"'; } $price_css = ''; if (!empty($price_background_color) || !empty($price_color)) { $price_css .= ' style="'; if (!empty($price_background_color)) { $price_css .= 'background-color:' . $price_background_color . ';border-color:' . $price_background_color . ';'; } if (!empty($price_color)) { $price_css .= 'color:' . $price_color . ';'; } $price_css .= '"'; } $output .= '<div class="pricing-column pricing-' . $color . '' . (!empty($recommend) ? ' pricing-recommend' : '') . '">';
<?php $brand_primary = dh_format_color(dh_get_theme_option('brand-primary', '#bca480')); $brand_primary = apply_filters('dh_brand_primary', $brand_primary); if ($brand_primary === '#bca480') { return ''; } // $darken_10_brand_primary = darken(dh_format_color($brand_primary),'10%'); $fade_70_brand_primary = fade(dh_format_color($brand_primary), '70%'); ?> a:hover, a:focus { color: <?php echo dh_print_string($brand_primary); ?> ; } .fade-loading i, .loadmore-action .loadmore-loading span { background: <?php echo dh_print_string($brand_primary); ?> ; } .loadmore-action .btn-loadmore:hover, .loadmore-action .btn-loadmore:focus { border-color: <?php echo dh_print_string($brand_primary); ?> ;
if (!empty($border_color)) { $cta_inline_style .= 'border-color:' . $border_color . ';'; } $output .= '<div class="' . $cta_class . $el_class . '" ' . (!empty($cta_inline_style) ? ' style="' . $cta_inline_style . '"' : '') . '>'; if ($buton_position == 'left') { $output .= '<div class="cta-btn">'; $output .= do_shortcode('[vc_button title="' . $btn_title . '" href="' . $href . '" target="' . $target . '" style="' . $btn_style . '" size="' . $btn_size . '" font_size="' . $btn_font_size . '" border_width="' . $btn_border_width . '" padding_top="' . $btn_padding_top . '" padding_right="' . $btn_padding_right . '" padding_bottom="' . $btn_padding_bottom . '" padding_left="' . $btn_padding_left . '" color="' . $btn_color . '" background_color="' . $btn_background_color . '" border_color="' . $btn_border_color . '" text_color="' . $btn_text_color . '" hover_background_color="' . $btn_hover_background_color . '" hover_border_color="' . $btn_hover_border_color . '" hover_text_color="' . $btn_hover_text_color . '" icon="' . $btn_icon . '" icon_position="' . $btn_icon_position . '" effect="' . $btn_effect . '" text_uppercase="' . $btn_text_uppercase . '" block_button="' . $block_button . '" tooltip="' . $tooltip . '" tooltip_position="' . $tooltip_position . '" tooltip_title="' . $tooltip_title . '" tooltip_content="' . $tooltip_content . '" tooltip_trigger="' . $tooltip_trigger . '"]'); $output .= '</div>'; } $output .= '<div class="cta-heading">'; if (!empty($heading) || !empty($second_heading)) { $output .= '<div class="cta-hgroup">'; if (!empty($heading)) { $heading_color = dh_format_color($heading_color); $output .= '<h3' . (!empty($heading_color) ? ' style="color:' . $heading_color . '"' : '') . '>' . $heading . '</h3>'; } if (!empty($second_heading)) { $heading_second_color = dh_format_color($heading_second_color); $output .= '<h4' . (!empty($heading_second_color) ? ' style="color:' . $heading_second_color . '"' : '') . '>' . $second_heading . '</h4>'; } $output .= '</div>'; } $output .= wpb_js_remove_wpautop($content, true); $output .= '</div>'; if ($buton_position != 'left') { $output .= '<div class="cta-btn">'; $output .= do_shortcode('[vc_button title="' . $btn_title . '" href="' . $href . '" target="' . $target . '" style="' . $btn_style . '" size="' . $btn_size . '" font_size="' . $btn_font_size . '" border_width="' . $btn_border_width . '" padding_top="' . $btn_padding_top . '" padding_right="' . $btn_padding_right . '" padding_bottom="' . $btn_padding_bottom . '" padding_left="' . $btn_padding_left . '" color="' . $btn_color . '" background_color="' . $btn_background_color . '" border_color="' . $btn_border_color . '" text_color="' . $btn_text_color . '" hover_background_color="' . $btn_hover_background_color . '" hover_border_color="' . $btn_hover_border_color . '" hover_text_color="' . $btn_hover_text_color . '" icon="' . $btn_icon . '" icon_position="' . $btn_icon_position . '" effect="' . $btn_effect . '" text_uppercase="' . $btn_text_uppercase . '" block_button="' . $block_button . '" tooltip="' . $tooltip . '" tooltip_position="' . $tooltip_position . '" tooltip_title="' . $tooltip_title . '" tooltip_content="' . $tooltip_content . '" tooltip_trigger="' . $tooltip_trigger . '"]'); $output .= '</div>'; } $output .= '</div>'; echo $output;
<?php $brand_warning = dh_format_color(dh_get_theme_option('brand-warning', '#f0ad4e')); $brand_warning = apply_filters('dh_brand_warning', $brand_warning); if ($brand_warning === '#f0ad4e') { return ''; } $darken_10_brand_warning = darken(dh_format_color($brand_warning), '10%'); $darken_12_brand_warning = darken(dh_format_color($brand_warning), '12%'); ?> .text-warning { color: <?php echo dhecho($brand_warning); ?> ; } .blockquote-warning { border-color: <?php echo dhecho($brand_warning); ?> ; } .btn-warning { background-color: <?php echo dhecho($brand_warning); ?> ; border-color: <?php echo dhecho($brand_warning); ?> ;
<?php $output = ''; extract(shortcode_atts(array('background_transparent' => '', 'color' => '', 'hide_pagination' => '', 'fx' => 'scroll', 'visibility' => '', 'el_class' => ''), $atts)); $el_class = !empty($el_class) ? ' ' . esc_attr($el_class) : ''; $el_class .= dh_visibility_class($visibility); /** * script * {{ */ wp_enqueue_script('vendor-carouFredSel'); $color = dh_format_color($color); $output .= '<div class="testimonial' . (!empty($background_transparent) ? ' bg-transparent' : '') . $el_class . '">'; $output .= '<div class="caroufredsel" data-visible="1" data-scroll-fx="' . $fx . '" data-speed="5000" data-responsive="1" data-infinite="1" data-autoplay="0">'; $output .= '<div class="caroufredsel-wrap">'; $output .= '<ul class="caroufredsel-items"' . (!empty($color) ? ' style="color:' . $color . '"' : '') . '>'; $output .= wpb_js_remove_wpautop($content); $output .= '</ul>'; $output .= '<a href="#" class="caroufredsel-prev hide"></a>'; $output .= '<a href="#" class="caroufredsel-next hide"></a>'; $output .= '</div>'; if (empty($hide_pagination)) { $output .= '<div class="caroufredsel-pagination">'; $output .= '</div>'; } $output .= '</div>'; $output .= '</div>'; echo $output;
<?php $brand_success = dh_format_color(dh_get_theme_option('brand-success', '#262626')); $brand_success = apply_filters('dh_brand_success', dhecho($brand_success)); if ($brand_success === '#262626') { return ''; } $darken_10_brand_success = darken(dh_format_color($brand_success), '10%'); $darken_12_brand_success = darken(dh_format_color($brand_success), '12%'); ?> .text-success { color: <?php echo dhecho($brand_success); ?> ; } .blockquote-success { border-color: <?php echo dhecho($brand_success); ?> ; } .btn-success { background-color: <?php echo dhecho($brand_success); ?> ; border-color: <?php echo dhecho($brand_success); ?> ;
$el_class .= ' hidden-sm hidden-md'; break; case 'hidden-pc': $el_class .= ' hidden-lg'; break; case 'visible-phone': $el_class .= ' visible-xs-inline'; break; case 'visible-tablet': $el_class .= ' visible-sm-inline visible-md-inline'; break; case 'visible-pc': $el_class .= ' visible-lg-inline'; break; } $border_color = dh_format_color($border_color); $border_size = absint($border_size); $img_id = preg_replace('/[^\\d]/', '', $image); $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => 'box-' . $style)); if ($img == NULL) { $img['thumbnail'] = '<img class="box-' . $style . '" src="' . vc_asset_url('vc/no_image.png') . '" />'; } //' <small>'.__('This is image placeholder, edit your page to replace it.', 'js_composer').'</small>'; if ((!empty($border_color) || !empty($border_size)) && ($style == 'border' || $style == 'border-circle' || $style == 'outline' || $style == 'outline-circle')) { $img = str_replace('<img', '<img style="border-width:' . $border_size . 'px;border-color:' . $border_color . '"', $img); } $a_rel = ''; $link_to = ''; if ($img_link_large == true) { $link_to = wp_get_attachment_url($img_id); $a_rel = ' data-rel="magnific-single-popup"';
$el_class .= ' hidden-lg'; break; case 'visible-phone': $el_class .= ' visible-xs-inline'; break; case 'visible-tablet': $el_class .= ' visible-sm-inline visible-md-inline'; break; case 'visible-pc': $el_class .= ' visible-lg-inline'; break; } $border_color = dh_format_color($border_color); $text_color = dh_format_color($text_color); $background_color = dh_format_color($background_color); $title_color = dh_format_color($title_color); $data_custom = ''; if ($color == 'custom') { $data_custom .= ' data-background-color="' . $background_color . '" data-border-color="' . $border_color . '" data-text-color="' . $text_color . '"'; } $output .= '<div class="piechart piechart-style-' . $style . $el_class . '" data-value="' . absint($value) . '" data-units="' . $units . '" data-border-size="' . $border_size . '" data-size="' . absint($box_size) . '">'; $output .= '<div class="pichart-canvas' . ($color != 'custom' ? ' piechart-' . $color : ' pichart-custom') . '"' . $data_custom . '>'; $output .= '<span class="pichart-canvas-back"></span>'; $output .= '<span class="pichart-canvas-value" style="font-size:' . $text_size . 'px;"></span>'; $output .= '<canvas width="' . $box_size . '" height="' . $box_size . '"></canvas>'; $output .= '</div>'; if (!empty($title)) { $output .= '<h3 class="el-heading" ' . (!empty($title_color) ? ' style="color:' . $title_color . '"' : '') . '>' . $title . '</h3>'; } $output .= '</div>'; echo $output;
$el_class .= ' hidden-sm hidden-md'; break; case 'hidden-pc': $el_class .= ' hidden-lg'; break; case 'visible-phone': $el_class .= ' visible-xs-inline'; break; case 'visible-tablet': $el_class .= ' visible-sm-inline visible-md-inline'; break; case 'visible-pc': $el_class .= ' visible-lg-inline'; break; } $output .= '<div class="dh-lists' . $el_class . '" data-animation="' . ($disable_animation == 'yes' ? '0' : '1') . '">'; $output .= '<ul>'; $items_arr = explode(',', $items); $icon_color = dh_format_color($icon_color); $item_color = dh_format_color($item_color); foreach ($items_arr as $item) { $output .= '<li style="font-size:' . absint($text_size) . 'px;' . (!empty($item_color) ? 'color:' . $item_color : '') . '">'; if (!empty($icon)) { $output .= '<i class="' . $icon . '" style="' . (!empty($icon_color) ? 'color:' . $icon_color : '') . '"></i>'; } $output .= $item; $output .= '</li>'; } $output .= '</ul>'; $output .= '</div>'; echo $output;
<?php $brand_danger = dh_format_color(dh_get_theme_option('brand-danger', '#bb5857')); $brand_danger = apply_filters('dh_brand_danger', $brand_danger); if ($brand_danger === '#bb5857') { return ''; } $darken_10_brand_danger = darken(dh_format_color(dh_get_theme_option('brand-danger', '#bb5857')), '10%'); $darken_12_brand_danger = darken(dh_format_color(dh_get_theme_option('brand-danger', '#bb5857')), '12%'); ?> .text-danger { color: <?php echo dhecho($brand_danger); ?> ; } .blockquote-danger { border-color: <?php echo dhecho($brand_danger); ?> ; } .btn-danger { background-color: <?php echo dhecho($brand_danger); ?> ; border-color: <?php echo dhecho($brand_danger); ?> ;
$class .= ' visible-xs-inline'; break; case 'visible-tablet': $class .= ' visible-sm-inline visible-md-inline'; break; case 'visible-pc': $class .= ' visible-lg-inline'; break; } $progress_height_style = ''; if ($progress_height === 'custom') { $progress_height_value = absint($progress_height_value); $progress_height_style = 'style="line-height: ' . $progress_height_value . 'px;height: ' . $progress_height_value . 'px;"'; } $title_color = dh_format_color($title_color); $label_color = dh_format_color($label_color); $bar_options = ''; $options = explode(",", $options); if (in_array("animated", $options)) { $bar_options .= " progress-bar-animated active"; } if (in_array("striped", $options)) { $bar_options .= " progress-bar-striped"; } $output[] = '<div class="' . $class . '">'; $output[] = !empty($title) ? '<h3 class="el-heading" ' . (!empty($title_color) ? 'style="color:' . $title_color . '"' : '') . '>' . $title . '</h3>' : ''; $graph_lines = explode(",", $values); $max_value = 0.0; $graph_lines_data = array(); foreach ($graph_lines as $line) { $new_line = array();
* {{ */ wp_enqueue_script('vendor-countTo'); $el_class = !empty($el_class) ? ' ' . esc_attr($el_class) : ''; $el_class .= dh_visibility_class($visibility); $number_color = dh_format_color($number_color); $text_color = dh_format_color($text_color); $units_color = dh_format_color($units_color); $number = dh_get_number($number); $number_format = $number; $data_format = ''; if (!empty($format)) { $thousand_sep = wp_specialchars_decode(stripslashes($thousand_sep), ENT_QUOTES); $decimal_sep = wp_specialchars_decode(stripslashes($decimal_sep), ENT_QUOTES); $num_decimals = absint($num_decimals); $data_format = ' data-thousand-sep="' . esc_attr($thousand_sep) . '" data-decimal-sep="' . esc_attr($decimal_sep) . '" data-num-decimals="' . $num_decimals . '"'; $number_format = number_format($number, absint($num_decimals), $decimal_sep, $thousand_sep); } $output .= '<div class="counter counter-icon-' . $icon_position . '">'; $icon_html = ''; if (!empty($icon)) { $icon_color = dh_format_color($icon_color); $icon_html .= '<span class="el-appear counter-icon" style="font-size:' . $icon_font_size . 'px;' . (!empty($icon_color) ? 'color:' . $icon_color : '') . '"><i class="' . $icon . '"></i></span>'; } if ($icon_position == 'top') { $output .= $icon_html; } $output .= '<div class="counter-text" style="font-size:' . $text_font_size . 'px;' . (!empty($text_color) ? 'color:' . $text_color . '' : '') . '">' . esc_html($text) . '</div>'; $output .= '<div class="counter-count">' . ($icon_position != 'top' ? $icon_html : '') . '<span class="counter-number"' . $data_format . ' data-to="' . $number . '" data-speed="' . $speed . '" style="font-size:' . $number_font_size . 'px;' . (!empty($number_color) ? 'color:' . $number_color . '' : '') . '">' . $number_format . '</span>' . (!empty($units) ? '<span class="counter-unit" style="font-size:' . $units_font_size . 'px;' . (!empty($units_color) ? 'color:' . $units_color . '' : '') . '">' . esc_html($units) . '</span>' : '') . '</div>'; $output .= '</div>'; echo $output;
} $output .= '<div class="iconbox-icon ' . (!empty($is_circle) ? ' icon-circle' : '') . $icon_color_class . $icon_size_class . '">'; $output .= '<i data-toggle="iconbox" class="' . $el_appear . $icon . '" ' . $data_hover . '' . (!empty($icon_css) ? ' style="' . $icon_css . '"' : '') . '></i>'; $output .= '</div>'; if ($link != '' && $link_type == 'icon_link') { $output .= '</a>'; } } if (!empty($title) || !empty($text) || $link != '' && $link_type == 'text_link') { $output .= '<div class="iconbox-content">'; if (!empty($title)) { $title_color = dh_format_color($title_color); $output .= '<h3 class="el-heading"' . (!empty($title_color) ? ' style="color:' . $title_color . '"' : '') . '>' . esc_html($title) . '</h3>'; } if (!empty($text)) { $text_color = dh_format_color($text_color); $output .= '<p' . (!empty($text_color) ? ' style="color:' . $text_color . '"' : '') . '>' . esc_html($text) . '</p>'; } if ($link != '' && $link_type == 'text_link') { $href = !strstr($link, 'http:') && !strstr($link, 'https:') ? home_url($link) : $link; $link_style = !empty($link_style) ? ' style="' . $link_style . '"' : ''; $output .= '<a class="text-' . $color . '" href="' . esc_url($href) . '"' . $target . $link_style . '>' . esc_html($link_text) . ' <i class="fa fa-arrow-circle-o-right"></i></a>'; } $output .= '</div>'; } if ($icon_position == 'right') { if ($link != '' && $link_type == 'icon_link') { $href = !strstr($link, 'http:') && !strstr($link, 'https:') ? home_url($link) : $link; $output .= '<a href="' . esc_url($href) . '"' . $target . '>'; } $output .= '<div class="iconbox-icon ' . (!empty($is_circle) ? ' icon-circle' : '') . $icon_color_class . $icon_size_class . '" ' . $data_hover . '' . (!empty($icon_css) ? ' style="' . $icon_css . '"' : '') . '>';
$output .= '<div class="latestnews latestnews-' . $style . $class . '">'; $sub_cats = array(); $tab = ''; $id = uniqid('latestnews_'); if ($style === 'tab' && !empty($categories) && ($category = get_category_by_slug($categories))) { $sub_cats = get_categories(array('child_of' => $category->term_id, 'number' => 3, 'hierarchical' => false)); if (!empty($sub_cats)) { $tab .= '<ul class="sub-cat">'; $tab .= '<li class="active"><a data-toggle="tab" href="#' . $id . '0">' . __('All', DH_THEME_DOMAIN) . '</a></li>'; foreach ((array) $sub_cats as $cat) { $tab .= '<li><a data-toggle="tab" href="#' . $id . $cat->term_id . '">' . $cat->name . '</a></li>'; } $tab .= '</ul>'; } } $title_bg = dh_format_color($title_bg); if (!empty($categories) && !empty($title_is_cat_name)) { $output .= '<div class="latestnews-title"' . (!empty($title_bg) ? ' style="border-color:' . $title_bg . '"' : '') . '>'; $category = get_category_by_slug($categories); $output .= '<h3 class="el-heading"' . (!empty($title_bg) ? ' style="background-color:' . $title_bg . '"' : '') . '><a href="' . esc_url(get_category_link($category)) . '">' . (!empty($title_icon) ? '<i class="' . esc_attr($title_icon) . '"></i>' : '') . $category->name . '</a></h3>'; $output .= $tab; $output .= '</div>'; } elseif (!empty($title)) { $output .= '<div class="latestnews-title"' . (!empty($title_bg) ? ' style="border-color:' . $title_bg . '"' : '') . '>'; $output .= '<h3 class="el-heading"' . (!empty($title_bg) ? ' style="background-color:' . $title_bg . '"' : '') . '><span>' . (!empty($title_icon) ? '<i class="' . esc_attr($title_icon) . '"></i>' : '') . $title . '</span></h3>'; $output .= $tab; $output .= '</div>'; } $output .= '<div class="latestnews-content">'; if ($style === 'carousel') { /**
<?php $brand_primary = dh_format_color(dh_get_theme_option('brand-primary', '#262626')); $brand_primary = apply_filters('dh_brand_primary', $brand_primary); if ($brand_primary === '#262626') { return ''; } $darken_10_brand_primary = darken(dh_format_color($brand_primary), '10%'); $darken_12_brand_primary = darken(dh_format_color($brand_primary), '12%'); ?> .fade-loading i { background: none repeat scroll 0 0 <?php echo dhecho($brand_primary); ?> ; } .text-primary { color: <?php echo dhecho($brand_primary); ?> ; } .bg-primary { background-color: <?php echo dhecho($brand_primary); ?> ; } .blockquote-primary { border-color: <?php