当前位置: 首页>>代码示例>>PHP>>正文


PHP jeg_get_image_attachment函数代码示例

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


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

示例1: vp_metabox

$bgtype = vp_metabox('jkreativ_slider_fulltext.bg_type', null, $sliderid);
$bgfallback = '';
if ($bgtype === 'image') {
    $backgroundimage = "background-image: url('{$backgroundimage}')";
} else {
    if ($bgtype === 'video') {
        $bgfallback = jeg_get_image_attachment(vp_metabox('jkreativ_slider_fulltext.video.0.bgfallback', null, $sliderid));
    } else {
        if ($bgtype === 'youtube') {
            $bgfallback = jeg_get_image_attachment(vp_metabox('jkreativ_slider_fulltext.youtube.0.bgfallback', null, $sliderid));
        }
    }
}
if ($is_IE && ($bgtype === 'video' || $bgtype === 'youtube')) {
    $bgtype = 'image';
    $backgroundimage = "background-image: url('" . jeg_get_image_attachment(vp_metabox('jkreativ_slider_fulltext.video.0.bgfallback', null, $sliderid)) . "')";
}
?>
<section class="fs-videobg  fs-container nomargin nopadding headingparallax <?php 
echo $uselight;
?>
" style="" data-slider-type="<?php 
echo $bgtype;
?>
">
	<?php 
if ($bgtype === 'video') {
    ?>
	<div class="video-wrap video-fixed video-fullscreen bgholder">
		<div class="video-fallback" style="background-image: url('<?php 
    echo $bgfallback;
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:31,代码来源:section-heading-slider-fulltext.php

示例2: WP_Query

<?php

$query = new WP_Query(array('post_type' => 'portfolio', 'p' => JEG_PORTFOLIO_ID));
if ($query->have_posts()) {
    $query->the_post();
    if (get_post_meta(JEG_PORTFOLIO_ID, "portfolio_layout", true) == 'ajax') {
        $expandtype = vp_metabox('jkreativ_portfolio_ajax.single_scale_mode');
    }
    $coverpage = jeg_get_image_attachment(get_post_meta($post->ID, "coverimage", true));
    ?>
<div class="portfoliocontent" data-expand="<?php 
    echo $expandtype;
    ?>
" data-hide-title="<?php 
    echo vp_metabox('jkreativ_portfolio_ajax.hide_image_title');
    ?>
">
	<div class="portfoliocontentwrapper">
		<div class="portfolionavbar">
			<div class="portfolionavtitle"><?php 
    echo the_title();
    ?>
</div>
			<div class="portfolionavlist ppopup">
				<ul>
					<li class="portfoliolove" data-title="<?php 
    the_title();
    ?>
" 
						data-cover="<?php 
    echo $coverpage;
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:31,代码来源:portfolio-single.php

示例3: vp_metabox

<div class="fs-container">				        			
	<div class="slideshowgallery" style='opacity: 0;' data-loop="true" data-autoplay="<?php 
    echo vp_metabox('jkreativ_page_slidermedia.toggle_autoplay') === "1" ? vp_metabox('jkreativ_page_slidermedia.autoplay_delay') : false;
    ?>
">
		<?php 
    $mediagallery = get_post_meta(get_the_ID(), 'postgallery', true);
    foreach ($mediagallery as $key => $value) {
        if ($value['type'] === 'image') {
            $image = jeg_get_image_attachment($value['imageid']);
            $thumbnail = jeg_image_resizer($image, 144, 96);
            echo "<a href='{$image}'><img src='{$thumbnail}' width='144' height='96'></a>";
        } else {
            if ($value['type'] === 'youtube' || $value['type'] === 'vimeo') {
                $mediaurl = $value['mediaurl'];
                $image = jeg_get_image_attachment($value['mediacover']);
                $thumbnail = jeg_image_resizer($image, 144, 96);
                echo "<a href='{$mediaurl}' data-img='{$image}'><img src='{$thumbnail}' width='144' height='96'></a>";
            }
        }
    }
    ?>
	</div>
</div>
<div class="sliderloader bigloader"></div>

<script>
	(function($){
		$(document).ready(function(){
			/** Full screen **/
			if($(".fs-container").length) {
开发者ID:ntnvu,项目名称:tcb_online,代码行数:31,代码来源:template-fsslider-media.php

示例4: vp_metabox

<!-- begin IOS Slider -->
<div class="fs-container">
	<div class="sliderContainer">
		<div class="iosSlider" data-autoplay="<?php 
    echo vp_metabox('jkreativ_page_iosslider.autoplay', 'false');
    ?>
" data-delay="<?php 
    echo vp_metabox('jkreativ_page_iosslider.sliderdelay', '5000');
    ?>
">
			<div class="slider sliderhold">
				<?php 
    $slideritem = vp_metabox('jkreativ_page_fsslider_content.slideritem');
    foreach ($slideritem as $slider) {
        echo "<div class='item'>";
        echo "<img src='" . jeg_get_image_attachment($slider['background']) . "'/>\n";
        echo "<div class='iosoverlay' style='background-color: " . $slider['overlay_color'] . "'></div>";
        echo "<div class='ioscontainer'>\n";
        echo "<div class='text1'>" . do_shortcode($slider['firstline']) . "</div>\n";
        if ($slider['show_secondline']) {
            echo "<div class='text2'>{$slider['secondline']}</div>\n";
        }
        if ($slider['show_thirdline']) {
            echo "<div class='text3'><a class='slider-button' href='{$slider['buttonurl']}'><span class='button-text'>{$slider['buttontext']}</span></a></div>\n";
        }
        echo "</div>\n";
        echo "</div>\n";
    }
    ?>
			</div>
			<div class="navigationdot">
开发者ID:ntnvu,项目名称:tcb_online,代码行数:31,代码来源:template-fsslider-iosslider.php

示例5: jeg_get_template_part

            if ($slidertype == 'fulltextslider') {
                jeg_get_template_part('template/landing/section-heading-slider-fulltext');
            } else {
                if ($slidertype == 'splitslider') {
                    jeg_get_template_part('template/landing/section-heading-slider-split');
                } else {
                    if ($slidertype == 'parallaxslider') {
                        jeg_get_template_part('template/landing/section-heading-parallax-slider');
                    }
                }
            }
            break;
        case 'parallaxheading':
            $uselight = vp_metabox('jkreativ_portfolio_landing_vc.heading_normal.0.light_heading') == 1 ? 'light' : '';
            $coverbg = vp_metabox('jkreativ_portfolio_landing_vc.heading_normal.0.cover_parallax_background') == '1' ? 'cover' : 'auto';
            $backgroundimage = jeg_get_image_attachment(vp_metabox('jkreativ_portfolio_landing_vc.heading_normal.0.heading_background'));
            $overlaybgimage = "<div class='parallaxoverlay' style='background-color: " . vp_metabox('jkreativ_portfolio_landing_vc.heading_normal.0.overlay_color') . ";'></div>";
            ?>

                <section class="nomargin nopadding headingparallax <?php 
            echo $uselight;
            ?>
">
                    <div class="bgholder">
                        <div class="bgitem" style="background-image: url('<?php 
            echo $backgroundimage;
            ?>
'); background-size: <?php 
            echo $coverbg;
            ?>
"></div>
开发者ID:ntnvu,项目名称:tcb_online,代码行数:31,代码来源:template-portfolio-landing-vc.php

示例6: vp_metabox

<div class="fs-container">
	<div class="splitslider">
		
		<div id="slider" class="sl-slider-wrapper">
			<div class="sl-slider">
				
				<?php 
    $slideritem = vp_metabox('jkreativ_page_sslider.slideritem');
    foreach ($slideritem as $id => $slider) {
        if ($id % 2 == 0) {
            echo '<div class="sl-slide" data-orientation="horizontal" data-slice1-rotation="-25" data-slice2-rotation="-25" data-slice1-scale="2" data-slice2-scale="2">';
        } else {
            echo '<div class="sl-slide" data-orientation="vertical" data-slice1-rotation="10" data-slice2-rotation="-15" data-slice1-scale="1.5" data-slice2-scale="1.5">';
        }
        echo '<div class="sl-slide-inner">';
        echo '<div class="bg-img" style="background-image: url(' . jeg_get_image_attachment($slider['background']) . ')"></div>';
        echo '<a href="' . $slider['url'] . '" class="tile-wrapper">';
        echo '<div class="slider-content">';
        echo '<i class="fa ' . $slider['iconfon'] . '"></i>';
        echo '<h2>' . $slider['servicetext'] . '</h2>';
        echo '<span class="sl-line"></span>';
        echo '<p>' . $slider['detailtext'] . '</p>';
        echo '</div>';
        echo '</a>';
        echo '</div>';
        echo '</div>';
    }
    ?>
				
			</div><!-- /sl-slider -->
			
开发者ID:ntnvu,项目名称:tcb_online,代码行数:30,代码来源:template-fsslider-serviceslider.php

示例7: jeg_product_slider

function jeg_product_slider($atts, $content = null)
{
    $atts = shortcode_atts(array('number' => '', 'column' => '', 'filter_category' => array(), 'image_dimension' => '', 'class' => ''), $atts);
    $productquery = array('post_type' => 'product', 'posts_per_page' => $atts['number'], 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'meta_query' => array(array('key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN')));
    if (!empty($atts['filter_category'])) {
        $productquery['tax_query'] = array(array('taxonomy' => 'product_cat', 'terms' => $atts['filter_category'], 'field' => 'id', 'operator' => 'IN'));
    }
    ob_start();
    $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $productquery, $atts));
    if ($products->have_posts()) {
        while ($products->have_posts()) {
            $products->the_post();
            global $product;
            // product image
            $productimage = jeg_get_image_attachment(get_post_thumbnail_id($product->id));
            $defaultwidth = 600;
            $thumbnail = jeg_image_resizer($productimage, $defaultwidth, $defaultwidth * $atts['image_dimension']);
            // category
            $terms = get_the_terms($product->id, 'product_cat');
            $termarray = array();
            if (!empty($terms)) {
                foreach ($terms as $term) {
                    $link = get_term_link($term);
                    $termarray[] = "<a href='{$link}'>" . $term->name . "</a>";
                    break;
                }
            }
            $additionalcss = '';
            global $is_safari;
            if (!wp_is_mobile() && !$is_safari) {
                $additionalcss = " jeg_do_animate ";
            }
            ?>
			<div class='<?php 
            $additionalcss;
            ?>
 item'>
				<div class='product-item'>
					<div class='product-cover'>
						<img src='<?php 
            echo $thumbnail;
            ?>
' alt='<?php 
            echo get_the_title();
            ?>
'>
					</div>
					<span class='product-category'><?php 
            echo implode(', ', $termarray);
            ?>
</span>
					<a href='<?php 
            echo get_the_permalink();
            ?>
'>
						<h3><?php 
            echo get_the_title();
            ?>
</h3>
					</a>
					<span class="product-line"></span>
			<?php 
            $rating = '';
            if (get_option('woocommerce_enable_review_rating') !== 'no') {
                $count = $product->get_rating_count();
                $average = $product->get_average_rating();
                if ($count > 0) {
                    ?>
					<div class="review-box">
						<div itemprop="ratingValue" title="<?php 
                    echo sprintf(__('Rated %.2f out of 5', 'jeg_textdomain'), $average);
                    ?>
" class="star-rating">
							<span style="width:<?php 
                    echo $average / 5 * 100;
                    ?>
%"></span>
						</div>
					</div>
			<?php 
                }
            }
            ?>
					<div class='price'>
						<span class='amount'><?php 
            echo $product->get_price_html();
            ?>
</span>
					</div>
				</div>
			</div>
			<?php 
        }
    }
    wp_reset_postdata();
    $additionalcss = '';
    global $is_safari;
    if (!wp_is_mobile() && !$is_safari) {
        $additionalcss = " jeg_animate_sequence jeg_animate_slow ";
    }
//.........这里部分代码省略.........
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:101,代码来源:build-shortcode.php

示例8: wp_get_attachment_image_src

		
		<?php 
        echo $parallaxhtml;
        ?>
		<?php 
        echo $overlaybackground;
        ?>
		
		<?php 
        if (isset($section['enable_top_ribon']) && $section['enable_top_ribon']) {
            $topribonsize = wp_get_attachment_image_src($section['top_ribon_bg']);
            echo "<div class='section-top-ribon' style='background-image:url(" . jeg_get_image_attachment($section['top_ribon_bg']) . "); height: {$topribonsize[2]}px;'></div>";
        }
        if (isset($section['enable_bottom_ribon']) && $section['enable_bottom_ribon']) {
            $bottomribonsize = wp_get_attachment_image_src($section['bottom_ribon_bg']);
            echo "<div class='section-bottom-ribon' style='background-image:url(" . jeg_get_image_attachment($section['bottom_ribon_bg']) . "); height: {$bottomribonsize[2]}px;'></div>";
        }
        ?>
	
		
		<div class="sectioncontainer">		
			<?php 
        echo apply_filters('the_content', $section['content']);
        ?>
		</div>
		
	</section>
<?php 
    }
} else {
    ?>
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:30,代码来源:section-content-builder.php

示例9: function

            /** Kenburn slider **/
            var recreate_slider = function(){
                if(instance !== null) instance.stop();
                $(".kenburntextcontent").hide();
                $(".kenburntextcontent > div").attr('style', '');

                $(".kenburns").remove();
                $(".kenburnwrapper").append("<canvas class='kenburns'></canvas>");
                $('.kenburns').attr('width',$(".fs-container").width()).attr('height',$(".fs-container").height());

                instance = $('.kenburns').kenburned({
                    images:[
                        <?php 
    foreach ($slideritem as $id => $slider) {
        echo "'" . jeg_get_image_attachment($slider['background']) . "',";
    }
    ?>
                    ],
                    frames_per_second: 30,
                    display_time: <?php 
    echo vp_metabox('jkreativ_page_kenburn.displaytime');
    ?>
,
                    fade_time: <?php 
    echo vp_metabox('jkreativ_page_kenburn.fadetime');
    ?>
,
                    zoom: <?php 
    echo vp_metabox('jkreativ_page_kenburn.zoom');
    ?>
开发者ID:ntnvu,项目名称:tcb_online,代码行数:30,代码来源:template-fsslider-kenburn.php

示例10: jeg_get_portfolio_featured_heading

 function jeg_get_portfolio_featured_heading($postid)
 {
     $portfolioitem = get_post_meta($postid, 'jkreativ_portfolio_gallery', true);
     $featured = '';
     if (!empty($portfolioitem)) {
         foreach ($portfolioitem as $idx => $portfolio) {
             $portfoliotype = $portfolio['type'];
             $loadclass = $idx === 0 ? "loaded" : "notloaded";
             $mediacover = '';
             if (isset($portfolio['mediacover'])) {
                 $mediacover = jeg_get_image_attachment($portfolio['mediacover']);
                 $mediacoversize = wp_get_attachment_image_src($portfolio['mediacover'], 'full');
             }
             switch ($portfoliotype) {
                 case 'image':
                     $image = wp_get_attachment_image_src($portfolio['imageid'], 'full');
                     $thumb = jeg_image_resizer($image[0], 90, 90);
                     if ($idx === 0) {
                         $featured .= "<div class='portfolio-content-holder item' data-type='image' data-title='{$portfolio['imagename']}' data-thumb='{$thumb}'>\r\n\t\t\t\t\t\t\t\t<img src='{$image[0]}' class='{$loadclass}' data-width='{$image[1]}' data-height='{$image[2]}'/>\r\n\t\t\t\t\t\t\t</div>";
                     } else {
                         $featured .= "<div class='portfolio-content-holder item' data-type='image' data-title='{$portfolio['imagename']}' data-thumb='{$thumb}'>\r\n\t\t\t\t\t\t\t\t<img src='' data-src='{$image[0]}' class='{$loadclass}' data-width='{$image[1]}' data-height='{$image[2]}'/>\r\n\t\t\t\t\t\t\t</div>";
                     }
                     break;
                 case 'youtube':
                 case 'vimeo':
                     $thumb = jeg_image_resizer($mediacover, 90, 90);
                     if ($idx === 0) {
                         $featured .= "<div class='portfolio-content-holder item' data-type='{$portfoliotype}' data-src='{$portfolio['mediaurl']}' data-title='{$portfolio['title']}' data-thumb='{$thumb}'>\r\n\t\t\t\t\t\t\t\t<div class='portfoliovideo-wrapper'>\r\n\t\t\t\t\t\t\t\t\t<img src='{$mediacover}' class='{$loadclass}' data-width='{$mediacoversize[1]}' data-height='{$mediacoversize[2]}'/>\r\n\t\t\t\t\t\t\t\t\t<div class='videooverlay'></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class='portfoliovideo-container'><div class='video-container'></div></div>\r\n\t\t\t\t\t\t\t</div>";
                     } else {
                         $featured .= "<div class='portfolio-content-holder item' data-type='{$portfoliotype}' data-src='{$portfolio['mediaurl']}' data-title='{$portfolio['title']}' data-thumb='{$thumb}'>\r\n\t\t\t\t\t\t\t\t<div class='portfoliovideo-wrapper'>\r\n\t\t\t\t\t\t\t\t\t<img src='' data-src='{$mediacover}' class='{$loadclass}' data-width='{$mediacoversize[1]}' data-height='{$mediacoversize[2]}'/>\r\n\t\t\t\t\t\t\t\t\t<div class='videooverlay'></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class='portfoliovideo-container'><div class='video-container'></div></div>\r\n\t\t\t\t\t\t\t</div>";
                     }
                     break;
                 case 'html5video':
                     $thumb = jeg_image_resizer($mediacover, 90, 90);
                     if ($idx === 0) {
                         $featured .= "<div class='portfolio-content-holder item' data-type='{$portfoliotype}' data-mp4='{$portfolio['videomp4']}' data-webm='{$portfolio['videowebm']}' data-ogg='{$portfolio['videoogg']}' data-title='{$portfolio['title']}' data-thumb='{$thumb}'>\r\n\t\t\t\t\t\t\t\t<div class='portfoliovideo-wrapper'>\r\n\t\t\t\t\t\t\t\t\t<img src='{$mediacover}' class='{$loadclass}' data-width='{$mediacoversize[1]}' data-height='{$mediacoversize[2]}'/>\r\n\t\t\t\t\t\t\t\t\t<div class='videooverlay'></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class='portfoliovideo-container'><div class='html5-video-container'></div></div>\r\n\t\t\t\t\t\t\t</div>";
                     } else {
                         $featured .= "<div class='portfolio-content-holder item' data-type='{$portfoliotype}' data-cover='{$mediacover}' data-mp4='{$portfolio['videomp4']}' data-webm='{$portfolio['videowebm']}' data-ogg='{$portfolio['videoogg']}' data-title='{$portfolio['title']}' data-thumb='{$thumb}'>\r\n\t\t\t\t\t\t\t\t<div class='portfoliovideo-wrapper'>\r\n\t\t\t\t\t\t\t\t\t<img src='' data-src='{$mediacover}' class='{$loadclass}' data-width='{$mediacoversize[1]}' data-height='{$mediacoversize[2]}'/>\r\n\t\t\t\t\t\t\t\t\t<div class='videooverlay'></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class='portfoliovideo-container'><div class='html5-video-container'></div></div>\r\n\t\t\t\t\t\t\t</div>";
                     }
                     break;
                 case 'soundcloud':
                     $thumb = jeg_image_resizer($mediacover, 90, 90);
                     $featured .= "<div class='portfolio-content-holder item' data-type='soundcloud' data-src='{$portfolio['mediaurl']}' data-title='{$portfolio['title']}' data-thumb='{$thumb}'>\r\n\t\t\t\t\t\t\t<div class='video-container'></div>\r\n\t\t\t\t\t\t</div>";
                     break;
                 default:
                     break;
             }
         }
     }
     return $featured;
 }
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:51,代码来源:themes-functionality.php

示例11: foreach

			<div class="text-holder">
				<?php 
foreach ($ps as $pslider) {
    if ($pslider['ps_show_video']) {
        $pslider['textposition'] = '';
    }
    ?>
					<div class="text-wrapper">
			 			<div class="container jcontainer <?php 
    echo $pslider['textposition'];
    ?>
">
			 				<div class="row-fluid">
			 					<?php 
    if ($pslider['ps_show_video']) {
        $imageposter = jeg_get_image_attachment($pslider['ps_video'][0]['ps_video_image']);
        $poster = jeg_image_resizer($imageposter, 1200, 900);
        ?>
			 									 					
									<div class="slider-video span6 ">
										
										<?php 
        if ($pslider['ps_video'][0]['ps_video_type'] === 'youtube') {
            ?>
											
										<a class="imggalitem jvideo" data-video-type="<?php 
            echo $pslider['ps_video'][0]['ps_video_type'];
            ?>
" href="<?php 
            echo $pslider['ps_video'][0]['ps_video_youtube'];
            ?>
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:31,代码来源:section-heading-parallax-slider.php

示例12: jeg_get_body_background

function jeg_get_body_background()
{
    $bgobj = array();
    $bgobj['color'] = get_theme_mod('website_color_background', '#ffffff');
    $bgobj['imgbg'] = get_theme_mod('website_image_background', get_template_directory_uri() . '/public/img/pattern/grid_noise.png');
    if (ctype_digit($bgobj['imgbg']) || is_int($bgobj['imgbg'])) {
        $bgobj['imgbg'] = wp_get_attachment_image_src($bgobj['imgbg'], "full");
        $bgobj['imgbg'] = $bgobj['imgbg'][0];
    }
    $bgobj['bgvertical'] = get_theme_mod('website_background_vertical_position', 'center');
    $bgobj['bghorizontal'] = get_theme_mod('website_background_horizontal_position', 'center');
    $bgobj['bgrepeat'] = get_theme_mod('website_background_repeat', 'repeat');
    $bgobj['bgfullscreen'] = get_theme_mod('website_background_fullscreen', false);
    // alter page id
    global $post;
    $pageid = $post !== null ? jeg_alter_woo_page_id(get_the_ID()) : null;
    if (vp_metabox('jkreativ_general.override_background', null, $pageid)) {
        $bgobj = array();
        $bgobj['color'] = vp_metabox('jkreativ_general.override_background_group.0.color_background', null, $pageid);
        $bgobj['imgbg'] = jeg_get_image_attachment(vp_metabox('jkreativ_general.override_background_group.0.image_background', null, $pageid));
        $bgobj['bgvertical'] = vp_metabox('jkreativ_general.override_background_group.0.background_vertical_position', null, $pageid);
        $bgobj['bghorizontal'] = vp_metabox('jkreativ_general.override_background_group.0.background_horizontal_position', null, $pageid);
        $bgobj['bgrepeat'] = vp_metabox('jkreativ_general.override_background_group.0.background_repeat', null, $pageid);
        $bgobj['bgfullscreen'] = vp_metabox('jkreativ_general.override_background_group.0.background_fullscreen', null, $pageid);
    }
    return $bgobj;
}
开发者ID:ntnvu,项目名称:tcb_online,代码行数:27,代码来源:scriptstyle.php

示例13: floatval

 // resize image
 if ($overwritewidth) {
     $itemwidth = $gallerydata['product_width'];
     $itw = $itemwidth * 1.5;
     $ith = null;
     if ($gallerydata['gallery_layout'] == 'normal') {
         $ith = $itw * floatval($gallerydata['product_height']);
     } else {
         if ($gallerydata['gallery_layout'] === 'justified') {
             $ith = $gallerydata['justified_height'] * 1.5;
             $itw = null;
         }
     }
 }
 foreach ($attachment_ids as $attachment) {
     $image = jeg_get_image_attachment($attachment);
     if ($overwritewidth) {
         // actual resize
         $thumbnail = jeg_image_resizer($image, $itw, $ith);
         // title
         $title = get_the_title($attachment);
         // margin
         $marginsize = 0;
         if ($gallerydata['user_margin']) {
             $marginsize = $gallerydata['margin_size'];
         }
         // echo
         echo "<div class='imggalitem notloaded' data-width='1' data-height='1' style='padding: {$marginsize}px;'>\n\t\t\t\t<a href='{$image}' data-type='image' style='margin: 0px;'>\n\t\t\t\t\t<img src='{$thumbnail}' alt='" . $title . "'>\n\t\t\t\t\t<div class='galoverlay'></div>\n\t\t\t\t</a>\n\t\t\t</div>";
     } else {
         echo "<div class='imageholder'>\n\t\t\t\t<img src='{$image}'/>\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t</div>";
     }
开发者ID:ntnvu,项目名称:tcb_online,代码行数:31,代码来源:product-image.php

示例14: sprintf

                <?php 
if (sizeof($woocommerce->cart->get_cart()) > 0) {
    ?>
                    <h6 class="topcartheader"><?php 
    echo sprintf(_n('An Item', '%s Items', $itemcount, 'jeg_textdomain'), $itemcount);
    ?>
 on Shopping Cart</h6>
                    <div class="topcartlist">
                        <?php 
    foreach ($woocommerce->cart->get_cart() as $cart_item_key => $values) {
        $_product = $values['data'];
        if ($_product->exists() && $values['quantity'] > 0) {
            ?>
                                <div class="topcartlist_product">
                                    <?php 
            $image = jeg_get_image_attachment(get_post_thumbnail_id($_product->id));
            $thumbnail = jeg_image_resizer($image, 65, 79);
            printf('<a href="%s" class="topcartlist_image"><img src="%s" alt="%s"/></a>', esc_url(get_permalink(apply_filters('woocommerce_in_cart_product_id', $values['product_id']))), $thumbnail, $_product->post->post_title);
            ?>
                                    <div class="topcart_desc">
                                        <a href="<?php 
            echo esc_url(get_permalink(apply_filters('woocommerce_in_cart_product_id', $values['product_id'])));
            ?>
"><strong><?php 
            echo $_product->post->post_title;
            ?>
</strong></a>
                                        <span><?php 
            _e('Quantity :', 'jeg_textdomain');
            ?>
 <?php 
开发者ID:ntnvu,项目名称:tcb_online,代码行数:31,代码来源:navigation-side-woo.php

示例15: _e

<div class="article-masonry-container">
	<article class="article-masonry-box">
		<div class="article-masonry-wrapper article-masonry-box-ads clearfix">
			<div class="article-masonry-ads-text"><?php 
_e('Advertisement', 'jeg_textdomain');
?>
</div>
			<a href="<?php 
echo vp_metabox('jkreativ_blog_ads.ads_url');
?>
 ">
				<div class="dummy-image">
					<img src="<?php 
echo jeg_get_image_attachment(vp_metabox('jkreativ_blog_ads.image'));
?>
 "/>
				</div>
			</a>
		</div>
	</article>
</div>
开发者ID:ntnvu,项目名称:tcb_online,代码行数:21,代码来源:masonry-ads.php


注:本文中的jeg_get_image_attachment函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。