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

PHP the_views函数代码示例

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

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



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

示例1: custom_views

function custom_views()
{
    $lect = "";
    if (function_exists('the_views')) {
        if (the_views() != "") {
            $lect = the_views(false);
        }
    }
    return $lect;
}
开发者ID:enetter,项目名称:Arthemia-fr,代码行数:10,代码来源:functions.php


示例2: widget

    function widget($args, $instance)
    {
        extract($args);
        $limit = strip_tags($instance['limit']);
        $limit = $limit ? $limit : 10;
        ?>
		<div class="widget widget-populars">
			<h3>热门文章</h3>
			<ul class="list">
				<?php 
        $args = array('paged' => 1, 'meta_key' => 'views', 'orderby' => 'meta_value_num', 'ignore_sticky_posts' => 1, 'post_type' => 'post', 'post_status' => 'publish', 'showposts' => $limit);
        $posts = query_posts($args);
        ?>
				<?php 
        while (have_posts()) {
            the_post();
            ?>
					<li class="widget-popular">
						<p>
							<a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"
							   title="<?php 
            the_title();
            ?>
"><?php 
            the_title();
            ?>
</a>
								<span>[<?php 
            if (function_exists('the_views')) {
                the_views();
            }
            ?>
]</span>
						</p>
					</li>
				<?php 
        }
        wp_reset_query();
        $posts = null;
        ?>
			</ul>
		</div>
	<?php 
    }
开发者ID:52M,项目名称:kunkka,代码行数:47,代码来源:mutheme-widget.php


示例3: makeThumb

function makeThumb($post_id, $titre = "long", $taille = 2)
{
    //genere les blocs videos
    echo '<div class="col-md-' . $taille . ' col-sm-' . $taille . ' col-xs-12">
				<div class="thumb">
					<a href="' . get_permalink() . '" title="' . get_the_title() . '" >';
    echo get_the_post_thumbnail($post_id, 'thumbnail', array('class' => 'img-responsive'));
    echo '<span class="overlay"></span>
					</a>';
    if (function_exists('the_views')) {
        echo '<span class="viewCounter">
									<i class="glyphicon glyphicon-eye-open"></i> ' . the_views(false) . '
								</span>';
    }
    echo '</div><div class="thumbData">	
				<h3 class="thumbTitle"><a href="' . get_permalink() . '" title="' . get_the_title() . '" >';
    if ($titre == 'global') {
        the_title();
    } else {
        getSceneTitle($post_id, $titre, true);
    }
    echo '</a></h3>';
    echo '</div></div>';
}
开发者ID:bertalFish,项目名称:panic-social-club,代码行数:24,代码来源:skamovie.php


示例4: the_bootstrap_posted_on

    /**
     * Prints HTML with meta information for the current post-date/time and author,
    * comment and edit link
    *
    * @author	Konstantin Obenland
    * @since	1.0.0 - 05.02.2012
    *
    * @return	void
    */
    function the_bootstrap_posted_on()
    {
        // CUSTOM CODE
        echo '<span class="sep">';
        the_views();
        echo '</span><span class="sep"> | </span>';
        // CUSTOM CODE DONE
        printf(__('<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'the-bootstrap'), esc_url(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'the-bootstrap'), get_the_author())), get_the_author());
        if (comments_open() and !post_password_required()) {
            ?>
		<span class="sep"> | </span>
		<span class="comments-link">
			<?php 
            comments_popup_link('<span class="leave-reply">' . __('Leave a reply', 'the-bootstrap') . '</span>', __('<strong>1</strong> Reply', 'the-bootstrap'), __('<strong>%</strong> Replies', 'the-bootstrap'));
            ?>
		</span>
		<?php 
        }
        edit_post_link(__('Edit', 'the-bootstrap'), '<span class="sep">&nbsp;</span><span class="edit-link label">', '</span>');
    }
开发者ID:jimmyshen007,项目名称:webproject,代码行数:29,代码来源:template-tags.php


示例5: the_content

            // Обратите внимание: Мы не будет открывать div, если у него не будет содержимого
            if ( '' != $taxo_text ) {
                ?>
                <div class="entry">
                    <?php
                    echo $taxo_text;
                    ?>
                </div>
            <?
            } // endif
            ?>


		<?php the_content('Читать полностью...'); ?><div class="clear"></div>
		<?php if(function_exists('the_ratings')) { echo '<div class="ratings"><strong>Рейтинг:</strong>'; the_ratings(); echo '</div>'; } ?>
		<?php if(function_exists('the_views')) { echo '<div class="views"> '; the_views(); echo '</div>'; } ?>
		<?php wp_link_pages(array('before' => '<p><strong>Страницы:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
		<?php edit_post_link('Редактировать', '<p class="edit">', '</p>'); ?>
		
		</div>
		<?php the_tags('<div class="tags">Метки: ', ', ', '</div><div class="clear"></div>'); ?>
	</div>
	
	<div class="post_follow">
		Если Вам интересна эта запись, Вы можете следить за ее обсуждением, подписавшись на <?php post_comments_feed_link('RSS 2.0'); ?> .
		<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) { ?>
		
		<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) { ?>
		
		<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) { ?>
	
开发者ID:nvvetal,项目名称:water,代码行数:30,代码来源:single.php


示例6: get_views

 function get_views()
 {
     $buffy = '';
     if (td_util::get_option('tds_p_show_views') != 'hide') {
         $buffy .= '<div class="td-post-views">';
         $buffy .= '<i class="td-icon-views"></i>';
         // WP-Post Views Counter
         if (function_exists('the_views')) {
             $post_views = the_views(false);
             $buffy .= $post_views;
         } else {
             $buffy .= '<span class="td-nr-views-' . $this->post->ID . '">' . td_page_views::get_page_views($this->post->ID) . '</span>';
         }
         $buffy .= '</div>';
     }
     return $buffy;
 }
开发者ID:Che234,项目名称:andreatelo,代码行数:17,代码来源:td_module_single_base.php


示例7: the_permalink

		<h1 class="entry-title"><a href="<?php 
the_permalink();
?>
" rel="bookmark"><?php 
the_title();
?>
</a></h1>
		<!-- post-info -->
		<div class="post-info">
			<span id="view-post">
				<i class="fa fa-eye"></i>
				<!-- post views -->
				<?php 
if (function_exists('the_views')) {
    the_views(true, '', '', false, true);
}
?>
			</span>

			<?php 
if ('post' == get_post_type()) {
    ?>
			<!-- comments in post count -->
			<span id="coment-count">
				<i class="fa fa-comment"></i>
				<?php 
    comments_number(0, 1, '%');
    ?>
			</span>
		</div>
开发者ID:NickTaporuk,项目名称:cd,代码行数:30,代码来源:content.php


示例8: widget

    function widget($args, $instance)
    {
        extract($args);
        @($title1 = $instance['title1'] ? $instance['title1'] : '最热文章');
        @($title2 = $instance['title2'] ? $instance['title2'] : '最新文章');
        @($title3 = $instance['title3'] ? $instance['title3'] : '随机文章');
        @($num = $instance['num'] ? $instance['num'] : 8);
        echo $before_widget;
        ?>

    <div class="panel panel-zan  widget-sets hidden-xs">
      <ul class="nav nav-pills pills-zan">
        <li class="active"><a href="#sidebar-hot" data-toggle="tab"><?php 
        echo $title1;
        ?>
</a></li>
        <li><a href="#sidebar-new" data-toggle="tab"><?php 
        echo $title2;
        ?>
</a></li>
        <li><a href="#sidebar-rand" data-toggle="tab"><?php 
        echo $title3;
        ?>
</a></li>
      </ul>
      <div class="tab-content">
        <div class="tab-pane active nav bs-sidenav fade in" id="sidebar-hot">
          <ul class="list-group">
            <?php 
        // 设置全局变量,实现post整体赋值
        global $post;
        $posts = zan_get_hotest_posts($num);
        foreach ($posts as $post) {
            setup_postdata($post);
            ?>
              <li class="list-group-item clearfix">
                <a href="<?php 
            the_permalink();
            ?>
">
                  <?php 
            the_title();
            ?>
                </a>
                <span class="badge">
                  <?php 
            if (function_exists('the_views')) {
                the_views();
            }
            ?>
                </span>
              </li>
            <?php 
        }
        wp_reset_postdata();
        ?>
          </ul>
        </div>
        <div class="tab-pane fade" id="sidebar-new">
          <ul class="list-group">
            <?php 
        // 设置全局变量,实现post整体赋值
        global $post;
        $posts = zan_get_latest_posts($num);
        foreach ($posts as $post) {
            setup_postdata($post);
            ?>
              <li class="list-group-item clearfix">
                <a href="<?php 
            the_permalink();
            ?>
">
                  <?php 
            the_title();
            ?>
                </a>
                <span class="badge">
                  <?php 
            if (function_exists('the_views')) {
                the_views();
            }
            ?>
                </span>
              </li>
            <?php 
        }
        wp_reset_postdata();
        ?>
          </ul>
        </div>
        <div class="tab-pane nav bs-sidenav fade" id="sidebar-rand">
          <ul class="list-group">
            <?php 
        // 设置全局变量,实现post整体赋值
        global $post;
        $posts = zan_get_rand_posts($num);
        foreach ($posts as $post) {
            setup_postdata($post);
            ?>
              <li class="list-group-item clearfix">
//.........这里部分代码省略.........
开发者ID:zhengxiexie,项目名称:wordpress,代码行数:101,代码来源:zan-widget-sets.php


示例9: the_author_posts_link

            the_author_posts_link();
            ?>
			<?php 
        }
        ?>
			<?php 
        if ($options['categories']) {
            ?>
				 | <?php 
            _e('Filed under ', 'blocks2');
            the_category(', ');
            ?>
			<?php 
        }
        ?>
		</div>
		<div class="comments">
			<?php 
        if (function_exists('the_views')) {
            the_views(true, '', ' | ');
        }
        comments_popup_link(__('No comments', 'blocks2'), __('1 comment', 'blocks2'), __('% comments', 'blocks2'));
        edit_post_link(__('Edit', 'blocks2'), ' | ', '');
        ?>
		</div>
		<div class="fixed"></div>
	</div>

	<div class="content">
		<?php 
        the_content(__('Read more...', 'blocks2'));
开发者ID:rubyerme,项目名称:rubyerme.github.com,代码行数:31,代码来源:index.php


示例10: get_header

 * @subpackage Twenty_Eleven
 */

get_header(); ?>

		<div id="primary">
			<div id="content" role="main">

			<?php if ( have_posts() ) : ?>

				<?php twentyeleven_content_nav( 'nav-above' ); ?>

				<?php /* Start the Loop */ ?>
				<?php while ( have_posts() ) : the_post(); ?>

				<?php if(function_exists('the_views')) { the_views(); } ?>
				
					<?php get_template_part( 'content', get_post_format() ); ?>

				<?php endwhile; ?>

				<?php twentyeleven_content_nav( 'nav-below' ); ?>

			<?php else : ?>

				<article id="post-0" class="post no-results not-found">
					<header class="entry-header">
						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
					</header><!-- .entry-header -->

					<div class="entry-content">
开发者ID:ramo01,项目名称:1kapp,代码行数:31,代码来源:index.php


示例11: the_title

" ><?php 
        the_title();
        ?>
</a></h2>
               <div class="row">
				  <div class="span1"><span class="label label-info"><?php 
        the_time('m-d');
        ?>
</span></div>
				  <div class="span1"><span class="label label-info"><?php 
        comments_number('0', '1', '%');
        ?>
人评论</span></div>
				  <div class="span1"><span class="label label-info"><?php 
        if (function_exists('the_views')) {
            echo the_views();
        }
        ?>
</span></div>
				</div>
                <?php 
        echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 136, '...');
        ?>
<br />
                <?php 
        dm_the_thumbnail();
        ?>
              </div>
            </div>
		<?php 
    }
开发者ID:pichina,项目名称:54UX,代码行数:31,代码来源:index.php


示例12: mb_strimwidth

    ?>
            	<?php 
    echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 330, "...");
    ?>
            	<span class="more">[<a href="<?php 
    the_permalink();
    ?>
" title="详细阅读 <?php 
    the_title();
    ?>
" rel="bookmark">阅读全文</a>]</span>
            </div>
            <div class="meta">
                <span class="meat_span"><i class="iconfont">&#279;</i><?php 
    if (function_exists(the_views)) {
        the_views('次浏览', true);
    }
    ?>
</span>
                <span class="meat_span"><i class="iconfont">&#54;</i><?php 
    comments_popup_link('没有评论', '1条评论', '%条评论');
    ?>
</span>
             	<span class="meat_span meat_max"><i class="iconfont">&#48;</i><?php 
    the_tags('', ', ', '');
    ?>
</span>
            </div>
		</div>
        <?php 
}
开发者ID:surperone,项目名称:tangstyle,代码行数:31,代码来源:archive.php


示例13: rbn_dom

/**
 * 生成DOM树
 * */
function rbn_dom()
{
    if (!is_admin()) {
        $base_url = get_bloginfo('wpurl');
        ?>
<div id="plugin_rbn">
	<div id="rbn_head_and_body">
		<div id="rbn_head">
			<div class="rbn_post_hot cur_rbn">热点</div><div class="rbn_post_new">最新</div><div class="rbn_post_random">随机</div><div class="rbn_weather">天气</div>
			<div id="rbn_close"></div>
		</div>
		<div id="rbn_body">
			<div class="cur_rbn">
				<ol class="list_hot">

<?php 
        $rbn_posts = new WP_Query('orderby=comment_count&caller_get_posts=4&posts_per_page=3');
        while ($rbn_posts->have_posts()) {
            $rbn_posts->the_post();
            ?>
		<li>
			<div class="img_wraper">
	<?php 
            preg_match_all('~<img [^\\>]*\\ />~', get_the_content(), $imgs);
            if (count($imgs[0]) > 0) {
                echo $imgs[0][0];
            } else {
                echo '<img alt="" src="', $base_url, '/wp-content/plugins/right_bottom_nav/rbn_default.png', '" />';
            }
            ?>
		</div>
		<div class='post_info'>
			<label><a class="plink" href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a></label><br/>
			<label class='author'><?php 
            the_author();
            ?>
</label><label class='ptime'> 于 <?php 
            the_time('m月d日');
            ?>
</label><br/>
			<label class="pv_and_comment_num"><?php 
            if (function_exists('the_views')) {
                echo '访问', the_views(), '&nbsp;&nbsp;';
            }
            echo comments_number('暂无评论', '评论 1', '评论 %');
            ?>
</label>
		</div>
	</li>
<?php 
        }
        ?>
				</ol>
			</div>
			<div>
				<ol class="list_new">
<?php 
        $rbn_posts = new WP_Query('numberposts=10&offset=0');
        while ($rbn_posts->have_posts()) {
            $rbn_posts->the_post();
            ?>
<li><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a></li></li><?php 
        }
        ?>
				</ol>
			</div>
			<div>
				<ul class="list_rand">
<?php 
        $rbn_posts = new WP_Query('numberposts=10&orderby=rand');
        while ($rbn_posts->have_posts()) {
            $rbn_posts->the_post();
            ?>
<li><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a><label class="ptime"><?php 
            the_time('m月d日');
            ?>
</label></li></li><?php 
        }
        ?>
//.........这里部分代码省略.........
开发者ID:uglmee,项目名称:kikiku.com,代码行数:101,代码来源:right_bottom_nav.php


示例14: mutheme_views

/**
 * Post views
 */
function mutheme_views()
{
    if (function_exists('the_views')) {
        ?>
		<li class="inline-li"><span class="post-span">·</span></li>
		<li class="inline-li"><?php 
        the_views();
        ?>
</li>
	<?php 
    }
}
开发者ID:52M,项目名称:kunkka,代码行数:15,代码来源:mutheme-basic.php


示例15: get_film_home

function get_film_home($type, $num = 28, $excerpt_length = 40)
{
    global $post;
    // tao cache
    query_posts('post_type=post&showposts=' . $num . '&meta_key=phim_loai&meta_value=' . $type . '&paged=' . $q . '&order=desc');
    while (have_posts()) {
        the_post();
        $html .= '<li><div class="inner"><a data-tooltip="
<span class=\'title\'>' . get_the_title() . '</span><br />

' . get_excerpt_content(60, '', 0, $post->post_content) . '
"


 href="' . get_permalink() . '" title="' . get_the_title() . '">
<img src="' . img3(146, 195) . '" alt="' . get_the_title() . '"/></a>
<div class="info"><div class="name"><h3><a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3> </div>
<div class="name2"><h4>' . get_post_meta($post->ID, "phim_en", true) . '</h4></div>

<div class="stats"><span class="liked">' . the_views($post_views->ID) . ' </span></div>
<h5 style="text-indent:-9999px;">' . get_excerpt_content($excerpt_length, '', 0, $post->post_content) . '</h5></div>

<!--
<div class="status"><span class="status_r">' . get_post_meta($post->ID, "phim_tl", true) . '</span></div>
<div class="g-status"><span class="status_g">' . get_post_meta($post->ID, "phim_nsx", true) . '</span></div>
-->
<div class="f_tag">
	                    <div class="f_t_f"></div>
	                    <div class="f_t_c">' . get_post_meta($post->ID, "phim_tl", true) . '</div>
	                    <div class="f_t_e"></div>
	                    <div class="clr"></div>
	                </div>
	                <div class="f_tag g-year">
                        <div class="f_t_f"></div>
                        <div class="f_t_c">' . get_post_meta($post->ID, "phim_nsx", true) . '</div>
                        <div class="f_t_e"></div>
                        <div class="clr"></div>
                    </div>
</div></li>
';
    }
    wp_reset_query();
    return $html;
}
开发者ID:congtrieu112,项目名称:anime,代码行数:44,代码来源:functions.php


示例16: get_commentsAndViews

 function get_commentsAndViews()
 {
     $buffy = '';
     $buffy .= '<div class="entry-comments-views">';
     if (td_util::get_option('tds_p_show_comments') != 'hide') {
         //$buffy .= '<a href="' . get_comments_link($this->post->ID) . '">';
         $buffy .= '<span class="td-sp td-sp-ico-comments td-fake-click" data-fake-click="' . get_comments_link($this->post->ID) . '"></span>';
         $buffy .= get_comments_number($this->post->ID);
         //$buffy .= '</a>';
     }
     if (td_util::get_option('tds_p_show_views') != 'hide') {
         $buffy .= ' ';
         $buffy .= '<span class="td-sp td-sp-ico-view"></span>';
         // WP-Post Views Counter
         if (function_exists('the_views')) {
             $post_views = the_views(false);
             $buffy .= $post_views;
         } else {
             $buffy .= '<span class="td-nr-views-' . $this->post->ID . '">' . td_page_views::get_page_views($this->post->ID) . '</span>';
         }
     }
     $buffy .= '</div>';
     return $buffy;
 }
开发者ID:Vatia13,项目名称:tofido,代码行数:24,代码来源:td_module.php


示例17: the_title

        ?>
" title="<?php 
        the_title();
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
		<div class="postinfo">
		<div class="info">Опубликовал <?php 
        the_author_posts_link();
        ?>
  <?php 
        the_time('j F, Y');
        ?>
 &nbsp; <? if(function_exists('the_views')) {the_views();} ?></div>
		<div class="commentnum"><?php 
        comments_popup_link('Прокомментировать &#187;', '1 комментарий &#187;', '% коммент. &#187;');
        ?>
</div><div class="clear"></div>
		</div>
		<div class="category">Размещено в рубрике <?php 
        the_category(', ');
        ?>
</div>
		<div class="entry">

		<?php 
        the_content('Читать далее...');
        ?>
<div class="clear"></div>
开发者ID:AlexKosarim,项目名称:site123321,代码行数:31,代码来源:index.php


示例18: the_field

			<!--插件图标-->	
			<div id="addon-icon"><img src="<?php 
    the_field('addon_icon');
    ?>
" title="<?php 
    the_title();
    ?>
" alt="<?php 
    the_title();
    ?>
" width="1125px" height="200px" /></div>

			<!--插件标签-->
			<div id="addon-meta">
				<span id="cloudid-box"><span id="yylmacro-meta-cloudid" class="yylmacro-meta">下载次数:</span><span id="cloudid"><?php 
    the_views($display = true, $prefix = '', $postfix = '', $always = false);
    ?>
</span></span>
				<span class="yylmacro-meta">更新日期</span> <?php 
    the_modified_time('Ymd');
    ?>
				<span class="yylmacro-meta">插件作者</span> <?php 
    the_field('addon_author');
    ?>
				<span class="yylmacro-meta">插件版本</span> <?php 
    the_field('addon_version');
    ?>
				<span class="yylmacro-meta">官方主页</span> <a href="<?php 
    the_field('addon_authorlink');
    ?>
"  target="_blank">点击访问</a>
开发者ID:deepziyu,项目名称:JX3PVE,代码行数:31,代码来源:top-pve.php


示例19: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        $number = strip_tags($instance['number']) ? absint($instance['number']) : 5;
        ?>

<div id="hot" class="hot_commend">
	<ul>
		<?php 
        query_posts(array('meta_key' => 'hot', 'showposts' => $number, 'orderby' => rand, 'caller_get_posts' => 1));
        while (have_posts()) {
            the_post();
            ?>
			<li>
				<figure class="thumbnail">
					<?php 
            get_template_part('inc/thumbnail');
            ?>
				</figure>
				<div class="hot-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" title="<?php 
            the_title();
            ?>
"><?php 
            the_title();
            ?>
</a></div>
				<?php 
            if (function_exists('the_views')) {
                print '<div class="views"><i class="icon-views"></i>阅读 ';
                the_views();
                print ' 次</div>';
            }
            ?>
			</li>
		<?php 
        }
        ?>
		<div class="clear"></div>
	</ul>
</div>

<?php 
        echo $after_widget;
    }
开发者ID:beichengandnight,项目名称:daikuanzj,代码行数:52,代码来源:widgets.php


示例20: mystique_post

function mystique_post()
{
    global $post, $id, $comment;
    $category = get_the_category();
    $category_name = $category[0]->cat_name;
    if (!empty($category_name)) {
        $category_link = '<a href="' . get_category_link($category[0]->cat_ID) . '">' . $category_name . '</a>';
    } else {
        $category_link = "[...]";
    }
    $post_tags = get_the_tags();
    $post_settings = apply_filters('mystique_post_settings', get_option("mystique"));
    $comment_count = mystique_comment_count('comments');
    do_action('mystique_before_post');
    ?>

  <!-- post -->
  <div id="post-<?php 
    the_ID();
    ?>
" class="<?php 
    mystique_post_class('clear-block');
    ?>
">

   <?php 
    $post_thumb = mystique_post_thumb();
    if ($post_settings['post_title']) {
        $title_url = get_post_meta($post->ID, 'title_url', true);
        ?>
     <h2 class="title"><a href="<?php 
        if ($title_url) {
            echo $title_url;
        } else {
            the_permalink();
        }
        ?>
" rel="bookmark" title="<?php 
        _e('Permanent Link:', 'mystique');
        echo ' ';
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
   <?php 
    }
    ?>

   <?php 
    if ($post_settings['post_info'] && !get_post_meta($post->ID, 'asides', true)) {
        ?>
     <div class="post-date">
       <p class="day"><?php 
        the_time(__('M jS', 'mystique'));
        ?>
</p>
     </div>

     <div class="post-info clear-block <?php 
        if ($post_thumb) {
            echo 'with-thumbs';
        }
        ?>
">
      <p class="author alignleft"><?php 
        printf(__('Posted by %1$s in %2$s', 'mystique'), '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '" title="' . sprintf(__("Posts by %s", "mystique"), attribute_escape(get_the_author())) . ' ">' . get_the_author() . '</a>', $category_link);
        ?>
      <?php 
        if (function_exists('the_views')) {
            ?>
<span class="postviews">| <?php 
            the_views();
            ?>
</span><?php 
        }
        ?>
      <?php 
        edit_post_link(__('Edit', 'mystique'), ' | ');
        ?>
      </p>
      <?php 
        if (comments_open() || $comment_count > 0) {
            ?>
      <p class="comments alignright"><a href="<?php 
            the_permalink();
            ?>
#comments" class="<?php 
            if ($comment_count < 1) {
                echo "no";
            }
            ?>
 comments"><?php 
            comments_number(__('No comments', 'mystique'), __('1 comment', 'mystique'), __('% comments', 'mystique'));
            ?>
</a></p>
      <?php 
        }
        ?>
//.........这里部分代码省略.........
开发者ID:nottombrown,项目名称:vlab,代码行数:101,代码来源:core.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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