コード例 #1
0
ファイル: productslider.php プロジェクト: bluedrone/plugins
 /**
  * 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
ファイル: productslider.php プロジェクト: DylanPeti/socialize
 /**
  * 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();
 }