• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP etheme_get_image函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中etheme_get_image函数的典型用法代码示例。如果您正苦于以下问题:PHP etheme_get_image函数的具体用法?PHP etheme_get_image怎么用?PHP etheme_get_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了etheme_get_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_post_thumbnail_id

			<?php 
}
?>
			
			<?php 
if (has_post_thumbnail()) {
    ?>
				<?php 
    $img_id = get_post_thumbnail_id($post->ID);
    $alt_text = get_post_meta($img_id, '_wp_attachment_image_alt', true);
    ?>
				<a href="<?php 
    the_permalink();
    ?>
" id="<?php 
    echo etheme_get_image(false, 800, 1000, false);
    ?>
" class="product-content-image <?php 
    if ($hover == 'tooltip') {
        ?>
imageTooltip<?php 
    }
    ?>
 <?php 
    if ($hoverUrl != '') {
        ?>
with-hover<?php 
    }
    ?>
" data-images-list="<?php 
    echo get_images_list($width, $height, $crop);
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:31,代码来源:content-product.php


示例2: foreach

            if (count($attachments) > 4 && $product_layout == 'universal') {
                ?>
jcarousel-horizontal<?php 
            }
            ?>
">
          <?php 
            foreach ($attachments as $id => $attachment) {
                if ($id == $main_img_id) {
                    continue;
                }
                $thumb_width = 68;
                $thumb_height = 68;
                $thumb_img = etheme_get_image($id, $thumb_width, $thumb_height, false);
                $big_img = etheme_get_image($id, $big_width, $big_height, false);
                $full_img = etheme_get_image($id, false, false, false);
                $img_title = get_post_meta($id, '_wp_attachment_image_alt', true);
                if (!$img_title) {
                    $img_title = get_post_field('post_title', $id);
                }
                ?>
              <li class="slide">
                <a href="<?php 
                echo $full_img;
                ?>
"
                   <?php 
                if (etheme_get_option('cloud_zoom')) {
                    ?>
class="cloud-zoom-gallery"<?php 
                } else {
开发者ID:Nguyenkain,项目名称:hanghieusales,代码行数:31,代码来源:wpsc-single_product.php


示例3: wp_get_attachment_url

        if (get_post_meta($id, '_woocommerce_exclude_image', true) == 1) {
            continue;
        }
        ?>
                    <li class="slide">
                        <a href="<?php 
        echo wp_get_attachment_url($id);
        ?>
" class="image" <?php 
        if ($zoom == 'disable') {
            ?>
 rel="lightbox[gal]"<?php 
        }
        ?>
 data-easyzoom-source="<?php 
        echo etheme_get_image($id, $mainWidth, $mainHeight, $crop);
        ?>
">
                            <?php 
        echo wp_get_attachment_image($id, apply_filters('single_product_small_thumbnail_size', 'shop_thumbnail'));
        ?>
                        </a>   
                    </li>               
                        
                    <?php 
    }
    ?>
        </ul>
    </div>
    <?php 
    if (count($attachment_ids) > 2 && $product_layout != 'variant3') {
开发者ID:phanhoanglong2610,项目名称:flowershop,代码行数:31,代码来源:product-thumbnails.php


示例4: get_images_list

 function get_images_list($width, $height, $crop)
 {
     global $post, $product, $woocommerce;
     $images_string = '';
     $attachment_ids = $product->get_gallery_attachment_ids();
     $_i = 0;
     $images_string .= etheme_get_image(false, $width, $height, $crop);
     if (count($attachment_ids) > 0) {
         $images_string .= ',';
         foreach ($attachment_ids as $value) {
             $_i++;
             $images_string .= etheme_get_image($value, $width, $height, $crop);
             if ($_i != count($attachment_ids)) {
                 $images_string .= ',';
             }
         }
     }
     return $images_string;
 }
开发者ID:MrMuzik,项目名称:ar4tupgrade,代码行数:19,代码来源:woo.php


示例5: etheme_featured_post_shortcode

function etheme_featured_post_shortcode($atts)
{
    $a = shortcode_atts(array('title' => '', 'id' => '', 'class' => '', 'more_posts' => 1), $atts);
    $limit = 1;
    $width = 300;
    $height = 300;
    $lightbox = etheme_get_option('blog_lightbox');
    $blog_slider = etheme_get_option('blog_slider');
    $posts_url = get_permalink(get_option('page_for_posts'));
    $args = array('p' => $a['id'], 'post_type' => 'post', 'ignore_sticky_posts' => 1, 'no_found_rows' => 1, 'posts_per_page' => $limit);
    $the_query = new WP_Query($args);
    ob_start();
    ?>

    <?php 
    if ($the_query->have_posts()) {
        ?>

        <?php 
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $postId = get_the_ID();
            ?>

            <div class="featured-posts <?php 
            echo $a['class'];
            ?>
">
                <?php 
            if ($a['title'] != '') {
                ?>
                    <h3 class="title a-left"><span><?php 
                echo $a['title'];
                ?>
</span></h3>
                    <?php 
                if ($a['more_posts']) {
                    ?>
                            <?php 
                    echo '<a href="' . $posts_url . '" class="show-all-posts hidden-tablet hidden-phone">' . __('View more posts', ETHEME_DOMAIN) . '</a>';
                    ?>
                    <?php 
                }
                ?>
                <?php 
            }
            ?>
                <div class="featured-post row">
                    <div class="col-md-6">
                        <?php 
            $width = etheme_get_option('blog_page_image_width');
            $height = etheme_get_option('blog_page_image_height');
            $crop = etheme_get_option('blog_page_image_cropping');
            ?>

                        <?php 
            $images = etheme_get_images($width, $height, $crop);
            ?>

                        <?php 
            if (count($images) > 0 && has_post_thumbnail()) {
                ?>
                            <div class="post-images nav-type-small<?php 
                if (count($images) > 1) {
                    ?>
 images-slider<?php 
                }
                ?>
">
                                <ul class="slides">
                                     <li><a href="<?php 
                the_permalink();
                ?>
"><img src="<?php 
                echo $images[0];
                ?>
"></a></li>
                                </ul>
                                <div class="blog-mask">
                                    <div class="mask-content">
                                        <?php 
                if ($lightbox) {
                    ?>
<a href="<?php 
                    echo etheme_get_image(get_post_thumbnail_id($postId));
                    ?>
" rel="lightbox"><i class="fa fa-resize-full"></i></a><?php 
                }
                ?>
                                        <a href="<?php 
                the_permalink();
                ?>
"><i class="fa fa-link"></i></a>
                                    </div>
                                </div>
                            </div>
                        <?php 
            }
            ?>
                    </div>
//.........这里部分代码省略.........
开发者ID:baridavid,项目名称:themes,代码行数:101,代码来源:shortcodes.php


示例6: the_permalink

    the_permalink();
    ?>
"><img src="<?php 
    echo $imgSrc;
    ?>
" alt="<?php 
    the_title();
    ?>
"></a>
					<div class="zoom">
						<div class="btn_group">
							<?php 
    if ($lightbox) {
        ?>
<a href="<?php 
        echo etheme_get_image(get_post_thumbnail_id($postId));
        ?>
" class="btn btn-black xmedium-btn" rel="lightbox"><span><?php 
        _e('View large', ETHEME_DOMAIN);
        ?>
</span></a><?php 
    }
    ?>
							<a href="<?php 
    the_permalink();
    ?>
" class="btn btn-black xmedium-btn"><span><?php 
    _e('More details', ETHEME_DOMAIN);
    ?>
</span></a>
						</div>
开发者ID:EmmaTope,项目名称:gadafunds,代码行数:31,代码来源:content-portfolio.php


示例7: foreach

$catsClass = '';
foreach ($categories as $category) {
    $catsClass .= ' sort-' . $category->slug;
}
$columns = etheme_get_option('portfolio_columns');
?>
<div class="portfolio-item <?php 
echo $catsClass;
?>
">        
	<div class="portfolio-image">
		<?php 
if (has_post_thumbnail($postId)) {
    ?>
			<?php 
    $image = etheme_get_image(false, 220, 220);
    ?>
			<a href="<?php 
    the_permalink();
    ?>
"><img src="<?php 
    echo $image;
    ?>
" /></a>	
		<?php 
}
?>
        <div class="portfolio-mask"></div>
        <div class="portfolio-descr">
	        
	        <h3><?php 
开发者ID:Nguyenkain,项目名称:hanghieusales,代码行数:31,代码来源:portfolio-slide.php


示例8: foreach

$catsClass = '';
foreach ($categories as $category) {
    $catsClass .= ' sort-' . $category->slug;
}
$columns = etheme_get_option('portfolio_columns');
if ($_GET['col']) {
    $columns = $_GET['col'];
}
?>
<div class="portfolio-item article <?php 
echo $catsClass;
?>
">        
	<div class="portfolio-image">
		<img src="<?php 
echo etheme_get_image(false, 600, 600);
?>
" title="<?php 
the_title();
?>
"/>
        <div class="portfolio-mask"></div>
        <div class="portfolio-descr">
	        <?php 
if ($columns != 1) {
    ?>
			    <h3><?php 
    the_title();
    ?>
</h3>
		    <?php 
开发者ID:Nguyenkain,项目名称:hanghieusales,代码行数:31,代码来源:content-portfolio.php


示例9: etheme_get_image

                }
                ?>
										<a href="<?php 
                echo etheme_get_image($value);
                ?>
" <?php 
                if ($zoom == 'disable') {
                    ?>
rel="<?php 
                    echo $lightbox_rel;
                    ?>
"<?php 
                }
                ?>
 class="main-image zoom"><img src="<?php 
                echo etheme_get_image($value, $mainImageWidth, $mainImageHeight, $mainImageCrop);
                ?>
" title="<?php 
                $image_title;
                ?>
"></a></li>
								<?php 
            }
            ?>
						
							<?php 
        }
        ?>
						<?php 
    }
    ?>
开发者ID:MrMuzik,项目名称:ar4tupgrade,代码行数:31,代码来源:product-image.php


示例10: do_action

  <?php 
do_action('woocommerce_before_shop_loop_item');
?>

  <?php 
woocommerce_get_template('loop/sale-flash.php');
?>

  <?php 
$placeholder_width = wc_get_image_size('shop_catalog_image_width');
$placeholder_height = wc_get_image_size('shop_catalog_image_height');
$url = wp_get_attachment_image_src(get_post_thumbnail_id($product->ID), array(260, 260));
if (has_post_thumbnail()) {
    ?>
      <a id="<?php 
    echo etheme_get_image($product->ID, 400, 400, false);
    ?>
" href="<?php 
    echo the_permalink();
    ?>
"
         class="product-image <?php 
    if ($product_img_hover == 'tooltip') {
        ?>
imageTooltip<?php 
    }
    ?>
">
        <?php 
    if (etheme_get_custom_field('_etheme_hover') && $product_img_hover == 'swap') {
        ?>
开发者ID:Nguyenkain,项目名称:hanghieusales,代码行数:31,代码来源:content-product.php


示例11: woothemes_testimonials

 /**
  * Display or return HTML-formatted testimonials.
  * @param  string/array $args  Arguments.
  * @since  1.0.0
  * @return string
  */
 function woothemes_testimonials($args = '')
 {
     global $post;
     $defaults = array('limit' => 5, 'orderby' => 'menu_order', 'interval' => 10000, 'order' => 'DESC', 'id' => 0, 'display_author' => true, 'display_avatar' => true, 'display_url' => true, 'pagination' => false, 'echo' => true, 'size' => 30, 'title' => '', 'before' => '', 'after' => '', 'before_title' => '', 'after_title' => '', 'type' => 'slider', 'columns' => 3, 'navigation' => false, 'category' => 0);
     $img_size = 40;
     $args = wp_parse_args($args, $defaults);
     // Allow child themes/plugins to filter here.
     $args = apply_filters('woothemes_testimonials_args', $args);
     $html = '';
     do_action('woothemes_testimonials_before', $args);
     // The Query.
     $query = woothemes_get_testimonials($args);
     $class = 'cbp-qtrotator';
     if ($args['type'] == 'slider') {
         $class = 'owl-carousel testimonials-slider';
     } elseif ($args['type'] == 'grid') {
         $img_size = 60;
         $class = 'testimonial-grid';
     }
     // The Display.
     if (!is_wp_error($query) && is_array($query) && count($query) > 0) {
         $html .= $args['before'] . "\n";
         if ('' != $args['title']) {
             $html .= $args['before_title'] . esc_html($args['title']) . $args['after_title'] . "\n";
         }
         $html .= '<div id="owl-testimonials" class="' . $class . ' testimonials" data-navigation="' . $args['navigation'] . '" data-interval="' . $args['interval'] . '" >' . "\n";
         // Begin templating logic.
         if ($args['type'] == 'slider') {
             $tpl = '<div id="quote-%%ID%%" class="item %%CLASS%%"><blockquote class="testimonials-text">%%TEXT%%</blockquote><div class="testimonial-info"> %%AVATAR%% <div class="testimonial-author">%%AUTHOR%%</div></div> <div class="clear"></div></div>';
         } elseif ($args['type'] == 'grid') {
             $tpl = '<div id="quote-%%ID%%" class="item col-lg-4 %%CLASS%%"><blockquote class="testimonials-text">%%TEXT%%</blockquote><div class="testimonial-info">%%AVATAR%% <div class="testimonial-author">%%AUTHOR%%</div></div> <div class="clear"></div></div>';
         }
         $tpl = apply_filters('woothemes_testimonials_item_template', $tpl, $args);
         $count = 0;
         if ($args['type'] == 'grid') {
             $html .= '<div class="row">';
         }
         foreach ($query as $post) {
             $count++;
             $template = $tpl;
             $css_class = 'quote';
             if (1 == $count) {
                 $css_class .= ' first';
             }
             if (count($query) == $count) {
                 $css_class .= ' last';
             }
             setup_postdata($post);
             $author = '';
             $author_text = '';
             // If we need to display the author, get the data.
             if (get_the_title($post) != '' && true == $args['display_author']) {
                 $author .= '<cite class="author">';
                 $author_name = get_the_title($post);
                 $author .= '<strong>' . $author_name . '</strong>';
                 if (isset($post->byline) && '' != $post->byline) {
                     $author .= ' <span class="excerpt">' . $post->byline . '</span><!--/.excerpt-->' . "\n";
                 }
                 if (true == $args['display_url'] && '' != $post->url) {
                     $author .= ' <span class="url"><a href="' . esc_url($post->url) . '">' . $post->url . '</a></span><!--/.excerpt-->' . "\n";
                 }
                 $author .= '</cite><!--/.author-->' . "\n";
                 // Templating engine replacement.
                 $template = str_replace('%%AUTHOR%%', $author, $template);
             } else {
                 $template = str_replace('%%AUTHOR%%', '', $template);
             }
             // Templating logic replacement.
             $template = str_replace('%%ID%%', get_the_ID(), $template);
             $template = str_replace('%%CLASS%%', esc_attr($css_class), $template);
             if (isset($post->image) && '' != $post->image && true == $args['display_avatar']) {
                 $image = '<img src="' . etheme_get_image(false, $img_size, $img_size, true) . '">';
                 $template = str_replace('%%AVATAR%%', '<a class="avatar-link">' . $image . '</a>', $template);
             } else {
                 $template = str_replace('%%AVATAR%%', '', $template);
             }
             // Remove any remaining %%AVATAR%% template tags.
             $template = str_replace('%%AVATAR%%', '', $template);
             $content = apply_filters('woothemes_testimonials_content', get_the_content(), $post);
             $template = str_replace('%%TEXT%%', $content, $template);
             // Assign for output.
             $html .= $template;
             if ($count % $args['columns'] == 0 && count($query) != $count && $args['type'] == 'grid') {
                 $html .= '<div class="clear"></div></div><div class="row">';
             }
         }
         if ($args['type'] == 'grid') {
             $html .= '<div class="clear"></div></div><!--row-->';
         }
         wp_reset_postdata();
         if ($args['pagination'] == true && count($query) > 1 && $args['effect'] != 'none') {
             $html .= '<div class="pagination">' . "\n";
             $html .= '<a href="#" class="btn-prev">' . apply_filters('woothemes_testimonials_prev_btn', '&larr; ' . __('Previous', ETHEME_DOMAIN)) . '</a>' . "\n";
             $html .= '<a href="#" class="btn-next">' . apply_filters('woothemes_testimonials_next_btn', __('Next', ETHEME_DOMAIN) . ' &rarr;') . '</a>' . "\n";
//.........这里部分代码省略.........
开发者ID:EmmaTope,项目名称:gadafunds,代码行数:101,代码来源:woothemes-testimonials-template.php


示例12: etheme_woocommerce_subcategory_thumbnail

function etheme_woocommerce_subcategory_thumbnail($category)
{
    global $woocommerce;
    $small_thumbnail_size = apply_filters('single_product_small_thumbnail_size', 'shop_catalog');
    $dimensions = wc_get_image_size($small_thumbnail_size);
    $thumbnail_id = get_woocommerce_term_meta($category->term_id, 'thumbnail_id', true);
    if ($thumbnail_id) {
        $image = etheme_get_image($thumbnail_id, 215, 215, false);
    } else {
        $image = wc_placeholder_img_src();
    }
    if ($image) {
        echo '<img src="' . $image . '" alt="' . $category->name . '" width="' . $dimensions['width'] . '" height="' . $dimensions['height'] . '" />';
    }
}
开发者ID:scoutrul,项目名称:sys,代码行数:15,代码来源:woo.php


示例13: widget

    function widget($args, $instance)
    {
        $cache = wp_cache_get('etheme_widget_recent_entries', 'widget');
        if (!is_array($cache)) {
            $cache = array();
        }
        if (isset($cache[$args['widget_id']])) {
            echo $cache[$args['widget_id']];
            return;
        }
        ob_start();
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? false : $instance['title']);
        if (!($number = (int) $instance['number'])) {
            $number = 10;
        } else {
            if ($number < 1) {
                $number = 1;
            } else {
                if ($number > 15) {
                    $number = 15;
                }
            }
        }
        $r = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => 1));
        if ($r->have_posts()) {
            ?>
        <?php 
            echo $before_widget;
            ?>
        <?php 
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            ?>
            <div>
                <?php 
            while ($r->have_posts()) {
                $r->the_post();
                ?>
                    <div class="recent-post-mini">
                        <?php 
                $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), array(130, 130));
                $url = $thumb[0];
                if ($url && $url != '') {
                    ?>
                            <a class="postimg" href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    echo esc_attr(get_the_title() ? get_the_title() : get_the_ID());
                    ?>
"><img src="<?php 
                    echo etheme_get_image(false, 70, 70);
                    ?>
" /></a>
                            
                        <?php 
                }
                ?>
                        <?php 
                if (get_the_title()) {
                    $title = get_the_title();
                } else {
                    $title = get_the_ID();
                }
                $title = trunc($title, 10);
                ?>
                        <a href="<?php 
                the_permalink();
                ?>
" <?php 
                if (!$url || $url == '') {
                    echo 'style="width:100%;"';
                }
                ?>
 title="<?php 
                echo esc_attr(get_the_title() ? get_the_title() : get_the_ID());
                ?>
">
                            <?php 
                echo $title;
                ?>
 
                        </a><br />
                        <?php 
                _e('by', ETHEME_DOMAIN);
                ?>
 <strong><?php 
                the_author();
                ?>
</strong><br>
                        <?php 
                the_time(get_option('date_format'));
                ?>
                        <div class="clear"></div>
                    </div>
                <?php 
            }
            ?>
//.........这里部分代码省略.........
开发者ID:MrMuzik,项目名称:ar4tupgrade,代码行数:101,代码来源:widgets.php


示例14: do_action

if ($woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0) {
    echo ' last';
}
?>
">

	<?php 
do_action('woocommerce_before_subcategory', $category);
?>

	<div class="mask-container">

		<?php 
$thumbnail_id = get_woocommerce_term_meta($category->term_id, 'thumbnail_id', true);
if ($thumbnail_id) {
    $image = etheme_get_image($thumbnail_id);
} else {
    $image = woocommerce_placeholder_img_src();
}
if ($image) {
    echo '<img src="' . $image . '" alt="' . $category->name . '" />';
}
?>

		<div class="block-mask">
			<div class="mask-content">
				<a href="<?php 
echo get_term_link($category->slug, 'product_cat');
?>
"><i class="icon-link"></i></a>
			</div>
开发者ID:MrMuzik,项目名称:ar4tupgrade,代码行数:31,代码来源:content-product_cat.php


示例15: wpsc_the_product_id

        if (wpsc_show_thumbnails()) {
            ?>
          <div class="imagecol" id="imagecol_<?php 
            echo wpsc_the_product_id();
            ?>
">

            <?php 
            etheme_product_labels();
            ?>

            <?php 
            if (wpsc_the_product_thumbnail()) {
                ?>
              <a id="<?php 
                echo etheme_get_image($id, 400, 400, false);
                ?>
"
                 href="<?php 
                echo wpsc_the_product_permalink();
                ?>
"
                 class="product-image <?php 
                if ($product_img_hover == 'tooltip') {
                    ?>
imageTooltip<?php 
                }
                ?>
">
                <?php 
                if (etheme_get_custom_field('_etheme_hover') && $product_img_hover == 'swap') {
开发者ID:Nguyenkain,项目名称:hanghieusales,代码行数:31,代码来源:wpsc-products_page.php


示例16: etheme_cart_items

    function etheme_cart_items($limit = 3)
    {
        global $woocommerce;
        if (sizeof($woocommerce->cart->get_cart()) > 0) {
            ?>
			<p><?php 
            _e('Recently added item(s)', ETHEME_DOMAIN);
            ?>
</p>
			<ul class='order-list'>
          <?php 
            $counter = 0;
            foreach ($woocommerce->cart->get_cart() as $cart_item_key => $cart_item) {
                $counter++;
                if ($counter > $limit) {
                    continue;
                }
                $_product = $cart_item['data'];
                if (!apply_filters('woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key)) {
                    continue;
                }
                if ($_product->exists() && $cart_item['quantity'] > 0) {
                    $product_price = get_option('woocommerce_display_cart_prices_excluding_tax') == 'yes' || $woocommerce->customer->is_vat_exempt() ? $_product->get_price_excluding_tax() : $_product->get_price();
                    $product_price = apply_filters('woocommerce_cart_item_price_html', woocommerce_price($product_price), $cart_item, $cart_item_key);
                    ?>
					<li>
						<?php 
                    echo apply_filters('woocommerce_cart_item_remove_link', sprintf('<a href="%s" data-key="%s" class="close-order-li" title="%s"></a>', esc_url($woocommerce->cart->get_remove_url($cart_item_key)), $cart_item_key, __('Remove this item', ETHEME_DOMAIN)), $cart_item_key);
                    ?>
						<div class="media">
							<a class="pull-left" href="<?php 
                    echo get_permalink($cart_item['product_id']);
                    ?>
">
								<img class="media-object" src="<?php 
                    echo etheme_get_image(get_post_thumbnail_id($cart_item['product_id']), 70, 200, false);
                    ?>
">
							</a>
							<div class="media-body">
								<h4 class="media-heading"><a href="<?php 
                    echo get_permalink($cart_item['product_id']);
                    ?>
"><?php 
                    echo apply_filters('woocommerce_widget_cart_product_title', $_product->get_title(), $_product);
                    ?>
</a></h4>
								<div class="descr-box">
									<?php 
                    echo $woocommerce->cart->get_item_data($cart_item);
                    ?>
									<span class="coast"><?php 
                    echo $cart_item['quantity'];
                    ?>
 x <span class='medium-coast'><?php 
                    echo $product_price;
                    ?>
</span></span>
								</div>
							</div>
						</div>
					</li>
                <?php 
                }
            }
            ?>
		</ul>

        <?php 
        } else {
            echo '<p class="empty a-center">' . __('No products in the cart.', ETHEME_DOMAIN) . '</p>';
        }
        if (sizeof($woocommerce->cart->get_cart()) > 0) {
            do_action('woocommerce_widget_shopping_cart_before_buttons');
            ?>
			<p class="small-h pull-left"><?php 
            echo __('Cart Subtotal', ETHEME_DOMAIN);
            ?>
</p>
			<span class="big-coast pull-right">
				<?php 
            echo $woocommerce->cart->get_cart_subtotal();
            ?>
			</span>
			<div class="clearfix"></div>
			<div class='bottom-btn'>
				<a href="<?php 
            echo $woocommerce->cart->get_cart_url();
            ?>
" class='btn text-center border-grey'><?php 
            echo __('View Cart', ETHEME_DOMAIN);
            ?>
</a>
				<a href="<?php 
            echo $woocommerce->cart->get_checkout_url();
            ?>
" class='btn text-center big filled'><?php 
            echo __('Checkout', ETHEME_DOMAIN);
            ?>
</a>
//.........这里部分代码省略.........
开发者ID:baridavid,项目名称:themes,代码行数:101,代码来源:woo.php


示例17: do_action

echo $class;
?>
">
	<?php 
do_action('woocommerce_before_shop_loop_item');
?>
        
		<?php 
$placeholder_width = $woocommerce->get_image_size('shop_catalog_image_width');
$placeholder_height = $woocommerce->get_image_size('shop_catalog_image_height');
$catalogImage = get_option('shop_catalog_image_size');
$url = etheme_get_image(false, $catalogImage['width'], $catalogImage['height'], $catalogImage['crop']);
if (has_post_thumbnail()) {
    ?>
                    <a id="<?php 
    echo etheme_get_image(false, 460, 628, false);
    ?>
" href="<?php 
    echo the_permalink();
    ?>
" class="product-image <?php 
    if ($product_img_hover == 'tooltip') {
        ?>
imageTooltip<?php 
    }
    ?>
">
		
						<?php 
    woocommerce_get_template('loop/sale-flash.php');
    ?>
开发者ID:phanhoanglong2610,项目名称:flowershop,代码行数:31,代码来源:content-product.php


示例18: wp_get_attachment_url

                    <li class="slide">
                        <a href="<?php 
        echo wp_get_attachment_url($id);
        ?>
" class="image" <?php 
        if ($zoom == 'disable') {
            ?>
 rel="lightbox[gal]"<?php 
        }
        ?>
 data-easyzoom-source="<?php 
        echo etheme_get_image($id, $mainWidth, $mainHeight, $crop);
        ?>
">
                            <img src="<?php 
        echo etheme_get_image($id, $thumbImageWidth, $thumbImageHeight, $thumbImageCrop);
        ?>
" >
                        </a>   
						<?php 
        if (etheme_get_option('gallery_lightbox') && $zoom != 'disable') {
            ?>
							<a href="<?php 
            echo wp_get_attachment_url($id);
            ?>
" rel="lightbox[gal]" style="display:none;" data-original-title="" data-placement="left">&nbsp;</a>
						<?php 
        }
        ?>
                    </li>               
                        
开发者ID:donpapa26,项目名称:bakancslistad,代码行数:30,代码来源:product-thumbnails.php


示例19: etheme_create_slider

/**
 * Create product slider getting query
 */
function etheme_create_slider($args, $title = false, $image_width = 220, $image_height = 220, $crop = false)
{
    global $wpdb;
    $box_id = rand(1000, 10000);
    $multislides = new WP_Query($args);
    if ($multislides->have_posts()) {
        if ($title) {
            $title_output = '<h2 class="slider-title">' . $title . '</h2>';
        }
        echo '<div class="product-slider">';
        echo $title_output;
        echo '<div class="clear"></div>';
        echo '<div class="carousel">';
        echo '<div class="slider">';
        $_i = 0;
        while ($multislides->have_posts()) {
            $multislides->the_post();
            $_i++;
            if (class_exists('Woocommerce')) {
                global $product;
                if (!$product->is_visible()) {
                    continue;
                }
                echo '<div class="slide product-slide ' . $last . '">';
                woocommerce_get_template_part('content', 'product');
                echo '</div><!-- slide -->';
            }
            if (class_exists('WP_eCommerce')) {
                $post_id = get_the_ID();
                $post_name = get_the_title();
                $post_image = etheme_get_image(null, $image_width, $image_height, $crop, $post_id);
                if (!$post_image && $image_default) {
                    $post_image = $image_default;
                }
                $post_url = get_permalink();
                if (class_exists('WP_eCommerce')) {
                    $normal_price = class_exists('WP_eCommerce') ? the_product_price($post_id) : false;
                    $post_price = class_exists('WP_eCommerce') ? the_product_price($post_id, true) : '';
                }
                echo '<div class="slide product-slide ' . $last . '">';
                echo '<a href="' . $post_url . '" class="product-image"><div class="img-wrapper"><img alt="" src="' . $post_image . '" /></div></a>';
                echo '<span class="product-name"><a href="' . $post_url . '">' . esc_attr($post_name) . '</a></span>';
                if ($normal_price != $post_price) {
                    echo '<div class="price sale">';
                    echo '<p class="oldprice-p pricedisplay"><span class="oldprice">' . $normal_price . '</span></p>';
                    echo '<p class="pricedisplay"><span class="currentprice pricedisplay">' . $post_price . '</span></p>';
                    echo '</div> ';
                } else {
                    echo '<div class="price">';
                    echo '<span>' . $post_price . '</span>';
                    echo '</div>';
                }
                wpsc_the_product();
                if (wpsc_product_external_link($post_id) != '') {
                    $action = wpsc_product_external_link($post_id);
                } else {
                    $action = htmlentities(wpsc_this_page_url(), ENT_QUOTES, 'UTF-8');
                }
                echo '<div class="btn-cont">';
                echo '<form class="product_form"  enctype="multipart/form-data" action="' . $action . '" method="post" name="product_' . $post_id . '" id="product_' . $post_id . '" >';
                echo '<input type="hidden" value="add_to_cart" name="wpsc_ajax_action"/>';
                echo '<input type="hidden" value="' . $post_id . '" name="product_id"/>';
                if (false) {
                    echo '<button class="button" type="submit" id="product_' . $post_id . '_submit_button"><span>' . __('Add To Cart', 'wpsc') . '</span></button>';
                } else {
                    echo '<a href="' . $post_url . '" class="button add-to-cart sml"><span>' . __('Read more', 'wpsc') . '</span></a>';
                }
                echo '</form>';
                echo '</div>';
                echo '</div><!-- slide -->';
            }
            unset($last);
        }
        echo '</div><!-- slider -->';
        echo '</div><!-- carousel -->';
        if ($_i > 1) {
            echo '<div class="prev arrow' . $box_id . '" style="cursor: pointer; ">&nbsp;</div>';
            echo '<div class="next arrow' . $box_id . '" style="cursor: pointer; ">&nbsp;</div>';
        }
        echo '</div><!-- product-slider -->';
    }
    wp_reset_query();
    if (@$_i > 1) {
        echo '
            <script type="text/javascript">
                jQuery(".arrow' . $box_id . '.prev").addClass("disabled");
                jQuery(".carousel").iosSlider({
                    desktopClickDrag: true,
                    snapToChildren: true,
                    infiniteSlider: false,
                    navNextSelector: ".arrow' . $box_id . '.next",
                    navPrevSelector: ".arrow' . $box_id . '.prev",
                    lastSlideOffset: 3,
                    onFirstSlideComplete: function(){
                        jQuery(".arrow' . $box_id . '.prev").addClass("disabled");
                    },
                    onLastSlideComplete: function(){
//.........这里部分代码省略.........
开发者ID:Nguyenkain,项目名称:hanghieusales,代码行数:101,代码来源:products.php


示例20: elseif

                  </script>
              <?php 
    }
    ?>
      
    <?php 
} elseif (has_post_thumbnail()) {
    ?>
      <div  

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP etheme_get_option函数代码示例发布时间:2022-05-15
下一篇:
PHP etheme_get_custom_field函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap