本文整理汇总了PHP中yith_wcwl_get_template函数的典型用法代码示例。如果您正苦于以下问题:PHP yith_wcwl_get_template函数的具体用法?PHP yith_wcwl_get_template怎么用?PHP yith_wcwl_get_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yith_wcwl_get_template函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wishlist
/**
* Print the wishlist HTML.
*
* @since 1.0.0
*/
static function wishlist($atts, $content = null)
{
$atts = shortcode_atts(array('per_page' => 10, 'pagination' => 'no'), $atts);
ob_start();
yith_wcwl_get_template('wishlist.php', $atts);
return apply_filters('yith_wcwl_wishlisth_html', ob_get_clean());
}
开发者ID:zgomotos,项目名称:Bazar,代码行数:12,代码来源:class.yith-wcwl-shortcode.php
示例2: wc_print_notices
<?php
/**
* Wishlist pages template; load template parts basing on the url
*
* @author Your Inspiration Themes
* @package YITH WooCommerce Wishlist
* @version 2.0.0
*/
?>
<section class="page-padding">
<div class="small-12 small-centered medium-10 columns">
<?php
wc_print_notices();
?>
<div class="text-center"><a href="<?php
echo get_permalink(get_option('woocommerce_myaccount_page_id'));
?>
" class="back_to_account"><?php
_e("<small>Back to</small> My Account", THB_THEME_NAME);
?>
</a></div>
<?php
yith_wcwl_get_template('wishlist-' . $template_part . '.php', $atts);
?>
</div>
</section>
开发者ID:developmentDM2,项目名称:CZND,代码行数:27,代码来源:wishlist.php
示例3: _e
?>
<tr>
<td colspan="6" class="wishlist-empty"><?php
_e('Your wishlist is currently empty.', 'swiftframework');
?>
</td>
</tr>
<?php
}
if (isset($page_links)) {
?>
<tr>
<td colspan="6"><?php
echo $page_links;
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
do_action('yith_wcwl_after_wishlist');
yith_wcwl_get_template('share.php');
do_action('yith_wcwl_after_wishlist_share');
?>
</form>
</div>
</div>
开发者ID:roycocup,项目名称:enclothed,代码行数:31,代码来源:wishlist.php
示例4: add_to_wishlist
/**
* Return "Add to Wishlist" button.
*
* @since 1.0.0
*/
public static function add_to_wishlist($atts, $content = null)
{
global $product;
if (!isset($product)) {
$product = isset($atts['product_id']) ? wc_get_product($atts['product_id']) : false;
}
$template_part = 'button';
$label_option = get_option('yith_wcwl_add_to_wishlist_text');
$icon_option = get_option('yith_wcwl_add_to_wishlist_icon') != 'none' ? get_option('yith_wcwl_add_to_wishlist_icon') : '';
$label = apply_filters('yith_wcwl_button_label', $label_option);
$icon = apply_filters('yith_wcwl_button_icon', $icon_option);
$browse_wishlist = get_option('yith_wcwl_browse_wishlist_text');
$already_in_wishlist = get_option('yith_wcwl_already_in_wishlist_text');
$product_added = get_option('yith_wcwl_product_added_text');
$classes = apply_filters('yith_wcwl_add_to_wishlist_button_classes', get_option('yith_wcwl_use_button') == 'yes' ? 'add_to_wishlist single_add_to_wishlist button alt' : 'add_to_wishlist');
$default_wishlists = is_user_logged_in() ? YITH_WCWL()->get_wishlists(array('is_default' => true)) : false;
if (!empty($default_wishlists)) {
$default_wishlist = $default_wishlists[0]['ID'];
} else {
$default_wishlist = false;
}
$exists = YITH_WCWL()->is_product_in_wishlist($product->id, $default_wishlist);
$wishlist_url = YITH_WCWL()->get_wishlist_url();
$product_type = $product->product_type;
$additional_params = array('wishlist_url' => $wishlist_url, 'exists' => $exists, 'product_id' => $product->id, 'product_type' => $product_type, 'label' => $label, 'browse_wishlist_text' => $browse_wishlist, 'already_in_wishslist_text' => $already_in_wishlist, 'product_added_text' => $product_added, 'icon' => $icon, 'link_classes' => $classes, 'available_multi_wishlist' => false, 'disable_wishlist' => false);
$additional_params = apply_filters('yith_wcwl_add_to_wishlist_params', $additional_params);
$additional_params['template_part'] = isset($additional_params['template_part']) ? $additional_params['template_part'] : $template_part;
$atts = shortcode_atts($additional_params, $atts);
$atts['icon'] = !empty($atts['icon']) ? '<i class="fa ' . $atts['icon'] . '"></i>' : '';
// adds attributes list to params to extract in template, so it can be passed through a new get_template()
$atts['atts'] = $atts;
$template = yith_wcwl_get_template('add-to-wishlist.php', $atts, true);
return apply_filters('yith_wcwl_add_to_wishlisth_button_html', $template, $wishlist_url, $product_type, $exists);
}
开发者ID:seoduda,项目名称:Patua,代码行数:39,代码来源:class.yith-wcwl-shortcode.php
示例5: apply_filters
<?php
echo apply_filters('yith_wcwl_ask_an_estimate_icon', '<i class="fa fa-shopping-cart"></i>');
?>
<?php
echo apply_filters('yith_wcwl_ask_an_estimate_text', esc_html__('Ask for an estimate', 'cruxstore'));
?>
</a>
</div>
<?php
}
?>
<?php
do_action('yith_wcwl_before_wishlist_share');
if (is_user_logged_in() && $is_user_owner && $wishlist_meta['wishlist_privacy'] != 2 && $share_enabled) {
yith_wcwl_get_template('share.php', $share_atts);
}
do_action('yith_wcwl_after_wishlist_share');
?>
</td>
</tr>
</tfoot>
</table>
<?php
wp_nonce_field('yith_wcwl_edit_wishlist_action', 'yith_wcwl_edit_wishlist');
?>
<?php
if ($wishlist_meta['is_default'] != 1) {
开发者ID:websideas,项目名称:Mondova,代码行数:31,代码来源:wishlist-view.php
示例6: wc_print_notices
// Start wishlist page printing
if (function_exists('wc_print_notices')) {
wc_print_notices();
} else {
$woocommerce->show_messages();
}
?>
<div class="woocommerce">
<div class="row">
<div class="small-12 medium-3 columns">
<ul id="my-account-nav">
<li><a href="<?php
echo get_permalink(get_option('woocommerce_myaccount_page_id'));
?>
">
<?php
_e('Back to My Account', THB_THEME_NAME);
?>
</a></li>
</ul>
</div>
<div class="small-12 medium-9 columns">
<div class="tab-pane active">
<?php
yith_wcwl_get_template('wishlist-view.php', $atts);
?>
</div>
</div>
</div>
开发者ID:primarydesign,项目名称:the-color-mint,代码行数:31,代码来源:wishlist.php
注:本文中的yith_wcwl_get_template函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论