function __construct()
 {
     $i = 0;
     foreach ($this->component['structure']['element'] as $index => $value) {
         if (!is_array($value)) {
             unset($this->component['structure']['element'][$index]);
         }
     }
     $this->component['structure']['element'] = array_values($this->component['structure']['element']);
     foreach ($this->component['structure']['element'] as $index => $value) {
         $this->setDefaultElement($this->componentDefault, $value);
         if ($i == 0) {
             $this->setDefaultElement($this->componentDefault, $this->componentDescription);
             $this->componentDescription['ui']['panel'] = $value['ui']['panel'];
             $this->componentDescription['ui']['text']['header'] = __('Description', PLUGIN_PAGE_BUILDER_DOMAIN);
             $this->componentDescription['ui']['text']['subheader'] = __('Description of used component', PLUGIN_PAGE_BUILDER_DOMAIN);
             $this->component['structure']['element'][$i] = $this->componentDescription;
         }
         $i++;
         $this->component['structure']['element'][$i] = $value;
     }
     $function = PBComponentData::get($this->getComponentId(), 'component_construct');
     if (is_callable($function)) {
         $this->component = call_user_func($function, $this->component);
     }
 }
 function __construct()
 {
     $this->style = array('jquery-nivo-slider' => array('use' => 2, 'path' => $this->getStyleURL(), 'file' => 'jquery.nivo.slider.css'), 'nivo-slider' => array('use' => 2, 'path' => $this->getStyleURL(), 'file' => 'style.css'));
     $this->script = array('jquery-nivo-slider' => array('use' => 2, 'path' => $this->getScriptURL(), 'file' => 'jquery.nivo.slider.pack.js'), 'nivo-slider' => array('use' => 2, 'path' => $this->getScriptURL(), 'file' => 'PB.NivoSlider.js'));
     $this->effect = array('sliceDown' => array(__('Slice down', PLUGIN_PAGE_BUILDER_DOMAIN)), 'sliceDownLeft' => array(__('Slice down left', PLUGIN_PAGE_BUILDER_DOMAIN)), 'sliceUp' => array(__('Slice up', PLUGIN_PAGE_BUILDER_DOMAIN)), 'sliceUpLeft' => array(__('Slice up left', PLUGIN_PAGE_BUILDER_DOMAIN)), 'sliceUpDown' => array(__('Slice up down', PLUGIN_PAGE_BUILDER_DOMAIN)), 'sliceUpDownLeft' => array(__('Slice up down left', PLUGIN_PAGE_BUILDER_DOMAIN)), 'fold' => array(__('Fold', PLUGIN_PAGE_BUILDER_DOMAIN)), 'fade' => array(__('Fade', PLUGIN_PAGE_BUILDER_DOMAIN)), 'random' => array(__('Random', PLUGIN_PAGE_BUILDER_DOMAIN)), 'slideInRight' => array(__('Slide in right', PLUGIN_PAGE_BUILDER_DOMAIN)), 'slideInLeft' => array(__('Slide in left', PLUGIN_PAGE_BUILDER_DOMAIN)), 'boxRandom' => array(__('Box random', PLUGIN_PAGE_BUILDER_DOMAIN)), 'boxRain' => array(__('Box rain', PLUGIN_PAGE_BUILDER_DOMAIN)), 'boxRainReverse' => array(__('Box rain reverse', PLUGIN_PAGE_BUILDER_DOMAIN)), 'boxRainGrow' => array(__('Box rain grow', PLUGIN_PAGE_BUILDER_DOMAIN)), 'boxRainGrowReverse' => array(__('Box rain grow reverse', PLUGIN_PAGE_BUILDER_DOMAIN)));
     $this->component = array('name' => __('Nivo Slider', PLUGIN_PAGE_BUILDER_DOMAIN), 'description' => __('Displays Nivo Slider', PLUGIN_PAGE_BUILDER_DOMAIN), 'structure' => array('window' => array('title' => __('Nivo Slider', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array(array('id' => 'image', 'ui' => array('text' => array('header' => __('Images', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Click on below button to create gallery with images to the slider', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'select-gallery'))), array('id' => 'image_size', 'ui' => array('text' => array('header' => __('Image size', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Select image size', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'image-size')), 'shortcode' => array('default' => PBComponentData::get($this->getComponentId(), 'image_default'))), array('id' => 'url', 'ui' => array('text' => array('header' => __('URL', PLUGIN_PAGE_BUILDER_DOMAIN)))), array('id' => 'transition_effect', 'ui' => array('text' => array('header' => __('Transition effect', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Select transition effect', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'checkbox', 'dictionary' => array('source' => PBHelper::extractDictionary($this->effect)))), 'shortcode' => array('default' => 'random')), array('id' => 'count_slice', 'ui' => array('text' => array('header' => __('Number of slices', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enter number of slices - only for "slice" transitions', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 3))), 'shortcode' => array('default' => '15')), array('id' => 'count_column', 'ui' => array('text' => array('header' => __('Number of columns', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enter number of columns - only for "box" transitions', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 3))), 'shortcode' => array('default' => '8')), array('id' => 'count_row', 'ui' => array('text' => array('header' => __('Number of rows', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enter number of rows - only for "box" transitions', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 3))), 'shortcode' => array('default' => '4')), array('id' => 'transition_speed', 'ui' => array('text' => array('header' => __('Transition speed', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Slide transition speed in miliseconds', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 5))), 'shortcode' => array('default' => '500')), array('id' => 'pause_time', 'ui' => array('text' => array('header' => __('Pause time', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enter value of pause time in miliseconds', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 5))), 'shortcode' => array('default' => '3000')), array('id' => 'start_slide', 'ui' => array('text' => array('header' => __('Start slide', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enter number of start slide', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 3))), 'shortcode' => array('default' => '0')), array('id' => 'preloader_enable', 'ui' => array('text' => array('header' => __('Preloader', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enable or disable image slider preloader', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'direction_navigation_enable', 'ui' => array('text' => array('header' => __('Direction navigation', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enable Prev/Next navigation', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'control_navigation_enable', 'ui' => array('text' => array('header' => __('Control navigation', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enable 1,2,3 ... navigation (pagination)', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'control_navigation_thumbs_enable', 'ui' => array('text' => array('header' => __('Control navigation with thumbnails', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Use thumbnails for control navigation', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'pause_on_hover', 'ui' => array('text' => array('header' => __('Pause on hover', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Stop transition when user hover on image', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'manual_advance_enable', 'ui' => array('text' => array('header' => __('Manual advance', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Force manual transitions', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'random_start_enable', 'ui' => array('text' => array('header' => __('Random at start', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Start on a random slide', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'css_class', 'ui' => array('text' => array('header' => __('CSS class', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('List of CSS classes defined in CSS files separated by space', PLUGIN_PAGE_BUILDER_DOMAIN)))))));
     parent::__construct();
 }
 function __construct()
 {
     $Header = new PBHeader();
     $Window = new PBWindow();
     $this->style = array('call-to-action' => array('use' => 2, 'path' => $this->getStyleURL(), 'file' => 'style.css'));
     $this->script = array('call-to-action' => array('use' => 2, 'path' => $this->getScriptURL(), 'file' => 'PB.CallToAction.js'));
     $this->component = array('name' => __('Call To Action', PLUGIN_PAGE_BUILDER_DOMAIN), 'description' => __('Displays Call To Action box', PLUGIN_PAGE_BUILDER_DOMAIN), 'structure' => array('window' => array('title' => __('Call To Action', PLUGIN_PAGE_BUILDER_DOMAIN)), 'ui' => array('panel' => array(1 => array('header' => __('General', PLUGIN_PAGE_BUILDER_DOMAIN)), 2 => array('header' => __('First line', PLUGIN_PAGE_BUILDER_DOMAIN)), 3 => array('header' => __('Second line', PLUGIN_PAGE_BUILDER_DOMAIN)), 4 => array('header' => __('Button', PLUGIN_PAGE_BUILDER_DOMAIN)), 5 => array('header' => __('Box', PLUGIN_PAGE_BUILDER_DOMAIN)), 6 => array('header' => __('Border', PLUGIN_PAGE_BUILDER_DOMAIN))), 'group' => array(1 => array('header' => __('Colors', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Colors of button elements in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 2 => array('header' => __('Padding', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Padding of the box in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 3 => array('header' => __('Border top', PLUGIN_PAGE_BUILDER_DOMAIN)), 4 => array('header' => __('Border right', PLUGIN_PAGE_BUILDER_DOMAIN)), 5 => array('header' => __('Border bottom', PLUGIN_PAGE_BUILDER_DOMAIN)), 6 => array('header' => __('Border left', PLUGIN_PAGE_BUILDER_DOMAIN)), 7 => array('header' => __('Padding', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Padding of the button in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 8 => array('header' => __('Margin', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Margin of the button in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)))), 'element' => array(array('id' => 'css_class', 'ui' => array('panel' => 1, 'text' => array('header' => __('CSS class', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('List of CSS classes defined in CSS files separated by space', PLUGIN_PAGE_BUILDER_DOMAIN)))), array('id' => 'first_line_text', 'ui' => array('panel' => 2, 'text' => array('header' => __('First line', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Content of the first line', PLUGIN_PAGE_BUILDER_DOMAIN))), 'shortcode' => array('path' => 'first_line/@content')), array('id' => 'first_line_text_color', 'ui' => array('panel' => 2, 'text' => array('header' => __('Text color', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Text color of the first line in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => 'first_line/@text_color')), array('id' => 'first_line_header_important', 'ui' => array('panel' => 2, 'text' => array('header' => __('Importance of the header', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'radio', 'dictionary' => array('source' => PBHelper::extractDictionary($Header->important)))), 'shortcode' => array('default' => PBComponentData::get($this->getComponentId(), 'first_line_header_important_default'), 'path' => 'first_line/@header_important')), array('id' => 'second_line_text', 'ui' => array('panel' => 3, 'text' => array('header' => __('Second line', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Content of the second line', PLUGIN_PAGE_BUILDER_DOMAIN))), 'shortcode' => array('path' => 'second_line/@content')), array('id' => 'second_line_text_color', 'ui' => array('panel' => 3, 'text' => array('header' => __('Text color', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Text color of the second line in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => 'second_line/@text_color')), array('id' => 'second_line_header_important', 'ui' => array('panel' => 3, 'text' => array('header' => __('Importance of the header', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'radio', 'dictionary' => array('source' => PBHelper::extractDictionary($Header->important)))), 'shortcode' => array('default' => PBComponentData::get($this->getComponentId(), 'second_line_header_important_default'), 'path' => 'second_line/@header_important')), array('id' => 'button_src', 'ui' => array('panel' => 4, 'text' => array('header' => __('URL', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('URL of the button', PLUGIN_PAGE_BUILDER_DOMAIN))), 'shortcode' => array('path' => 'button/@src')), array('id' => 'button_target', 'ui' => array('panel' => 4, 'text' => array('header' => __('Target', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Target of the URL', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'radio', 'dictionary' => array('source' => PBHelper::extractDictionary($Window->linkTarget)))), 'shortcode' => array('path' => 'button/@src_target')), array('id' => 'button_label', 'ui' => array('panel' => 4, 'text' => array('header' => __('Label', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Label of the button', PLUGIN_PAGE_BUILDER_DOMAIN))), 'shortcode' => array('path' => 'button/@content')), array('id' => 'button_text_color', 'ui' => array('panel' => 4, 'group' => 1, 'text' => array('label' => __('Text color', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => 'button/@text_color')), array('id' => 'button_text_color_hover', 'ui' => array('panel' => 4, 'group' => 1, 'text' => array('label' => __('Text color (on hover)', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => 'button/@text_color_hover')), array('id' => 'button_bg_color', 'ui' => array('panel' => 4, 'group' => 1, 'text' => array('label' => __('Background color', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => 'button/@bg_color')), array('id' => 'button_bg_color_hover', 'ui' => array('panel' => 4, 'group' => 1, 'text' => array('label' => __('Background color (on hover)', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => 'button/@bg_color_hover')), array('id' => 'button_border_color', 'ui' => array('panel' => 4, 'group' => 1, 'text' => array('label' => __('Border color', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => 'button/@border_color')), array('id' => 'button_border_color_hover', 'ui' => array('panel' => 4, 'group' => 1, 'text' => array('label' => __('Border color (on hover)', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => 'button/@border_color_hover')), array('id' => 'button_padding_top', 'ui' => array('panel' => 4, 'group' => 7, 'text' => array('label' => __('Top', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => 'button/@padding_top')), array('id' => 'button_padding_right', 'ui' => array('panel' => 4, 'group' => 7, 'text' => array('label' => __('Right', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => 'button/@padding_right')), array('id' => 'button_padding_bottom', 'ui' => array('panel' => 4, 'group' => 7, 'text' => array('label' => __('Bottom', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => 'button/@padding_bottom')), array('id' => 'button_padding_left', 'ui' => array('panel' => 4, 'group' => 7, 'text' => array('label' => __('Left', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => 'button/@padding_left')), array('id' => 'button_margin_top', 'ui' => array('panel' => 4, 'group' => 8, 'text' => array('label' => __('Top', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => 'button/@margin_top')), array('id' => 'button_margin_bottom', 'ui' => array('panel' => 4, 'group' => 8, 'text' => array('label' => __('Bottom', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => 'button/@margin_bottom')), array('id' => 'box_bg_color', 'ui' => array('panel' => 5, 'text' => array('header' => __('Background color', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Background color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => '@bg_color')), array('id' => 'box_padding_top', 'ui' => array('panel' => 5, 'group' => 2, 'text' => array('label' => __('Top', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => '@padding_top')), array('id' => 'box_padding_right', 'ui' => array('panel' => 5, 'group' => 2, 'text' => array('label' => __('Right', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => '@padding_right')), array('id' => 'box_padding_bottom', 'ui' => array('panel' => 5, 'group' => 2, 'text' => array('label' => __('Bottom', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => '@padding_bottom')), array('id' => 'box_padding_left', 'ui' => array('panel' => 5, 'group' => 2, 'text' => array('label' => __('Left', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => '@padding_left')), array('id' => 'box_border_top_width', 'ui' => array('panel' => 6, 'group' => 3, 'text' => array('label' => __('Width in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => '@border_top_width')), array('id' => 'box_border_top_color', 'ui' => array('panel' => 6, 'group' => 3, 'text' => array('label' => __('Color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => '@border_top_color')), array('id' => 'box_border_right_width', 'ui' => array('panel' => 6, 'group' => 4, 'text' => array('label' => __('Width in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => '@border_right_width')), array('id' => 'box_border_right_color', 'ui' => array('panel' => 6, 'group' => 4, 'text' => array('label' => __('Color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => '@border_right_color')), array('id' => 'box_border_bottom_width', 'ui' => array('panel' => 6, 'group' => 5, 'text' => array('label' => __('Width in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => '@border_bottom_width')), array('id' => 'box_border_bottom_color', 'ui' => array('panel' => 6, 'group' => 5, 'text' => array('label' => __('Color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => '@border_bottom_color')), array('id' => 'box_border_left_width', 'ui' => array('panel' => 6, 'group' => 6, 'text' => array('label' => __('Width in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '4'))), 'shortcode' => array('path' => '@border_left_width')), array('id' => 'box_border_left_color', 'ui' => array('panel' => 6, 'group' => 6, 'text' => array('label' => __('Color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker')), 'shortcode' => array('path' => '@border_left_color')))));
     parent::__construct();
 }
 function __construct()
 {
     $Easing = new PBEasing();
     $this->style = array('jquery-flexslider' => array('use' => 2, 'path' => $this->getStyleURL(), 'file' => 'flexslider.css'), 'flexslider' => array('use' => 2, 'path' => $this->getStyleURL(), 'file' => 'style.css'));
     $this->script = array('jquery-flexslider' => array('use' => 2, 'path' => $this->getScriptURL(), 'file' => 'jquery.flexslider-min.js'), 'flexslider' => array('use' => 2, 'path' => $this->getScriptURL(), 'file' => 'PB.FlexSlider.js'));
     $this->animation = array('fade' => __('Fade', PLUGIN_PAGE_BUILDER_DOMAIN), 'slide' => __('Slide', PLUGIN_PAGE_BUILDER_DOMAIN));
     $this->direction = array('horizontal' => __('Horizontal', PLUGIN_PAGE_BUILDER_DOMAIN), 'vertical' => __('Vertical', PLUGIN_PAGE_BUILDER_DOMAIN));
     $this->component = array('name' => __('FlexSlider', PLUGIN_PAGE_BUILDER_DOMAIN), 'description' => __('Displays FlexSlider', PLUGIN_PAGE_BUILDER_DOMAIN), 'structure' => array('window' => array('title' => __('FlexSlider', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array(array('id' => 'image', 'ui' => array('text' => array('header' => __('Images', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Click on below button to create gallery with images to the slider', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'select-gallery'))), array('id' => 'image_size', 'ui' => array('text' => array('header' => __('Image size', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Select image size', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'image-size')), 'shortcode' => array('default' => PBComponentData::get($this->getComponentId(), 'image_default'))), array('id' => 'preloader_enable', 'ui' => array('text' => array('header' => __('Preloader', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enable or disable image slider preloader', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'url', 'ui' => array('text' => array('header' => __('URL', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => array(__('URL of site which has to be open after clicking on each image.', PLUGIN_PAGE_BUILDER_DOMAIN), __('You can set URL of separate image during editing it via Media Library.', PLUGIN_PAGE_BUILDER_DOMAIN))))), array('id' => 'animation', 'ui' => array('text' => array('header' => __('Animation', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Select animation type', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'radio', 'dictionary' => array('source' => PBHelper::extractDictionary($this->animation)))), 'shortcode' => array('default' => 'fade')), array('id' => 'easing', 'ui' => array('text' => array('header' => __('Easing', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Determines the easing method used in transitions', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'select-one', 'dictionary' => array('source' => PBHelper::extractDictionary($Easing->easingType)))), 'shortcode' => array('default' => 'swing')), array('id' => 'direction', 'ui' => array('text' => array('header' => __('Direction', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Select the sliding direction', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'radio', 'dictionary' => array('source' => $this->direction))), 'shortcode' => array('default' => 'horizontal')), array('id' => 'start_at', 'ui' => array('text' => array('header' => __('Start at', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('The slide that the slider should start on', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 3))), 'shortcode' => array('default' => '0')), array('id' => 'slideshow_speed', 'ui' => array('text' => array('header' => __('Slideshow speed', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Set the speed of the slideshow cycling in milliseconds.', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 5))), 'shortcode' => array('default' => '7000')), array('id' => 'animation_speed', 'ui' => array('text' => array('header' => __('Animation speed', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Set the speed of animations in milliseconds.', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 5))), 'shortcode' => array('default' => '600')), array('id' => 'init_delay', 'ui' => array('text' => array('header' => __('Initialization delay', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Set an initialization delay in milliseconds.', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 5))), 'shortcode' => array('default' => '0')), array('id' => 'reverse', 'ui' => array('text' => array('header' => __('Reverse', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Reverse the animation direction', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'animation_loop', 'ui' => array('text' => array('header' => __('Animation loop', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'smooth_height', 'ui' => array('text' => array('header' => __('Smooth height', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Allow height of the slider to animate smoothly in horizontal mode', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'slideshow', 'ui' => array('text' => array('header' => __('Slideshow', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Animate slider automatically', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'randomize', 'ui' => array('text' => array('header' => __('Randomize', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Randomize slide order', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'pause_on_action', 'ui' => array('text' => array('header' => __('Pause on action', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Pause the slideshow when interacting with control elements', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'pause_on_hover', 'ui' => array('text' => array('header' => __('Pause on hover', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Pause the slideshow when hovering over slider, then resume when no longer hovering', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'use_css', 'ui' => array('text' => array('header' => __('Use CSS', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Slider will use CSS3 transitions if available', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'touch', 'ui' => array('text' => array('header' => __('Touch', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Allow touch swipe navigation of the slider on touch-enabled devices', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'control_nav', 'ui' => array('text' => array('header' => __('Control navigation', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enable or disable control (1,2,3 ...) navigation', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'direction_nav', 'ui' => array('text' => array('header' => __('Direction navigation', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enbale or disable direction (previous/next slide) navigation', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'keyboard', 'ui' => array('text' => array('header' => __('Keyboard', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Allow slider navigating via keyboard left/right keys', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'multiple_keyboard', 'ui' => array('text' => array('header' => __('Multiple keyboard', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => array(__('Allow keyboard navigation to affect multiple sliders.', PLUGIN_PAGE_BUILDER_DOMAIN), __('Default behavior cuts out keyboard navigation with more than one slider present.', PLUGIN_PAGE_BUILDER_DOMAIN))), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'mousewheel', 'ui' => array('text' => array('header' => __('Mousewheel', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __(' Allows slider navigating via mousewheel.', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'css_class', 'ui' => array('text' => array('header' => __('CSS class', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('List of CSS classes defined in CSS files separated by space', PLUGIN_PAGE_BUILDER_DOMAIN)))))));
     parent::__construct();
 }
 function __construct()
 {
     $Post = new PBPost();
     $Easing = new PBEasing();
     $this->style = array('zaccordion' => array('use' => 2, 'path' => $this->getStyleURL(), 'file' => 'style.css'));
     $this->script = array('jquery-zaccordion' => array('use' => 2, 'path' => $this->getScriptURL(), 'file' => 'jquery.zaccordion.min.js'), 'zaccordion' => array('use' => 2, 'path' => $this->getScriptURL(), 'file' => 'PB.ZAccordion.js'));
     $this->dataSource = array(1 => __('Gallery', PLUGIN_PAGE_BUILDER_DOMAIN), 2 => __('Posts', PLUGIN_PAGE_BUILDER_DOMAIN));
     $this->tabOpenTriggerEvent = array('click' => __('On click', PLUGIN_PAGE_BUILDER_DOMAIN), 'mouseover' => __('On mouseover', PLUGIN_PAGE_BUILDER_DOMAIN));
     $this->component = array('name' => __('zAccordion', PLUGIN_PAGE_BUILDER_DOMAIN), 'description' => __('Displays zAccordion', PLUGIN_PAGE_BUILDER_DOMAIN), 'structure' => array('window' => array('title' => __('zAccordion', PLUGIN_PAGE_BUILDER_DOMAIN)), 'ui' => array('panel' => array(1 => array('header' => __('General', PLUGIN_PAGE_BUILDER_DOMAIN)), 2 => array('header' => __('Gallery', PLUGIN_PAGE_BUILDER_DOMAIN)), 3 => array('header' => __('Posts', PLUGIN_PAGE_BUILDER_DOMAIN)))), 'element' => array(array('id' => 'data_source', 'ui' => array('panel' => 1, 'text' => array('header' => __('Data source', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => array(__('Select data source for accordion content.', PLUGIN_PAGE_BUILDER_DOMAIN), __('Accordion can be build based on gallery (images) or posts featured image. Each of them can be setup in separate tabs.', PLUGIN_PAGE_BUILDER_DOMAIN))), 'element' => array('type' => 'radio', 'dictionary' => array('source' => PBHelper::extractDictionary($this->dataSource)))), 'shortcode' => array('default' => 1)), array('id' => 'image_size', 'ui' => array('panel' => 1, 'text' => array('header' => __('Image size', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Select image size', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'image-size')), 'shortcode' => array('default' => PBComponentData::get($this->getComponentId(), 'image_default'))), array('id' => 'preloader_enable', 'ui' => array('panel' => 1, 'text' => array('header' => __('Preloader', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enable or disable image slider preloader', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'starting_slide', 'ui' => array('panel' => 1, 'text' => array('header' => __('Start slide', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enter number of start slide', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 3))), 'shortcode' => array('default' => '0')), array('id' => 'timeout', 'ui' => array('panel' => 1, 'text' => array('header' => __('Timeout', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Time between each slide in miliseconds', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 5))), 'shortcode' => array('default' => '2000')), array('id' => 'speed', 'ui' => array('panel' => 1, 'text' => array('header' => __('Speed', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Speed of the slide in miliseconds', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => 5))), 'shortcode' => array('default' => '500')), array('id' => 'auto', 'ui' => array('panel' => 1, 'text' => array('header' => __('Auto', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Whether or not the slideshow should play automatically', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'pause', 'ui' => array('panel' => 1, 'text' => array('header' => __('Pause', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Pause on hover', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'easing', 'ui' => array('panel' => 1, 'text' => array('header' => __('Easing', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Easing method', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'select-one', 'dictionary' => array('source' => PBHelper::extractDictionary($Easing->easingType)))), 'shortcode' => array('default' => 'easeInQuad')), array('id' => 'trigger', 'ui' => array('panel' => 1, 'text' => array('header' => __('Event type', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => array(__('Event type needed to open tab', PLUGIN_PAGE_BUILDER_DOMAIN), __('Accordion can be build based on gallery (images) or posts featured image. Each of them can be setup in separate tabs.', PLUGIN_PAGE_BUILDER_DOMAIN))), 'element' => array('type' => 'radio', 'dictionary' => array('source' => PBHelper::extractDictionary($this->tabOpenTriggerEvent)))), 'shortcode' => array('default' => 'click')), array('id' => 'display_slide_title', 'ui' => array('panel' => 1, 'text' => array('header' => __('Slide title', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enable or disable slide title (for posts) or caption (for images)', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'display_slide_excerpt', 'ui' => array('panel' => 1, 'text' => array('header' => __('Slide excerpt', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Enable or disable slide excerpt (for posts) or description (for images)', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '1')), array('id' => 'css_class', 'ui' => array('panel' => 1, 'text' => array('header' => __('CSS class', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('List of CSS classes defined in CSS files separated by space', PLUGIN_PAGE_BUILDER_DOMAIN)))), array('id' => 'image', 'ui' => array('panel' => 2, 'text' => array('header' => __('Images', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Click on below button to create gallery with images to the accordion', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'select-gallery'))), array('id' => 'url', 'ui' => array('panel' => 2, 'text' => array('header' => __('URL', PLUGIN_PAGE_BUILDER_DOMAIN)))), array('id' => 'post_type', 'ui' => array('panel' => 3, 'text' => array('header' => __('Post type', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Select types of posts which have to be displayed.', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'checkbox', 'dictionary' => array('source' => PBHelper::extractDictionary($Post->postType)))), 'shortcode' => array('default' => '')), array('id' => 'post_status', 'ui' => array('panel' => 3, 'text' => array('header' => __('Post status', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Select types of post statuses which have to be displayed.', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'checkbox', 'dictionary' => array('source' => PBHelper::extractDictionary($Post->postStatus)))), 'shortcode' => array('default' => '')), array('id' => 'post__in', 'ui' => array('panel' => 3, 'text' => array('header' => __('Include', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Define a comma-separated list of page ID\'s to be included to the list', PLUGIN_PAGE_BUILDER_DOMAIN))), 'shortcode' => array('default' => '')), array('id' => 'post__not_in', 'ui' => array('panel' => 3, 'text' => array('header' => __('Exclude', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Define a comma-separated list of page ID\'s to be excluded from the list.', PLUGIN_PAGE_BUILDER_DOMAIN))), 'shortcode' => array('default' => '')), array('id' => 'posts_per_page', 'ui' => array('panel' => 3, 'text' => array('header' => __('Limit number of posts', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Number of posts to show. Leave this field empty to show all posts.', PLUGIN_PAGE_BUILDER_DOMAIN))), 'shortcode' => array('default' => '-2')), array('id' => 'orderby', 'ui' => array('panel' => 3, 'text' => array('header' => __('Sort column', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'radio', 'dictionary' => array('source' => PBHelper::extractDictionary($Post->sortColumn)))), 'shortcode' => array('default' => 'date')), array('id' => 'order', 'ui' => array('panel' => 3, 'text' => array('header' => __('Sort order', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'radio', 'dictionary' => array('source' => array('asc' => __('Ascending', PLUGIN_PAGE_BUILDER_DOMAIN), 'desc' => __('Descending', PLUGIN_PAGE_BUILDER_DOMAIN))))), 'shortcode' => array('default' => 'asc')))));
     parent::__construct();
 }
    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));
    }
 static function setFile($componentId, $name, $path)
 {
     global $pb_data;
     PBComponentData::prepare($componentId);
     if (array_key_exists($name, $pb_data['component'][$componentId])) {
         return $pb_data['component'][$componentId][$name];
     }
     $pb_data['component'][$componentId][$name] = array();
     $file = PBFile::scanDir($path);
     if (is_array($file)) {
         foreach ($file as $value) {
             $pb_data['component'][$componentId][$name][$value] = $value;
         }
     }
     return $pb_data['component'][$componentId][$name];
 }
 function createCSS($code = null, $retina = false)
 {
     $CSS = new PBCSS();
     $key = $retina ? 'icon_url_retina' : 'icon_url';
     $codeCurrent = null;
     foreach ($this->social as $index => $value) {
         $codeCurrent .= $CSS->create(array('selector' => array('ul.pb-social-icon>li>a.pb-social-icon-' . $index), 'property' => array('background-image' => PBComponentData::get($this->getComponentId(), $key) . $value[1])));
     }
     if ($retina) {
         $codeCurrent = $CSS->getRetinaMediaQuery($codeCurrent);
     }
     $code .= $codeCurrent;
     if (PBData::get('retina_ready') == 1 && !$retina) {
         $this->createCSS($code, true);
         return;
     }
     PBComponentData::set($this->getComponentId(), 'css', $code);
 }
 function createCSS($code = null, $retina = false)
 {
     $CSS = new PBCSS();
     $url = $retina ? $this->icon_url_retina : $this->icon_url;
     $codeCurrent = null;
     foreach ($this->icon_file as $value) {
         $codeCurrent .= $CSS->create(array('selector' => array('.pb-button>a>span.pb-button-box>span.pb-button-icon.pb-button-icon-' . PBHelper::createHash($value)), 'property' => array('background-image' => $url . $value)));
     }
     if ($retina) {
         $codeCurrent = $CSS->getRetinaMediaQuery($codeCurrent);
     }
     $code .= $codeCurrent;
     if (PBData::get('retina_ready') == 1 && !$retina) {
         $this->createCSS($code, true);
         return;
     }
     PBComponentData::set($this->getComponentId(), 'css', $code);
 }
 function createCSS($code = null, $retina = false)
 {
     $CSS = new PBCSS();
     $key = $retina ? 'url_retina' : 'url';
     $codeCurrent = null;
     foreach ((array) $this->bullet['file'] as $file) {
         $codeCurrent .= $CSS->create(array('selector' => array('.pb-pricing-plan .pb-pricing-plan-item-feature-list.pb-pricing-plan-item-feature-list-' . PBHelper::createHash($file) . ' ul li'), 'property' => array('background-image' => $this->bullet[$key] . $file)));
     }
     if ($retina) {
         $codeCurrent = $CSS->getRetinaMediaQuery($codeCurrent);
     }
     $code .= $codeCurrent;
     if (PBData::get('retina_ready') == 1 && !$retina) {
         $this->createCSS($code, true);
         return;
     }
     PBComponentData::set($this->getComponentId(), 'css', $code);
 }
 function createCSS($code = null, $retina = false)
 {
     $CSS = new PBCSS();
     $key = $retina ? 'url_retina' : 'url';
     $codeCurrent = null;
     foreach ($this->icon as $iconSize => $iconFile) {
         foreach ($iconFile['file'] as $iconName) {
             $codeCurrent .= $CSS->create(array('selector' => array('.pb-box.pb-box-icon.pb-box-icon-size-' . $iconSize . '.pb-box-icon-' . PBHelper::createHash($iconName) . '>.pb-box-inner'), 'property' => array('background-image' => $this->icon[$iconSize][$key] . $iconName)));
         }
     }
     if ($retina) {
         $codeCurrent = $CSS->getRetinaMediaQuery($codeCurrent);
     }
     $code .= $codeCurrent;
     if (PBData::get('retina_ready') == 1 && !$retina) {
         $this->createCSS($code, true);
         return;
     }
     PBComponentData::set($this->getComponentId(), 'css', $code);
 }
    function processShortcodeList($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $Validation = new PBValidation();
        if (PBComponentData::get($this->getComponentId(), 'icon_type') === 'gr') {
            $classBullet = null;
            if ($Validation->isNotEmpty($attribute['bullet'])) {
                $classBullet = 'pb-list-icon-name-' . PBHelper::createHash($attribute['bullet']);
            }
            $class = array('pb-list', 'pb-list-icon-type-gr', $classBullet, $attribute['css_class']);
        } else {
            $class = array('pb-list', 'pb-list-icon-type-fa', $attribute['css_class']);
        }
        $id = PBHelper::createId('pb_list');
        $html = '<div' . PBHelper::createClassAttribute($class) . ' id="' . esc_attr($id) . '">' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</div>';
        if (PBComponentData::get($this->getComponentId(), 'icon_type') === 'fa' && $Validation->isNotEmpty($attribute['font_icon_name'])) {
            $option = array();
            $option['icon_type'] = 'fa';
            if ($Validation->isNotEmpty($attribute['font_icon_name'])) {
                $option['font_icon_name'] = $attribute['font_icon_name'];
            }
            if ($Validation->isColor($attribute['font_icon_color'])) {
                $option['font_icon_color'] = $attribute['font_icon_color'];
            }
            if ($Validation->isNumber($attribute['font_icon_size'], 1, 200)) {
                $option['font_icon_size'] = $attribute['font_icon_size'];
            }
            $html .= '
				<div class="pb-script-tag">
					<script type="text/javascript">
						jQuery(document).ready(function($)
						{
							$(\'#' . $id . '\').PBList(' . json_encode($option) . ');
						});
					</script>
				</div>
			';
        }
        return PBHelper::formatHTML($html, $content);
    }
 function processShortcodeFeatureItemHeader($attribute, $content, $tag)
 {
     $attribute = $this->processAttribute($tag, $attribute);
     $html = null;
     $Window = new PBWindow();
     $Validation = new PBValidation();
     if ($Validation->isEmpty($content)) {
         return $html;
     }
     if (!array_key_exists($this->attrItemURLTarget, $Window->linkTarget)) {
         return $html;
     }
     $content = do_shortcode($content);
     if ($Validation->isNotEmpty($this->attrItemURL)) {
         $class = array($Window->getTargetCSSClass($this->attrItemURLTarget));
         $content = '<a href="' . esc_attr($this->attrItemURL) . '"' . PBHelper::createClassAttribute($class) . '>' . $content . '</a>';
     }
     $class = array('pb-feature-header');
     $html = '<h' . PBComponentData::get($this->getComponentId(), 'header_important_default') . PBHelper::createClassAttribute($class) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</h' . PBComponentData::get($this->getComponentId(), 'header_important_default') . '>';
     return PBHelper::formatHTML($html, $content);
 }
    function processShortcodeGallery($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $elementHTML = null;
        $Layout = new PBLayout();
        $Validation = new PBValidation();
        $ImageHover = new PBImageHover();
        $file = PBFile::getImage(explode(',', $attribute['image']));
        if ($file === false) {
            return $html;
        }
        if (!count($file->posts)) {
            return $html;
        }
        if (!PBFile::isWPImage($attribute['image_size'])) {
            return $html;
        }
        if (!array_key_exists($attribute['layout'], $this->layout)) {
            return $html;
        }
        if (!$Validation->isBool($attribute['hover_enable'])) {
            return $html;
        }
        if (!array_key_exists($attribute['hover_type'], $ImageHover->type)) {
            return $html;
        }
        if (!$Validation->isBool($attribute['caption_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['preloader_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['description_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['layout_full_width_enable'])) {
            return $html;
        }
        $key = array('hover_type', 'hover_enable', 'preloader_enable', 'layout_full_width_enable');
        foreach ($key as $index) {
            $option[$index] = $attribute[$index];
        }
        $id = PBHelper::createId('pb_gallery');
        global $post;
        $bPost = $post;
        $i = 0;
        while ($file->have_posts()) {
            global $post;
            $file->the_post();
            $full = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
            $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), $attribute['image_size']);
            $meta = PBMeta::get($post);
            PBHelper::removeUIndex($meta, 'media_library_video_url', 'media_library_url');
            $class = array();
            $class[0] = array('pb-layout-' . $Layout->getLayoutColumnCSSClass($attribute['layout'], $i));
            $class[1] = array('pb-image-box');
            $class[2] = array('pb-image');
            if ($attribute['preloader_enable'] == 1) {
                array_push($class[1], 'pb-image-preloader', 'pb-image-preloader-animation-enable');
            }
            if ($attribute['hover_enable'] == 1) {
                array_push($class[1], 'pb-image-hover', 'pb-image-hover-type-' . $attribute['hover_type']);
            }
            /****/
            $imageTextHTML = null;
            if ($Validation->isNotEmpty($post->post_excerpt) && $attribute['caption_enable'] == 1) {
                $imageTextHTML .= '<' . PBComponentData::get($this->getComponentId(), 'image_text_caption_header_tag') . ' class="pb-image-text-caption">' . get_the_excerpt() . '</' . PBComponentData::get($this->getComponentId(), 'image_text_caption_header_tag') . '>';
            }
            if ($Validation->isNotEmpty($post->post_content) && $attribute['description_enable'] == 1) {
                $imageTextHTML .= '<div class="pb-image-text-description">' . get_the_content() . '</div>';
            }
            if ($Validation->isNotEmpty($imageTextHTML)) {
                $imageTextHTML = '<div class="pb-image-text">' . $imageTextHTML . '</div>';
            }
            if ($Validation->isNotEmpty($imageTextHTML)) {
                $imageTextHTML .= '<div class="pb-image-text-fancybox"><b>' . get_the_excerpt() . '</b> ' . get_the_content() . '</div>';
            }
            /****/
            $url = null;
            $rel = null;
            if ($Validation->isVideoURL($meta['media_library_video_url'])) {
                $url = $meta['media_library_video_url'];
                array_push($class[1], 'pb-image-type-video');
            } elseif ($Validation->isURL($meta['media_library_url'])) {
                $url = $meta['media_library_url'];
                array_push($class[1], 'pb-image-type-link');
            } else {
                $rel = $id;
                $url = $full[0];
                array_push($class[1], 'pb-image-type-image');
            }
            /****/
            $imageHTML = null;
            if ($attribute['hover_enable'] == 1) {
                $imageHTML = '<a href="' . $url . '"' . PBHelper::createClassAttribute($class[2]) . ($Validation->isEmpty($rel) ? null : ' data-fancybox-group="' . esc_attr($rel) . '"') . '><img src="' . $thumbnail[0] . '" alt=""/><span><span><span></span></span></span></a>';
            } else {
                $imageHTML = '<div' . PBHelper::createClassAttribute($class[2]) . '><img src="' . $thumbnail[0] . '" alt=""/></div>';
            }
            /****/
            if ($Validation->isNotEmpty($imageTextHTML)) {
                array_push($class[1], 'pb-image-text-enable');
            }
            $elementHTML .= '<li' . PBHelper::createClassAttribute($class[0]) . '><div' . PBHelper::createClassAttribute($class[1]) . '>' . $imageHTML . $imageTextHTML . '</div></li>';
            $i++;
        }
        wp_reset_query();
        $post = $bPost;
        $class = array();
        $class[0] = array('pb-gallery', 'pb-clear-fix', $attribute['css_class']);
        $class[1] = array($Layout->getLayoutCSSClass($attribute['layout']), 'pb-reset-list', 'pb-clear-fix');
        if ($attribute['layout_full_width_enable'] == 1) {
            array_push($class[1], 'pb-layout-full-width');
        }
        $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 . '\').PBGallery(' . json_encode($option) . ');
					});
				</script>
			</div>
		';
        return PBHelper::formatHTML($html, $elementHTML);
    }
    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 processShortcodeCounterBoxItemHeader($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $Validation = new PBValidation();
        if ($Validation->isEmpty($content)) {
            return $html;
        }
        $html = '
			<h' . PBComponentData::get($this->getComponentId(), 'header_important_default') . PBHelper::createClassAttribute(array('pb-counter-box-header')) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</h' . PBComponentData::get($this->getComponentId(), 'header_important_default') . '>
		';
        return PBHelper::formatHTML($html, $content);
    }
    function processShortcodeSocialIcon($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $style = array();
        $social = array();
        $Window = new PBWindow();
        $Validation = new PBValidation();
        if (!array_key_exists($attribute['target'], $Window->linkTarget)) {
            return $html;
        }
        if (!$Validation->isBool($attribute['native_color_enable'])) {
            return $html;
        }
        foreach ($this->social as $index => $value) {
            $url = 'profile_' . $index . '_url';
            $order = 'profile_' . $index . '_order';
            PBHelper::removeUIndex($attribute, $url, $order);
            if (!$Validation->isURL($attribute[$url])) {
                continue;
            }
            $orderValue = (int) $attribute[$order];
            $socialData = array('id' => $index, 'url' => $attribute[$url], 'name' => $value[1]);
            if ($Validation->isNumber($attribute[$order], 0, 99)) {
                if (isset($social[$orderValue])) {
                    array_push($social, $socialData);
                } else {
                    $social[$orderValue] = $socialData;
                }
            } else {
                array_push($social, $socialData);
            }
        }
        ksort($social);
        if (!count($social)) {
            return;
        }
        $option = array('in' => array(), 'out' => array());
        if ($Validation->isNumber($attribute['width'], 0, 999)) {
            $style['width'] = $attribute['width'] . 'px';
        }
        if ($Validation->isNumber($attribute['height'], 0, 999)) {
            $style['height'] = $attribute['height'] . 'px';
        }
        if (PBComponentData::get($this->getComponentId(), 'icon_type') !== 'gr') {
            if ($Validation->isNumber($attribute['font_icon_size'], 1, 200)) {
                $style['font-size'] = $attribute['font_icon_size'] . 'px';
            }
        }
        $borderRadius = null;
        if ($Validation->isNumber($attribute['border_radius_top_left'], 0, 999)) {
            $borderRadius .= ' ' . $attribute['border_radius_top_left'] . 'px';
        }
        if ($Validation->isNumber($attribute['border_radius_top_right'], 0, 999)) {
            $borderRadius .= ' ' . $attribute['border_radius_top_right'] . 'px';
        }
        if ($Validation->isNumber($attribute['border_radius_bottom_right'], 0, 999)) {
            $borderRadius .= ' ' . $attribute['border_radius_bottom_right'] . 'px';
        }
        if ($Validation->isNumber($attribute['border_radius_bottom_left'], 0, 999)) {
            $borderRadius .= ' ' . $attribute['border_radius_bottom_left'] . 'px';
        }
        if ($Validation->isNotEmpty($borderRadius)) {
            $borderRadius = trim($borderRadius);
            $style['-webkit-border-radius'] = $borderRadius;
            $style['-moz-border-radius'] = $borderRadius;
            $style['border-radius'] = $borderRadius;
        }
        if ($Validation->isNumber($attribute['border_width'], 0, 999)) {
            $style['border-style'] = 'solid';
            $style['border-width'] = $attribute['border_width'] . 'px';
            $option['out']['border-width'] = $style['border-width'];
            $option['out']['border-style'] = 'solid';
        }
        if ($Validation->isColor($attribute['bg_color'])) {
            $style['background-color'] = PBColor::getColor($attribute['bg_color']);
            $option['out']['background-color'] = $style['background-color'];
        }
        if (PBComponentData::get($this->getComponentId(), 'icon_type') == 'fa') {
            if ($Validation->isColor($attribute['icon_color'])) {
                $style['color'] = PBColor::getColor($attribute['icon_color']);
                $option['out']['color'] = $style['color'];
            }
        }
        if ($Validation->isColor($attribute['border_color'])) {
            $style['border-color'] = PBColor::getColor($attribute['border_color']);
            $option['out']['border-color'] = $style['border-color'];
        }
        if ($Validation->isNumber($attribute['border_width_hover'], 0, 999)) {
            $option['in']['border-width'] = $attribute['border_width_hover'] . 'px';
            $option['in']['border-style'] = 'solid';
        }
        if ($Validation->isColor($attribute['bg_color_hover'])) {
            $option['in']['background-color'] = PBColor::getColor($attribute['bg_color_hover']);
        }
        if (PBComponentData::get($this->getComponentId(), 'icon_type') == 'fa') {
            if ($Validation->isColor($attribute['font_icon_color_hover'])) {
                $option['in']['color'] = PBColor::getColor($attribute['font_icon_color_hover']);
            }
        }
        if ($Validation->isColor($attribute['border_color_hover'])) {
            $option['in']['border-color'] = PBColor::getColor($attribute['border_color_hover']);
        }
        foreach ($social as $index => $value) {
            $class = array('pb-social-icon-' . $value['id']);
            $iconHTML = null;
            if (PBComponentData::get($this->getComponentId(), 'icon_type') == 'fa') {
                $iconHTML = '<i class="fa fa-' . esc_html($value['name']) . '"></i>';
            }
            array_push($class, $Window->getTargetCSSClass($attribute['target']));
            $html .= '
				<li><a href="' . esc_attr($value['url']) . '"' . PBHelper::createClassAttribute($class) . PBHelper::createStyleAttribute($style) . '>' . $iconHTML . '</a></li>
			';
        }
        $id = PBHelper::createId('pb_social_icon');
        $class = array('pb-social-icon');
        if ($attribute['native_color_enable'] == 1) {
            array_push($class, 'pb-social-icon-color-native');
        }
        if (PBComponentData::get($this->getComponentId(), 'icon_type') === 'gr') {
            array_push($class, 'pb-social-icon-type-gr');
        } elseif (PBComponentData::get($this->getComponentId(), 'icon_type') === 'fa') {
            array_push($class, 'pb-social-icon-type-fa');
        }
        array_push($class, 'pb-reset-list', 'pb-clear-fix', $attribute['css_class']);
        $html = '
			<ul' . PBHelper::createClassAttribute($class) . ' id="' . esc_attr($id) . '">
				' . $html . '
			</ul>
			<div class="pb-script-tag">
				<script type="text/javascript">
					jQuery(document).ready(function($)
					{
						$(\'#' . $id . '\').PBSocialIcon(' . json_encode($option) . ');
					});
				</script>
			</div>
		';
        return PBHelper::formatHTML($html);
    }
    function processShortcodeTeam($attribute, $content, $tag)
    {
        $html = null;
        $teamHTML = null;
        $option = array();
        $attribute = $this->processAttribute($tag, $attribute);
        $Window = new PBWindow();
        $Easing = new PBEasing();
        $Layout = new PBLayout();
        $Validation = new PBValidation();
        $ImageHover = new PBImageHover();
        $data = $this->getTeam($attribute);
        if ($data === false) {
            return;
        }
        if (!count($data->posts)) {
            return;
        }
        if (!array_key_exists($attribute['template'], $this->template)) {
            return $html;
        }
        if (!array_key_exists($attribute['layout'], $this->layout)) {
            return $html;
        }
        if (!PBFile::isWPImage($attribute['image_size'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['hover_enable'])) {
            return $html;
        }
        if (!array_key_exists($attribute['hover_type'], $ImageHover->type)) {
            return $html;
        }
        if (!$Validation->isBool($attribute['preloader_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['skill_list_waypoint_enable'])) {
            return $html;
        }
        if (!$Validation->isNumber($attribute['skill_list_waypoint_duration'], 0, 99999)) {
            return $html;
        }
        if (!array_key_exists($attribute['skill_list_waypoint_easing'], $Easing->easingType)) {
            return $html;
        }
        $key = array('hover_type', 'hover_enable', 'preloader_enable', 'skill_list_waypoint_enable', 'skill_list_waypoint_easing', 'skill_list_waypoint_duration', 'skill_list_waypoint_offset_trigger');
        foreach ($key as $index) {
            $option[$index] = $attribute[$index];
        }
        $layoutCurrent = '100';
        if ($attribute['template'] == 2) {
            $layoutCurrent = '50x50';
        } elseif ($attribute['template'] == 3) {
            $layoutCurrent = $attribute['layout'];
        }
        global $post;
        $bPost = $post;
        $i = 0;
        while ($data->have_posts()) {
            global $post;
            $data->the_post();
            $full = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
            $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), $attribute['image_size']);
            if ($full == false || $thumbnail == false) {
                continue;
            }
            $meta = PBMeta::get($post);
            PBHelper::removeUIndex($meta, 'team_social', 'team_skill');
            /***/
            $class = array(array(), array());
            $class[0] = array('pb-layout-' . $Layout->getLayoutColumnCSSClass($layoutCurrent, $i));
            $class[1] = array('pb-image-box', 'pb-image-preloader-animation-enable');
            $class[2] = array('pb-image');
            if ($attribute['preloader_enable'] == 1) {
                array_push($class[1], 'pb-image-preloader');
            }
            if ($attribute['hover_enable'] == 1) {
                array_push($class[1], 'pb-image-hover', 'pb-image-hover-type-' . $attribute['hover_type'], 'pb-image-type-image');
            }
            /***/
            $textHTML = null;
            if ($Validation->isNotEmpty($meta['team_first_name']) || $Validation->isNotEmpty($meta['team_second_name'])) {
                $textHTML .= '<h3 class="pb-team-text-box-member-name">' . trim($meta['team_first_name'] . ' ' . $meta['team_second_name']) . '</h3>';
            }
            if ($Validation->isNotEmpty($meta['team_position'])) {
                $textHTML .= '<div class="pb-team-text-box-member-position">' . $meta['team_position'] . '</div>';
            }
            /***/
            $socialHTML = null;
            if (is_array($meta['team_social'])) {
                $social = PBHelper::orderArrayByElement($meta['team_social'], 'team_social_order');
                foreach ($social as $index => $value) {
                    if (!array_key_exists($value['team_social_name'], $this->social)) {
                        continue;
                    }
                    $socialHTML .= '
						<li>
							<a href="' . esc_attr($value['team_social_url']) . '" class="pb-team-social-icon-' . $value['team_social_name'] . ' ' . $Window->getTargetCSSClass('_blank') . '"></a>
						</li>
					';
                }
                if ($Validation->isNotEmpty($socialHTML)) {
                    $socialHTML = '
						<ul class="pb-team-social-icon-box pb-reset-list pb-clear-fix">
							' . $socialHTML . '
						</ul>
					';
                }
            }
            /***/
            $skillHTML = null;
            if (is_array($meta['team_skill'])) {
                $skill = PBHelper::orderArrayByElement($meta['team_skill'], 'team_skill_order');
                foreach ($skill as $index => $value) {
                    if (!$Validation->isNumber($value['team_skill_level'], 0, 100)) {
                        continue;
                    }
                    $skillHTML .= '
						<div class="pb-team-skill pb-value-' . (int) $value['team_skill_level'] . '">
							<span class="pb-team-skill-label">' . esc_html($value['team_skill_name']) . '</span>
							<span class="pb-team-skill-value">
								<span class="pb-team-skill-value-value">' . (int) $value['team_skill_level'] . '</span>
								<span class="pb-team-skill-value-character-after">%</span>
							</span>
							<span class="pb-team-skill-foreground"></span>
							<span class="pb-team-skill-background"></span>						
						</div>
					';
                }
                if ($Validation->isNotEmpty($skillHTML)) {
                    $skillHTML = '
						<div class="pb-team-skill-box">
							' . $skillHTML . '
						</div>
					';
                }
            }
            /***/
            $imageTextHTML = null;
            if ($Validation->isNotEmpty($meta['team_first_name']) || $Validation->isNotEmpty($meta['team_second_name'])) {
                $imageTextHTML .= '<' . PBComponentData::get($this->getComponentId(), 'image_text_caption_header_tag') . ' class="pb-image-text-caption">' . trim($meta['team_first_name'] . ' ' . $meta['team_second_name']) . '</' . PBComponentData::get($this->getComponentId(), 'image_text_caption_header_tag') . '>';
            }
            if ($Validation->isNotEmpty($meta['team_position'])) {
                $imageTextHTML .= '<div class="pb-image-text-description">' . $meta['team_position'] . '</div>';
            }
            if ($Validation->isNotEmpty($imageTextHTML)) {
                $imageTextHTML = '<div class="pb-image-text">' . $imageTextHTML . '</div>';
            }
            /***/
            $imageHTML = null;
            if ($attribute['hover_enable'] == 1) {
                $imageHTML = '<a href="' . $full[0] . '"' . PBHelper::createClassAttribute($class[2]) . '><img src="' . $thumbnail[0] . '" alt=""/><span><span><span></span></span></span></a>';
            } else {
                $imageHTML = '<div' . PBHelper::createClassAttribute($class[2]) . '><img src="' . $thumbnail[0] . '" alt=""/></div>';
            }
            if ($Validation->isNotEmpty($imageTextHTML)) {
                array_push($class[1], 'pb-image-text-enable');
            }
            $imageBoxHTML = '<div' . PBHelper::createClassAttribute($class[1]) . '>' . $imageHTML . $imageTextHTML . '</div>';
            /***/
            $teamHTML .= '
				<li' . PBHelper::createClassAttribute($class[0]) . '>
			';
            switch ($attribute['template']) {
                case 1:
                    $teamHTML .= '<div class="pb-layout-33x66 pb-clear-fix"><div class="pb-layout-column-left">' . $imageBoxHTML . $socialHTML . '</div><div class="pb-layout-column-right"><div class="pb-team-text-box">' . $textHTML . apply_filters('the_content', do_shortcode(get_the_content())) . '</div>' . $skillHTML . '</div></div>';
                    break;
                case 2:
                    $teamHTML .= '<div class="pb-layout-50x50 pb-clear-fix"><div class="pb-layout-column-left">' . $imageBoxHTML . '</div><div class="pb-layout-column-right"><div class="pb-team-quote-box"></div><div class="pb-team-text-box">' . apply_filters('the_content', do_shortcode(get_the_content())) . '</div>' . $socialHTML . '</div></div>';
                    break;
                case 3:
                    $teamHTML .= '<div>' . $imageBoxHTML . $socialHTML . '</div>';
                    break;
            }
            $teamHTML .= '
				</li>
			';
            $i++;
        }
        wp_reset_query();
        $post = $bPost;
        if ($Validation->isEmpty($teamHTML)) {
            return;
        }
        $id = PBHelper::createId('pb_team');
        $class = array();
        $class[0] = array('pb-team', 'pb-team-template-' . $attribute['template'], 'pb-clear-fix', $attribute['css_class']);
        $class[1] = array('pb-layout-' . $layoutCurrent, 'pb-reset-list', 'pb-clear-fix');
        $html = '
			<div' . PBHelper::createClassAttribute($class[0]) . ' id="' . $id . '">
				<ul' . PBHelper::createClassAttribute($class[1]) . '>
					' . $teamHTML . '
				</ul>			
			</div>
			<div class="pb-script-tag">
				<script type="text/javascript">
					jQuery(document).ready(function($)
					{
						$(\'#' . $id . '\').PBTeam(' . json_encode($option) . ');
					});
				</script>
			</div>
		';
        return $html;
    }
    function processShortcodeSitemap($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $Validation = new PBValidation();
        $argument = array();
        if ($Validation->isNotEmpty($attribute['post_type'])) {
            $argument['post_type'] = explode(',', $attribute['post_type']);
        }
        if ($Validation->isNotEmpty($attribute['post_status'])) {
            $argument['post_status'] = explode(',', $attribute['post_status']);
        }
        if ($Validation->isNotEmpty($attribute['post__in'])) {
            $argument['post__in'] = explode(',', $attribute['post__in']);
        }
        if ($Validation->isNotEmpty($attribute['post__not_in'])) {
            $argument['post__not_in'] = explode(',', $attribute['post__not_in']);
        }
        if ($Validation->isNotEmpty($attribute['posts_per_page'])) {
            $argument['posts_per_page'] = $attribute['posts_per_page'] == -2 ? -1 : $attribute['posts_per_page'];
        }
        if ($Validation->isNotEmpty($attribute['orderby'])) {
            $argument['orderby'] = $attribute['orderby'];
        }
        if ($Validation->isNotEmpty($attribute['order'])) {
            $argument['order'] = $attribute['order'];
        }
        $query = new WP_Query($argument);
        if ($query === false) {
            return $html;
        }
        if ($query->post_count == 0) {
            return $html;
        }
        $class = array(array('pb-sitemap'), array('pb-reset-list'));
        if (PBComponentData::get($this->getComponentId(), 'icon_type') === 'gr') {
            if (array_key_exists($attribute['bullet'], $this->bullet['file'])) {
                array_push($class[0], 'pb-sitemap-icon-type-gr', 'pb-sitemap-icon-name-' . PBHelper::createHash($attribute['bullet']));
            }
        }
        $iconHTML = null;
        if (PBComponentData::get($this->getComponentId(), 'icon_type') === 'fa') {
            if ($Validation->isNotEmpty($attribute['font_icon_name'])) {
                $style = array();
                if ($Validation->isColor($attribute['font_icon_color'])) {
                    $style['color'] = PBColor::getColor($attribute['font_icon_color']);
                }
                if ($Validation->isNumber($attribute['font_icon_size'], 1, 200)) {
                    $style['font-size'] = $attribute['font_icon_size'] . 'px';
                }
                array_push($class[0], 'pb-sitemap-icon-type-fa');
                $iconHTML = '<i class="fa fa-' . esc_attr($attribute['font_icon_name']) . '"' . PBHelper::createStyleAttribute($style) . '></i>';
            }
        }
        global $post;
        $bPost = $post;
        while ($query->have_posts()) {
            $query->the_post();
            $html .= '
				<li id="post-' . get_the_ID() . '" class="' . implode(' ', get_post_class()) . '">
					' . $iconHTML . '
					<a href="' . get_the_permalink() . '">' . preg_replace('/\\<br\\/\\>/', ' ', get_the_title()) . '</a>
				</li>
			';
        }
        $post = $bPost;
        $html = '
			<div' . PBHelper::createClassAttribute($class[0]) . '>
				<ul' . PBHelper::createClassAttribute($class[1]) . '>' . $html . '</ul>
			</div>
		';
        return PBHelper::formatHTML($html);
    }
Beispiel #20
0
PBComponentData::set('notice', 'first_line_header_important_default', '6');
PBComponentData::set('notice', 'icon_path', get_template_directory() . '/media/image/public/icon_feature/small/');
PBComponentData::set('notice', 'icon_url', get_template_directory_uri() . '/media/image/public/icon_feature/small/');
PBComponentData::set('notice', 'icon_url_retina', get_template_directory_uri() . '/media/image/public/2x/icon_feature/small/');
/******************************************************************************/
PBComponentData::set('pricing_plan', 'bullet', array('url' => get_template_directory_uri() . '/media/image/public/icon_bullet/', 'url_retina' => get_template_directory_uri() . '/media/image/public/2x/icon_bullet/', 'path' => get_template_directory() . '/media/image/public/icon_bullet/'));
/******************************************************************************/
PBComponentData::set('recent_post', 'image_default', 'image-525-315');
PBComponentData::set('recent_post', 'image_hover_type_default', 'fade');
PBComponentData::set('recent_post', 'template_default', '2');
PBComponentData::set('recent_post', 'header_important_default', '5');
/******************************************************************************/
PBComponentData::set('social_icon', 'icon_path', get_template_directory() . '/media/image/public/icon_social/');
PBComponentData::set('social_icon', 'icon_url', get_template_directory_uri() . '/media/image/public/icon_social/');
PBComponentData::set('social_icon', 'icon_url_retina', get_template_directory_uri() . '/media/image/public/2x/icon_social/');
PBComponentData::set('social_icon', 'icon_type', 'gr');
/******************************************************************************/
PBComponentData::set('sitemap', 'bullet', array('url' => get_template_directory_uri() . '/media/image/public/icon_bullet/', 'url_retina' => get_template_directory_uri() . '/media/image/public/2x/icon_bullet/', 'path' => get_template_directory() . '/media/image/public/icon_bullet/'));
PBComponentData::set('sitemap', 'icon_type', 'gr');
/******************************************************************************/
PBComponentData::set('team', 'image_default', 'image-525-560');
PBComponentData::set('team', 'image_hover_type_default', 'fade');
PBComponentData::set('team', 'image_text_caption_header_tag', 'h6');
PBComponentData::set('team', 'social_icon_path', get_template_directory() . '/media/image/public/icon_social/');
PBComponentData::set('team', 'social_icon_url', get_template_directory_uri() . '/media/image/public/icon_social/');
PBComponentData::set('team', 'social_icon_url_retina', get_template_directory_uri() . '/media/image/public/2x/icon_social/');
/******************************************************************************/
PBComponentData::set('zaccordion', 'image_default', 'image-1050-770');
/******************************************************************************/
PBData::set('css_class', array(array('value' => 'pb-top-0', 'description' => 'Reset top margin'), array('value' => 'pb-bottom-0', 'description' => 'Reset top margin'), array('value' => 'pb-margin-top-0', 'description' => 'Set a 0px top margin'), array('value' => 'pb-margin-top-10', 'description' => 'Set a 10px top margin'), array('value' => 'pb-margin-top-20', 'description' => 'Set a 20px top margin'), array('value' => 'pb-margin-top-30', 'description' => 'Set a 30px top margin'), array('value' => 'pb-margin-top-40', 'description' => 'Set a 40px top margin'), array('value' => 'pb-margin-top-50', 'description' => 'Set a 50px top margin'), array('value' => 'pb-margin-top-60', 'description' => 'Set a 60px top margin'), array('value' => 'pb-margin-top-70', 'description' => 'Set a 70px top margin'), array('value' => 'pb-margin-top-80', 'description' => 'Set a 80px top margin'), array('value' => 'pb-margin-top-90', 'description' => 'Set a 90px top margin'), array('value' => 'pb-margin-top-100', 'description' => 'Set a 100px top margin'), array('value' => 'pb-margin-bottom-0', 'description' => 'Set a 0px bottom margin'), array('value' => 'pb-margin-bottom-10', 'description' => 'Set a 10px bottom margin'), array('value' => 'pb-margin-bottom-20', 'description' => 'Set a 20px bottom margin'), array('value' => 'pb-margin-bottom-30', 'description' => 'Set a 30px bottom margin'), array('value' => 'pb-margin-bottom-40', 'description' => 'Set a 40px bottom margin'), array('value' => 'pb-margin-bottom-50', 'description' => 'Set a 50px bottom margin'), array('value' => 'pb-margin-bottom-60', 'description' => 'Set a 60px bottom margin'), array('value' => 'pb-margin-bottom-70', 'description' => 'Set a 70px bottom margin'), array('value' => 'pb-margin-bottom-80', 'description' => 'Set a 80px bottom margin'), array('value' => 'pb-margin-bottom-90', 'description' => 'Set a 90px bottom margin'), array('value' => 'pb-margin-bottom-100', 'description' => 'Set a 100px bottom margin'), array('value' => 'pb-margin-left-0', 'description' => 'Set a 0px left margin'), array('value' => 'pb-margin-left-10', 'description' => 'Set a 10px left margin'), array('value' => 'pb-margin-left-20', 'description' => 'Set a 20px left margin'), array('value' => 'pb-margin-left-30', 'description' => 'Set a 30px left margin'), array('value' => 'pb-margin-left-40', 'description' => 'Set a 40px left margin'), array('value' => 'pb-margin-left-50', 'description' => 'Set a 50px left margin'), array('value' => 'pb-margin-left-60', 'description' => 'Set a 60px left margin'), array('value' => 'pb-margin-left-70', 'description' => 'Set a 70px left margin'), array('value' => 'pb-margin-left-80', 'description' => 'Set a 80px left margin'), array('value' => 'pb-margin-left-90', 'description' => 'Set a 90px left margin'), array('value' => 'pb-margin-left-100', 'description' => 'Set a 100px left margin'), array('value' => 'pb-margin-right-0', 'description' => 'Set a 0px right margin'), array('value' => 'pb-margin-right-10', 'description' => 'Set a 10px right margin'), array('value' => 'pb-margin-right-20', 'description' => 'Set a 20px right margin'), array('value' => 'pb-margin-right-30', 'description' => 'Set a 30px right margin'), array('value' => 'pb-margin-right-40', 'description' => 'Set a 40px right margin'), array('value' => 'pb-margin-right-50', 'description' => 'Set a 50px right margin'), array('value' => 'pb-margin-right-60', 'description' => 'Set a 60px right margin'), array('value' => 'pb-margin-right-70', 'description' => 'Set a 70px right margin'), array('value' => 'pb-margin-right-80', 'description' => 'Set a 80px right margin'), array('value' => 'pb-margin-right-90', 'description' => 'Set a 90px right margin'), array('value' => 'pb-margin-right-100', 'description' => 'Set a 100px right margin'), array('value' => 'pb-position-absolute', 'description' => 'Set element absolute'), array('value' => 'pb-position-relative', 'description' => 'Set element relative'), array('value' => 'pb-float-left', 'description' => 'Add left float'), array('value' => 'pb-float-right', 'description' => 'Add right float'), array('value' => 'theme-section-padding-top', 'description' => 'Add default (80px) top padding to the layout'), array('value' => 'theme-section-padding-bottom', 'description' => 'Add default (80px) bottom padding to the layout'), array('value' => 'theme-section-white', 'description' => 'Create selected component in white version')));
/******************************************************************************/
    function processShortcodeAccordionPanelHeader($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $style = array();
        $Validation = new PBValidation();
        if ($Validation->isNumber(PBComponentData::get('accordion', 'header_font_size'), 1, 100, false)) {
            $style['font-size'] = PBComponentData::get('accordion', 'header_font_size') . 'px';
        }
        $html = '
			<h' . PBComponentData::get($this->getComponentId(), 'header_important_default') . '><a href="#"' . PBHelper::createStyleAttribute($style) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '<span></span></a></h' . PBComponentData::get($this->getComponentId(), 'header_important_default') . '>
		';
        return PBHelper::formatHTML($html, $content);
    }
    function processShortcodeRecentPost($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $html = null;
        $Layout = new PBLayout();
        $Validation = new PBValidation();
        $ImageHover = new PBImageHover();
        if (!PBFile::isWPImage($attribute['image_size'])) {
            return $html;
        }
        if (!array_key_exists($attribute['layout'], $this->layout)) {
            return $html;
        }
        if (!array_key_exists($attribute['template'], $this->template)) {
            return $html;
        }
        if (!$Validation->isNumber($attribute['post_count'], 1, 999)) {
            return $html;
        }
        if (!$Validation->isBool($attribute['preloader_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['hover_enable'])) {
            return $html;
        }
        if (!array_key_exists($attribute['hover_type'], $ImageHover->type)) {
            return $html;
        }
        if (!$Validation->isBool($attribute['date_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['image_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['header_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['author_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['excerpt_enable'])) {
            return $html;
        }
        if (!$Validation->isBool($attribute['category_enable'])) {
            return $html;
        }
        $option = array();
        $key = array('hover_type', 'hover_enable', 'preloader_enable');
        foreach ($key as $index) {
            $option[$index] = $attribute[$index];
        }
        $data = $this->getPost($attribute);
        if ($data === false) {
            return null;
        }
        if (!count($data->posts)) {
            return null;
        }
        $i = 0;
        global $post;
        $bPost = $post;
        while ($data->have_posts()) {
            $data->the_post();
            $class = array('pb-layout-' . $Layout->getLayoutColumnCSSClass($attribute['layout'], $i));
            $meta = array('date' => null, 'comment_count' => null, 'image' => null, 'header' => null, 'excerpt' => null, 'meta' => null);
            if ($attribute['date_enable']) {
                $meta['date'] = '<div class="pb-recent-post-date">' . get_the_date() . '</div>';
            }
            if ($attribute['image_enable']) {
                if (has_post_thumbnail()) {
                    $commentCountHTML = null;
                    if ($attribute['template'] == 1) {
                        if ($attribute['comment_count_enable'] == 1 && comments_open(get_the_id())) {
                            $commentCount = wp_count_comments(get_the_id());
                            $commentCountHTML = '<div class="pb-recent-post-comment-count"><span class="pb-recent-post-comment-count-value">' . $commentCount->approved . '</span><span class="pb-recent-post-comment-count-arrow"></span></div>';
                        }
                    }
                    $classImage = array(array('pb-recent-post-image', 'pb-image-box'), array('pb-image'));
                    if ($attribute['preloader_enable'] == 1) {
                        array_push($classImage[0], 'pb-image-preloader', 'pb-image-preloader-animation-enable');
                    }
                    if ($attribute['hover_enable'] == 1) {
                        array_push($classImage[0], 'pb-image-hover', 'pb-image-hover-type-' . $attribute['hover_type']);
                    }
                    if ($attribute['hover_enable'] == 1) {
                        $meta['image'] = '<a href="' . get_permalink(get_the_ID()) . '"' . PBHelper::createClassAttribute($classImage[1]) . '>' . get_the_post_thumbnail(get_the_ID(), $attribute['image_size']) . '<span><span><span></span></span></span></a>';
                    } else {
                        $meta['image'] = '<div' . PBHelper::createClassAttribute($classImage[1]) . '>' . get_the_post_thumbnail(get_the_ID(), $attribute['image_size']) . '</div>';
                    }
                    $meta['image'] = '<div' . PBHelper::createClassAttribute($classImage[0]) . '>' . $meta['image'] . $commentCountHTML . '</div>';
                }
            }
            if ($attribute['header_enable']) {
                $meta['header'] = '<h' . PBComponentData::get($this->getComponentId(), 'header_important_default') . ' class="pb-recent-post-header"><a href="' . get_permalink(get_the_ID()) . '">' . get_the_title() . '</a></h' . PBComponentData::get($this->getComponentId(), 'header_important_default') . '>';
            }
            if ($attribute['excerpt_enable']) {
                $meta['excerpt'] = '<div class="pb-recent-post-excerpt">' . get_the_excerpt() . '</div>';
            }
            if ($attribute['author_enable'] || $attribute['category_enable'] || $attribute['template'] == 2 && $attribute['comment_count_enable'] == 1 && comments_open(get_the_id())) {
                $authorHTML = null;
                $categoryHTML = null;
                $commentCountHTML = null;
                if ($attribute['author_enable']) {
                    $authorHTML = '<div class="pb-recent-post-meta-author">' . get_the_author() . '</div>';
                }
                $category = get_the_category(get_the_ID());
                $count = count($category);
                if ($count) {
                    foreach ($category as $index => $value) {
                        $separator = $index == $count - 1 ? '' : ',&nbsp;';
                        $title = $Validation->isEmpty($value->description) ? sprintf(__('View all posts filed under %s', PLUGIN_PAGE_BUILDER_DOMAIN), $value->name) : strip_tags(apply_filters('category_description', $value->description, $value));
                        $categoryHTML .= '<li><a href="' . get_category_link($value->term_id) . '" title="' . esc_attr($title) . '">' . esc_html($value->name) . '</a>' . $separator . '</li>';
                    }
                    $categoryHTML = '<div class="pb-recent-post-meta-category"><ul class="pb-reset-list">' . $categoryHTML . '</ul></div>';
                }
                if ($attribute['template'] == 2) {
                    if ($attribute['comment_count_enable'] == 1 && comments_open(get_the_id())) {
                        $commentCount = wp_count_comments(get_the_id());
                        $commentCountHTML = '<div class="pb-recent-post-meta-comment-count">' . __(sprintf('%d Comments', $commentCount->approved), PLUGIN_PAGE_BUILDER_DOMAIN) . '</div>';
                    }
                }
                $meta['meta'] = '<div class="pb-recent-post-meta pb-clear-fix">' . $authorHTML . $categoryHTML . $commentCountHTML . '</div>';
            }
            $templateHTML = array();
            $templateOrder = array('date', 'image', 'header', 'excerpt', 'meta');
            if ($attribute['template'] == 2) {
                $templateOrder = array('image', 'header', 'date', 'excerpt', 'meta');
            }
            foreach ($templateOrder as $value) {
                if (isset($meta[$value])) {
                    $templateHTML[$value] = $meta[$value];
                }
            }
            $html .= '<li' . PBHelper::createClassAttribute($class) . '><div>' . implode($templateHTML) . '</div></li>';
            $i++;
        }
        wp_reset_query();
        $post = $bPost;
        $id = PBHelper::createId('pb_recent_post');
        $class = array();
        $class[0] = array('pb-recent-post', 'pb-recent-post-template-' . $attribute['template'], $attribute['css_class']);
        $class[1] = array('pb-clear-fix', 'pb-reset-list', $Layout->getLayoutCSSClass($attribute['layout']));
        $html = '
			<div' . PBHelper::createClassAttribute($class[0]) . ' id="' . $id . '">
				<ul' . PBHelper::createClassAttribute($class[1]) . '>
					' . $html . '
				</ul>
			</div>
			<div class="pb-script-tag">
				<script type="text/javascript">
					jQuery(document).ready(function($) 
					{
						$("#' . $id . '").PBRecentPost(' . json_encode($option) . ');
					});
				</script>
			</div>
		';
        return PBHelper::formatHTML($html);
    }
    function processShortcodeNoticeFirstLine($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $style = array();
        $Validation = new PBValidation();
        if ($Validation->isColor($attribute['text_color'])) {
            $style['color'] = PBColor::getColor($attribute['text_color']);
        }
        $class = array('pb-notice-first-line');
        $html = '
			<h' . PBComponentData::get($this->getComponentId(), 'first_line_header_important_default') . PBHelper::createClassAttribute($class) . PBHelper::createStyleAttribute($style) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</h' . PBComponentData::get($this->getComponentId(), 'first_line_header_important_default') . '>
		';
        return PBHelper::formatHTML($html, $content);
    }
 function createCSSFile()
 {
     $content = null;
     $component = PBData::get('component');
     $Validation = new PBValidation();
     foreach ($component as $componentName => $componentData) {
         $className = 'PBComponent' . $this->formatName($componentName);
         $Component = new $className();
         if (method_exists($Component, 'createCSS')) {
             $Component->createCSS();
             $css = PBComponentData::get($componentName, 'css');
             if ($Validation->isNotEmpty($css)) {
                 $content .= $css . "\n\n";
             }
         }
     }
     $file = PBData::get('theme_path_multisite_style') . 'PB.Frontend.css';
     $WPFileSystem = new PBWPFileSystem();
     if ($WPFileSystem->put_contents($file, $content, 0755) === false) {
         return false;
     }
     return true;
 }
    function processShortcodeTabNavigationHeader($attribute, $content, $tag)
    {
        $attribute = $this->processAttribute($tag, $attribute);
        $style = array();
        $Validation = new PBValidation();
        if ($Validation->isNumber(PBComponentData::get('tab', 'header_font_size'), 1, 100, false)) {
            $style['font-size'] = PBComponentData::get('tab', 'header_font_size') . 'px';
        }
        $html = '
			<li><a href="#"' . PBHelper::createStyleAttribute($style) . '>' . PLUGIN_PAGE_BUILDER_SHORTCODE_CONTENT . '</a><span></span></li>
		';
        return PBHelper::formatHTML($html, $content);
    }