$id = uniqid();
if (!empty($icon)) {
    $icon = strpos($icon, 'mk-') !== FALSE ? $icon : 'mk-' . $icon . '';
}
$text_size = $text_size > 12 ? ';font-size:' . $text_size . 'px' : '';
$font_weight = $font_weight ? ';font-weight:' . $font_weight . '' : '';
$output = '<div class="' . $el_class . ' ' . $visibility . '">';
$output .= '<div id="milestone-' . $id . '" class="mk-shortcode mk-milestone milestone-' . $icon_size . ' ' . $align . '-align" >';
$output .= $link != '' ? '<a href="' . $link . '">' : '';
$output .= '<i style="color:' . $icon_color . '" class="' . $icon . '"></i>';
$output .= '<div class="milestone-top">';
$output .= !empty($prefix) ? '<span style="color:' . $text_color . $text_size . $font_weight . '" class="milestone-prefix">' . $prefix . '</span> ' : '';
$output .= '<span style="color:' . $text_color . $text_size . $font_weight . '" class="milestone-number" data-speed="' . $speed . '" data-stop="' . $stop . '">' . $start . '</span>';
$output .= !empty($suffix) ? ' <span style="color:' . $text_color . $text_size . $font_weight . '" class="milestone-suffix">' . $suffix . '</span>' : '';
$output .= !empty($text) ? '<div style="color:' . $text_color . ';font-size:' . $desc_size . 'px" class="milestone-text">' . $text . '</div>' : '';
$output .= '</div>';
$output .= '<div class="clearboth"></div>';
$output .= $link != '' ? '</a>' : '';
$output .= '</div></div>';
// Get global JSON contructor object for styles and create local variable
global $app_dynamic_styles;
$app_styles = '';
$app_styles .= '#milestone-' . $id . ' .milestone-text:after{background:' . $text_color . ';}';
// Hidden styles node for head injection after page load through ajax
echo '<div id="ajax-' . $id . '" class="mk-dynamic-styles">';
echo '<!-- ' . mk_clean_dynamic_styles($app_styles) . '-->';
echo '</div>';
// Export styles to json for faster page load
$app_dynamic_styles[] = array('id' => 'ajax-' . $id, 'inject' => $app_styles);
$output .= mk_get_fontfamily("#milestone-", $id, $font_family, $font_type);
echo $output;
Exemplo n.º 2
0
<?php

extract(shortcode_atts(array('el_class' => '', 'color' => '', 'highlight_color' => '', 'highlight_opacity' => 0.3, "size" => '18', 'letter_spacing' => 0, 'stroke' => 0, 'stroke_color' => '', 'font_weight' => 'normal', 'margin_bottom' => '20', 'margin_top' => '0', 'line_height' => '34', "align" => 'left', 'animation' => '', "font_family" => '', "font_type" => ''), $atts));
$id = uniqid();
$output = $stroke_style_css = $animation_css = $highlight_css = '';
$output .= mk_get_fontfamily("#fancy-title-", $id, $font_family, $font_type);
if ($animation != '') {
    $animation_css = ' mk-animate-element ' . $animation . ' ';
}
if ($stroke > 0) {
    $stroke_color = $stroke_color ? $stroke_color : $color;
    $stroke_style_css = 'border:' . $stroke . 'px solid ' . $stroke_color . ';padding-left:' . $line_height / 2.5 . 'px;padding-right:' . $line_height / 2.5 . 'px;display:inline-block;';
}
if (!empty($highlight_color)) {
    if ($stroke > 0) {
        $highlight_css = 'background-color:' . mk_color($highlight_color, $highlight_opacity) . ';';
    } else {
        $highlight_css = 'background-color:' . mk_color($highlight_color, $highlight_opacity) . '; box-shadow: 8px 0 0 ' . mk_color($highlight_color, $highlight_opacity) . ', -8px 0 0 ' . mk_color($highlight_color, $highlight_opacity) . ';';
    }
}
$output .= '<h3 style="font-size: ' . $size . 'px;text-align:' . $align . ';color: ' . $color . ';font-weight:' . $font_weight . ';letter-spacing:' . $letter_spacing . 'px;margin-top:' . $margin_top . 'px;margin-bottom:' . $margin_bottom . 'px;" id="fancy-title-' . $id . '" class="mk-shortcode mk-title-box ' . $animation_css . ' ' . $el_class . '"><span style="' . $stroke_style_css . $highlight_css . 'line-height:' . $line_height . 'px">' . wpb_js_remove_wpautop($content) . '</span></h3>';
echo $output;
Exemplo n.º 3
0
<?php

extract(shortcode_atts(array('el_class' => '', "style" => 'quote-style', "text_size" => '12', "align" => 'left', "font_family" => '', 'animation' => '', "font_type" => ''), $atts));
$id = uniqid();
$output = $animation_css = '';
$output .= mk_get_fontfamily("#blockquote-", $id, $font_family, $font_type);
if ($animation != '') {
    $animation_css = ' mk-animate-element ' . $animation . ' ';
}
$output .= '<div style="font-size: ' . $text_size . 'px;" id="blockquote-' . $id . '" class="mk-shortcode mk-blockquote ' . $style . ' ' . $animation_css . $el_class . '">' . wpb_js_remove_wpautop($content) . '</div>';
echo $output;