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

PHP fave_featured_image函数代码示例

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

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



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

示例1: widget

    /**
     * Front-end display of widget
     **/
    public function widget($args, $instance)
    {
        global $before_widget, $after_widget, $before_title, $after_title;
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $items_num = $instance['items_num'];
        $category = $instance['category'];
        $first_big = $instance['first_post'];
        $post_meta = $instance['post_meta'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
            
            <?php 
        /** 
         * Latest Posts
         **/
        if (!empty($category)) {
            $qy_galleries = new WP_Query(array('post_type' => 'gallery', 'tax_query' => array(array('taxonomy' => 'gallery-categories', 'field' => 'term_id', 'terms' => $category)), 'posts_per_page' => $items_num));
        } else {
            $qy_galleries = new WP_Query(array('post_type' => 'gallery', 'posts_per_page' => $items_num));
        }
        ?>
            

			<div class="widget-body">

				<?php 
        $i = 0;
        ?>
				<?php 
        if ($qy_galleries->have_posts()) {
            while ($qy_galleries->have_posts()) {
                $qy_galleries->the_post();
                $i++;
                ?>

					<?php 
                if ($i == 1 && $first_big == 'yes') {
                    ?>

							<div class="latest-post">
									
								<?php 
                    if (has_post_thumbnail()) {
                        ?>
								<div class="featured-image-wrap">
									<a href="<?php 
                        echo esc_url(get_permalink());
                        ?>
">
										<img alt="<?php 
                        the_title();
                        ?>
" class="featured-image" width="370" height="277" src="<?php 
                        echo fave_featured_image(get_the_ID(), 370, 277, true, true, true);
                        ?>
">
									</a>
								</div><!-- slide-image-wrap -->
								<?php 
                    }
                    ?>

								<div class="post">
									<h2 class="post-title module-big-title"><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h2>
									<?php 
                    if ($post_meta != 'no') {
                        ?>
										<ul class="list-inline post-meta hidden-sm hidden-md">
											<?php 
                        get_template_part('inc/widgets', 'meta');
                        ?>
										</ul><!-- .post-meta -->
									<?php 
                    }
                    ?>
								</div>
							
							</div>

					<?php 
                } else {
                    ?>

							<div class="latest-galleries">
								<div class="row">
									<div class="col-lg-6 col-md-6 col-sm-12 col-xs-4">
										<div class="thumb">
//.........这里部分代码省略.........
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:magazilla-latest-galleries.php


示例2: fav_module_7


//.........这里部分代码省略.........
        $style = 'style="' . $bg . ' ' . $padding . '"';
    }
    //do the query
    $the_query = fave_data_source::get_wp_query($atts);
    //by ref  do the query
    ?>
	
	<div class="module module-7 <?php 
    echo esc_attr($columns_class . ' ' . $text_align);
    ?>
 gallery-4" <?php 
    echo $style;
    ?>
>
		<?php 
    if ($hide_title != 'hide_title') {
        ?>
		<div class="row">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div class="module-top clearfix">
					<?php 
        //get the block title
        echo fave_get_block_title($atts);
        //get the sub category filter for this block
        echo fave_get_block_sub_cats($atts);
        ?>
				</div><!-- .module-top -->
			</div><!-- col-lg-12 col-md-12 col-sm-12 col-xs-12 -->
		</div><!-- .row -->
		<?php 
    }
    ?>

		<div class="row <?php 
    if (!empty($module_space)) {
        echo $module_space;
    }
    ?>
">
			<?php 
    while ($the_query->have_posts()) {
        $the_query->the_post();
        ?>
			<div <?php 
        post_class($css_classes);
        ?>
 <?php 
        echo fave_get_item_scope();
        ?>
>
				<div class="thumb big-thumb">
					<a itemprop="url" href="<?php 
        echo esc_url(get_permalink());
        ?>
"></a>
					<div class="thumb-content">
						<h2 itemprop="headline" class="gallery-title-small"><a itemprop="url" href="<?php 
        echo esc_url(get_permalink());
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
						<ul class="list-inline post-meta hidden-xs hidden-sm hidden-md">
							<?php 
        fave_vc_modules_meta($module_meta, $author_name, $time_diff, $post_date, $post_time, $post_view_count, $post_comment_count);
        ?>
						</ul><!-- .post-meta -->
					</div>
					<div class="slide-image-wrap slider-with-animation">
						<?php 
        get_template_part('inc/article', 'icon');
        ?>
						<img itemprop="image" class="featured-image" width="<?php 
        echo $img_width;
        ?>
" height="<?php 
        echo $img_height;
        ?>
" src="<?php 
        echo fave_featured_image(get_the_ID(), $img_width, $img_height, true, true, true);
        ?>
" alt="<?php 
        the_title();
        ?>
">
					</div><!-- slide-image-wrap -->
				</div><!-- thumb -->
			</div><!-- col-lg-4 col-md-4 col-sm-6 col-xs-6 -->				
			<?php 
    }
    ?>
	    </div><!-- row -->
	</div><!-- .module-7 -->

	<?php 
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:module-7.php


示例3: get_template_part

        if (has_post_thumbnail()) {
            ?>
		<div class="featured-image-wrap">
			<?php 
            get_template_part('inc/article', 'icon');
            ?>
			<div class="category-label"><?php 
            get_template_part('inc/post', 'cats');
            ?>
</div>
			<a href="<?php 
            echo esc_url(get_permalink());
            ?>
">
				<img itemprop="image" class="featured-image" src="<?php 
            echo fave_featured_image(get_the_ID(), $img_1_width, $img_1_height, true, true, true);
            ?>
" width="<?php 
            echo $img_1_width;
            ?>
" height="<?php 
            echo $img_1_height;
            ?>
" alt="<?php 
            the_title();
            ?>
">
			</a>
		</div><!-- featured-image-wrap -->
		<?php 
        }
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:31,代码来源:module-e.php


示例4: fav_post_slider


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

			        });

		        } else {
			            banner_slider();
		        }

});
</script>


<?php 
    if ($slider_type == "fullwidth_slider") {
        ?>

<div class="grid-banner banner-slide" <?php 
        echo $style;
        ?>
>
	<!-- owl-carousel-grid-banner-slide -->
	<div id="owl-carousel-grid-banner-slide-<?php 
        echo $unique_key;
        ?>
" class="owl-carousel">

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

			<?php 
            if (has_post_thumbnail()) {
                if ($image_crop == "yes") {
                    $featured_image = fave_featured_image(get_the_ID(), 1470, 650, true, true, true);
                } else {
                    $featured_image = fave_featured_image(get_the_ID(), 1470, 650, false);
                }
            } else {
                $featured_image = 'http://placehold.it/1170x400';
            }
            ?>
			<div <?php 
            post_class('slide');
            ?>
 <?php 
            echo fave_get_item_scope();
            ?>
>
				<div class="row row-no-padding">
					<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
						<div class="left-side">
							<!-- thumb -->
							<div class="thumb">
								<a href="<?php 
            the_permalink();
            ?>
"></a>
								<div class="thumb-content <?php 
            echo esc_attr($slider_text_align);
            ?>
">

									<?php 
            if ($hide_cat != 'no') {
                ?>
										<div class="category-label">
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:67,代码来源:post-slider.php


示例5: fav_gallery_module_2


//.........这里部分代码省略.........
        $padding = "padding:" . $module_padding . ";";
    }
    if (!empty($bg) || !empty($padding)) {
        $style = 'style="' . $bg . ' ' . $padding . '"';
    }
    ?>
	
	<div class="module-8 <?php 
    echo $text_align;
    ?>
 gallery" <?php 
    echo $style;
    ?>
>
		
		<?php 
    if ($hide_title != 'hide_title') {
        ?>
		<div class="row">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div class="module-top clearfix"> <?php 
        echo fave_get_gallery_block_title($atts);
        ?>
 </div><!-- .module-top -->
			</div><!-- col-lg-12 col-md-12 col-sm-12 col-xs-12 -->
		</div><!-- .row -->
		<?php 
    }
    ?>

		<div class="row">
			<div id="favethemes-carousel-<?php 
    echo esc_attr($rnr_id);
    ?>
" class="owl-carousel">
			
				<?php 
    while ($the_query->have_posts()) {
        $the_query->the_post();
        ?>
				<div class="slide">
					<div class="slide-image-wrap slider-with-animation">
						<div class="post-type-icon"><i class="fa fa-video-camera"></i></div>
						<a href="<?php 
        echo esc_url(get_permalink());
        ?>
">
							<img class="featured-image lazyOwl" data-src="<?php 
        echo fave_featured_image(get_the_ID(), $img_width, $img_height, true, true, true);
        ?>
" alt="<?php 
        the_title();
        ?>
" src="<?php 
        echo fave_featured_image(get_the_ID(), $img_width, $img_height, true, true, true);
        ?>
">
						</a>
					</div><!-- slide-image-wrap -->
					
					<h2 class="gallery-title-small <?php 
        echo esc_attr($title_custom_class);
        ?>
"><a href="<?php 
        echo esc_url(get_permalink());
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
					
					<?php 
        if ($hide_meta != 'hide_meta') {
            ?>
					<ul class="list-inline post-meta">
						<?php 
            fave_vc_gallery_modules_meta($module_meta, $author_name, $time_diff, $post_date, $post_time, $post_view_count, $post_comment_count);
            ?>
					</ul><!-- .post-meta -->
					<?php 
        }
        ?>

				</div><!-- slide -->
				<?php 
    }
    wp_reset_postdata();
    ?>
						
			</div><!-- owl-carousel -->

	    </div><!-- row -->

	</div><!-- .module-8 -->

	<?php 
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:gallery-module-2.php


示例6: get_template_part

						<?php 
        if (has_post_thumbnail()) {
            ?>
						<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
							
							<div class="featured-image-wrap">
								<?php 
            get_template_part('inc/article', 'icon');
            ?>
		
								<a href="<?php 
            echo esc_url(get_permalink());
            ?>
">
									<img class="featured-image" src="<?php 
            echo fave_featured_image(get_the_ID(), 720, 539, true, true, true);
            ?>
" alt="<?php 
            the_title();
            ?>
">
								</a>
							</div><!-- featured-image-wrap -->
							
						</div><!-- col-lg-4 col-md-4 col-sm-4 col-xs-4 -->
						<?php 
        }
        ?>

						<?php 
        if (has_post_thumbnail()) {
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:31,代码来源:search.php


示例7: widget

    /**
     * Front-end display of widget
     **/
    public function widget($args, $instance)
    {
        global $before_widget, $after_widget, $before_title, $after_title, $ft_option;
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $items_num = $instance['items_num'];
        $category = $instance['category'];
        $first_big = $instance['first_post'];
        $post_meta = $instance['post_meta'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
            
            <?php 
        $qy_latest = new WP_Query(array('post_type' => 'post', 'cat' => $category, 'posts_per_page' => $items_num, 'ignore_sticky_posts' => 1));
        ?>
            

			<div class="widget-body">

				<?php 
        $i = 0;
        ?>
				<?php 
        if ($qy_latest->have_posts()) {
            while ($qy_latest->have_posts()) {
                $qy_latest->the_post();
                $i++;
                ?>


					<?php 
                if ($i == 1 && $first_big == 'yes') {
                    ?>

							<div class="latest-post">
								
								<?php 
                    if (has_post_thumbnail()) {
                        ?>
								<div class="featured-image-wrap">
									<?php 
                        get_template_part('inc/article', 'icon');
                        ?>
									<?php 
                        if ($ft_option['widget_category'] != 0) {
                            ?>
										<div class="category-label"><?php 
                            get_template_part('inc/post', 'cats');
                            ?>
</div>
									<?php 
                        }
                        ?>
									
									<a href="<?php 
                        echo esc_url(get_permalink());
                        ?>
">
										<img alt="<?php 
                        the_title();
                        ?>
" width="370" height="277" class="featured-image" src="<?php 
                        echo fave_featured_image(get_the_ID(), 370, 277, true, true, true);
                        ?>
">
									</a>
								</div><!-- featured-image-wrap -->
								<?php 
                    }
                    ?>

								<article class="post">
									<h2 class="post-title module-big-title"><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h2>
									<?php 
                    if ($post_meta != 'no') {
                        ?>
										<ul class="list-inline post-meta">
											<?php 
                        get_template_part('inc/widgets', 'meta');
                        ?>
										</ul><!-- .post-meta -->
									<?php 
                    }
                    ?>
									<div class="post-content post-small-content">
										<p><?php 
                    echo fave_clean_excerpt('130', true);
                    ?>
//.........这里部分代码省略.........
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:magazilla-latest-posts.php


示例8: get_template_part

							<div class="featured-image-wrap">
								<?php 
            get_template_part('inc/article', 'icon');
            ?>
								
								<div class="category-label"><?php 
            echo $cats_html;
            ?>
</div>
								
								<a href="<?php 
            echo esc_url(get_permalink());
            ?>
">
									<img class="featured-image" src="<?php 
            echo fave_featured_image(get_the_ID(), 770, 400, true, true, true);
            ?>
" alt="<?php 
            the_title();
            ?>
"> 
								</a>
							</div><!-- featured-image-wrap -->
							<?php 
        }
        ?>

							<article class="post">
								<h2 class="post-title module-big-title"><a href="<?php 
        echo esc_url(get_permalink());
        ?>
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:31,代码来源:index.php


示例9: widget

    /**
     * Front-end display of widget
     **/
    public function widget($args, $instance)
    {
        global $before_widget, $after_widget, $before_title, $after_title;
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $items_num = $instance['items_num'];
        $category = $instance['category'];
        $post_meta = $instance['post_meta'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
            
            <?php 
        /** 
         * Latest Posts
         **/
        global $post;
        //init the array
        $wp_query_args = array('ignore_sticky_posts' => 1);
        if (!empty($category)) {
            $wp_query_args['cat'] = $category;
        }
        $wp_query_args['meta_key'] = 'fave_final_score';
        $wp_query_args['orderby'] = 'meta_value_num';
        $wp_query_args['order'] = 'DESC';
        $wp_query_args['posts_per_page'] = $items_num;
        $qy_latest = new WP_Query($wp_query_args);
        ?>
            

			<div class="widget-body">

				<?php 
        $i = 0;
        ?>
				<?php 
        if ($qy_latest->have_posts()) {
            while ($qy_latest->have_posts()) {
                $qy_latest->the_post();
                $fave_score_display_type = get_post_meta(get_the_ID(), 'fave_score_display_type', true);
                $fave_final_score = get_post_meta(get_the_ID(), 'fave_final_score', true);
                $fave_final_score_override = get_post_meta(get_the_ID(), 'fave_final_score_override', true);
                /*if( !empty( $fave_final_score_override ) ) {
                			$fave_final_score = $fave_final_score_override;
                		}*/
                $fave_review_final_score = intval($fave_final_score);
                if ($fave_score_display_type == 'percentage') {
                    $fave_score_output = $fave_review_final_score . '%';
                }
                if ($fave_score_display_type == 'points') {
                    $fave_score_output = $fave_review_final_score / 10;
                }
                ?>


					<div class="latest-review">
						<div class="row">
							<div class="col-xs-4 col-sm-12 col-md-4 col-lg-4">
								<?php 
                if (has_post_thumbnail()) {
                    ?>
								<div class="featured-image-wrap">
									<a href="<?php 
                    the_permalink();
                    ?>
">
										<div class="score-label"><?php 
                    echo $fave_score_output;
                    ?>
</div>
										<img alt="<?php 
                    the_title();
                    ?>
" class="featured-image" width="175" height="175" src="<?php 
                    echo fave_featured_image(get_the_ID(), 175, 175, true, true, true);
                    ?>
">
									</a>
								</div>
								<?php 
                }
                ?>
							</div>
							<div class="col-xs-8 col-sm-12 col-md-8 col-lg-8 no-padding-left">
								<h2 class="post-title module-small-title">
									<a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a>
								</h2>
								<?php 
                if ($post_meta != 'no') {
//.........这里部分代码省略.........
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:magazilla-latest-reviews.php


示例10: widget


//.........这里部分代码省略.........
            ?>
" id="fave_tab1">
							
							<?php 
            if ($qy_popular->have_posts()) {
                while ($qy_popular->have_posts()) {
                    $qy_popular->the_post();
                    ?>
							
							<div class="latest-post">
								<div class="row">
									<div class="col-xs-4 col-sm-12 col-md-4 col-lg-4">
										
										<?php 
                    if (has_post_thumbnail()) {
                        ?>
										<div class="featured-image-wrap">

											<?php 
                        if ($ft_option['widget_category'] != 0) {
                            ?>
											<div class="category-label"><?php 
                            get_template_part('inc/post', 'cats');
                            ?>
</div>
											<?php 
                        }
                        ?>
											<a href="<?php 
                        echo esc_url(get_permalink());
                        ?>
">
												<img class="featured-image" width="175" height="175" src="<?php 
                        echo fave_featured_image(get_the_ID(), 175, 175, true, true, true);
                        ?>
"  alt="<?php 
                        the_title();
                        ?>
">
											</a>
										</div>
										<?php 
                    }
                    ?>

									</div>
									<div class="col-xs-8 col-sm-12 col-md-8 col-lg-8 no-padding-left">
										<h2 class="post-title module-small-title">
											<a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a>
										</h2>
										<?php 
                    if ($post_meta != 'no') {
                        ?>
											<ul class="list-inline post-meta">
												<?php 
                        get_template_part('inc/widgets', 'meta');
                        ?>
											</ul><!-- .post-meta -->
										<?php 
                    }
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:67,代码来源:magazilla-tabs.php


示例11: fav_module_6

function fav_module_6($atts, $content = null)
{
    extract(shortcode_atts(array('category_id' => '', 'category_ids' => '', 'tag_slug' => '', 'sort' => '', 'autors_id' => '', 'posts_limit' => '', 'offset' => '', 'header_color' => '', 'header_text_color' => '', 'header_border_color' => '', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'title_style' => '', 'show_child_cat' => '', 'excerpt_limit' => '', 'image_size' => '', 'read_more' => '', 'module_meta' => '', 'author_name' => '', 'time_diff' => '', 'post_date' => '', 'post_time' => '', 'post_view_count' => '', 'post_comment_count' => '', 'module_bg' => '', 'module_padding' => ''), $atts));
    ob_start();
    //do the query
    $the_query = fave_data_source::get_wp_query($atts);
    //by ref  do the query
    if ($image_size == '570_427') {
        $img_width = '570';
        $img_height = '427';
    } else {
        $img_width = '370';
        $img_height = '277';
    }
    $style = $bg = $padding = '';
    if (!empty($module_bg)) {
        $bg = "background-color:" . $module_bg . ";";
    }
    if (!empty($module_padding)) {
        $padding = "padding:" . $module_padding . ";";
    }
    if (!empty($bg) || !empty($padding)) {
        $style = 'style="' . $bg . ' ' . $padding . '"';
    }
    ?>
	

	<div class="module-6 module" <?php 
    echo $style;
    ?>
>
		
		<?php 
    if ($hide_title != 'hide_title') {
        ?>
		<div class="row">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div class="module-top clearfix">
					
					<?php 
        //get the block title
        echo fave_get_block_title($atts);
        //get the sub category filter for this block
        echo fave_get_block_sub_cats($atts);
        ?>

				</div><!-- .module-top -->
			</div><!-- col-lg-12 col-md-12 col-sm-12 col-xs-12 -->
		</div><!-- .row -->
		<?php 
    }
    ?>

			
		<?php 
    while ($the_query->have_posts()) {
        $the_query->the_post();
        $categories = get_the_category(get_the_ID());
        $cats_html = '';
        if ($categories) {
            foreach ($categories as $category) {
                $cat_id = $category->cat_ID;
                $cat_link = get_category_link($cat_id);
                $cats_html .= '<a class="cat-color-' . $cat_id . '" href="' . esc_url($cat_link) . '">' . esc_html($category->name) . '</a>';
            }
        }
        ?>
			
			
			<div <?php 
        post_class('row');
        ?>
 <?php 
        echo fave_get_item_scope();
        ?>
>
				
				<?php 
        if (has_post_thumbnail()) {
            ?>
				<div class="col-lg-6 col-md-6 col-sm-5 col-xs-5">
					<div class="featured-image-wrap">
						<?php 
            get_template_part('inc/article', 'icon');
            ?>
						
						<a href="<?php 
            echo esc_url(get_permalink());
            ?>
">
							<img itemprop="image" class="featured-image" width="<?php 
            echo $img_width;
            ?>
" height="<?php 
            echo $img_height;
            ?>
" src="<?php 
            echo fave_featured_image(get_the_ID(), $img_width, $img_height, true, true, true);
            ?>
" alt="<?php 
//.........这里部分代码省略.........
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:module-6.php


示例12: fav_video_gallery


//.........这里部分代码省略.........
        ?>
" frameborder="0" allowfullscreen></iframe>

						<?php 
        if ($i == 1) {
            break;
        }
        ?>

						<?php 
    }
    ?>

					</div>
				</div>
			</div>
			<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
				<div class="playlist-holder scroll-pane scroll-pane-<?php 
    echo esc_attr($unique_key);
    ?>
">

					<?php 
    $i = 0;
    ?>
					<?php 
    while ($the_query->have_posts()) {
        $the_query->the_post();
        $i++;
        $video_channel = get_post_meta(get_the_ID(), 'fave_video_channel', true);
        $video_id = get_post_meta(get_the_ID(), 'fave_video_id', true);
        $video_duration = get_post_meta(get_the_ID(), 'fave_video_duration', true);
        if ($video_channel == 'vimeo') {
            $video_link = "https://player.vimeo.com/video/" . esc_attr($video_id) . "?color=ffcc3a";
        } elseif ($video_channel == 'youtube') {
            $video_link = "https://www.youtube.com/embed/" . esc_attr($video_id) . "";
        } else {
            $video_link = "";
        }
        ?>

					<div class="playlist-video favethemes-video-<?php 
        echo esc_attr($unique_key);
        ?>
 <?php 
        if ($i == 1) {
            echo "selected";
        }
        ?>
">
						<a href="<?php 
        echo esc_url($video_link);
        ?>
">
							<div class="media">
								<div class="media-left">
									<img class="media-object" src="<?php 
        echo fave_featured_image(get_the_ID(), 160, 90, true, true, true);
        ?>
" alt="<?php 
        the_title();
        ?>
" alt="<?php 
        the_title();
        ?>
">
								</div>
								<div class="media-body">
									<div class="media-heading"><?php 
        the_title();
        ?>
</div>
									<?php 
        if (!empty($video_duration)) {
            ?>
									<i class="fa fa-clock-o"></i> <?php 
            echo esc_attr($video_duration);
            ?>
									<?php 
        }
        ?>
								</div>
							</div>
						</a>
					</div><!-- playlist-video -->

					<?php 
    }
    ?>

				</div>
			</div>
		</div>
	</div>
</div>
	<?php 
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:video-gallery.php


示例13: fav_grids

function fav_grids($atts, $content = null)
{
    extract(shortcode_atts(array('grid_type' => '', 'post_from' => '', 'category_id' => '', 'category_ids' => '', 'hide_meta' => '', 'hide_cat' => '', 'sort' => '', 'posts_limit' => '', 'module_meta' => '', 'author_name' => '', 'time_diff' => '', 'post_date' => '', 'post_time' => '', 'post_view_count' => '', 'post_comment_count' => '', 'module_bg' => '', 'module_padding' => ''), $atts));
    ob_start();
    $style = $bg = $padding = '';
    if (!empty($module_bg)) {
        $bg = "background-color:" . $module_bg . ";";
    }
    if (!empty($module_padding)) {
        $padding = "padding:" . $module_padding . ";";
    }
    if (!empty($bg) || !empty($padding)) {
        $style = 'style="' . $bg . ' ' . $padding . '"';
    }
    //do the query
    $wp_query_args = array('ignore_sticky_posts' => 1);
    if ($post_from == "category_posts") {
        if (!empty($category_id) and empty($category_ids)) {
            $category_ids = $category_id;
        }
        if (!empty($category_ids)) {
            $wp_query_args['cat'] = $category_ids;
        }
    }
    if ($post_from == "featured") {
        $wp_query_args['meta_key'] = 'fave_featured';
        $wp_query_args['meta_value'] = '1';
    }
    $current_day = date('j');
    switch ($sort) {
        case 'popular':
            $wp_query_args['meta_key'] = 'fave-post_views';
            $wp_query_args['orderby'] = 'meta_value_num';
            $wp_query_args['order'] = 'DESC';
            break;
        case 'review_high':
            $wp_query_args['meta_key'] = '';
            //td_review::$td_review_key;
            $wp_query_args['orderby'] = 'meta_value_num';
            $wp_query_args['order'] = 'DESC';
            break;
        case 'random_posts':
            $wp_query_args['orderby'] = 'rand';
            break;
        case 'alphabetical_order':
            $wp_query_args['orderby'] = 'title';
            $wp_query_args['order'] = 'ASC';
            break;
        case 'comment_count':
            $wp_query_args['orderby'] = 'comment_count';
            $wp_query_args['order'] = 'DESC';
            break;
        case 'random_today':
            $wp_query_args['orderby'] = 'rand';
            $wp_query_args['year'] = date('Y');
            $wp_query_args['monthnum'] = date('n');
            $wp_query_args['day'] = date('j');
            break;
        case 'random_7_day':
            $wp_query_args['orderby'] = 'rand';
            $wp_query_args['date_query'] = array('column' => 'post_date_gmt', 'after' => '1 week ago');
            break;
    }
    //custom pagination limit
    if (empty($posts_limit)) {
        $posts_limit = get_option('posts_per_page');
    }
    $wp_query_args['posts_per_page'] = $posts_limit;
    $the_query = new WP_Query($wp_query_args);
    ?>

       

<?php 
    if ($grid_type == "grid_1") {
        ?>

<div class="grid-banner magzilla-grid-1" <?php 
        echo $style;
        ?>
>
		
		<div class="row row-no-padding">

		<?php 
        $i = 0;
        ?>
		<?php 
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $i++;
            if ($i == 1 || $i == 6) {
                $grid_classes = "col-lg-6 col-md-6 col-sm-6 col-xs-12 grid-1-big";
                $img_width = '585';
                $img_height = '285';
                if (has_post_thumbnail()) {
                    $featured_image = fave_featured_image(get_the_ID(), 585, 285, true, true, true);
                } else {
                    $featured_image = 'http://placehold.it/585x284';
                }
//.........这里部分代码省略.........
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:magzilla-grids.php


示例14: start_el

    function start_el(&$output, $object, $depth = 0, $args = array(), $id = 0)
    {
        parent::start_el($output, $object, $depth, $args);
        $fave_menu_type = $object->favemenutype;
        $fave_cat_id = $object->favemegamenu;
        $no_of_posts = $object->nav_no_of_posts;
        $fave_posts = $main_posts = $cat_main = $cat_list = $posts_area = $posts_area_end = NULL;
        $fave_subcategories = get_categories(array('child_of' => $fave_cat_id));
        $sub_cats_array = array();
        foreach ($fave_subcategories as $key => $cat_val) {
            $sub_cats_array[$cat_val->name] = $cat_val->term_id;
        }
        $parant_cat = array($fave_cat_id);
        $merge_cat_ids = array_merge($parant_cat, $sub_cats_array);
        if ($fave_menu_type == 3) {
            if ($fave_cat_id != NULL) {
                $j = 0;
                foreach ($merge_cat_ids as $fave_cat_id) {
                    $fave_posts = '';
                    $j++;
                    if ($j == 1) {
                        $active = 'active in';
                        $no_of_posts = $no_of_posts;
                    } else {
                        $active = '';
                        $no_of_posts = 4;
                    }
                    $fave_args = array('cat' => $fave_cat_id, 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $no_of_posts, 'ignore_sticky_posts' => 1);
                    $fave_qry_latest = $mzine_img = NULL;
                    $fave_qry_latest = new WP_Query($fave_args);
                    $i = 1;
                    $featured_image = '';
                    if ($no_of_posts > 4 || $no_of_posts == '') {
                        $css_classes = 'slide';
                    } else {
                        $css_classes = 'col-xs-3 col-sm-3 col-md-3 col-lg-3';
                    }
                    while ($fave_qry_latest->have_posts()) {
                        $fave_qry_latest->the_post();
                        $menu_categories = get_the_category(get_the_ID());
                        $menu_cats_html = '';
                        if ($menu_categories) {
                            foreach ($menu_categories as $category) {
                                $cat_id = $category->cat_ID;
                                $cat_link = get_category_link($cat_id);
                                $menu_cats_html .= '<a class="cat-color-' . intval($cat_id) . '" href="' . esc_url($cat_link) . '">' . esc_html($category->name) . '</a>';
                            }
                        }
                        if ('gallery' == get_post_format()) {
                            // Gallery
                            $article_icon = '<div class="post-type-icon"><i class="fa fa-picture-o"></i></div>';
                        } elseif ('video' == get_post_format()) {
                            // Video
                            $article_icon = '<div class="post-type-icon"><i class="fa fa-video-camera"></i></div>';
                        } elseif ('audio' == get_post_format()) {
                            // Audio
                            $article_icon = '<div class="post-type-icon"><i class="fa fa-microphone"></i></div>';
                        } elseif ('link' == get_post_format()) {
                            // Link
                            $article_icon = '<div class="post-type-icon"><i class="fa fa-link"></i></div>';
                        } else {
                            $article_icon = '';
                        }
                        $fave_permalink = get_permalink(get_the_ID());
                        if (has_post_thumbnail()) {
                            $thumbnail = fave_featured_image(get_the_ID(), 260, 195, true, true, true);
                            $featured_image = '<div class="featured-image-wrap">
                                ' . $article_icon . '
                                <div class="category-label">' . $menu_cats_html . '</div>
                                <a href="' . $fave_permalink . '">
                                    <img class="featured-image lazyOwl" width="260" height="195" src="' . esc_url($thumbnail) . '" alt="' . get_the_title() . '">
                                </a>
                            </div>';
                        }
                        $fave_posts .= '<div class="' . $css_classes . '">
                                                <div class="menu-post">
                                                    ' . $featured_image . '
                                                    <article class="post">
                                                        <h2 class="post-title module-small-title"><a href="' . esc_url($fave_permalink) . '">' . get_the_title() . '</a></h2>
                                                    </article>
                                                </div>
                                            </div>';
                        $i++;
                    }
                    wp_reset_postdata();
                    if ($no_of_posts > 4 || $no_of_posts == '') {
                        $rnr_id = fave_unique_key();
                        if (is_rtl()) {
                            $magzilla_rtl = 'true';
                        } else {
                            $magzilla_rtl = 'false';
                        }
                        ?>

                        <script>
                        jQuery(document).ready(function($) {

                            $('#owl-carousel-menu-<?php 
                        echo esc_attr($rnr_id);
                        ?>
//.........这里部分代码省略.........
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:menu-walker.php


示例15: fav_gallery_module_1


//.........这里部分代码省略.........
        echo fave_get_gallery_block_sub_cats($atts);
        ?>

				</div><!-- .module-top -->
			</div><!-- col-lg-12 col-md-12 col-sm-12 col-xs-12 -->
		</div><!-- .row -->
		<?php 
    }
    ?>


		<div class="row <?php 
    if (!empty($module_space)) {
        echo esc_attr($module_space);
    }
    ?>
">
			<div class="fave-loop-wrap">
				<div class="fave-post">
				<?php 
    while (have_posts()) {
        the_post();
        ?>
				
					<div class="<?php 
        echo esc_attr($css_classes);
        ?>
">
						<div class="thumb <?php 
        echo esc_attr($image_thumb_size);
        ?>
">
							<a href="<?php 
        echo esc_url(get_permalink());
        ?>
"></a>
							<div class="thumb-content">
								<h2 class="gallery-title-small"><a href="<?php 
        echo esc_url(get_permalink());
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
								<ul class="list-inline post-meta hidden-xs hidden-sm hidden-md">
									<?php 
        fave_vc_gallery_modules_meta($module_meta, $author_name, $time_diff, $post_date, $post_time, $post_view_count, $post_comment_count);
        ?>
								</ul><!-- .post-meta -->
							</div>
							<div class="slide-image-wrap slider-with-animation ">
								<div class="post-type-icon"><i class="fa fa-picture-o"></i></div>								
								<img class="featured-image" width="<?php 
        echo $image_width;
        ?>
" height="<?php 
        echo $image_height;
        ?>
" alt="<?php 
        the_title();
        ?>
" src="<?php 
        echo fave_featured_image(get_the_ID(), $image_width, $image_height, true, true, true);
        ?>
">
							</div><!-- slide-image-wrap -->
							
						</div><!-- thumb -->
					</div><!-- col-lg-4 col-md-4 col-sm-6 col-xs-6 -->
					
				<?php 
    }
    ?>
				</div>
			</div>

	    </div><!-- row -->

	    <?php 
    if (!empty($pagination)) {
        ?>
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
				<?php 
        get_template_part('inc/pagination/' . $pagination);
        ?>
			</div>
		</div>
		<?php 
    }
    ?>

	</div><!-- .module-7 -->

	<?php 
    wp_reset_query();
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
开发者ID:phuthuytinhoc,项目名称:Demo1,代码行数:101,代码来源:gallery-module-1.php


示例16: fav_module_9

该文章已有0人参与评论

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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