Пример #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 = "")
 {
     // SARAH ADD MYCLASS AND MYID
     //$atts =  shortcode_atts(array('initial' => '1', 'position' => 'top_tab', 'boxed'=>'border_tabs'), $atts, $this->config['shortcode']);
     $atts = shortcode_atts(array('initial' => '1', 'position' => 'top_tab', 'boxed' => 'border_tabs', 'myclass' => '', 'myid' => ''), $atts, $this->config['shortcode']);
     extract($atts);
     $boxed = $position != "top_tab" ? $boxed : "";
     // SARAH OUT PUT ID AND CLASS
     $output = '<div class="tabcontainer ' . $myclass . ' ' . $position . ' ' . $boxed . ' ' . $meta['el_class'] . '" id="' . $myid . '">' . "\n";
     //$output  = '<div class="tabcontainer  '.$position.' '.$boxed.' '.$meta['el_class'].'">'."\n";
     $counter = 1;
     avia_sc_tab::$counter = 1;
     avia_sc_tab::$initial = $initial;
     $output .= ShortcodeHelper::avia_remove_autop($content, true);
     $output .= '</div>' . "\n";
     return $output;
 }
Пример #2
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('initial' => '1', 'position' => 'top_tab', 'boxed' => 'border_tabs'), $atts);
     extract($atts);
     $boxed = $position != "top_tab" ? $boxed : "";
     $output = '<div class="tabcontainer  ' . $position . ' ' . $boxed . ' ' . $meta['el_class'] . '">' . "\n";
     $counter = 1;
     avia_sc_tab::$counter = 1;
     avia_sc_tab::$initial = $initial;
     $output .= ShortcodeHelper::avia_remove_autop($content, true);
     $output .= '</div>' . "\n";
     return $output;
 }