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


PHP tie_get_time函数代码示例

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


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

示例1: get_home_recent


//.........这里部分代码省略.........
						<div class="entry">
							<p><?php 
                    tie_excerpt();
                    ?>
							<a class="more-link" href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    _e('Read More &raquo;', 'tie');
                    ?>
</a></p>
						</div>
						<?php 
                }
                ?>
						
						<?php 
                if (tie_get_option('archives_socail')) {
                    get_template_part('includes/post-share');
                }
                // Get Share Button template
                ?>
					</article><!-- .item-list -->
				<?php 
            } else {
                ?>
					<div <?php 
                tie_post_class('recent-item');
                ?>
>
						<?php 
                if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                    ?>
			
							<div class="post-thumbnail">
								<a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
                    ?>
" rel="bookmark">
									<?php 
                    tie_thumb('tie-medium');
                    ?>
									<span class="overlay-icon"></span>
								</a>
							</div><!-- post-thumbnail /-->
						<?php 
                }
                ?>
			
						<h3 class="post-box-title"><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
                ?>
" rel="bookmark"><?php 
                the_title();
                ?>
</a></h3>
						<p class="post-meta">
							<?php 
                if (tie_get_option('box_meta_score')) {
                    tie_get_score();
                }
                ?>
							<?php 
                if (tie_get_option('box_meta_date')) {
                    tie_get_time();
                }
                ?>
						</p>
					</div>
				<?php 
            }
            ?>
				<?php 
        }
        ?>
				<div class="clear"></div>

			<?php 
    }
    ?>
			</div><!-- .cat-box-content /-->
		</section>
		<?php 
    if (!empty($pagination) && $pagination == 'y' && empty($offset) && $cat_query->max_num_pages > 1) {
        ?>
 <div class="recent-box-pagination"><?php 
        tie_pagenavi($cat_query, $Posts);
        ?>
 </div> <?php 
    }
    ?>
		<div class="clear"></div>
<?php 
}
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:101,代码来源:home-recent-box.php

示例2: get_author_posts_url

        echo get_author_posts_url(get_the_author_meta('ID'));
        ?>
" title=""><?php 
        echo get_the_author();
        ?>
 </a></span>
<?php 
    }
    ?>
	
<?php 
    if (tie_get_option('post_date')) {
        ?>
		
	<?php 
        tie_get_time();
    }
    ?>
	
<?php 
    if (tie_get_option('post_cats')) {
        ?>
	<span class="post-cats"><i class="fa fa-folder"></i><?php 
        printf('%1$s', get_the_category_list(', '));
        ?>
</span>
<?php 
    }
    ?>
	
<?php 
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:31,代码来源:meta-post.php

示例3: if

<?php
global $get_meta;
if( ( tie_get_option( 'post_meta' ) && empty( $get_meta["tie_hide_meta"][0] ) ) || $get_meta["tie_hide_meta"][0] == 'no' ): ?>		
<p class="post-meta">
<?php if( tie_get_option( 'post_author' ) ): ?>		
	<span class="post-meta-author"><i class="fa fa-user"></i><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) )?>" title=""><?php echo get_the_author() ?> </a></span>
<?php endif; ?>	
<?php if( tie_get_option( 'post_date' ) ): ?>		
	<?php tie_get_time() ?>
<?php endif; ?>	
<?php if( tie_get_option( 'post_cats' ) ): ?>
	<span class="post-cats"><i class="fa fa-folder"></i><?php printf('%1$s', get_the_category_list( ', ' ) ); ?></span>
<?php endif; ?>	
<?php if( tie_get_option( 'post_comments' ) ): ?>
	<span class="post-comments"><i class="fa fa-comments"></i><?php comments_popup_link( __ti( 'Leave a comment'  ), __ti( '1 Comment' ), __ti( '% Comments' ) ); ?></span>
<?php endif; ?>
<?php if( tie_get_option( 'post_views' ) ):
	$text = __ti( 'Views' );
	echo tie_views( $text ); ?>
<?php endif; ?>
</p>
<div class="clear"></div>
<?php endif; ?>
开发者ID:rebeccayshen,项目名称:kitlist,代码行数:23,代码来源:meta-post.php

示例4: if

<?php

global $get_meta;

?>
<p class="post-meta">
<?php if( !empty( $get_meta[ 'box_meta_score' ][0] ) ) tie_get_score(); ?>
<?php if( !empty( $get_meta[ 'box_meta_author' ][0] ) ): ?>		
	<span class="post-meta-author"><i class="fa fa-user"></i><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) )?>" title=""><?php echo get_the_author() ?> </a></span>
<?php endif; ?>	
<?php if( !empty( $get_meta[ 'box_meta_date' ][0] ) ) tie_get_time() ?>
<?php if( !empty( $get_meta[ 'box_meta_cats' ][0] ) ): ?>
	<span class="post-cats"><i class="fa fa-folder"></i><?php printf('%1$s', get_the_category_list( ', ' ) ); ?></span>
<?php endif; ?>	
<?php if( !empty( $get_meta[ 'box_meta_comments' ][0] ) ): ?>
	<span class="post-comments"><i class="fa fa-comments"></i><?php comments_popup_link( '0' , '1' , '%' ); ?></span>
<?php endif; ?>
<?php if( !empty( $get_meta[ 'box_meta_views' ][0] ) ): ?>
	<?php echo tie_views(); ?>
<?php endif; ?>
</p>
开发者ID:rebeccayshen,项目名称:kitlist,代码行数:21,代码来源:meta-blocks.php

示例5: tie_best_reviews_posts

function tie_best_reviews_posts($posts_number = 5, $thumb = true)
{
    global $post;
    $original_post = $post;
    $args = array('orderby' => 'meta_value_num', 'meta_key' => 'taq_review_score', 'posts_per_page' => $posts_number, 'post_status' => 'publish', 'no_found_rows' => true, 'ignore_sticky_posts' => true);
    $best_views = new WP_Query($args);
    if ($best_views->have_posts()) {
        while ($best_views->have_posts()) {
            $best_views->the_post();
            ?>
<li <?php 
            tie_post_class();
            ?>
>
	<?php 
            if (function_exists("has_post_thumbnail") && has_post_thumbnail() && $thumb) {
                ?>
			
		<div class="post-thumbnail">
			<a href="<?php 
                the_permalink();
                ?>
" rel="bookmark"><?php 
                the_post_thumbnail('tie-small');
                ?>
<span class="fa overlay-icon"></span></a>
		</div><!-- post-thumbnail /-->
	<?php 
            }
            ?>
	<h3><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
	<?php 
            tie_get_score();
            ?>
 <?php 
            tie_get_time();
            ?>
</li>
<?php 
        }
    }
    $post = $original_post;
    wp_reset_query();
}
开发者ID:khanhhoang288,项目名称:anc_shf,代码行数:50,代码来源:theme-functions.php

示例6: get_home_scroll

function get_home_scroll($cat_data)
{
    wp_enqueue_script('tie-cycle');
    $Cat_ID = $cat_data['id'];
    $offset = $Posts_num = $Box_Title = '';
    if (!empty($cat_data['number'])) {
        $Posts_num = $cat_data['number'];
    }
    if (!empty($cat_data['title'])) {
        $Box_Title = $cat_data['title'];
    }
    if (!empty($cat_data['offset'])) {
        $offset = $cat_data['offset'];
    }
    $cat_query = new WP_Query('cat=' . $Cat_ID . '&no_found_rows=1&posts_per_page=' . $Posts_num . '&offset=' . $offset);
    ?>
		<section class="cat-box scroll-box tie-cat-<?php 
    echo $Cat_ID;
    ?>
">
			<h2 class="cat-box-title"><a href="<?php 
    echo get_category_link($Cat_ID);
    ?>
"><?php 
    if (function_exists('icl_t')) {
        echo icl_t(theme_name, $cat_data['boxid'], $Box_Title);
    } else {
        echo $Box_Title;
    }
    ?>
</a></h2>

			<div class="cat-box-content">
				<?php 
    if ($cat_query->have_posts()) {
        ?>
				<div class="group_items-box" id="slideshow<?php 
        echo $Cat_ID;
        ?>
">
				<?php 
        while ($cat_query->have_posts()) {
            $cat_query->the_post();
            ?>
					<div class="scroll-item">
						<?php 
            if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                ?>
			
							<div class="post-thumbnail">
								<a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
                ?>
" rel="bookmark">
									<?php 
                the_post_thumbnail('tie-large');
                ?>
									<?php 
                tie_get_score();
                ?>
								</a>
							</div><!-- post-thumbnail /-->
						<?php 
            } else {
                ?>
						<div class="empty-space"></div>
						<?php 
            }
            ?>

						<h3 class="post-box-title"><a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a></h3>
						<p class="post-meta">
							<?php 
            tie_get_time();
            ?>
						</p>
					</div>
				<?php 
        }
        ?>
				<div class="clear"></div>
				</div>
				<div class="scroll-nav"><a id="next<?php 
        echo $Cat_ID;
        ?>
" href="#"><i class="tieicon-right-open"></i></a><a class="prev-scroll" id="prev<?php 
        echo $Cat_ID;
        ?>
//.........这里部分代码省略.........
开发者ID:sondang86,项目名称:mySite,代码行数:101,代码来源:home-cat-scroll.php

示例7: tie_best_reviews_posts

function tie_best_reviews_posts($pop_posts = 5, $thumb = true)
{
    global $post;
    $orig_post = $post;
    $cat_query1 = new WP_Query(array('posts_per_page' => $pop_posts, 'orderby' => 'meta_value_num', 'meta_key' => 'tie_review_score', 'post_status' => 'publish', 'no_found_rows' => 1));
    while ($cat_query1->have_posts()) {
        $cat_query1->the_post();
        ?>
<li>
	<?php 
        if (function_exists("has_post_thumbnail") && has_post_thumbnail() && $thumb) {
            ?>
			
		<div class="post-thumbnail">
			<a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            printf(__('Permalink to %s', 'tie'), the_title_attribute('echo=0'));
            ?>
" rel="bookmark"><?php 
            the_post_thumbnail('tie-small');
            ?>
</a>
		</div><!-- post-thumbnail /-->
	<?php 
        }
        ?>
	<h3><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
	<?php 
        tie_get_score();
        ?>
 <span class="date"><?php 
        tie_get_time();
        ?>
</span>
</li>
<?php 
    }
    $post = $orig_post;
}
开发者ID:sondang86,项目名称:mySite,代码行数:47,代码来源:theme-functions.php

示例8: end_el

    /**
     * Ends the element output, if needed.
     */
    public function end_el(&$output, $item, $depth = 0, $args = array())
    {
        //By TieLabs ===========
        if ($depth === 0 && !empty($this->tie_megamenu_type) && $this->tie_megamenu_type != 'disable') {
            global $post;
            $output .= "\n<div class=\"mega-menu-content\">\n";
            //Sub Categories ===============================================================
            if ($this->tie_megamenu_type == 'sub-posts' && $item->object == 'category') {
                $no_sub_categories = $sub_categories_exists = $sub_categories = '';
                $query_args = array('child_of' => $item->object_id);
                $sub_categories = get_categories($query_args);
                //Check if the Category doesn't contain any sub categories.
                if (count($sub_categories) == 0) {
                    $sub_categories = array($item->object_id);
                    $no_sub_categories = true;
                } else {
                    $sub_categories_exists = ' mega-cat-sub-exists';
                }
                $output .= '<div class="mega-cat-wrapper"> ';
                if (!$no_sub_categories) {
                    $output .= '<ul class="mega-cat-sub-categories"> ';
                    foreach ($sub_categories as $category) {
                        $output .= '<li><a href="#mega-cat-' . $item->ID . '-' . $category->term_id . '">' . $category->name . '</a></li>';
                    }
                    $output .= '</ul> ';
                }
                $output .= ' <div class="mega-cat-content' . $sub_categories_exists . '">';
                foreach ($sub_categories as $category) {
                    if (!$no_sub_categories) {
                        $cat_id = $category->term_id;
                    } else {
                        $cat_id = $category;
                    }
                    $output .= '<div id="mega-cat-' . $item->ID . '-' . $cat_id . '" class="mega-cat-content-tab">';
                    $original_post = $post;
                    $args = array('posts_per_page' => 4, 'cat' => $cat_id, 'no_found_rows' => true, 'ignore_sticky_posts' => true);
                    $cat_query = new WP_Query($args);
                    while ($cat_query->have_posts()) {
                        $cat_query->the_post();
                        $img_classes = tie_get_post_class('post-thumbnail');
                        $post_time = tie_get_time(true);
                        $output .= '<div class="mega-menu-post">';
                        if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                            $output .= '<div ' . $img_classes . '><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '"><img src="' . tie_thumb_src('tie-medium') . '" width="310" height="165" /><span class="fa overlay-icon"></span></a></div>';
                        }
                        $output .= '<h3 class="post-box-title"><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3>
									' . $post_time . '
							</div> <!-- mega-menu-post -->';
                    }
                    $post = $original_post;
                    wp_reset_query();
                    $output .= '</div><!-- .mega-cat-content-tab --> ';
                }
                $output .= '</div> <!-- .mega-cat-content --> 
								<div class="clear"></div>
							</div> <!-- .mega-cat-Wrapper --> ';
            }
            // End of Sub Categories =====================================================
            //Recent + Check also ========================================================
            if ($this->tie_megamenu_type == 'recent' && $item->object == 'category') {
                $count = 0;
                $output_more_posts = '';
                $posts_number = empty($this->tie_has_children) ? 7 : 4;
                $original_post = $post;
                $args = array('posts_per_page' => $posts_number, 'cat' => $item->object_id, 'no_found_rows' => true, 'ignore_sticky_posts' => true);
                $cat_query = new WP_Query($args);
                while ($cat_query->have_posts()) {
                    $count++;
                    $cat_query->the_post();
                    $img_classes = tie_get_post_class('post-thumbnail');
                    $post_time = tie_get_time(true);
                    if ($count == 1) {
                        $output .= '<div class="mega-recent-post">';
                        if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                            $output .= '<div ' . $img_classes . '><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '"><img src="' . tie_thumb_src('slider') . '"  width="660" height="330" /><span class="fa overlay-icon"></span></a></div>';
                        }
                        $output .= '<h3 class="post-box-title"><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3>
						' . $post_time . '
						</div> <!-- mega-recent-post -->';
                    } else {
                        $output_more_posts .= '<li>';
                        if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                            $output_more_posts .= '<div ' . $img_classes . '><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '"><img src="' . tie_thumb_src() . '"  width="110" height="75" /><span class="fa overlay-icon"></span></a></div>';
                        }
                        $output_more_posts .= '<h3 class="post-box-title"><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3>' . $post_time;
                        $output_more_posts .= '</li>';
                    }
                }
                $post = $original_post;
                wp_reset_query();
                $output .= '<div class="mega-check-also"><ul>' . $output_more_posts . '</ul></div> <!-- mega-check-also -->';
            }
            // End of Sub Categories =====================================================
            $output .= "\n</div><!-- .mega-menu-content --> \n</div><!-- .mega-menu-block --> \n";
        }
        // =====================
        $output .= "</li>\n";
//.........这里部分代码省略.........
开发者ID:NguyenHiep,项目名称:learn-wp,代码行数:101,代码来源:mega-menus.php

示例9: wp_query

	}		
	$related_query = new wp_query( $args );
	if( $related_query->have_posts() ) : $count=0;?>
	<section id="related_posts">
		<div class="block-head">
			<h3><?php _eti( 'Related Articles' , 'tie' ); ?></h3><div class="stripe-line"></div>
		</div>
		<div class="post-listing">
			<?php while ( $related_query->have_posts() ) : $related_query->the_post(); $do_not_duplicate[] = get_the_ID(); ?>
			<div <?php tie_post_class('related-item'); ?>>
				<?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) : ?>			
				<div class="post-thumbnail">
					<a href="<?php the_permalink(); ?>">
						<?php the_post_thumbnail( 'tie-medium' ); ?>
						<span class="fa overlay-icon"></span>
					</a>
				</div><!-- post-thumbnail /-->
				<?php endif; ?>			
				<h3><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
				<p class="post-meta"><?php tie_get_time() ?></p>
			</div>
			<?php endwhile;?>
			<div class="clear"></div>
		</div>
	</section>
	<?php
	endif;

	$post = $original_post;
	wp_reset_query();
endif; ?>
开发者ID:rebeccayshen,项目名称:kitlist,代码行数:31,代码来源:related-posts.php


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