本文整理汇总了PHP中yit_image函数的典型用法代码示例。如果您正苦于以下问题:PHP yit_image函数的具体用法?PHP yit_image怎么用?PHP yit_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yit_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: widget
function widget($args, $instance)
{
extract($args);
$yit_portfolio = yit_portfolios();
/* User-selected settings. */
$title = apply_filters('widget_title', $instance['title']);
$project_fx = isset($instance['project_fx']) ? $instance['project_fx'] : false;
$project_easing_fx = isset($instance['project_easing_fx']) ? $instance['project_easing_fx'] : false;
$project_speed_fx = isset($instance['project_speed_fx']) ? $instance['project_speed_fx'] : false;
$project_timeout_fx = isset($instance['project_timeout_fx']) ? $instance['project_timeout_fx'] : false;
$project_n_items = isset($instance['project_n_items']) ? $instance['project_n_items'] : 5;
$project_post_types = isset($instance['project_post_type']) ? $instance['project_post_type'] : 'portfolio';
global $more;
$more = 0;
$post_type = $project_post_types;
if ($project_post_types) {
foreach ($yit_portfolio as $portfolio) {
if ($portfolio->ID == $project_post_types) {
echo $before_widget;
if ($title) {
echo $before_title . $title . $after_title;
}
echo '<div class="featured-projects-widget flexslider">';
echo '<ul class="slides">';
yit_set_portfolio_loop($portfolio->ID);
$i = 0;
$categories = yit_portfolio_get_setting('categories', $portfolio->ID);
$portfolios = yit_portfolio_get_setting('items', $portfolio->ID);
foreach ($portfolios as $item_id => $item) {
$post_permalink = yit_work_permalink($item_id);
echo '<li>';
echo '<div class="thumb-project">';
echo "<a href='" . $post_permalink . "'>";
yit_image("id={$item_id}&size=featured_project_thumb");
//echo wp_get_attachment_image( $item_id, 'featured_project_thumb' );
echo '</a></div>';
echo '<h4>' . $item['title'] . '</h4>';
echo '<p class="categories">';
$str_categories = '';
$terms = isset($item['terms']) ? $item['terms'] : array();
foreach ($terms as $name) {
$str_categories .= "<a href='" . yit_term_link($name) . "'>{$categories[$name]}</a>, ";
}
echo substr($str_categories, 0, strlen($str_categories) - 2);
echo '</p>';
echo '</li>';
if (++$i == $project_n_items) {
break;
}
}
echo '</ul>';
echo '</div>';
$script = "<script type=\"text/javascript\">\n\t\t jQuery(document).ready(function(\$){\n\t\t \tvar animation = \$.browser.msie || \$.browser.opera ? 'fade' : '{$project_fx}';\n\t\t \$('.featured-projects-widget').flexslider({\n\t\t animation: animation,\n\t\t slideshowSpeed: {$project_timeout_fx},\n\t\t animationSpeed: {$project_speed_fx},\n\t\t selectors: 'ul > li',\n\t\t directionNav: true,\n\t\t slideshow: true,\n\n\t\t\t\t\t\t pauseOnAction: false,\n\t\t\t\t\t\t controlNav: false,\n\t\t\t\t\t\t touch: true\n\t\t });\n\t\t });\n\t\t </script>";
echo $script;
echo $after_widget;
}
}
}
}
开发者ID:zgomotos,项目名称:Bazar,代码行数:59,代码来源:featured_projects.php
示例2: widget
function widget($args, $instance)
{
extract($args);
/* User-selected settings. */
if (!isset($instance['title'])) {
$instance['title'] = '';
}
$title = apply_filters('widget_title', $instance['title']);
$items = isset($instance['items']) ? $instance['items'] : '';
$show_thumb = isset($instance['show_thumb']) ? $instance['show_thumb'] : 'yes';
$date = isset($instance['date_excerpt']) ? $instance['date_excerpt'] : 'no';
echo $before_widget;
if ($title) {
echo $before_title . $title . $after_title;
}
$args = array('posts_per_page' => $items, 'orderby' => 'date', 'ignore_sticky_posts' => 1);
$args['order'] = 'DESC';
$myposts = new WP_Query($args);
$html = "\n";
$html .= '<div class="recent-post group">' . "\n";
if ($myposts->have_posts()) {
while ($myposts->have_posts()) {
$myposts->the_post();
$img = '';
if (has_post_thumbnail()) {
$img = yit_image("size=blog_thumb", false);
}
/*
else
{ $img = '<img src="'.get_template_directory_uri().'/images/no_image_recentposts.jpg" alt="No Image" />'; }
*/
$html .= '<div class="hentry-post group">' . "\n";
if ($date == 'yes') {
$html .= '<p class="post-date">' . get_the_date('M') . '<br /><span>' . get_the_date('d') . '</span></p>';
}
if ($show_thumb == 'yes' && has_post_thumbnail()) {
$html .= " <div class=\"thumb-img\">{$img}</div>\n";
$html .= '<div class="text">';
} else {
$html .= '<div class="text without-thumbnail">';
}
$html .= the_title('<a href="' . get_permalink() . '" title="' . get_the_title() . '" class="title">', '</a>', false);
$html .= '<span class="posted_by">' . __('posted by', 'yit') . ' <a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . get_the_author() . '</a></span>';
$html .= '</div>' . "\n";
$html .= '</div>' . "\n";
}
}
wp_reset_query();
$html .= '</div>';
echo $html;
add_filter('the_content_more_link', 'yit_sc_more_link', 10, 3);
//shortcode in more links
echo $after_widget;
}
开发者ID:zgomotos,项目名称:Bazar,代码行数:54,代码来源:recent_posts.php
示例3: while
<div class="services-row row group">
<?php
while ($services->have_posts()) {
$services->the_post();
?>
<div class="span<?php
echo $items_span;
?>
service-wrapper">
<div class="service group">
<div class="image-wrapper">
<a href="<?php
the_permalink();
?>
" ><?php
echo has_post_thumbnail() ? yit_image('size=section_services&alt=featured image', false) : yit_image('src=' . YIT_CORE_ASSETS_URL . '/images/no-featured-175.jpg&title=' . __('(this post does not have a featured image)', 'yit') . '&alt=no featured image', false);
?>
</a>
</div>
<?php
if ($show_title == "1" || $show_title == 'yes') {
?>
<h4><a href="<?php
the_permalink();
?>
"><?php
echo yit_decode_title(get_the_title());
?>
</a></h4><?php
}
?>
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:31,代码来源:section-services.php
示例4: the_ID
<div class="swiper-pagination pagination-post-<?php
the_ID();
?>
"></div>
<div class="swiper-direction left"><i class="fa fa-chevron-left"></i></div>
<div class="swiper-direction right"><i class="fa fa-chevron-right"></i></div>
</div>
</div>
</div>
<?php
} elseif ($has_thumbnail) {
?>
<div class="col-sm-7 yit_portfolio_thumbnail">
<div class="thumbnail">
<?php
yit_image(array('size' => 'portfolio_single_small', 'class' => 'img-responsive'));
?>
</div>
</div>
<?php
} elseif ($show_extra_content) {
?>
<div class="col-sm-3 yit_portfolio_extra_info">
<?php
if ($show_meta_section) {
?>
<div class="portfolio_meta">
<?php
if ($extra_title != '') {
?>
<h3 class="portfolio_extra_title">
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:small_image_extra_info.php
示例5: widget
function widget( $args, $instance ) {
extract( $args );
/* User-selected settings. */
if ( ! isset( $instance['title'] ) )
{
$instance['title'] = '';
}
$title = apply_filters( 'widget_title', $instance['title'] );
$author = get_the_author_link();
$items = isset( $instance['items'] ) ? $instance['items'] : '';
$more_text = isset( $instance['more_text'] ) ? $instance['more_text'] : '';
$show_thumb = isset( $instance['show_thumb'] ) ? $instance['show_thumb'] : 'yes';
$excerpt_length = isset( $instance['excerpt_length'] ) ? $instance['excerpt_length'] : 10;
$date = isset( $instance['date_excerpt'] ) ? $instance['date_excerpt'] : 'no';
$show_comments = isset( $instance ['show_comments'] ) ? $instance['show_comments'] : 'no';
$show_author = isset( $instance ['show_author'] ) && ! empty( $author ) ? $instance['show_author'] : 'no';
$show_excerpt = isset( $instance ['show_excerpt'] ) ? $instance['show_excerpt'] : 'no';
$show_compact = isset( $instance ['show_compact'] ) ? $instance['show_compact'] : 'yes';
echo $before_widget;
if ( $title ) echo $before_title . $title . $after_title;
$args = array(
'posts_per_page' => $items,
'orderby' => 'date',
'ignore_sticky_posts' => 1
);
$args['order'] = 'DESC';
$excluded_cats = yit_get_excluded_categories( 2 );
if ( ! empty( $excluded_cats ) ) {
$args['cat'] = $excluded_cats;
}
$myposts = new WP_Query( $args );
$html = "\n";
if( 'yes' == $show_compact ){
$html .= '<div class="recent-post group compact">' . "\n";
}else{
$html .= '<div class="recent-post group">' . "\n";
}
if ( $myposts->have_posts() ) :
while ( $myposts->have_posts() ) : $myposts->the_post();
$wrapper_class = '';
if( 'yes' == $show_thumb && has_post_thumbnail() ){
$wrapper_class .= ' with-thumb';
}else{
$wrapper_class .= ' without-thumb';
}
if( 'yes' == $date ){
$wrapper_class .= ' with-date';
}else {
$wrapper_class .= ' without-date';
}
$img = '';
if ( has_post_thumbnail() && $show_compact == "no" ) {
$img = yit_image( "size=blog_section", false );
}
elseif ( has_post_thumbnail() && $show_compact == "yes" ){
$img = yit_image( "size=blog_widget_compact", false );
}
$html .= '<div class="hentry-post group clearfix">' . "\n";
$html .= '<div class="post-content">';
if ( $date == "yes" ) {
$html .= '<p class="post-date">';
$html .= '<span class="day">' . get_the_time( 'd' ) . '</span>';
$html .= '<span class="month">' . get_the_time( 'M' ) . '</span>';
$html .= '</p>';
}
if ( $show_thumb == 'yes' && $img != '' ) {
$html .= "<div class=\"thumb-img\">" . $img . "</div>\n";
}
$html .= '<div class="clearfix text ' . $wrapper_class . '">';
if ( strpos( $more_text, "href='#'" ) ) {
$post_readmore = str_replace( "href='#'", "href='" . get_permalink() . "'", str_replace( '"', "'", do_shortcode( $more_text ) ) );
}
else {
$post_readmore = $more_text;
//.........这里部分代码省略.........
开发者ID:jabue,项目名称:wordpress,代码行数:101,代码来源:YIT_Recent_Posts.php
示例6: YIT_Icon
echo $delay;
?>
>
<?php
echo $a_before;
echo '<div class="box-icon">';
if ($icon_type == 'theme-icon') {
$icon_data = YIT_Icon()->get_icon_data($icon_theme);
$margin_left = $circle_size != 0 && $layout == 'horizontal' ? $circle_size + 30 : $margin_left;
echo '<span class="icon-circle" style="border-width:' . $border_size . 'px;width:' . $circle_size . 'px; height:' . $circle_size . 'px;border-color: ' . $color_circle . ';">';
$color = $color == '' ? '' : 'color:' . $color;
$icon_size = $icon_size == '' ? '14' : $icon_size;
echo '<span class="icon"><i ' . $icon_data . '" style="' . $color . '; font-size:' . $icon_size . 'px"></i></span>';
echo '</span>';
} elseif (strcmp($icon_custom, '') != 0) {
$image = yit_image("echo=no&src=" . $icon_custom . "&getimagesize=1");
echo '<span class="icon">' . $image . '</span>';
}
echo '</div><div class="box-content" style="margin-left:' . $margin_left . 'px">';
if ($title != '') {
echo '<' . $title_size . '>' . $title . '</' . $title_size . '>';
}
echo $a_after;
?>
<?php
echo wpautop(do_shortcode($content));
?>
<?php
echo '</div>';
?>
</div>
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:31,代码来源:box_section.php
示例7: foreach
echo $desc;
?>
</span>
<ul id="<?php
echo $id;
?>
-extra-images" class="slides-wrapper extra-images ui-sortable clearfix" style="">
<?php
if (!empty($value)) {
foreach ($value as $image_id) {
?>
<li>
<a href="#">
<?php
if (function_exists('yit_image')) {
yit_image("id={$image_id}&size=admin-post-type-thumbnails");
} else {
echo wp_get_attachment_image($image_id, array(80, 80));
}
?>
<input type="hidden" name="<?php
echo $name;
?>
[]" value="<?php
echo esc_attr($image_id);
?>
" />
</a>
<a href="#" title="<?php
_e('Delete image', 'yith-plugin-fw');
?>
开发者ID:Sibzsolutions,项目名称:Schiffrinpa,代码行数:31,代码来源:images.php
示例8: foreach
<ul class="slides">
<?php foreach ( $extra_images as $image_id ) : ?>
<li><?php yit_image( "id=$image_id" );//echo wp_get_attachment_image( $image_id, 'full' ); ?></li>
<?php endforeach; ?>
</ul>
</div>
<script type="text/javascript">
jQuery(document).ready(function($){
$('.extra-images-slider').flexslider({
controlNav: false
});
});
</script>
<?php else: ?>
<?php yit_image( "id=$image_id" );//echo wp_get_attachment_image( $image_id, 'full' ); ?>
<?php endif ?>
<?php endif ?>
</div>
<div class="work-description span8" style="float: <?php echo $image_position ?>">
<h1><?php yit_work_the( 'title' ) ?></h1>
<?php yit_work_the('content'); ?>
</div>
<?php if( ($skills && $skills_label) || $year || $customer || $terms_plain ): ?>
<div class="work-skillsdate span4">
<h4><?php echo yit_work_get('project-label'); ?></h4>
<?php if( ! empty( $skills ) && ! empty( $skills_label ) ): ?><p class="categories paragraph-links"><span class="meta-label"><?php echo $skills_label ?>:</span> <?php echo $skills ?></p><?php endif ?>
<?php if( ! empty( $customer ) ): ?><p class="customer"><span class="meta-label"><?php echo _e('Customer', 'yit') ?>:</span> <?php echo $customer; ?></p><?php endif ?>
<?php if( ! empty( $terms_plain ) ): ?><p class="categories"><span class="meta-label"><?php echo _e('Categories', 'yit') ?>:</span> <?php echo $terms_plain; ?></p><?php endif ?>
开发者ID:simonsays88,项目名称:costa,代码行数:31,代码来源:markup.php
示例9: while
$html .= "\n";
$html .= '<div class="recent-post group">' . "\n";
while ($myposts->have_posts()) {
$myposts->the_post();
$html .= '<div class="hentry-post group">' . "\n";
// Show Date
if ($date == 'yes') {
$html .= '<p class="post-date">';
$html .= '<span class="day">' . get_the_time('d') . '</span>';
$html .= '<span class="month">' . get_the_time('M') . '</span>';
$html .= '</p>';
}
// Show Post Thumbnail
if ($showthumb == 'yes') {
if (has_post_thumbnail()) {
$html .= '<div class="thumb-img">' . yit_image("size=blog_thumb&alt=blog_thumb", false) . '</div>' . "\n";
} else {
$html .= '<div class="thumb-img"><img src="' . get_template_directory_uri() . '/images/no_image_recentposts.jpg" alt="No Image" /></div>';
}
$html .= '<div class="text">';
} else {
$html .= '<div class="text without-thumbnail">';
}
// Post Title
$html .= the_title('<a href="' . get_permalink() . '" title="' . get_the_title() . '" class="title">', '</a>', false);
// The Post Content
$html .= '' . yit_content('excerpt', $excerpt_length, $readmore) . '';
/*
if( strpos( $readmore, "href='#'" ) )
$post_readmore = str_replace( "href='#'", "href='" . get_permalink() . "'", $readmore );
else
开发者ID:jayeshnair,项目名称:ctp,代码行数:31,代码来源:recentpost.php
示例10: jQuery
?>
</ul>
</div>
<script type="text/javascript">
jQuery(document).ready(function($){
$('.extra-images-slider').flexslider({
controlNav: false
});
});
</script>
<?php
} else {
?>
<?php
yit_image("id={$image_id}");
//echo wp_get_attachment_image( $image_id, 'full' );
?>
<?php
}
?>
<?php
}
?>
</div>
<div class="work-description span8" style="float: <?php
echo $image_position;
?>
">
<h1><?php
开发者ID:zgomotos,项目名称:Bazar,代码行数:31,代码来源:markup.php
示例11: yit_portfolio_next_page
/**
* Print Next page div
*
* @return void
* @since 2.0.0
* @author Antonio La Rocca <[email protected]>
*/
function yit_portfolio_next_page()
{
global $post;
if (defined('DOING_AJAX') && DOING_AJAX && isset($_REQUEST['post_id'])) {
$post = get_post(intval($_REQUEST['post_id']));
}
$next_post = get_next_post();
if ($next_post == '' || $next_post == null) {
$args = array('orderby' => 'menu_order', 'order' => 'ASC', 'post_type' => $post->post_type);
$posts = get_posts($args);
if (!empty($posts)) {
$next_post = $posts[0];
}
}
$post = $next_post;
setup_postdata($post);
$layout = "big_image";
$attachments = get_posts(array('post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => get_the_ID(), 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC'));
$image_size = YIT_Registry::get_instance()->image->get_size('portfolio_single_big');
$placeholder_size = YIT_Registry::get_instance()->image->get_size('portfolio_single_big_placeholder');
if (!empty($attachments)) {
$min_height = $image_size['height'];
foreach ($attachments as $key => $attachment) {
$image = yit_image("id={$attachment->ID}&size=portfolio_single_big&output=array&echo=0");
$min_height = $image_size['height'] < $image[2] ? $image_size['height'] : $image[2];
}
}
$placeholder = !has_post_thumbnail() ? 'class="placeholder no-featured" style="height: ' . $placeholder_size['height'] . 'px;"' : 'class="placeholder"';
?>
<div id="next" class='slide-tab next-post hidden-content <?php
echo !has_post_thumbnail() ? "no-thumb" : "";
?>
' data-post_id="<?php
the_ID();
?>
">
<div class='big-image'>
<div <?php
echo $placeholder;
?>
>
<div class="placeholder-container">
<?php
yit_image(array('post_id' => get_the_ID(), 'size' => 'portfolio_single_big_placeholder', 'class' => 'img-responsive', 'crop' => true));
?>
<div class="inner">
<div class="info-overlay">
<div class="read-more-label"><?php
_e('VIEW NEXT PROJECT', 'yit');
?>
</div>
<div class="read-more-title"><?php
the_title();
?>
</div>
</div>
</div>
</div>
</div>
<?php
if (!empty($attachments) && count($attachments) > 1) {
?>
<div class="swiper-container swiper-<?php
the_ID();
?>
" data-postid="<?php
the_ID();
?>
" style="max-height: <?php
echo $min_height;
?>
px;">
<div class="swiper-wrapper">
<?php
foreach ($attachments as $key => $attachment) {
?>
<div class="swiper-slide">
<?php
yit_image("id={$attachment->ID}&size=portfolio_single_big&class=img-responsive");
?>
</div>
<?php
}
?>
</div>
<div class="swiper-pagination pagination-post-<?php
the_ID();
?>
"></div>
<div class="swiper-navigation container">
<div class="swiper-direction left"><i class="fa fa-chevron-left"></i></div>
<div class="swiper-direction right"><i class="fa fa-chevron-right"></i></div>
//.........这里部分代码省略.........
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:101,代码来源:config.php
示例12: esc_url
<?php
/**
* This file belongs to the YIT Plugin Framework.
*
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.gnu.org/licenses/gpl-3.0.txt
*/
/**
* Template file for insert an image
*
* @package Yithemes
* @author Francesco Licandro <[email protected]>
* @since 1.0.0
*/
$src = esc_url($src);
$animate = $animate != '' ? ' yit_animate ' . $animate : '';
if (function_exists('yit_image')) {
yit_image("src={$src}&width={$width}&height={$height}&alt={$alt}&class=" . esc_attr($animate . $vc_css));
} else {
echo '<img src="' . $src . '" width="' . $width . '" height="' . $height . '" alt="' . $alt . '" class="' . esc_attr($animate . $vc_css) . '" >';
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:24,代码来源:img.php
示例13: empty
if (yit_get_option('shop-title-uppercase')) {
$title_class[] = 'upper';
}
$title_class = empty($title_class) ? '' : ' class="' . implode(' ', $title_class) . '"';
yit_detect_span_catalog_image();
//automatically add the classes
if (0 == ($woocommerce_loop['loop'] - 1) % $woocommerce_loop['columns'] || 1 == $woocommerce_loop['columns']) {
$woocommerce_loop['li_class'][] = 'first';
}
if (0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns']) {
$woocommerce_loop['li_class'][] = 'last';
}
if (!is_shop_enabled() || !yit_get_option('shop-view-show-price')) {
remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price');
}
$image = yit_image("size=shop_catalog&output=array");
$height = isset($image[2]) ? $image[2] : 0;
//quick view js
do_action('yit_quick_view_load_static');
?>
<li <?php
post_class($woocommerce_loop['li_class']);
if ($woocommerce_loop['view'] == 'list') {
?>
style="min-height: <?php
echo $height;
?>
px;"<?php
}
?>
>
开发者ID:jayeshnair,项目名称:ctp,代码行数:31,代码来源:content-product.php
示例14: is_singular
global $post;
$blog_type = is_singular( 'post' ) ? 'single_' . $blog_type : $blog_type;
$attachments = get_posts( array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => get_the_ID(),
'post_mime_type'=> 'image',
'orderby' => 'menu_order',
'order' => 'ASC'
)
);
$image_type = yit_size_xl( 'blog_' . $blog_type );
$image_size = YIT_Registry::get_instance()->image->get_size( $image_type );
if ( !empty( $attachments ) ):
?>
<div style="visibility: hidden;" class="masterslider ms-skin-default" data-view="flow" data-width="<?php echo $image_size['width'] ?>" data-height="<?php echo $image_size['height'] ?>" data-postid="<?php the_ID() ?>" id="galleryslider-<?php the_ID() ?>">
<?php foreach ( $attachments as $key => $attachment ) : ?>
<div class="ms-slide">
<?php yit_image( "id=$attachment->ID&size=$image_type&class=img-responsive" ); ?>
</div>
<?php endforeach; ?>
</div>
<?php endif ?>
开发者ID:jabue,项目名称:wordpress,代码行数:30,代码来源:gallery.php
示例15: do_shortcode
<?php
echo do_shortcode(apply_filters('yit-elegant_blog-socials', '[share icon_type="square" title="' . __('Share on', 'yit') . '" socials="facebook, twitter, google, pinterest"]'));
?>
</div>
</div>
<!-- post title -->
<div class="the-content span6">
<div>
<?php
$attachments = get_posts(array('post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => get_the_ID(), 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC'));
if ($attachments) {
$height = 0;
$html = '';
foreach ($attachments as $key => $attachment) {
$image = yit_image("id={$attachment->ID}&size=blog_elegant&output=array");
//wp_get_attachment_image_src( $attachment->ID, 'blog_elegant' );
$html .= $image[0] . PHP_EOL;
$height = $image[2] > $height ? $image[2] : $height;
}
$html = '[images_slider effect="fade" width="0" height="' . $height . '" direction="horizontal" speed="5000"]' . PHP_EOL . $html . '[/images_slider]';
echo do_shortcode($html);
}
if (!is_single()) {
?>
<!-- post content -->
<div class="the-content"><?php
if (is_category() || is_archive() || is_search()) {
if (is_category()) {
if (yit_get_option('posts-categories') == 'excerpt') {
the_excerpt();
开发者ID:zgomotos,项目名称:Bazar,代码行数:31,代码来源:gallery.php
示例16: yit_ajax_portfolio_thumbs
/**
* Return JSON well formatted portfolio work
*
* @param array $work
* @return string
* @since 1.0.0
*/
function yit_ajax_portfolio_thumbs()
{
$work = $_POST['work'];
$type = $_POST['type'];
//thumb
$thumb_output = '';
$lightbox = $_POST['overlay'];
if (isset($work['video_url']) && $work['video_url']) {
list($video_type, $video_id) = explode(':', yit_video_type_by_url($work['video_url']));
if ($video_type == 'youtube') {
$video_url = 'http://www.youtube.com/embed/' . $video_id . '?width=640&height=480&iframe=true';
} else {
if ($video_type == 'vimeo') {
$video_url = 'http://player.vimeo.com/video/' . $video_id;
}
}
$thumb_output = do_shortcode("[{$video_type} video_id=\"{$video_id}\" width=\"100%\" height=\"100%\"]");
} elseif (!empty($work['extra-images'])) {
$thumb_output = '<div class="extra-images-slider"><ul class="slides">';
$thumb_size = $type == 'portfolio' ? 'thumb_medium_portfolio_thumbs' : 'section_portfolio';
array_unshift($work['extra-images'], $work['item_id']);
foreach ($work['extra-images'] as $image_id) {
$thumb_output .= '<li><div class="picture_overlay">';
$thumb_output .= yit_image("id={$image_id}&size={$thumb_size}", false);
//wp_get_attachment_image( $image_id, $thumb_size );
if ($lightbox) {
$thumb = yit_image("id={$image_id}&output=url", false);
$thumb_output .= '<div class="overlay"><div><p>';
$thumb_output .= '<a href="' . $thumb . '" rel="lightbox_thumbs"><img src="' . get_template_directory_uri() . '/images/icons/zoom.png" alt="' . __('Open Lightbox', 'yit') . '" /></a>';
$thumb_output .= '</p></div></div>';
}
$thumb_output .= '</div></li>';
}
$thumb_output .= '</ul></div>';
} else {
$thumb_size = $type == 'portfolio' ? 'thumb_medium_portfolio_thumbs' : 'section_portfolio';
$thumb_output = '<div class="picture_overlay">';
$thumb_output .= yit_image("id={$work['item_id']}&size={$thumb_size}", false);
//wp_get_attachment_image( $work['item_id'], $thumb_size );
if ($lightbox) {
$thumb_output .= '<div class="overlay"><div><p>';
$thumb_output .= '<a href="' . $work['image'] . '" rel="lightbox_thumbs"><img src="' . get_template_directory_uri() . '/images/icons/zoom.png" alt="' . __('Open Lightbox', 'yit') . '" /></a>';
$thumb_output .= '</p></div></div>';
}
$thumb_output .= '</div>';
}
//content
$thumb_content = '';
if ($type != 'portfolio') {
$thumb_content = '<h3 class="title">' . yit_decode_title($work['title']) . '</h3>';
if (isset($work['subtitle']) && $work['subtitle']) {
$thumb_content .= '<h4 class="subtitle">' . yit_decode_title($work['subtitle']) . '</h4>';
}
}
$thumb_content .= yit_clean_text($work['text']);
//meta
$meta_content = '';
$customer = $work['customer'];
$skills = $work['skills'];
$skills_label = empty($work['skills_label']) ? yit_string('<strong>', __('Skills: ', 'yit'), '</strong>', 0) : yit_string('<strong>', $work['skills_label'], '</strong>', 0) . ': ';
$website = $work['website_name'] ? $work['website_name'] : $work['website_url'];
$website_url = $work['website_url'];
$year = $work['year'];
$terms = isset($work['terms']) ? $work['terms'] : '';
$meta_content = '<ul>';
if ($terms) {
$terms_plain = '';
$categories = $work['categories'];
foreach ($terms as $term) {
$terms_plain .= $categories[$term] . ', ';
}
$terms_plain = substr($terms_plain, 0, strlen($terms_plain) - 2);
$icon = '<span><img src="' . YIT_THEME_ASSETS_URL . '/images/categories.png" alt="categories" /></span>';
$meta_content .= '<li class="categories">' . $icon . yit_string('<strong>', __('Categories: ', 'yit'), '</strong>', 0) . $terms_plain . '</li>';
}
if ($customer) {
$icon = '<span><img src="' . YIT_THEME_ASSETS_URL . '/images/customer.png" alt="customer" /></span>';
$meta_content .= '<li class="customer">' . $icon . yit_string('<strong>', __('Customer: ', 'yit'), '</strong>', 0) . $customer;
if ($website_url) {
$meta_content .= ' - <a href="' . $website_url . '">' . $website . '</a>';
}
$meta_content .= '</li>';
}
if ($skills) {
$icon = '<span><img src="' . YIT_THEME_ASSETS_URL . '/images/project.png" alt="skills" /></span>';
$meta_content .= '<li class="skills">' . $icon . $skills_label . $skills . '</li>';
}
if ($year) {
$icon = '<span><img src="' . YIT_THEME_ASSETS_URL . '/images/year.png" alt="year" /></span>';
$meta_content .= '<li class="year">' . $icon . yit_string('<strong>', __('Year: ', 'yit'), '</strong>', 0) . $year . '</li>';
}
echo json_encode(array('thumb' => $thumb_output, 'content' => $thumb_content, 'meta' => $meta_content, 'title' => yit_decode_title($work['title'])));
die;
//.........这里部分代码省略.........
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:101,代码来源:functions-template.php
示例17: esc_url
$website = '<a class="website" href="' . esc_url($siteurl) . '">' . $siteurl . '</a>';
endif;
else:
$website = '<span class="website">' . $label . '</span>';
endif;
$thumb = (get_the_post_thumbnail( null, 'thumb-testimonial' )) ? 'testimonial-thumb' : '';
?>
<article id="post-<?php echo $item_id ?>" class="hentry-post group testimonial-post internal-post">
<div class="post_content group">
<div class="testimonial-page span<?php echo yit_get_sidebar_layout() != 'sidebar-no' ? 9 : 12 ?>">
<div class="testimonial-text-full <?php echo $thumb; ?>">
<blockquote><?php wpautop( the_content() ); ?></blockquote>
<?php if (has_post_thumbnail()) : ?>
<div class="thumbnail">
<?php yit_image( "size=thumb-testimonial" );//echo get_the_post_thumbnail( null, 'thumb-testimonial' ); ?>
</div>
<?php endif; ?>
</div>
<div class="testimonial-name"><?php echo the_title('<p class="name">', '</p>',false) . $website; ?></div>
</div>
</div>
</article>
</div>
</div>
<!-- END CONTENT -->
<?php do_action( 'yit_after_content' ) ?>
<?php do_action( 'yit_before_sidebar' ) ?>
开发者ID:simonsays88,项目名称:costa,代码行数:31,代码来源:testimonial.php
示例18: yit_image
*/
?>
<?php
if ($has_thumbnail) {
?>
<div class="thumbnail span<?php
echo $span;
?>
">
<div class="thumbnail-wrapper span9">
<?php
if ($has_thumbnail) {
yit_image("size=blog_big&alt=blogimage");
}
?>
<div class="blog-meta">
<?php
if (yit_get_option('blog-show-date')) {
?>
<div class="blog-big-image-date">
<span class="day"><?php
echo get_the_date('d');
?>
</span>
<span class="month"><?php
echo get_the_date('M');
?>
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:31,代码来源:standard.php
示例19: is |
请发表评论