public function render($atts)
 {
     extract($atts);
     $contents = '';
     foreach ($elements as $e) {
         $e_params = array('title' => $e['title'], 'title_color' => $e['title_color'], 'text_color' => $e['text_color'], 'graphic' => $graphic, 'graphic_size' => $graphic_size, 'graphic_shape' => $e['graphic_shape'], 'graphic_color' => $e['graphic_color'], 'graphic_bg_color' => $e['graphic_bg_color'], 'align_h' => $align_h, 'align_v' => $align_v, 'side_graphic_spacing' => $side_graphic_spacing, 'max_width' => $max_width, 'child' => 'true', 'connector_width' => $connector_width, 'connector_style' => $connector_style, 'connector_color' => $connector_color);
         if ($e['link_text'] != '') {
             $e_params['link_text'] = $e['link_text'];
             $e_params['href'] = $e['href'];
             $e_params['href_title'] = $e['href_title'];
             $e_params['href_target'] = $e['href_target'] == 'true' ? 'blank' : '';
             $e_params['link_color'] = $e['link_color'];
         }
         if ($e['graphic_border_style'] != 'none') {
             $e_params['graphic_border'] = $this->borderStyle($e['graphic_border_width'], $e['graphic_border_style'], $e['graphic_border_color']);
         }
         if ($graphic == 'icon') {
             $e_params['graphic_icon'] = $e['graphic_icon'];
         } else {
             if ($graphic == 'image') {
                 $e_params['graphic_image'] = $e['graphic_image'];
             }
         }
         if ($graphic_animation != 'none') {
             $e_params['graphic_animation'] = $graphic_animation;
         }
         if ($connector_animation != 'none') {
             $e_params['connector_animation'] = $connector_animation;
         }
         $contents .= cs_build_shortcode('x_feature_box', $e_params, $this->extra($e), $e['content']);
     }
     $params = array();
     if ($graphic_animation != 'none' || $connector_animation != 'none') {
         $params['animation_offset'] = $animation_offset;
         $params['animation_delay_initial'] = $animation_delay_initial;
         $params['animation_delay_between'] = $animation_delay_between;
     }
     $shortcode = cs_build_shortcode('x_feature_list', $params, $extra, $contents);
     return $shortcode;
 }
Exemplo n.º 2
0
 public function render($atts)
 {
     extract($atts);
     $params = array('title' => $title, 'title_color' => $title_color, 'text_color' => $text_color, 'graphic' => $graphic, 'graphic_size' => $graphic_size, 'graphic_shape' => $graphic_shape, 'graphic_color' => $graphic_color, 'graphic_bg_color' => $graphic_bg_color, 'align_h' => $align_h, 'align_v' => $align_v, 'side_graphic_spacing' => $side_graphic_spacing, 'max_width' => $max_width);
     if ($link_text != '') {
         $params['link_text'] = $link_text;
         $params['href'] = $href;
         $params['href_title'] = $href_title;
         $params['href_target'] = $href_target == 'true' ? 'blank' : '';
         $params['link_color'] = $link_color;
     }
     if ($graphic_border_style != 'none') {
         $params['graphic_border'] = $this->borderStyle($graphic_border_width, $graphic_border_style, $graphic_border_color);
     }
     if ($graphic == 'icon') {
         $params['graphic_icon'] = $graphic_icon;
     } else {
         if ($graphic == 'image') {
             $params['graphic_image'] = $graphic_image;
         }
     }
     if ($graphic_animation != 'none') {
         $params['graphic_animation'] = $graphic_animation;
         $params['graphic_animation_offset'] = $graphic_animation_offset;
         $params['graphic_animation_delay'] = $graphic_animation_delay;
     }
     $shortcode = cs_build_shortcode('x_feature_box', $params, $extra, $content);
     return $shortcode;
 }