Пример #1
0
 function processShortcodeText($attribute, $content, $tag)
 {
     $attribute = $this->processAttribute($tag, $attribute);
     $class = array('pb-text', $attribute['css_class']);
     $html = '<div' . PBHelper::createClassAttribute($class) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</div>';
     return PBHelper::formatHTML($html, PBHelper::formatContent($content));
 }
 function processShortcodeVerticalGridLine($attribute, $content, $tag)
 {
     $attribute = $this->processAttribute($tag, $attribute);
     $class = array('pb-clear-fix', 'pb-vertical-grid-line-' . ($this->lineNumber % 2 == 0 ? 'even' : 'odd'));
     $html = '<li' . PBHelper::createClassAttribute($class) . '>' . do_shortcode($content) . '</li>';
     $this->lineNumber++;
     return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
 }
    function processShortcodeHeaderSubheader($attribute, $content, $tag)
    {
        $Validation = new PBValidation();
        $attribute = $this->processAttribute($tag, $attribute);
        if (!$Validation->isBool($attribute['underline_enable'])) {
            return;
        }
        $class = array(array('pb-header-subheader', $attribute['css_class']), array('pb-header-underline'));
        $html = '
			<div' . PBHelper::createClassAttribute($class[0]) . '>
				' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '
				' . ($attribute['underline_enable'] == 1 ? '<div' . PBHelper::createClassAttribute($class[1]) . '></div>' : null) . '
			</div>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
    }
    function processShortcodeLayoutColumn($attribute, $content, $tag)
    {
        $Layout = new PBLayout();
        $attribute = $this->processAttribute($tag, $attribute);
        $index = PBComponentData::get('layout', 'index');
        $layout = PBComponentData::get('layout', 'layout');
        $class = array('pb-layout-' . $Layout->getLayoutColumnCSSClass($layout, $index));
        $html = '
			<li' . PBHelper::createClassAttribute($class) . '> 
				<div class="pb-space-line"></div>
				<div>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</div>
			</li>			
		';
        PBComponentData::set('layout', 'index', $index + 1);
        return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
    }
    function processShortcodeCounterList($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $option = array();
        $Easing = new PBEasing();
        $Validation = new PBValidation();
        $this->character = array('before' => $attribute['character_before'], 'after' => $attribute['character_after']);
        $content = do_shortcode($content);
        if ($Validation->isEmpty($content)) {
            return $html;
        }
        if (!$Validation->isBool($attribute['waypoint_enable'])) {
            return $html;
        }
        if (!$Validation->isNumber($attribute['waypoint_duration'], 0, 99999)) {
            return $html;
        }
        if (!array_key_exists($attribute['waypoint_easing'], $Easing->easingType)) {
            return $html;
        }
        $key = array('waypoint_enable', 'waypoint_duration', 'waypoint_easing', 'waypoint_offset_trigger', 'character_before', 'character_after');
        foreach ($key as $index) {
            $option[$index] = $attribute[$index];
        }
        $class = array(array('pb-clear-fix', 'pb-counter-list', $attribute['css_class']), array('pb-reset-list'));
        $id = PBHelper::createId('pb_counter_list');
        $html = '
			<div' . PBHelper::createClassAttribute($class[0]) . ' id="' . $id . '">
				<ul' . PBHelper::createClassAttribute($class[1]) . '>
					' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '
				</ul>
			</div>
			<div class="pb-script-tag">
				<script type="text/javascript">
					jQuery(document).ready(function($) 
					{
						$("#' . $id . '").PBCounterList(' . json_encode($option) . ');
					});
				</script>
			</div>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
    }
    function processShortcodeBlockquote($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $Validation = new PBValidation();
        if ($Validation->isEmpty($content)) {
            return $html;
        }
        $class = array('pb-blockquote', $attribute['css_class']);
        if ($Validation->isNotEmpty($attribute['author'])) {
            $html = '<div class="pb-blockquote-author">&mdash; ' . $attribute['author'] . '</div>';
        }
        $html = '
			<div' . PBHelper::createClassAttribute($class) . '>
				<blockquote>
					' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '
				</blockquote>
				' . $html . '
			</div>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content));
    }
    function processShortcodeDropcap($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $Validation = new PBValidation();
        $style = array();
        $class = array('pb-dropcap', 'pb-clear-fix', $attribute['css_class']);
        if ($Validation->isNumber($attribute['font_size'], 1, 100)) {
            $style['font-size'] = $attribute['font_size'] . 'px';
        }
        if ($Validation->isColor($attribute['font_color'])) {
            $style['color'] = PBColor::getColor($attribute['font_color']);
        }
        if ($Validation->isColor($attribute['bg_color'])) {
            $style['background-color'] = PBColor::getColor($attribute['bg_color']);
        }
        $letter = mb_substr($content, 0, 1);
        $content = mb_substr($content, 1);
        $html = '
			<p' . PBHelper::createClassAttribute($class) . '>
				<span class="pb-dropcap-first-letter" ' . PBHelper::createStyleAttribute($style) . '>' . $letter . '</span>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '
			</p>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
    }
    function processShortcodeCallToAction($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $style = array(array(), array());
        $class = array(array('pb-call-to-action', 'pb-clear-fix', $attribute['css_class']), array('pb-call-to-action-box', 'pb-clear-fix'));
        $Validation = new PBValidation();
        if ($Validation->isColor($attribute['bg_color'])) {
            $style[0]['background-color'] = PBColor::getColor($attribute['bg_color']);
        }
        if ($Validation->isNumber($attribute['border_top_width'], 0, 9999)) {
            $style[0]['border-top-width'] = $attribute['border_top_width'] . 'px';
        }
        if ($Validation->isColor($attribute['border_top_color'])) {
            $style[0]['border-top-color'] = PBColor::getColor($attribute['border_top_color']);
        }
        if ($Validation->isNumber($attribute['border_right_width'], 0, 9999)) {
            $style[0]['border-right-width'] = $attribute['border_right_width'] . 'px';
        }
        if ($Validation->isColor($attribute['border_right_color'])) {
            $style[0]['border-right-color'] = PBColor::getColor($attribute['border_right_color']);
        }
        if ($Validation->isNumber($attribute['border_bottom_width'], 0, 9999)) {
            $style[0]['border-bottom-width'] = $attribute['border_bottom_width'] . 'px';
        }
        if ($Validation->isColor($attribute['border_bottom_color'])) {
            $style[0]['border-bottom-color'] = PBColor::getColor($attribute['border_bottom_color']);
        }
        if ($Validation->isNumber($attribute['border_left_width'], 0, 9999)) {
            $style[0]['border-left-width'] = $attribute['border_left_width'] . 'px';
        }
        if ($Validation->isColor($attribute['border_left_color'])) {
            $style[0]['border-left-color'] = PBColor::getColor($attribute['border_left_color']);
        }
        if ($Validation->isNumber($attribute['padding_top'], 0, 9999)) {
            $style[0]['padding-top'] = $attribute['padding_top'] . 'px';
        }
        if ($Validation->isNumber($attribute['padding_right'], 0, 9999)) {
            $style[0]['padding-right'] = $attribute['padding_right'] . 'px';
        }
        if ($Validation->isNumber($attribute['padding_bottom'], 0, 9999)) {
            $style[0]['padding-bottom'] = $attribute['padding_bottom'] . 'px';
        }
        if ($Validation->isNumber($attribute['padding_left'], 0, 9999)) {
            $style[0]['padding-left'] = $attribute['padding_left'] . 'px';
        }
        $id = PBHelper::createId('pb_call_to_action');
        $html = '
			<div' . PBHelper::createClassAttribute($class[0]) . PBHelper::createStyleAttribute($style[0]) . ' id="' . esc_attr($id) . '">
				<div' . PBHelper::createClassAttribute($class[1]) . PBHelper::createStyleAttribute($style[1]) . '>
					' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '
				</div>
			</div>
			<div class="pb-script-tag">
				<script type="text/javascript">
					jQuery(document).ready(function($)
					{
						$("#' . $id . '").PBCallToAction();
					});
				</script>
			</div>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
    }
Пример #9
0
    function processShortcodeClassItem($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $Layout = new PBLayout();
        $Background = new PBBackground();
        $Validation = new PBValidation();
        if ($Validation->isEmpty($content)) {
            return $html;
        }
        $class = array('pb-layout-' . $Layout->getLayoutColumnCSSClass($this->currentLayout, $this->currentIndex));
        $style = array();
        if ($Validation->isNotEmpty($attribute['image_url'])) {
            $style['background-image'] = 'url(\'' . $attribute['image_url'] . '\')';
        }
        if ($Validation->isNotEmpty($attribute['image_position'])) {
            $style['background-position'] = $attribute['image_position'];
        }
        if (array_key_exists($attribute['image_repeat'], $Background->backgroundRepeat)) {
            $style['background-repeat'] = $attribute['image_repeat'];
        }
        if (array_key_exists($attribute['image_size_a'], $Background->backgroundSize)) {
            if (in_array($attribute['image_size_a'], array('length', 'percentage'))) {
                if ($Validation->isNotEmpty($attribute['image_size_b'])) {
                    $style['background-size'] = $attribute['image_size_b'];
                }
            } else {
                $style['background-size'] = $attribute['image_size_a'];
            }
        }
        $html = '
			<li' . PBHelper::createClassAttribute($class) . PBHelper::createStyleAttribute($style) . '>
				<div>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</div>
			</li>
		';
        $this->currentIndex++;
        return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
    }
    function processShortcodeBoxText($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $style = array();
        $Validation = new PBValidation();
        if ($Validation->isColor($attribute['text_color'])) {
            $style['color'] = PBColor::getColor($attribute['text_color']);
        }
        $class = array('pb-box-content');
        $html = '
			<div' . PBHelper::createClassAttribute($class) . PBHelper::createStyleAttribute($style) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</div>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content));
    }
 function processShortcodeFeatureItemContent($attribute, $content, $tag)
 {
     $attribute = $this->processAttribute($tag, $attribute);
     $html = null;
     $Validation = new PBValidation();
     if ($Validation->isEmpty($content)) {
         return $html;
     }
     $class = array('pb-feature-content');
     $html = '<div' . PBHelper::createClassAttribute($class) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</div>';
     return PBHelper::formatHTML($html, PBHelper::formatContent($content));
 }
 function processShortcodePricingPlanItemPrice($attribute, $content, $tag)
 {
     $attribute = $this->processAttribute($tag, $attribute);
     $html = null;
     $Validation = new PBValidation();
     if ($Validation->isEmpty($content)) {
         return $html;
     }
     $class = array('pb-pricing-plan-item-price-box');
     $html = '<div' . PBHelper::createClassAttribute($class) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</div>';
     return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
 }
Пример #13
0
    function processShortcodeTabPanelContent($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = '
			<div class="pb-clear-fix">' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</div>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content));
    }
Пример #14
0
    function processShortcodeLayout($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $Border = new PBBorder();
        $Layout = new PBLayout();
        $Background = new PBBackground();
        $Validation = new PBValidation();
        $style = array();
        $option = array();
        if (!$Layout->isLayout($attribute['layout'])) {
            return;
        }
        if (!$Layout->isLayoutLine($attribute['layout_line'])) {
            return;
        }
        if (!$Validation->isBool($attribute['bg_parallax_enable'])) {
            return;
        }
        if (!$Validation->isBool($attribute['bg_parallax_mobile_enable'])) {
            return;
        }
        if (!$Validation->isNumber($attribute['bg_parallax_speed'], 0, 100)) {
            return;
        }
        if ($Validation->isColor($attribute['bg_color'])) {
            $style['background-color'] = PBColor::getColor($attribute['bg_color']);
        }
        if ($Validation->isNotEmpty($attribute['bg_position'])) {
            $style['background-position'] = $attribute['bg_position'];
        }
        if ($Validation->isNotEmpty($attribute['bg_repeat'])) {
            $style['background-repeat'] = $attribute['bg_repeat'];
        }
        if ($Validation->isNotEmpty($attribute['bg_image'])) {
            $style['background-image'] = 'url(\'' . $attribute['bg_image'] . '\')';
        }
        if ($Validation->isNotEmpty($attribute['bg_size_a'])) {
            if (array_key_exists($attribute['bg_size_a'], $Background->backgroundSize)) {
                if (in_array($attribute['bg_size_a'], array('length', 'percentage'))) {
                    if ($Validation->isNotEmpty($attribute['bg_size_b'])) {
                        $style['background-size'] = $attribute['bg_size_b'];
                    }
                } else {
                    $style['background-size'] = $attribute['bg_size_a'];
                }
            }
        }
        if (!$Validation->isBool($attribute['video_loop'])) {
            return;
        }
        if (!$Validation->isBool($attribute['video_muted'])) {
            return;
        }
        if (!$Validation->isBool($attribute['video_autoplay'])) {
            return;
        }
        if (!$Validation->isBool($attribute['video_control'])) {
            return;
        }
        if ($Validation->isNotEmpty($attribute['padding_top'])) {
            $style['padding-top'] = (int) $attribute['padding_top'] . 'px';
        }
        if ($Validation->isNotEmpty($attribute['padding_right'])) {
            $style['padding-right'] = (int) $attribute['padding_right'] . 'px';
        }
        if ($Validation->isNotEmpty($attribute['padding_bottom'])) {
            $style['padding-bottom'] = (int) $attribute['padding_bottom'] . 'px';
        }
        if ($Validation->isNotEmpty($attribute['padding_left'])) {
            $style['padding-left'] = (int) $attribute['padding_left'] . 'px';
        }
        if (array_key_exists($attribute['border_top_style'], $Border->style)) {
            $style['border-top-style'] = $attribute['border_top_style'];
        }
        if ($Validation->isNumber($attribute['border_top_width'], 0, 999)) {
            $style['border-top-width'] = $attribute['border_top_width'] . 'px';
        }
        if ($Validation->isColor($attribute['border_top_color'])) {
            $style['border-top-color'] = PBColor::getColor($attribute['border_top_color']);
        }
        if (array_key_exists($attribute['border_right_style'], $Border->style)) {
            $style['border-right-style'] = $attribute['border_right_style'];
        }
        if ($Validation->isNumber($attribute['border_right_width'], 0, 999)) {
            $style['border-right-width'] = $attribute['border_right_width'] . 'px';
        }
        if ($Validation->isColor($attribute['border_right_color'])) {
            $style['border-right-color'] = PBColor::getColor($attribute['border_right_color']);
        }
        if (array_key_exists($attribute['border_bottom_style'], $Border->style)) {
            $style['border-bottom-style'] = $attribute['border_bottom_style'];
        }
        if ($Validation->isNumber($attribute['border_bottom_width'], 0, 999)) {
            $style['border-bottom-width'] = $attribute['border_bottom_width'] . 'px';
        }
        if ($Validation->isColor($attribute['border_bottom_color'])) {
            $style['border-bottom-color'] = PBColor::getColor($attribute['border_bottom_color']);
        }
        if (array_key_exists($attribute['border_left_style'], $Border->style)) {
            $style['border-left-style'] = $attribute['border_left_style'];
        }
        if ($Validation->isNumber($attribute['border_left_width'], 0, 999)) {
            $style['border-left-width'] = $attribute['border_left_width'] . 'px';
        }
        if ($Validation->isColor($attribute['border_left_color'])) {
            $style['border-left-color'] = PBColor::getColor($attribute['border_left_color']);
        }
        /***/
        $MobileDetect = new Mobile_Detect();
        $mobile = (int) $MobileDetect->isMobile();
        /***/
        $videoHTML = null;
        $video = $Validation->isNotEmpty($attribute['video_format_webm']) || $Validation->isNotEmpty($attribute['video_format_ogg']) || $Validation->isNotEmpty($attribute['video_format_mp4']);
        if ($video && $attribute['video_mobile_enable'] != 1) {
            PBInclude::includeClass(PLUGIN_PAGE_BUILDER_LIBRARY_PATH . 'mobileDetect/Mobile_Detect.php', array('Mobile_Detect'));
            if ($mobile) {
                $video = false;
            }
        }
        if ($video) {
            $sourceHTML = null;
            $videoControlHTML = null;
            $videoAttributeHTML = null;
            if ($Validation->isNotEmpty($attribute['video_format_mp4'])) {
                $sourceHTML .= '<source type="video/mp4" src="' . esc_attr($attribute['video_format_mp4']) . '" />';
            }
            if ($Validation->isNotEmpty($attribute['video_format_webm'])) {
                $sourceHTML .= '<source type="video/webm" src="' . esc_attr($attribute['video_format_webm']) . '" />';
            }
            if ($Validation->isNotEmpty($attribute['video_format_ogg'])) {
                $sourceHTML .= '<source type="video/ogg" src="' . esc_attr($attribute['video_format_ogg']) . '" />';
            }
            if ($attribute['video_loop']) {
                $videoAttributeHTML .= ' loop';
            }
            if ($attribute['video_muted']) {
                $videoAttributeHTML .= ' muted';
            }
            if ($attribute['video_autoplay']) {
                $videoAttributeHTML .= ' autoplay';
            }
            if ($attribute['video_control'] == 1) {
                $videoControlHTML = '
					<div class="pb-line-video-control">
						<a href="#" class="pb-line-video-control-toggle-play pb-line-video-control-toggle-play-' . ($attribute['video_autoplay'] == 1 ? 'on' : 'off') . '"></a>
						<a href="#" class="pb-line-video-control-toggle-sound pb-line-video-control-toggle-sound-' . ($attribute['video_muted'] == 1 ? 'off' : 'on') . '"></a>
					</div>
				';
            }
            $videoHTML = '
				<div class="pb-line-video">
					<video preload="auto"' . $videoAttributeHTML . '>
						' . $sourceHTML . '
					</video>
				</div>
				' . $videoControlHTML . '
			';
        }
        /***/
        $overlay = false;
        $overlayHTML = null;
        if ($Validation->isColor($attribute['overlay_color'])) {
            $overlay = true;
            $overlayHTML = '<div class="pb-line-overlay" style="background-color:' . PBColor::getColor($attribute['overlay_color']) . '"></div>';
        }
        /***/
        $class = array(array('pb-line', 'pb-clear-fix', $attribute['css_class'], $video || $overlay ? 'pb-line-include-video' : null), array('pb-layout', $Layout->getLayoutCSSClass($attribute['layout']), 'pb-reset-list', 'pb-clear-fix'));
        if (in_array($attribute['layout_line'], array('boxed'))) {
            $class[0][] = 'pb-main';
        }
        if (in_array($attribute['layout_line'], array('boxed', 'wide', ''))) {
            $class[1][] = 'pb-main';
        }
        $key = array('bg_parallax_speed', 'bg_parallax_enable', 'bg_parallax_mobile_enable');
        foreach ($key as $index) {
            $option[$index] = $attribute[$index];
        }
        $id = PBHelper::createId('pb_line');
        $css = esc_attr($attribute['css_group']);
        if ($Validation->isNotEmpty($css)) {
            array_push($class[0], 'pb-line-css-group-' . $css);
        }
        PBComponentData::set('layout', 'index', 0);
        PBComponentData::set('layout', 'layout', $attribute['layout']);
        $html = '
			<div id="' . $id . '" ' . PBHelper::createClassAttribute($class[0]) . PBHelper::createStyleAttribute($style) . '>
				' . $videoHTML . '
				' . $overlayHTML . '
				<ul' . PBHelper::createClassAttribute($class[1]) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</ul>
			</div>
			<div class="pb-script-tag">
				<script type="text/javascript">
					jQuery(document).ready(function($)
					{
						$("#' . $id . '").PBLayout(' . json_encode($option) . ',' . $mobile . ');
					});
				</script>
			</div>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
    }
 function processShortcodeTestimonialItemAuthor($attribute, $content, $tag)
 {
     $attribute = $this->processAttribute($tag, $attribute);
     return PBHelper::formatContent($content, true, false, false);
 }
 function processShortcodeCounterBoxItemContent($attribute, $content, $tag)
 {
     $attribute = $this->processAttribute($tag, $attribute);
     return PBHelper::formatContent($content);
 }
    function processShortcodeNotice($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $Validation = new PBValidation();
        $style = array(array(), array());
        if ($Validation->isColor($attribute['box_bg_color'])) {
            $style[1]['background-color'] = PBColor::getColor($attribute['box_bg_color']);
        }
        if ($Validation->isNumber($attribute['box_border_top_width'], 0, 9999)) {
            $style[1]['border-top-width'] = $attribute['box_border_top_width'] . 'px';
        }
        if ($Validation->isColor($attribute['box_border_top_color'])) {
            $style[1]['border-top-color'] = PBColor::getColor($attribute['box_border_top_color']);
        }
        if ($Validation->isNumber($attribute['box_border_right_width'], 0, 9999)) {
            $style[1]['border-right-width'] = $attribute['box_border_right_width'] . 'px';
        }
        if ($Validation->isColor($attribute['box_border_right_color'])) {
            $style[1]['border-right-color'] = PBColor::getColor($attribute['box_border_right_color']);
        }
        if ($Validation->isNumber($attribute['box_border_bottom_width'], 0, 9999)) {
            $style[1]['border-bottom-width'] = $attribute['box_border_bottom_width'] . 'px';
        }
        if ($Validation->isColor($attribute['box_border_bottom_color'])) {
            $style[1]['border-bottom-color'] = PBColor::getColor($attribute['box_border_bottom_color']);
        }
        if ($Validation->isNumber($attribute['box_border_left_width'], 0, 9999)) {
            $style[1]['border-left-width'] = $attribute['box_border_left_width'] . 'px';
        }
        if ($Validation->isColor($attribute['box_border_left_color'])) {
            $style[1]['border-left-color'] = PBColor::getColor($attribute['box_border_left_color']);
        }
        $class = array('pb-notice', $attribute['css_class']);
        $id = PBHelper::createId('pb_notice');
        $timelineHTML = null;
        $closeButtonHTML = null;
        /***/
        if ($Validation->isNotEmpty($attribute['icon'])) {
            array_push($class, 'pb-notice-icon', 'pb-notice-icon-' . PBHelper::createHash($attribute['icon']));
            if ($Validation->isColor($attribute['icon_bg_color'])) {
                $style[0]['background-color'] = PBColor::getColor($attribute['icon_bg_color']);
            }
        }
        /***/
        if ($attribute['timeline_enable'] == 1 && $attribute['timeline_time_to_close'] > 0) {
            $tStyle = array(array(), array());
            $tClass = array('pb-notice-timeline');
            if ($Validation->isNumber($attribute['timeline_height'], 0, 9999)) {
                $tStyle[0]['height'] = $attribute['timeline_height'] . 'px';
            }
            if ($Validation->isColor($attribute['timeline_bg_color'])) {
                $tStyle[1]['background-color'] = PBColor::getColor($attribute['timeline_bg_color']);
            }
            array_push($class, 'pb-notice-time-to-close-' . (int) $attribute['timeline_time_to_close']);
            $timelineHTML = '
				<div' . PBHelper::createClassAttribute($tClass) . PBHelper::createStyleAttribute($tStyle[0]) . '>
					<div' . PBHelper::createStyleAttribute($tStyle[1]) . '></div>
				</div>
			';
        }
        /***/
        $tStyle = array();
        $tClass = array('pb-notice-close-button');
        if ($Validation->isColor($attribute['close_button_text_color'])) {
            $tStyle['color'] = PBColor::getColor($attribute['close_button_text_color']);
        }
        $label = $Validation->isNotEmpty($timelineHTML) ? sprintf(__('Close within <span>%s</span> seconds', PLUGIN_PAGE_BUILDER_DOMAIN), $attribute['timeline_time_to_close']) : __('Close', PLUGIN_PAGE_BUILDER_DOMAIN);
        if ($attribute['close_button_enable'] != 1) {
            $tStyle['display'] = 'none';
        }
        $closeButtonHTML = '
			<div><a href="#"' . PBHelper::createClassAttribute($tClass) . PBHelper::createStyleAttribute($tStyle) . '>' . $label . '</a></div>
		';
        /***/
        $html = '
			<div' . PBHelper::createClassAttribute($class) . PBHelper::createStyleAttribute($style[0]) . ' id="' . esc_attr($id) . '">
				<div class="pb-notice-content"' . PBHelper::createStyleAttribute($style[1]) . '>
					' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '
					' . $timelineHTML . '
					' . $closeButtonHTML . '
				</div>
			</div>
			<div class="pb-script-tag">
				<script type="text/javascript">
					jQuery(document).ready(function($) 
					{
						$("#' . $id . '").PBNotice();
					});
				</script>
			</div>
		';
        return PBHelper::formatHTML($html, PBHelper::formatContent($content, true, false, false));
    }