Exemplo n.º 1
0
 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;
             }
         }
     }
 }
Exemplo n.º 2
0
 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;
 }
		<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 
        }
        ?>
                <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">
Exemplo n.º 5
0
    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;
                }


                

                $html .= the_title( '<h3><a href="' . get_permalink() . '" title="' . get_the_title() . '" class="title">', '</a></h3>', false );

                if ( $show_author == "yes" ) {
                    $html .= '<span class="author">' . __( "by", "yit" ) . ' <a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author_link() . ' </a></span>';
                }


                if ( $show_comments == 'yes' ) {
                    $separator = $show_author == 'yes' ? ' / ' : '';
                    $html .= '<span class="num-comments">' . $separator . ' <a href="' . get_comments_link( get_the_ID() ) . '">' . get_comments_number() . ( get_comments_number() == 1 ? __( ' comment', 'yit' ) : __( ' comments', 'yit' ) ) . '</a></span>';
                }
                
                if ( $show_excerpt == 'yes' ) {
                    $excerpt = '' . yit_content( 'excerpt', $excerpt_length, $post_readmore ) . '';

                    if ( $excerpt != '' ) {
                        $html .= $excerpt;
                    }
                }

                

                $html .= '</div></div>' . "\n";
                $html .= '</div>' . "\n";

            endwhile; 
        endif;

        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;
    }
Exemplo n.º 6
0
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>
Exemplo n.º 7
0
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');
        ?>
Exemplo n.º 8
0
    	                            	<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 ?>
Exemplo n.º 9
0
 $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
Exemplo n.º 10
0
                ?>
    	                                </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 
Exemplo n.º 11
0
    /**
     * Print Next page div
     *
     * @return void
     * @since 2.0.0
     * @author Antonio La Rocca <*****@*****.**>
     */
    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>
                    </div>
                </div>

                <?php 
        } elseif (has_post_thumbnail()) {
            ?>

                <?php 
            yit_image(array('size' => 'portfolio_single_big', 'class' => 'img-responsive'));
            ?>

                <?php 
        }
        ?>
            </div>
            <div class='container'>
                <div class='row'>
                    <?php 
        remove_action('yit_primary', 'yit_start_primary', 5);
        remove_action('yit_primary', 'yit_end_primary', 90);
        remove_action('yit_content_loop', 'yit_content_loop', 10);
        add_action('yit_content_loop', 'yit_portfolio_single_loop');
        do_action('yit_primary');
        add_action('yit_primary', 'yit_end_primary', 90);
        ?>
                </div>
            </div>
        </div>
        <?php 
        if (defined('DOING_AJAX') && DOING_AJAX) {
            die;
        }
    }
Exemplo n.º 12
0
<?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 <*****@*****.**>
 * @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) . '" >';
}
Exemplo n.º 13
0
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 
}
?>
>
Exemplo n.º 14
0
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 ?>
Exemplo n.º 15
0
                    <?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();
 /**
  * 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;
 }
Exemplo n.º 17
0
								$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' ) ?>
Exemplo n.º 18
0
 */
?>

<?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');
        ?>
Exemplo n.º 19
0
$subtitle_size = ( isset( $subtitle_size ) ) ? $subtitle_size : '15';

if ( $image != '' ) {
    $attachment_image_id = yit_plugin_get_attachment_id( $image );
    $attachment_image_info = yit_getimagesize( $image );
}

$animate_data   = ( $animate != '' ) ? 'data-animate="' . $animate . '"' : '';
$animate_data  .= ( $animation_delay != '' ) ? ' data-delay="' . $animation_delay . '"' : '';
$animate        = ( $animate != '' ) ? ' yit_animate' : '';
?>

<?php if ( $image != '' ) : ?>
        <div class="teaser-wrapper <?php echo esc_attr( $animate . $vc_css . ' '. $button_class ) ?>" <?php echo $animate_data ?>>
            <div class="image" >
                <img src="<?php yit_image( "id={$attachment_image_id}&size=teaser_widget&output=url" ) ?>">
                <div class="image_banner_inside" style="height: <?php echo $attachment_image_info[1] ?>px;">
                    <div class="image_banner_text <?php echo $slogan_position ?>">
                        <?php if( $link != '' && $button == '' ) : ?>
                            <a href="<?php echo $link ?>">
                        <?php endif; ?>
                            <p class="title" style="color:<?php echo $title_color ?>;font-size:<?php echo $title_size ?>px"><?php echo $title ?></p>
                            <p class="subtitle" style="color:<?php echo $subtitle_color ?>;font-size:<?php echo $subtitle_size ?>px"><?php echo $subtitle ?></p>
                            <?php if ( $button != '' ): ?>
                                <a href="<?php echo $link ?>" class="btn btn-<?php echo $button_style ?>"><?php echo  $button ?></a>
                            <?php endif ?>
                        <?php if( $link != '' && $button == '' ) : ?>
                            </a>
                        <?php endif; ?>
                    </div>
                </div>
Exemplo n.º 20
0
$custom = get_post_meta($product->id, '_custom_onsale_icon', true);
$regular_price = get_post_meta($product->id, '_regular_price', true);
$regular_price_var = get_post_meta($product->id, '_min_variation_price', true);
$img = '';
// set a preset image
if ($is_active && $is_active != 'no') {
    switch ($preset) {
        case 'onsale':
            $img = get_template_directory_uri() . '/woocommerce/images/bullets/sale.png';
            break;
        case '-50%':
            $img = get_template_directory_uri() . '/woocommerce/images/bullets/50.png';
            break;
        case '-25%':
            $img = get_template_directory_uri() . '/woocommerce/images/bullets/25.png';
            break;
        case '-10%':
            $img = get_template_directory_uri() . '/woocommerce/images/bullets/10.png';
            break;
        case 'custom':
            $img = $custom;
            break;
    }
} elseif ($product->is_on_sale() && (!empty($regular_price) || !empty($regular_price_var))) {
    $img = get_template_directory_uri() . '/woocommerce/images/bullets/sale.png';
}
if (empty($img)) {
    return;
}
yit_image("src={$img}&getimagesize=1&class=onsale&alt=" . __('On sale!', 'yit'));
Exemplo n.º 21
0
//if ( !$is_active || !$product->is_on_sale() ) return; 
       
$img = '';                                                               

// set a preset image 
if ( $is_active && $is_active != 'no' ) {
    switch ( $preset ) {
        case 'onsale' : $img = get_stylesheet_directory_uri() . '/woocommerce/images/bullets/sale.png'; break;
        case '-50%'   : $img = get_stylesheet_directory_uri() . '/woocommerce/images/bullets/50.png'; break;
        case '-25%'   : $img = get_stylesheet_directory_uri() . '/woocommerce/images/bullets/25.png'; break;
        case '-10%'   : $img = get_stylesheet_directory_uri() . '/woocommerce/images/bullets/10.png'; break;
        case 'custom' : $img = $custom; break;        
    }
    
} elseif ( $product->is_on_sale() && ( !empty( $regular_price ) || !empty( $regular_price_var ) ) ) {

    $img = 'sale.png';
    if( function_exists('icl_get_default_language') ){
        if( ICL_LANGUAGE_CODE == icl_get_default_language() )  $img = 'sale.png';
        else $img = icl_get_default_language().'_sale.png';
    }

    $img = get_stylesheet_directory_uri() . '/woocommerce/images/bullets/'.$img;
}

if ( empty( $img ) ) return;


$image = apply_filters('woocommerce_sale_flash', yit_image( "echo=no&src=$img&getimagesize=1&class=onsale&alt=" . __( 'On sale!', 'yit' ) ), $post, $product );

echo $image;
Exemplo n.º 22
0
yit_slider_class($slider_class);
?>
 style="<?php 
echo $width_inline;
?>
">
            <div class="ei-slider-loading"><?php 
_e('Loading', 'yit');
?>
</div>
            <ul class="ei-slider-large">
            
                <?php 
while (yit_have_slide()) {
    global $_wp_additional_image_sizes;
    list($thumbnail, $thumb_width, $thumb_height) = yit_image("id=" . yit_slide_get('item_id') . "&size=thumb-slider-elastic&output=array");
    $thumbs .= "<li><a href=\"#\">" . strip_tags(yit_slide_get('title')) . " - " . strip_tags(yit_slide_get('clean-content')) . "</a><img src=\"{$thumbnail}\" alt=\"" . strip_tags(yit_slide_get('slide_title')) . " - " . strip_tags(yit_slide_get('clean-content')) . "\" /></li>\n";
    ?>
                    
                <li<?php 
    yit_slide_class('slide align-' . yit_slide_get('layout_slide'));
    ?>
>
                    <?php 
    yit_slide_the('featured-content', array('container' => false));
    ?>
 
                    <?php 
    if (yit_slide_get('title') != '' || yit_slide_get('subtitle') != '') {
        ?>
                    <div class="ei-title">
Exemplo n.º 23
0
<?php

/**
 * Product loop sale flash
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $product;
if (!$product->is_in_stock()) {
    return;
}
$is_active = get_post_meta($product->id, '_active_custom_onsale', true);
$preset = get_post_meta($product->id, '_preset_onsale_icon', true);
$img = get_post_meta($product->id, '_custom_onsale_icon', true);
$regular_price = get_post_meta($product->id, '_regular_price', true);
$regular_price_var = get_post_meta($product->id, '_min_variation_price', true);
// set a preset image
if ($is_active == 'yes' && $preset != 'custom') {
    echo '<span class="onsale preset">' . $preset . '</span>';
} elseif ($is_active == 'yes' && !empty($img)) {
    yit_image("src={$img}&getimagesize=1&class=onsale custom");
} elseif ($product->is_on_sale() && (!empty($regular_price) || !empty($regular_price_var))) {
    echo '<span class="onsale">' . yit_get_option('shop-sale-text') . '</span>';
}
Exemplo n.º 24
0
    /**
     * Get the next blog post with an ajax call
     *
     * @return void
     * @since 2.0.0
     * @author Antonio La Rocca <*****@*****.**>
     * @author Andrea Grillo    <*****@*****.**>
     */
    function yit_blog_big_next_post()
    {
        global $post;
        if (is_null($post) || empty($post)) {
            return;
        }
        if (YIT_Request()->is_ajax && isset($_REQUEST['post_id'])) {
            $post = get_post(intval($_REQUEST['post_id']));
        }
        if ((is_singular('post') || YIT_Request()->is_ajax && $post->post_type == 'post') && yit_get_option('blog-single-type') == 'big') {
            $blog_type_options = array('blog_single_type' => yit_get_option('blog-single-type'), 'is_next_post' => true);
            $image_size = YIT_Registry::get_instance()->image->get_size('blog_single_big');
            $next_post = get_previous_post();
            if ($next_post == '' || $next_post == null) {
                $args = array('order' => 'DESC', 'order_by' => 'date');
                $posts = get_posts($args);
                if (!empty($posts)) {
                    $next_post = $posts[0];
                }
            }
            $post = $next_post;
            setup_postdata($post);
            $has_post_thumbnail = has_post_thumbnail();
            $placeholder = !$has_post_thumbnail ? 'class="placeholder no-featured" style="height: ' . $image_size['height'] . 'px;"' : 'class="placeholder" style="max-height: ' . $image_size['height'] . 'px;"';
            ?>
            <div id="next" class='slide-tab next-post hidden-content' data-post_id="<?php 
            the_ID();
            ?>
">
                <div class='big-image'>
                    <div <?php 
            echo $placeholder;
            ?>
>
                        <?php 
            if ($has_post_thumbnail) {
                ?>
                            <?php 
                yit_image(array('post_id' => get_the_ID(), 'size' => 'blog_single_big', 'class' => 'img-responsive'));
                ?>
                        <?php 
            }
            ?>
                        <div class="inner">
                            <div class="info-overlay">
                                <div class="read-more-label"><?php 
            _e('VIEW NEXT POST', 'yit');
            ?>
</div>
                                <div class="read-more-title"><?php 
            the_title();
            ?>
</div>
                            </div>
                        </div>
                    </div>
                    <?php 
            yit_blog_big_post_start('next-post');
            ?>
                </div>
                <div class='container'>
                    <?php 
            remove_action('yit_primary', 'yit_start_primary', 5);
            remove_action('yit_primary', 'yit_end_primary', 90);
            remove_action('yit_content_loop', 'yit_content_loop', 10);
            add_action('yit_content_loop', 'yit_blog_single_loop');
            yit_get_template('primary/loop/single.php', $blog_type_options);
            if (!YIT_Request()->is_ajax) {
                comments_template();
            }
            add_action('yit_primary', 'yit_end_primary', 90);
            ?>
                </div>
            </div>
            <?php 
            if (defined('DOING_AJAX') && DOING_AJAX) {
                die;
            }
        }
    }
Exemplo n.º 25
0
        $class = $video_url ? 'video' : 'img';
    } elseif ($lightbox) {
        $class = $video_url ? 'video' : 'img';
    } elseif ($details) {
        $class = 'project';
    } elseif ($title) {
        $class = 'onlytitle';
    }
    ?>
        
                            <?php 
    if (!empty($image_url)) {
        ?>
							  	<div class="picture_overlay">
							  		<?php 
        yit_image("id={$image_id}&size=thumb_portfolio_{$columns}cols");
        //echo wp_get_attachment_image( $image_id, "thumb_portfolio_{$columns}cols" );
        ?>
							  	
							  		<?php 
        if ($lightbox || $details || $title) {
            ?>
   
							  		<div class="overlay">
							  			<div>
							  				<?php 
            if ($lightbox || $details) {
                ?>
							  				<p>
												<?php 
                if ($lightbox) {
Exemplo n.º 26
0
        ?>
<a class="no-lightbox" href="<?php 
        echo $post_permalink;
        ?>
" title=""><?php 
    }
    ?>

					<div class="ch-item<?php 
    if ($lightbox || $details || $title) {
        ?>
 ch-item-hover<?php 
    }
    ?>
" style="background: url('<?php 
    yit_image("id={$image_id}&size=thumb_portfolio_4cols&output=url");
    ?>
') no-repeat center;">
						<?php 
    if ($lightbox || $details || $title) {
        ?>
   
						<div class="ch-info">
							<?php 
        if ($lightbox || $details) {
            $title_class = '';
            ?>
							<div class="ch-info-icons<?php 
            echo !yit_work_get('title') ? ' ch-info-icons-no-title' : '';
            ?>
">
Exemplo n.º 27
0
	<?php 
} else {
    ?>

		
		<!-- YITH Magnifier Template -->
		<?php 
    if (has_post_thumbnail()) {
        ?>


			<a itemprop="image" href="<?php 
        yit_image('size=shop_magnifier&output=url');
        ?>
" class="yith_magnifier_zoom" rel="thumbnails"><?php 
        yit_image(array('size' => apply_filters('single_product_large_thumbnail_size', 'shop_single')));
        ?>
</a>
			
		<?php 
    } else {
        ?>

			
			<img src="<?php 
        echo woocommerce_placeholder_img_src();
        ?>
" alt="Placeholder" />
			
		<?php 
    }
Exemplo n.º 28
0
                    </li>
                    
                <?php endwhile ?>
                <div class="clear"></div>
			</ul>
		</div>
	<?php endif ?>
    
<?php elseif ($style == 'squared') : ?>
	<?php if( ! yit_is_accordion_empty() ): ?>
		<div class="team-slider wrapper team-squared margin-top margin-bottom">
        	<div class="row">
            	<ul id="team-squared-container">
					<?php $box_number = 1; while( yit_have_accordion_item() ): ?>	
                    	
                        <?php list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = yit_image( array( 'id' => yit_accordion_item_get('item_id'), 'output' => 'array' ) ); ?>
                        <li class="span3">
                        	<div class="box box<?php echo $box_number; ?>">
                            	<div class="image">
                                	<img src="<?php echo $thumbnail_url ?>" alt="<?php yit_accordion_item_the('title'); ?>" />
                                	<div class="content">
                                		<h6><?php yit_accordion_item_the('title'); ?></h6>
                                        <?php echo yit_content(yit_accordion_item_get('content'), 1000); ?>
                                	</div>
                                </div>
                            </div>			
                        </li>
                        
                    <?php $box_number++; endwhile ?>
				</ul>
            </div>
Exemplo n.º 29
0
thumbnail">
    <!-- post title -->
    <?php 
$link = get_permalink();
if (get_the_title() == '') {
    $title = __('(this post does not have a title)', 'yit');
} else {
    $title = get_the_title();
}
$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 = wp_get_attachment_image_src( $attachment->ID, 'blog_big' );
        $image_url = yit_image("id={$attachment->ID}&size=blog_img&output=url");
        $html .= $image_url . PHP_EOL;
    }
    $html = '[images_slider effect="fade" width="0" height="auto" direction="horizontal" speed="5000"]' . PHP_EOL . $html . '[/images_slider]';
    echo do_shortcode($html);
}
?>
    
    <!-- post meta -->
    <div class="meta group span4">
        <?php 
if (is_single()) {
    yit_string("<h1 class=\"post-title\"><a href=\"{$link}\">", $title, "</a></h1>");
} else {
    yit_string("<h2 class=\"post-title\"><a href=\"{$link}\">", $title, "</a></h2>");
}
Exemplo n.º 30
0
 <?php if( yit_get_option( 'blog-show-date' ) || yit_get_option( 'blog-show-comments' ) ) : ?>
 <div class="date-comments span1">
     <?php if( yit_get_option( 'blog-show-date' ) ) : ?><p class="date"><span class="month"><?php echo get_the_date( 'M' ) ?></span><span class="day"><?php echo get_the_date( 'd' ) ?></span></p><?php endif; ?>
     <?php if( yit_get_option( 'blog-show-comments' ) ) : ?><p class="comments"><i class="<?php echo yit_get_icon( 'blog-comments-icon' ) ?>"></i><span><?php comments_popup_link( '0', '1', '%' ); ?></span></p><?php endif ?>
 </div>
 <?php endif ?>
 
 <!-- post featured & title -->
 <?php
 if( get_post_format() == 'quote' ) :
     yit_get_template( 'blog/small-ribbon/post-formats/quote.php' );  
 else :
 ?>                
 <div class="<?php if ( ! $has_thumbnail ) echo 'without ' ?>thumbnail span4">
     <?php if ( $has_thumbnail ) : ?>        
         <?php yit_image( 'size=blog_small_ribbon&image_scan=' . yit_get_option('blog-show-first-content-image') ); ?>
     <?php endif ?>          
 
     <?php if( get_post_format() != '' ) : ?><span class="post-format <?php echo get_post_format() ?>"><?php _e( ucfirst( get_post_format() ), 'yit' ) ?></span><?php endif ?>
 </div>
 
 <!-- post title -->
 <div class="span<?php echo $span ?>">
     <?php 
     $link = get_permalink();
     
     if( get_the_title() == '' )
         { $title = __( '(this post does not have a title)', 'yit' ); }
     else
         { $title = get_the_title(); }