本文整理汇总了PHP中yit_shop_single_w函数的典型用法代码示例。如果您正苦于以下问题:PHP yit_shop_single_w函数的具体用法?PHP yit_shop_single_w怎么用?PHP yit_shop_single_w使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yit_shop_single_w函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: yit_shop_single_w
debug: false,
auto: false,
align: 'left',
height: 'auto',
//height: "100%", //turn vertical
//width: 105, //turn vertical
prev : {
button : "#slider-prev",
key : "left"
},
next : {
button : "#slider-next",
key : "right"
},
//width : <?php
echo yit_shop_single_w() + 18;
?>
,
scroll : {
items : 1,
pauseOnHover: true
},
items : {
//width: <?php
echo yit_shop_thumbnail_w() + 4;
?>
,
visible: <?php
echo apply_filters('woocommerce_product_thumbnails_columns', $slider_items);
?>
},
开发者ID:roadthemez,项目名称:roadthemes,代码行数:31,代码来源:product-image-magnifier.php
示例2: yit_size_images_style
function yit_size_images_style()
{
$content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870;
$margin = 30 / $content_width * 100;
// 30px
$margin_thumbnails = 8 / $content_width * 100;
// 8px
$images_container_w = yit_shop_single_w() / $content_width * 100;
$thumbnails_container_w = $content_width - (yit_shop_single_w() + 30) - $margin_thumbnails;
?>
<style type="text/css">
ul.products li.product.list .product-wrapper { padding-left:<?php
echo yit_shop_catalog_w() + 30 + 7 + 2;
?>
px; }
ul.products li.product.list .product-wrapper a.thumb { margin-left:-<?php
echo yit_shop_catalog_w() + 30 + 7 + 2;
?>
px; width: <?php
echo yit_shop_catalog_w();
?>
px; }
.single-product.woocommerce div.product.product-layout-1 div.images { width:<?php
echo $images_container_w;
?>
%; }
.single-product.woocommerce div.product.product-layout-1 div.images .thumbnails { width:<?php
echo $thumbnails_container_w / yit_shop_single_w() * 100;
?>
%; }
.single-product.woocommerce div.product.product-layout-1 div.summary { width:<?php
echo 100 - $images_container_w - $margin;
?>
%; }
</style>
<?php
}
开发者ID:VitaliyProdan,项目名称:wp_shop,代码行数:37,代码来源:woocommerce.php
示例3: floor
<?php
/**
* Single Product Image
*
* @author YIThemes
* @package YITH_Magnifier/Templates
* @version 1.0.0
*/
if (!defined('ABSPATH')) {
exit;
}
// Exit if accessed directly
global $post, $product, $woocommerce;
$columns = floor((yit_shop_single_w() + 16) / (yit_shop_thumbnail_w() + 16));
$attachment_ids = $product->get_gallery_attachment_ids();
// add featured image
if (!empty($attachment_ids)) {
array_unshift($attachment_ids, get_post_thumbnail_id());
}
$enable_slider = (bool) (get_option('yith_wcmg_enableslider') == 'yes' && count($attachment_ids) > $columns);
if ($attachment_ids) {
?>
<div class="thumbnails <?php
echo $enable_slider ? 'slider' : 'noslider';
?>
">
<ul class="clearfix yith_magnifier_gallery">
<?php
$loop = 0;
$columns = apply_filters('woocommerce_product_thumbnails_columns', $columns);
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:product-thumbnails-magnifier.php
示例4: yit_size_images_style
function yit_size_images_style()
{
$content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870;
$margin = 30 / $content_width * 100;
// 30px
$margin_thumbnails = 8 / $content_width * 100;
// 8px
$images_container_w = (yit_shop_single_w() + 16) / $content_width * 100;
$thumbnails_container_w = $content_width - (yit_shop_single_w() + 16 + 30) - $margin_thumbnails;
?>
<style type="text/css">
ul.products li.product.list .product-wrapper {
padding-left: <?php
echo yit_shop_catalog_w() + 30 + 7 + 2;
?>
px;
min-height: <?php
echo yit_shop_catalog_h() + 7 + 2;
?>
px;
}
ul.products li.product.list .product-wrapper .thumb-wrapper {
margin-left: -<?php
echo yit_shop_catalog_w() + 30 + 7 + 2;
?>
px;
width: <?php
echo yit_shop_catalog_w() + 10;
?>
px;
height: <?php
echo yit_shop_catalog_h() + 8;
?>
px;
}
ul.products li.product.list .product-wrapper img.onsale {
left: <?php
echo yit_shop_catalog_w() + 3 - 63;
?>
px;
}
.og-expander.woocommerce div.product div.images div.thumbnails {
height: <?php
echo yit_shop_thumbnail_h() + 10;
?>
px;
}
.single-product.woocommerce div.product.product-layout-1 div.images {
width: <?php
echo $images_container_w;
?>
%;
}
.single-product.woocommerce div.product.product-layout-1 div.summary {
width: <?php
echo 100 - $images_container_w - $margin;
?>
%;
padding-bottom: <?php
echo yit_shop_thumbnail_h();
?>
px;
}
</style>
<?php
}
开发者ID:jayeshnair,项目名称:ctp,代码行数:71,代码来源:woocommerce.php
示例5: yit_image_content_single_width
/**
* Set image and content width for single product image
*
* @return array
* @since 1.0.0
* @author Francesco Licando <[email protected]>
*/
function yit_image_content_single_width() {
$size = array();
if ( ( yit_get_option( 'general-layout-type' ) == 'fluid' && ! wp_is_mobile() ) || is_quick_view() ) return $size;
$img_size = yit_shop_single_w();
$sidebar = YIT_Layout()->sidebars;
if ( intval( $img_size ) < $GLOBALS['content_width'] ) {
$size['image'] = ( intval( $img_size ) * 100 ) / $GLOBALS['content_width'];
if ( $sidebar['layout'] != 'sidebar-no' && ! wp_is_mobile() ) $size['image'] -= 20;
}
else {
$size['image'] = 100;
}
$size['content'] = 100 - ( $size['image'] );
$min_size = ( wp_is_mobile() ) ? '40' : '20';
if ( $size['content'] < $min_size ) {
$size['content'] = 100;
}
return $size;
}
开发者ID:jabue,项目名称:wordpress,代码行数:37,代码来源:woocommerce.php
示例6: apply_filters
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.0.3
*/
if (!defined('ABSPATH')) {
exit;
}
// Exit if accessed directly
global $post, $woocommerce, $product;
?>
<div class="thumbnails nomagnifier"><?php
$attachments = $product->get_gallery_attachment_ids();
if ($attachments) {
$loop = 0;
$columns = apply_filters('woocommerce_product_thumbnails_columns', floor(yit_shop_single_w() / yit_shop_thumbnail_w()));
foreach ($attachments as $attachment_id) {
$attachment = get_post($attachment_id);
if (get_post_meta($attachment_id, '_woocommerce_exclude_image', true) == 1) {
continue;
}
$classes = array('zoom');
if ($loop == 0 || $loop % $columns == 0) {
$classes[] = 'first';
}
if (($loop + 1) % $columns == 0) {
$classes[] = 'last';
}
echo apply_filters('woocommerce_single_product_image_thumbnail_html', sprintf('<a href="%s" title="%s" data-rel="prettyPhoto[product-gallery]" class="%s">%s</a>', wp_get_attachment_url($attachment->ID), esc_attr($attachment->post_title), implode(' ', $classes), yit_image("id={$attachment->ID}&size=" . apply_filters('single_product_small_thumbnail_size', 'shop_thumbnail'), false)));
$loop++;
}
开发者ID:VitaliyProdan,项目名称:wp_shop,代码行数:31,代码来源:product-thumbnails.php
示例7: yit_global_object
/**
* Include responsive css file after all stylesheets loaded
*/
function yit_global_object()
{
wp_localize_script('jquery', 'yit', array('isRtl' => is_rtl(), 'ajaxurl' => admin_url('admin-ajax.php'), 'responsive_menu_text' => __('Navigate to...', 'yit'), 'price_filter_slider' => yit_get_option('shop-price-filter-style'), 'added_to_cart_text' => __('Added to cart', 'yit'), 'general_layout_type' => yit_get_option('general-layout-type'), 'single_image_width' => function_exists('yit_shop_single_w') ? yit_shop_single_w() : false, 'load_gif' => YIT_THEME_ASSETS_URL . '/images/search.gif'));
}
开发者ID:jabue,项目名称:wordpress,代码行数:7,代码来源:assets.php
示例8: yit_image_content_single_width
/**
* Set image and content width for single product image
*
* @return array
* @since 1.0.0
* @author Francesco Licando <[email protected]>
*/
function yit_image_content_single_width()
{
$size = array();
if (is_quick_view()) {
return $size;
}
$img_size = yit_shop_single_w();
$sidebar = YIT_Layout()->sidebars;
if (intval($img_size) < $GLOBALS['content_width']) {
$size['image'] = intval($img_size) * 100 / $GLOBALS['content_width'];
if ($sidebar['layout'] != 'sidebar-no' && !wp_is_mobile()) {
$size['image'] -= 20;
}
} else {
$size['image'] = 100;
}
$size['content'] = 100 - $size['image'];
$min_size = wp_is_mobile() ? '40' : '20';
if ($size['content'] < $min_size) {
$size['content'] = 100;
}
return $size;
}
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:30,代码来源:woocommerce.php
注:本文中的yit_shop_single_w函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论