本文整理汇总了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);
}
示例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);
}
示例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'));
}
示例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);
}
示例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);
}
示例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'));
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}