public function getHeading($atts) { if (isset($atts['use_custom_heading']) && 'true' === $atts['use_custom_heading']) { $custom_heading = visual_composer()->getShortCode('vc_custom_heading'); $data = vc_map_integrate_parse_atts($this->shortcode, 'vc_custom_heading', $atts, 'custom_'); $data['text'] = $atts['title']; return $custom_heading->render(array_filter($data)); } else { return '<h4>' . esc_html($atts['title']) . '</h4>'; } }
public function getVcIcon($atts) { if (empty($atts['i_type'])) { $atts['i_type'] = 'fontawesome'; } $data = vc_map_integrate_parse_atts($this->shortcode, 'vc_icon', $atts, 'i_'); if ($data) { $icon = visual_composer()->getShortCode('vc_icon'); if (is_object($icon)) { return $icon->render(array_filter($data)); } } return ''; }
public function buildGridSettings() { $this->grid_settings = array('page_id' => $this->atts['page_id'], 'style' => $this->atts['style'], 'action' => 'vc_get_vc_grid_data', 'animation_in' => 'zoomIn'); // used in ajax request for items if (isset($this->atts['shortcode_id']) && !empty($this->atts['shortcode_id'])) { $this->grid_settings['shortcode_id'] = $this->atts['shortcode_id']; } elseif (isset($this->atts['shortcode_hash']) && !empty($this->atts['shortcode_hash'])) { // @deprecated since 4.4.3 $this->grid_settings['shortcode_hash'] = $this->atts['shortcode_hash']; } if ('load-more' === $this->atts['style']) { $this->grid_settings = array_merge($this->grid_settings, array('items_per_page' => $this->atts['items_per_page'], 'btn_data' => vc_map_integrate_parse_atts($this->shortcode, 'vc_btn', $this->atts, 'btn' . '_'))); } elseif ('lazy' === $this->atts['style']) { $this->grid_settings = array_merge($this->grid_settings, array('items_per_page' => $this->atts['items_per_page'])); } elseif ('pagination' === $this->atts['style']) { $this->grid_settings = array_merge($this->grid_settings, array('items_per_page' => $this->atts['items_per_page'], 'auto_play' => $this->atts['autoplay'] > 0 ? true : false, 'gap' => (int) $this->atts['gap'], 'speed' => (int) $this->atts['autoplay'] * 1000, 'loop' => $this->atts['loop'], 'animation_in' => $this->atts['paging_animation_in'], 'animation_out' => $this->atts['paging_animation_out'], 'arrows_design' => $this->atts['arrows_design'], 'arrows_color' => $this->atts['arrows_color'], 'arrows_position' => $this->atts['arrows_position'], 'paging_design' => $this->atts['paging_design'], 'paging_color' => $this->atts['paging_color'])); } $this->grid_settings['tag'] = $this->shortcode; }