Пример #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['class'] = $meta['el_class'];
     $slider = new avia_product_slider($atts);
     $slider->query_entries();
     return $slider->html();
 }
Пример #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['class'] = $meta['el_class'];
     //fix for seo plugins which execute the do_shortcode() function before the WooCommerce plugin is loaded
     global $woocommerce;
     if (!is_object($woocommerce) || !is_object($woocommerce->query)) {
         return;
     }
     $slider = new avia_product_slider($atts);
     $slider->query_entries();
     return $slider->html();
 }