Beispiel #1
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('type' => 'slider', 'autoplay' => 'false', 'animation' => 'fade', 'interval' => 5, 'navigation' => 'arrows', 'heading' => '', 'columns' => 3, 'handle' => $shortcodename, 'content' => ShortcodeHelper::shortcode2array($content, 1), 'class' => $meta['el_class']), $atts);
     $slider = new avia_content_slider($atts);
     return $slider->html();
 }
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('type' => 'slider', 'autoplay' => 'false', 'animation' => 'fade', 'interval' => 5, 'navigation' => 'arrows', 'heading' => '', 'columns' => 3, 'handle' => $shortcodename, 'content' => ShortcodeHelper::shortcode2array($content, 1), 'class' => $meta['el_class'], 'custom_markup' => $meta['custom_markup'], 'font_color' => '', 'color' => '', 'styling' => ''), $atts, $this->config['shortcode']);
     if ($atts['font_color'] == "custom") {
         $atts['class'] .= " av_inherit_color";
         $atts['styling'] .= !empty($atts['color']) ? " color:" . $atts['color'] . "; " : "";
         if ($atts['styling']) {
             $atts['styling'] = " style='" . $atts['styling'] . "'";
         }
     }
     $slider = new avia_content_slider($atts);
     return $slider->html();
 }