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


PHP yit_content函数代码示例

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


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

示例1: widget

 function widget($args, $instance)
 {
     extract($args);
     /* User-selected settings. */
     if (!isset($instance['title'])) {
         $instance['title'] = '';
     }
     if (isset($instance['icon_title']) && $instance['icon_title'] != '') {
         $img_title = '<img class="title-icon" src="' . $instance['icon_title'] . '" />';
     } else {
         $img_title = '';
     }
     $title = apply_filters('widget_title', $instance['title']);
     $test_fx = isset($instance['test_fx']) ? $instance['test_fx'] : 'fade';
     $excerpt_length = isset($instance['excerpt_length']) ? $instance['excerpt_length'] : 55;
     $test_timeout_fx = isset($instance['test_timeout_fx']) ? $instance['test_timeout_fx'] : 5000;
     $test_speed_fx = isset($instance['test_speed_fx']) ? $instance['test_speed_fx'] : 500;
     $test_n_items = isset($instance['test_n_items']) ? $instance['test_n_items'] : 5;
     $size = 32;
     global $post;
     $test_posts = new WP_Query("post_type=testimonial&posts_per_page={$test_n_items}");
     if ($test_posts->have_posts()) {
         echo $before_widget;
         if ($title) {
             echo $before_title . $img_title . $title . $after_title;
         }
         echo '<div class="testimonial-text">';
         echo '<ul class="slides">';
         while ($test_posts->have_posts()) {
             $test_posts->the_post();
             global $more;
             $more = 0;
             echo '<li>';
             echo '<div>';
             // echo '<blockquote>';
             echo yit_content('content', $excerpt_length);
             //echo '</blockquote>';
             $label = get_post_meta(get_the_ID(), '_site-label', true);
             $website = get_post_meta(get_the_ID(), '_site-url', true);
             $website = empty($website) ? '<span class="label-testimonial">' . $label . '</span>' : "<a class='url-testimonial' href=\"" . esc_url($website) . "\">" . (!empty($label) ? $label : $website) . "</a>";
             //the_post_thumbnail( 'thumb-testimonial', array( 'class' => 'thumbnail' ) );
             the_title('<div class="name-testimonial">
                         <a class="name-testimonial" href="' . get_permalink(get_the_ID()) . '">', '</a> </div>');
             echo '<div class="clear"></div>';
             echo '</div>';
             echo '</li>';
         }
         echo '</ul>';
         //echo '<div class="p-testimonial"></div>';
         echo '</div>';
         $easing_attr = '';
         $script = "<script type=\"text/javascript\">\n                jQuery(document).ready(function(\$){\n                    \$('.testimonial-widget ul').css( 'max-height', 'none' );\n\n                    \n                    var animation = \$.browser.msie || \$.browser.opera ? 'fade' : '{$test_fx}';\n                    \$('.testimonial-widget').flexslider({\n                        animation: animation,\n                        slideshowSpeed: {$test_timeout_fx},\n                        animationSpeed: {$test_speed_fx},\n                        selectors: '.slides > li',\n                        directionNav: true,\n                        slideshow: true,\n\n\t\t\t\t        pauseOnAction: false,\n\t\t\t\t        controlNav: false,\n\t\t\t\t        touch: true\n                    });\n                });\n            </script>";
         echo $script;
         echo $after_widget;
     }
     wp_reset_query();
 }
开发者ID:jayeshnair,项目名称:ctp,代码行数:57,代码来源:testimonials.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']);
     $test_fx = isset($instance['test_fx']) ? $instance['test_fx'] : 'fade';
     $excerpt_length = isset($instance['excerpt_length']) ? $instance['excerpt_length'] : 55;
     $test_easing_fx = isset($instance['test_easing_fx']) ? $instance['test_easing_fx'] : false;
     $test_timeout_fx = isset($instance['test_timeout_fx']) ? $instance['test_timeout_fx'] : 5000;
     $test_speed_fx = isset($instance['test_speed_fx']) ? $instance['test_speed_fx'] : 500;
     $test_n_items = isset($instance['test_n_items']) ? $instance['test_n_items'] : 5;
     $size = 32;
     global $post;
     $test_posts = new WP_Query("post_type=testimonial&posts_per_page={$test_n_items}");
     if ($test_posts->have_posts()) {
         echo $before_widget;
         if ($title) {
             echo $before_title . $title . $after_title;
         }
         echo '<div class="testimonial-text">';
         echo '<ul>';
         while ($test_posts->have_posts()) {
             $test_posts->the_post();
             global $more;
             $more = 0;
             echo '<li>';
             echo '<blockquote>';
             echo yit_content('content', $excerpt_length);
             the_title('<div class="name-testimonial"><a class="name-testimonial" href="' . get_permalink(get_the_ID()) . '">', ' </a></div>');
             $label = get_post_meta(get_the_ID(), '_testimonial_label', true);
             $website = get_post_meta(get_the_ID(), '_testimonial_website', true);
             $website = "<a class='url-testimonial' href=\"" . esc_url($website) . "\">" . $label . "</a>";
             if ($label) {
                 echo $website;
             }
             echo '</blockquote>';
             echo '</li>';
         }
         echo '</ul>';
         //echo '<div class="p-testimonial"></div>';
         echo '</div>';
         $easing_attr = '';
         if ($test_easing_fx) {
             $easing_attr = "easing: '{$test_easing_fx}',";
         }
         $script = "<script type=\"text/javascript\">\r\n                jQuery(document).ready(function(\$){\r\n                    \$('.testimonial-widget ul').cycle({\r\n                        fx:'{$test_fx}',\r\n                        {$easing_attr}\r\n                        timeout:{$test_timeout_fx},\r\n                        speed:{$test_speed_fx}, \r\n                        pager:'.p-testimonial',\r\n                        fit: 1,\r\n                        width: '100%'\r\n                    });\r\n                });\r\n            </script>";
         echo $script;
         echo $after_widget;
     }
     wp_reset_query();
 }
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:54,代码来源:testimonials.php

示例3: the_content

</span></p><?php 
                }
                ?>
                </div>
                <?php 
            }
            ?>
            </div>
            
            <div class="the-content">
                <?php 
            if ($show_excerpt == '1' || $show_excerpt == 'yes') {
                if ($show_readmore == '1' || $show_readmore == 'yes') {
                    the_content($readmore_text);
                } else {
                    echo yit_content('content', $excerpt_length);
                }
            }
            ?>
            </div>
        
        </div>
        <div class="clear"></div>
        <?php 
            $i++;
            continue;
        }
        if ($i == 1 && $sticked) {
            yit_string('<h4 class="other-articles">', $other_posts_label, '</h4>');
        }
        if ($i != 0 || !$sticked) {
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:31,代码来源:section-blog.php

示例4: yit_work_the

    ?>
  
        
                            <h4><a href="<?php 
    echo $post_permalink;
    ?>
"><?php 
    yit_work_the('title');
    ?>
</a></h4>
                            
                            <?php 
    if (yit_work_get('enable_excerpt')) {
        ?>
	                            <?php 
        echo yit_content(yit_work_get('content'), yit_work_get('excerpt_length'));
        ?>
                            <?php 
    }
    ?>
                            
                			<?php 
    if (yit_work_get('read_more_text') != '') {
        echo yit_sc_more_link("<a class='read-more' href='{$post_permalink}'>" . yit_work_get('read_more_text') . "</a>", yit_work_get('read_more_text'), $post_permalink);
    }
    ?>
                        </li>       
                        <?php 
    $i++;
}
?>
开发者ID:zgomotos,项目名称:Bazar,代码行数:31,代码来源:markup.php

示例5: yit_image

        }
        // 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
        	$post_readmore = $readmore;
        */
        $html .= '</div>' . "\n";
        $html .= '</div>' . "\n";
    }
    wp_reset_query();
    $html .= '</div>';
}
add_filter('the_content_more_link', 'yit_sc_more_link', 10, 3);
//shortcode in more links
?>
开发者ID:jayeshnair,项目名称:ctp,代码行数:31,代码来源:recentpost.php

示例6: yit_work_the

					<div class="work-description">
						<?php 
            if ($show_title == "1" || $show_title == 'yes') {
                ?>
<h4><a href="<?php 
                echo $post_permalink;
                ?>
"><?php 
                yit_work_the('title');
                ?>
</a></h4><?php 
            }
            ?>
						<?php 
            if ($show_excerpt == "1" || $show_excerpt == 'yes') {
                echo yit_content(yit_work_get('content'), $excerpt_length, '', '[...]');
            }
            ?>
					</div>
				</div>
			<?php 
        }
        ?>
			<?php 
        if ($i == $items) {
            break;
        }
        ?>
			<?php 
    }
    ?>
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:31,代码来源:section-portfolio.php

示例7: widget


//.........这里部分代码省略.........

        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;
    }
开发者ID:jabue,项目名称:wordpress,代码行数:101,代码来源:YIT_Recent_Posts.php

示例8: elseif

    
<?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>
			<div class="clear"></div>
            
		</div>
        <?php
			$about_container = "team-squared-container";			// ID CONTAINER
			$about_cols = $this->shortcode_atts['sqrcols'];			// (default 7 for span12, 5 for span9)
			if($about_cols == "auto") $about_cols = $sidebar_layout != 'sidebar-no' ? '5' : '7';
开发者ID:simonsays88,项目名称:costa,代码行数:30,代码来源:markup.php

示例9: apply_filters

        echo $thumbnail_width + apply_filters('yit_accordion_text_offset', 32);
        ?>
px;">
				<h4><?php 
        if (yit_accordion_item_get('website')) {
            yit_string('<a style="color:inherit" href=' . yit_accordion_item_get('website') . '>', yit_accordion_item_get('subtitle'), '</a>');
        } else {
            yit_accordion_item_the('subtitle');
        }
        ?>
</h4>
				<?php 
        echo yit_content(yit_accordion_item_get('content'), 1000);
        ?>
				<?php 
        echo yit_content(yit_accordion_item_get('social'));
        ?>
			</div>
		</div>
		<div class="clear"></div>
		
	<?php 
    }
    ?>
	</div>
	<div class="clear"></div>
	
	<script>
	jQuery(document).ready(function($){
		
		$('.accordion-title').click(function(){
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:31,代码来源:markup.php

示例10: if

				    <div class="span<?php echo $items_span; ?>">
				    	<div class="circle-services">
					    	<?php if (has_post_thumbnail()):
								//$image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'section_services' );
								$image_id = get_post_thumbnail_id( get_the_ID() );
								$image[0] = yit_image( "id=$image_id&size=section_services&output=url", false );
							else:
								$image[0] = YIT_CORE_ASSETS_URL . '/images/no-featured-175.jpg';
							endif ?>
					        <div class="ch-item <?php if($show_detail_hover == 'yes' || $show_detail_hover == '1'  || $show_title_hover == 'yes' || $show_title_hover == '1'): ?>no-empty<?php endif ?>" style="background-image: url(<?php echo $image[0] ?>);">
					            <div class="ch-info">
					            	<a href="<?php the_permalink() ?>"><img src="<?php echo YIT_IMAGES_URL . '/project_empty.png'; ?>" alt="" width="175" height="175" /></a>								
					                <?php if($show_detail_hover == 'yes' || $show_detail_hover == '1'): ?> 
					                	<p class="related_project"><a href="<?php the_permalink() ?>"><img src="<?php echo YIT_IMAGES_URL . '/icons/project.png'; ?>" alt="project" /></a></p>
					                <?php endif ?>
					                <?php if($show_title_hover == 'yes' || $show_title_hover == '1'): ?>
					                	<p><a href="<?php the_permalink() ?>"><?php the_title() ?></a></p>
					                <?php endif ?>
					            </div>
					        </div>
					    </div>
					    <?php if( $show_title == "1" || $show_title == 'yes' ): ?><h4><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h4><?php endif ?>
						<?php if( $show_excerpt == "1" || $show_excerpt == 'yes' ): ?><?php echo yit_content( 'content', $excerpt_length ) ?><?php endif ?>
				    </div>
				<?php endwhile ?>
			</div>
		</div>
    <?php
	endif;
endif;
wp_reset_query();
开发者ID:simonsays88,项目名称:costa,代码行数:31,代码来源:section-services.php

示例11: wp_get_attachment_image

            ?>
                    <a class="thumb"><?php 
            echo wp_get_attachment_image($image_id, 'thumb_portfolio_fulldesc');
            ?>
</a>
                    <?php 
        }
        ?>
                </div>
			<?php 
    }
    ?>
			
            <div class="work-description">
                <?php 
    echo yit_content(yit_work_get('content'), 1000);
    ?>

				<div class="clear"></div>
                <?php 
    if ($skills || $year || $customer) {
        ?>
                    <div class="work-skillsdate">
                        <?php 
        if (!empty($skills)) {
            ?>
<p class="skills"><span class="label"><?php 
            echo $skills_label;
            ?>
:</span> <?php 
            echo $skills;
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:31,代码来源:markup.php

示例12: while

$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 ($showthumb == 'yes') {
            $html .= "    <div class=\"thumb-img\">{$img}</div>\n";
        }
        $html .= '<div class="text">';
        $html .= the_title('<a href="' . get_permalink() . '" title="' . get_the_title() . '" class="title">', '</a>', false);
        if (strpos($readmore, "href='#'")) {
            $post_readmore = str_replace("href='#'", "href='" . get_permalink() . "'", $readmore);
        } else {
            $post_readmore = $readmore;
        }
        $html .= $date == "yes" ? '<p class="post-date">' . get_the_date() . '</p>' : '' . yit_content('excerpt', $excerpt_length, $post_readmore) . '';
        $html .= '</div>' . "\n";
        $html .= '</div>' . "\n";
    }
}
wp_reset_query();
$html .= '</div>';
add_filter('the_content_more_link', 'yit_sc_more_link', 10, 3);
//shortcode in more links
echo $html;
开发者ID:jayeshnair,项目名称:ctp,代码行数:31,代码来源:recentpost.php

示例13: 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'] : '';
     $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']) ? $instance['show_author'] : 'no';
     $excerpt = '';
     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";
     $html .= '<div class="recent-post group">' . "\n";
     if ($myposts->have_posts()) {
         while ($myposts->have_posts()) {
             $myposts->the_post();
             $img = '';
             if (has_post_thumbnail()) {
                 $img = get_the_post_thumbnail(get_the_ID(), 'blog_thumb');
             } else {
                 $img = '<img src="' . get_template_directory_uri() . '/images/no_image_recentposts.jpg" alt="No Image" />';
             }
             $html .= '<div class="hentry-post group">' . "\n";
             if ($show_thumb == 'yes') {
                 $html .= "    <div class=\"thumb-img\">{$img}</div>\n";
                 $html .= '<div class="text">';
             } else {
                 $html .= '<div class="text without-thumbnail">';
             }
             if (strpos($more_text, "href='#'")) {
                 $post_readmore = str_replace("href='#'", "href='" . get_permalink() . "'", str_replace('"', "'", do_shortcode($more_text)));
             } else {
                 $post_readmore = $more_text;
             }
             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>';
             } else {
                 $excerpt = '' . yit_content('excerpt', $excerpt_length, $post_readmore) . '';
             }
             $html .= the_title('<a href="' . get_permalink() . '" title="' . get_the_title() . '" class="title">', '</a>', false);
             if (isset($excerpt) && $excerpt != '') {
                 $html .= $excerpt;
             }
             if ($show_comments == 'yes') {
                 $html .= '<span class="num-comments">' . get_comments_number() . (get_comments_number() == 1 ? __(' comment', 'yit') : __(' comments', 'yit')) . '</span>';
             }
             if ($show_author == "yes") {
                 $html .= '<span class="author">by ' . '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . get_the_author_link() . '</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:jayeshnair,项目名称:ctp,代码行数:79,代码来源:recent_posts.php

示例14: widget

    function widget( $args, $instance )
    {
        extract( $args );

        /* User-selected settings. */
        if( !isset( $instance['title'] ) )
            $instance['title'] = '';

        $title = apply_filters('widget_title', $instance['title'] );

        $test_fx = isset( $instance['test_fx']) ? $instance['test_fx'] : 'fade';
        $excerpt_length = isset( $instance['excerpt_length']) ? $instance['excerpt_length'] : 55;
        $test_timeout_fx = isset( $instance['test_timeout_fx']) ? $instance['test_timeout_fx'] : 5000;
        $test_speed_fx = isset( $instance['test_speed_fx']) ? $instance['test_speed_fx'] : 500;
        $test_n_items = isset( $instance['test_n_items']) ? $instance['test_n_items'] : 5;
        $size = 32;

        global $post;

        $test_posts = new WP_Query("post_type=testimonial&posts_per_page=$test_n_items");

        if( $test_posts->have_posts() )
        {
            echo '<div class="testimonial-widget-span span3">';
			echo '<div class="border-1 border">';
			echo '<div class="border-2 border">';
			echo $before_widget;

            if ( $title ) echo $before_title . $title . $after_title;

            echo '<div class="testimonial-text">';
                echo '<ul class="slides">';
                while( $test_posts->have_posts() )
                {
                    $test_posts->the_post();
                    global $more;
                    $more = 0;

                    echo '<li>';
                        echo '<div>';
                            echo '<blockquote>';
                            echo yit_content( 'content', $excerpt_length );
                            echo '</blockquote>';

                            $label   = get_post_meta( get_the_ID(), '_site-label', true );
                            $website = get_post_meta( get_the_ID(), '_testimonial_website', true );
                            $website = empty( $website ) ? '<span class="label-testimonial">' . $label . '</span>' : "<a class='url-testimonial' href=\"" . esc_url( $website ) . "\">". ( !empty( $label ) ? $label : $website )  ."</a>";
                            echo '<img width="64" height="62" title="Testimonials" alt="Testimonials" class="thumbnail wp-post-image" src="' . YIT_THEME_ASSETS_URL . '/images/testimonial.png">';
                            the_title( '<div class="name-testimonial"><a class="name-testimonial" href="' . get_permalink( get_the_ID() ) . '">', '</a><p></p>' . $website . '</div>' );

                            echo '<div class="clear"></div>';
                        echo '</div>';

                    echo '</li>';
                }
                echo '</ul>';

                //echo '<div class="p-testimonial"></div>';
            echo '</div>';

            $easing_attr = '';

            $script = "<script type=\"text/javascript\">
                jQuery(document).ready(function($){
                    $('.testimonial-widget ul').css( 'max-height', 'none' );


                    var animation = 'fade';
                    if ( typeof $.browser !== 'undefined' ) {
                        animation = $.browser.msie || $.browser.opera ? 'fade' : '$test_fx';
                    }

                    $('.testimonial-widget').flexslider({
                        animation: animation,
                        slideshowSpeed: $test_timeout_fx,
                        animationSpeed: $test_speed_fx,
                        selectors: '.slides > li',
                        directionNav: true,
                        slideshow: true,

				        pauseOnAction: false,
				        controlNav: false,
				        touch: true
                    });
                });
            </script>";

            echo $script;
            echo $after_widget . '</div></div></div>';

        }

        wp_reset_query();
    }
开发者ID:simonsays88,项目名称:costa,代码行数:94,代码来源:testimonials.php

示例15: get_permalink

    $link = get_permalink();
    $title = get_the_title() == '' ? __('(this post does not have a title)', 'yit') : get_the_title();
    $upper = yit_get_option('blog-title-uppercase') ? ' upper' : '';
    yit_string("<h2 class=\"post-title{$upper}\"><a href=\"{$link}\">", $title, "</a></h2>");
    // CONTROL TO THE SUBTITLE SETTINGS
    $subtitle = yit_get_post_meta(get_the_ID(), '_subtitle');
    if (yit_get_option('list-blog-show-subtitle')) {
        if (isset($subtitle) && $subtitle != '') {
            echo "<div class= \"post-subtitle \">" . $subtitle . "</div>";
        }
    } else {
        // Nothing
    }
    // CONTROL TO THE EXCERPT
    if (yit_get_option('list-blog-show-excerpt')) {
        echo yit_content('excerpt', '40', " " . yit_get_option('blog-read-more-text'), '[...]');
    } else {
        // Nothing
    }
    ?>

        <?php 
    wp_link_pages();
    ?>


        </div>

    </div> <!-- End no-thumb -->

<?php 
开发者ID:jayeshnair,项目名称:ctp,代码行数:31,代码来源:standard.php


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