當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WC_Shortcodes::shortcode_wrapper方法代碼示例

本文整理匯總了PHP中WC_Shortcodes::shortcode_wrapper方法的典型用法代碼示例。如果您正苦於以下問題:PHP WC_Shortcodes::shortcode_wrapper方法的具體用法?PHP WC_Shortcodes::shortcode_wrapper怎麽用?PHP WC_Shortcodes::shortcode_wrapper使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WC_Shortcodes的用法示例。


在下文中一共展示了WC_Shortcodes::shortcode_wrapper方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get

 /**
  * Get the shortcode content.
  *
  * @access public
  * @param array $atts
  * @return string
  */
 public static function get($atts)
 {
     return WC_Shortcodes::shortcode_wrapper(array(__CLASS__, 'output'), $atts);
 }
開發者ID:ayoayco,項目名稱:upbeat,代碼行數:11,代碼來源:class-wc-shortcode-checkout.php

示例2: shortcode_wrapper

 /**
  * @deprecated 2.1.0
  * @param       $function
  * @param array $atts
  * @param array $wrapper
  * @return string
  */
 public function shortcode_wrapper($function, $atts = array(), $wrapper = array('class' => 'woocommerce', 'before' => null, 'after' => null))
 {
     _deprecated_function('Woocommerce->shortcode_wrapper', '2.1', 'WC_Shortcodes::shortcode_wrapper');
     return WC_Shortcodes::shortcode_wrapper($function, $atts, $wrapper);
 }
開發者ID:donwea,項目名稱:nhap.org,代碼行數:12,代碼來源:woocommerce.php

示例3: pricing_table_shortcode

 /**
  * Pricing table shortcode: renders a table of product prices
  *
  * @since 3.0
  * @param array $atts associative array of shortcode parameters
  * @return string shortcode content
  */
 public function pricing_table_shortcode($atts)
 {
     require_once 'classes/shortcodes/class-wc-price-calculator-shortcode-pricing-table.php';
     return WC_Shortcodes::shortcode_wrapper(array('WC_Price_Calculator_Shortcode_Pricing_Table', 'output'), $atts, array('class' => 'wc-measurement-price-calculator'));
 }
開發者ID:abcode619,項目名稱:wpstuff,代碼行數:12,代碼來源:woocommerce-measurement-price-calculator.php

示例4: get_woocommerce_review_order_angelleye

 /**
  * Add the gateway to woocommerce
  */
 function get_woocommerce_review_order_angelleye($atts)
 {
     global $woocommerce;
     return WC_Shortcodes::shortcode_wrapper(array($this, 'woocommerce_review_order_angelleye'), $atts);
 }
開發者ID:Nat97,項目名稱:paypal-woocommerce,代碼行數:8,代碼來源:paypal-for-woocommerce.php

示例5: get

 /**
  * Get shortcode content
  *
  * @access public
  * @param array $atts
  * @return string
  * 
  */
 public static function get($atts)
 {
     global $woocommerce;
     return WC_Shortcodes::shortcode_wrapper(array(__CLASS__, 'output'), $atts);
 }
開發者ID:Omuze,項目名稱:barakat,代碼行數:13,代碼來源:woocommerce-simple-auctions-shortcode-my-auctions.php

示例6: get

 /**
  * Get the shortcode content
  *
  * @since 3.0
  * @param array $atts associative array of shortcode parameters
  * @return string shortcode content
  */
 public static function get($atts)
 {
     return WC_Shortcodes::shortcode_wrapper(array(__CLASS__, 'output'), $atts, array('class' => 'wc-measurement-price-calculator'));
 }
開發者ID:baden03,項目名稱:access48,代碼行數:11,代碼來源:class-wc-price-calculator-shortcode-pricing-table.php

示例7: shortcode_wrapper

 /**
  * WooCommerce Shortcode wrapper
  *
  * @since 2.0
  * @param mixed $function shortcode callback
  * @param array $atts (default: array())
  * @param array $wrapper array of wrapper options (class, before, after)
  * @return string
  */
 public static function shortcode_wrapper($function, $atts = array(), $wrapper = array('class' => 'woocommerce', 'before' => null, 'after' => null))
 {
     if (self::is_wc_version_gte_2_1()) {
         return WC_Shortcodes::shortcode_wrapper($function, $atts, $wrapper);
     } else {
         global $woocommerce;
         return $woocommerce->shortcode_wrapper($function, $atts, $wrapper);
     }
 }
開發者ID:nomadicmarc,項目名稱:goodbay,代碼行數:18,代碼來源:class-sv-wc-plugin-compatibility.php

示例8: intercept_woocommerce_my_account_shortcode

 /**
  * Intercept and replace woocommerce_my_account shortcode
  * 
  * @access public
  * @param array $atts
  * @return void
  */
 public function intercept_woocommerce_my_account_shortcode($atts)
 {
     return WC_Shortcodes::shortcode_wrapper(array('Subscriptio_My_Account', 'output'), $atts);
 }
開發者ID:qhuit,項目名稱:dcosta,代碼行數:11,代碼來源:subscriptio.php

示例9: get_swr_view_rewards

function get_swr_view_rewards($atts)
{
    global $woocommerce;
    if (version_compare($woocommerce->version, '2.1.0') >= 0) {
        return WC_Shortcodes::shortcode_wrapper('get_swr_wrapper_view_rewards', $atts);
    } else {
        return $woocommerce->shortcode_wrapper('get_swr_wrapper_view_rewards', $atts);
    }
}
開發者ID:englsergio,項目名稱:allsensations,代碼行數:9,代碼來源:swr-base.php

示例10: shortcode_my_auctions

 /**
  *  Shortcode for my auctions
  *
  * @access public
  * @param  array
  * @return 
  * 
  */
 function shortcode_my_auctions($atts)
 {
     global $woocommerce;
     return WC_Shortcodes::shortcode_wrapper(array('WC_Shortcode_Simple_Auction_My_Auctions', 'output'), $atts);
 }
開發者ID:Omuze,項目名稱:barakat,代碼行數:13,代碼來源:woocommerce-simple-auctions.php


注:本文中的WC_Shortcodes::shortcode_wrapper方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。