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


PHP link_pages函数代码示例

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


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

示例1: b_wp_contents_show

function b_wp_contents_show($options)
{
    //	global $xoopsDB,$xoopsUser;
    //	global $tableoptions,$tableusers;
    //	global $id, $posts, $post, $day, $previousday, $newday;
    $id = 1;
    global $posts, $post, $day, $previousday, $newday;
    global $dateformat, $time_difference, $siteurl, $blogfilename;
    global $tablelinks, $tablelinkcategories;
    global $querystring_start, $querystring_equal, $querystring_separator, $month, $wpdb, $start_of_week;
    global $tableposts, $tablepost2cat, $tablecomments, $tablecategories;
    global $smilies_directory, $use_smilies, $wp_smiliessearch, $wp_smiliesreplace;
    global $wp_bbcode, $use_bbcode, $wp_gmcode, $use_gmcode, $use_htmltrans, $wp_htmltrans, $wp_htmltranswinuni;
    require_once dirname(__FILE__) . '/../wp-blog-header.php';
    $blog = 1;
    $block = array();
    $block['siteurl'] = $siteurl;
    foreach ($posts as $post) {
        $content = array();
        start_wp();
        $content['date'] = the_date('', '<h2>', '</h2>', false);
        $content['time'] = the_time('', false);
        $content['title'] = the_title('', '', false);
        $content['permlink'] = get_permalink();
        //
        ob_start();
        the_author();
        $content['author'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        the_category();
        $content['category'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        the_content();
        $content['body'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        link_pages('<br />Pages: ', '<br />', 'number');
        $content['linkpage'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)');
        $content['comments'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        trackback_rdf();
        $content['trackback'] = ob_get_contents();
        ob_end_clean();
        //
        $block['contents'][] = $content;
    }
    return $block;
}
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:59,代码来源:wp_contents.php

示例2: b_wp_contents_show

function b_wp_contents_show($options)
{
    global $xoopsDB, $xoopsUser, $wpdb, $siteurl;
    global $tableoptions, $tableposts, $tableusers, $tablecategories, $tablecomments, $tablepost2cat;
    global $querystring_start, $querystring_equal, $querystring_separator;
    global $id, $posts, $post, $day, $previousday, $dateformat, $newday;
    require_once dirname(__FILE__) . '/../wp-blog-header.php';
    $blog = 1;
    $block = array();
    $block['siteurl'] = $siteurl;
    foreach ($posts as $post) {
        $content = array();
        start_wp();
        $content['date'] = the_date('', '<h2>', '</h2>', false);
        $content['time'] = the_time('', false);
        $content['title'] = the_title('', '', false);
        $content['permlink'] = get_permalink();
        //
        ob_start();
        the_author();
        $content['author'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        the_category();
        $content['category'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        the_content();
        $content['body'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        link_pages('<br />Pages: ', '<br />', 'number');
        $content['linkpage'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)');
        $content['comments'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        trackback_rdf();
        $content['trackback'] = ob_get_contents();
        ob_end_clean();
        //
        $block['contents'][] = $content;
    }
    return $block;
}
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:52,代码来源:wp_contents.php

示例3: veryplaintxt_post_class

?>
" class="<?php 
veryplaintxt_post_class();
?>
">
				<h2 class="entry-title"><?php 
the_title();
?>
</h2>
				<div class="entry-content">
<?php 
the_content('<span class="more-link">' . __('Read More', 'veryplaintxt') . '</span>');
?>

<?php 
link_pages('<div class="page-link">' . __('Pages: ', 'veryplaintxt'), "</div>\n", 'number');
?>
				</div>

				<div class="entry-meta">
					<?php 
printf(__('This was written by %1$s. Posted on <abbr class="published" title="%2$s">%3$s at %4$s</abbr>. Filed under %5$s. %6$sBookmark the <a href="%7$s" title="Permalink to %8$s" rel="bookmark">permalink</a>. Follow comments here with the <a href="%9$s" title="Comments RSS to %8$s" rel="alternate" type="application/rss+xml">RSS feed</a>.', 'veryplaintxt'), '<span class="vcard"><span class="fn n">' . $authordata->display_name . '</span></span>', get_the_time('Y-m-d\\TH:i:sO'), the_date('l, F j, Y,', '', '', false), get_the_time(), get_the_category_list(', '), get_the_tag_list('Tagged ', ', ', '. '), get_permalink(), wp_specialchars(get_the_title(), 'double'), comments_rss());
if ('open' == $post->comment_status && 'open' == $post->ping_status) {
    ?>
					<?php 
    printf(__('<a href="#respond" title="Post a comment">Post a comment</a> or leave a <a href="%s" rel="trackback" title="Trackback URL for your post">trackback</a>.', 'veryplaintxt'), get_trackback_url());
} elseif (!('open' == $post->comment_status) && 'open' == $post->ping_status) {
    ?>
					<?php 
    printf(__('Comments are closed, but you can leave a <a href="%s" rel="trackback" title="Trackback URL for your post">trackback</a>.', 'veryplaintxt'), get_trackback_url());
} elseif ('open' == $post->comment_status && !('open' == $post->ping_status)) {
开发者ID:slaFFik,项目名称:l10n-ru,代码行数:31,代码来源:single.php

示例4: the_permalink

the_permalink();
?>
" title="Permanent link to <?php 
the_title_attribute();
?>
" rel="bookmark" rev="post-<?php 
the_ID();
?>
"><?php 
the_title();
?>
</a></h1>
		<div class="entry-content full-content">
			<?php 
the_content('<span class="more-link">' . __('Continued...', 'carrington') . '</span>');
link_pages('<p class="pages-link">' . __('Pages: ', 'carrington'), "</p>\n", 'number');
?>
		</div><!--/entry-content-->
		<p class="filed">
			<span class="categories"><?php 
printf(__('Posted in %s.', 'carrington'), get_the_category_list(', '));
?>
</span> 
			<?php 
the_tags(__('<span class="tags">Tagged with ', 'carrington'), ', ', '.</span>');
?>
		</p><!--/filed-->
		<div class="by-line">
			<address class="author vcard full-author">
				<?php 
printf(__('<span class="by">By</span> %s', 'carrington'), '<a class="url fn" href="' . get_author_link(false, get_the_author_ID(), $authordata->user_nicename) . '" title="View all posts by ' . attribute_escape($authordata->display_name) . '">' . get_the_author() . '</a>');
开发者ID:rascoop,项目名称:carrington,代码行数:31,代码来源:content-default.php

示例5: the_category

				<span class="post-category"><?php 
        the_category(' &middot; ');
        ?>
</span>
				<br/><?php 
        the_tags('<span class="post-tags">Tags: ', ', ', '</span>');
        ?>
			</h4>
			</div>
			
			<div class="post-content">
			<?php 
        the_content("Continuer la lecture &hellip;");
        ?>
			<?php 
        link_pages('<p class="pagenav">Page: ', '</p>');
        ?>
			</div>
		</div>

		<?php 
        comments_template();
        ?>
		
		<?php 
    }
    ?>
	<?php 
} else {
    ?>
		
开发者ID:alx,项目名称:barceloneta,代码行数:30,代码来源:single.php

示例6: b_wp_contents_show

 function b_wp_contents_show($options, $wp_num = "")
 {
     $no_posts = empty($options[0]) ? 10 : $options[0];
     global $wpdb, $siteurl, $post, $use_cache, $category_cache, $comment_count_cache;
     global $smilies_directory, $wp_smiliessearch, $wp_smiliesreplace, $authordata;
     global $wp_bbcode, $wp_gmcode, $wp_htmltrans, $wp_htmltranswinuni, $wp_filter;
     global $wp_id, $wp_mod, $wp_base, $wp_inblock, $xoopsConfig, $previousday, $time_difference, $day;
     $id = 1;
     $use_cache = 1;
     if ($wp_num == "") {
         $wp_id = $wp_num;
         $wp_inblock = 2;
         require dirname(__FILE__) . '/../wp-config.php';
         $wp_inblock = 0;
     }
     global $dateformat, $timeformat;
     $dateformat = stripslashes(get_settings('date_format'));
     $timeformat = stripslashes(get_settings('time_format'));
     $now = date('Y-m-d H:i:s', time() + get_settings('time_difference') * 3600);
     $request = "SELECT DISTINCT * FROM {$wpdb->posts[$wp_id]} ";
     $request .= " LEFT JOIN {$wpdb->post2cat[$wp_id]} ON ({$wpdb->posts[$wp_id]}.ID = {$wpdb->post2cat[$wp_id]}.post_id) ";
     $request .= "WHERE post_status = 'publish' ";
     $request .= " AND post_date <= '" . $now . "'";
     $request .= " GROUP BY {$wpdb->posts[$wp_id]}.ID ORDER BY post_date DESC LIMIT 0, {$no_posts}";
     $lposts = $wpdb->get_results($request);
     if ($lposts) {
         // Get the categories for all the posts
         foreach ($lposts as $post) {
             $post_id_list[] = $post->ID;
             $category_cache[$wp_id][$post->ID] = array();
         }
         $post_id_list = implode(',', $post_id_list);
         $dogs = $wpdb->get_results("SELECT DISTINCT\n\t\t\t\tID, category_id, cat_name, category_nicename, category_description, category_parent\n\t\t\t\tFROM {$wpdb->categories[$wp_id]}, {$wpdb->post2cat[$wp_id]}, {$wpdb->posts[$wp_id]}\n\t\t\t\tWHERE category_id = cat_ID AND post_id = ID AND post_id IN ({$post_id_list})");
         foreach ($dogs as $catt) {
             $category_cache[$wp_id][$catt->ID][] = $catt;
         }
         // Do the same for comment numbers
         $comment_counts = $wpdb->get_results("SELECT ID, COUNT( comment_ID ) AS ccount\n\t\t\t\tFROM {$wpdb->posts[$wp_id]}\n\t\t\t\tLEFT JOIN {$wpdb->comments[$wp_id]} ON ( comment_post_ID = ID  AND comment_approved =  '1')\n\t\t\t\tWHERE post_status =  'publish' AND ID IN ({$post_id_list})\n\t\t\t\tGROUP BY ID");
         foreach ($comment_counts as $comment_count) {
             $comment_count_cache[$wp_id]["{$comment_count->ID}"] = $comment_count->ccount;
         }
     }
     $blog = 1;
     $block = array();
     $block['use_theme_template'] = get_xoops_option('wordpress' . $wp_num, 'use_theme_template');
     $block['style'] = block_style_get($wp_num, false);
     $block['divid'] = 'wpBlockContent' . $wp_num;
     $block['template_content'] = "";
     $i = 0;
     $previousday = 0;
     foreach ($lposts as $post) {
         if ($block['use_theme_template'] == 0) {
             $content = array();
             start_wp();
             $content['date'] = the_date($dateformat, '', '', false);
             $content['time'] = the_time('', false);
             $content['title'] = the_title('', '', false);
             $content['permlink'] = get_permalink();
             //
             ob_start();
             the_author_posts_link();
             $content['author'] = ob_get_contents();
             ob_end_clean();
             //
             ob_start();
             the_category();
             $content['category'] = ob_get_contents();
             ob_end_clean();
             //
             ob_start();
             the_content();
             $content['body'] = ob_get_contents();
             ob_end_clean();
             //
             ob_start();
             link_pages('<br />Pages: ', '<br />', 'number');
             $content['linkpage'] = ob_get_contents();
             ob_end_clean();
             //
             ob_start();
             if (get_xoops_option($wp_mod[$wp_id], 'wp_use_xoops_comments') == 0) {
                 comments_popup_link(_WP_TPL_COMMENT0, _WP_TPL_COMMENT1, _WP_TPL_COMMENTS);
             } else {
                 xcomments_popup_link(_WP_TPL_COMMENT0, _WP_TPL_COMMENT1, _WP_TPL_COMMENTS);
                 echo " | ";
                 comments_popup_link(_WP_TPL_TRACKBACK0, _WP_TPL_TRACKBACK1, _WP_TPL_TRACKBACKS);
             }
             //				comments_popup_link(_WP_TPL_COMMENT0, _WP_TPL_COMMENT1, _WP_TPL_COMMENTS);
             $content['comments'] = ob_get_contents();
             ob_end_clean();
             //
             ob_start();
             trackback_rdf();
             $content['trackback'] = ob_get_contents();
             ob_end_clean();
             //
             $block['contents'][] = $content;
         } else {
             ob_start();
             include get_custom_path('content_block-template.php');
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:101,代码来源:wp_contents.php

示例7: the_title

'><?php 
    the_title();
    ?>
</a></h2>
					<?php 
    edit_post_link(__('Edit', 'k2_domain'), '<span class="entry-edit">', '</span>');
    ?>
				</div>
	
				<div class="entry-content">
					<?php 
    the_content();
    ?>

					<?php 
    link_pages('<p><strong>' . __('Pages:', 'k2_domain') . '</strong> ', '</p>', 'number');
    ?>
				</div>

			</div> <!-- #post-ID -->
		<?php 
}
?>

		</div> <!-- #current-content -->

		<div id="dynamic-content"></div>
	</div> <!-- #primary -->

	<?php 
get_sidebar();
开发者ID:64kbytes,项目名称:stayinba,代码行数:31,代码来源:page.php

示例8: the_time

</a></h2>
			<small><?php 
        the_time('F jS، Y');
        ?>
 <!-- بوسیله <?php 
        the_author();
        ?>
 --></small>
	
			<div class="entry">
				<?php 
        the_content('<p class="serif">ادامه مطلب را بخوانید &raquo;</p>');
        ?>
	
				<?php 
        link_pages('<p><strong>صفحات:</strong> ', '</p>', 'number');
        ?>
	
				<p class="postmetadata alt">
					<small>
						این مطلب
						<?php 
        /* This is commented, because it requires a little adjusting sometimes.
        			You'll need to download this plugin, and follow the instructions:
        			http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
        /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */
        ?>
 
						در تاریخ <?php 
        the_time('l، F jS، Y');
        ?>
开发者ID:hormoz,项目名称:whiteasmilk,代码行数:31,代码来源:single.php

示例9: edit_post_link

        ?>
 <?php 
        edit_post_link();
        ?>
</div>
	
	<div class="storycontent">
		<?php 
        the_content();
        ?>
		<br clear="left" />
	</div>
	
	<div class="feedback">
		<?php 
        link_pages('<br />Pages: ', '<br />', 'number');
        ?>
 
<?php 
        if (get_xoops_option($wp_mod[$wp_id], 'wp_use_xoops_comments') == 0) {
            comments_popup_link(_WP_TPL_COMMENT0, _WP_TPL_COMMENT1, _WP_TPL_COMMENTS);
        } else {
            xcomments_popup_link(_WP_TPL_COMMENT0, _WP_TPL_COMMENT1, _WP_TPL_COMMENTS);
            echo " | ";
            comments_popup_link(_WP_TPL_TRACKBACK0, _WP_TPL_TRACKBACK1, _WP_TPL_TRACKBACKS);
        }
        ?>
	</div>
	
	<!--
	<?php 
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:index-template.php

示例10: get_permalink

        echo get_permalink();
        ?>
" rel="bookmark" title="<?php 
        printf(__('Permanent Link to %s', 'chaoticsoul'), get_the_title());
        ?>
"><?php 
        the_title();
        ?>
</a></h2>

			<div class="entrytext">
				<?php 
        the_content('<p class="serif">' . __('Read the rest of this entry &raquo;', 'chaoticsoul') . '</p>');
        ?>
				<?php 
        link_pages('<p><strong>' . __('Pages:', 'chaoticsoul') . '</strong> ', '</p>', 'number');
        ?>
				<p class="authormeta">~ <?php 
        _e('by', 'chaoticsoul');
        ?>
 <?php 
        the_author();
        ?>
 <?php 
        _e('on');
        ?>
 <? the_time(get_option("date_format")); ?>.</p>
				<p class="postmetadata"><?php 
        printf(__('Posted in %s', 'chaoticsoul'), get_the_category_list(', '));
        ?>
					<?php 
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:single.php

示例11: printf

<?php 
        printf(__('Posted on %s by %s'), '<span class="postdate">' . get_the_time(get_option('date_format')) . '</span>', get_the_author());
        ?>
	
<?php 
        edit_post_link(__('Edit', 'digg3'), ' &#124; ', '');
        ?>
				</div>

				<div class="entry">

					<?php 
        the_content();
        ?>
					<?php 
        link_pages('<p><strong>' . __('Pages', 'digg3') . ':</strong> ', '</p>', 'number');
        ?>

					<p class="postinfo">
				<?php 
        _e('Filed under&#58;', 'digg3');
        ?>
 <?php 
        the_category(', ');
        ?>
 <?php 
        the_tags('&#124; ' . __('Tagged:', 'digg3') . ' ', ', ', '');
        ?>
					</p>

				</div>
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:single.php

示例12: thesis_post_content

function thesis_post_content($post_count = false, $post_image = false)
{
    global $wp_query, $post, $thesis_design;
    thesis_hook_before_post($post_count);
    if ($post_image['show'] && $post_image['y'] == 'before-post') {
        echo $post_image['output'];
    }
    if ($wp_query->is_page && get_post_meta($post->ID, '_wp_page_template', true) == 'archives.php') {
        thesis_hook_archives_template();
    } elseif (($wp_query->is_home || $wp_query->is_archive || $wp_query->is_search) && $thesis_design->display['posts']['excerpts'] || ($wp_query->is_archive || $wp_query->is_search) && $thesis_design->display['archives']['style'] == 'excerpts') {
        the_excerpt();
    } else {
        the_content(thesis_read_more_text());
    }
    if ($wp_query->is_single || $wp_query->is_page) {
        link_pages('<p><strong>Pages:</strong> ', '</p>', 'number');
    }
    thesis_hook_after_post($post_count);
}
开发者ID:CherylMuniz,项目名称:fashion,代码行数:19,代码来源:content.php

示例13: the_permalink

					<h2 class="post-title"><a href="<?php 
        the_permalink();
        ?>
" title="Permalink to <?php 
        the_title();
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a></h2>
					<div class="post-entry">
						<?php 
        the_content('<span class="more-link">Continue Reading &raquo;</span>');
        ?>
						<?php 
        link_pages('<p style="margin:-1em 0 0 0;"><strong>Pages: ', '</strong></p>', 'number');
        ?>
						<!-- <?php 
        trackback_rdf();
        ?>
 -->
					</div>
				</div>
			</div>
			<div class="post-header">
				<h3 class="post-date"><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_time('Y m d');
        ?>
开发者ID:psd,项目名称:hellfettle,代码行数:31,代码来源:index.php

示例14: the_title

        the_title();
        ?>
</a></h2>
		

		<div class="entry" id="entry<?php 
        the_ID();
        ?>
">

		<?php 
        the_content();
        ?>
		
		<h4 class="nextpage"><?php 
        link_pages('Pages: ', '', 'number');
        ?>
</h4>

		<p class="metadata">
		<?php 
        the_date('jS F Y');
        edit_post_link('Edit', ' &#124; ', '');
        ?>
		</p>
		</div>
		
<div class="comments">
<?php 
        comments_template();
        ?>
开发者ID:robertedwards,项目名称:robedwards,代码行数:31,代码来源:single.php

示例15: the_time

</a></h2>
				<div class="entry-date"><abbr class="published" title="<?php 
    the_time('Y-m-d\\TH:i:sO');
    ?>
"><?php 
    unset($previousday);
    printf(__('%1$s &#8211; %2$s', 'sandbox'), the_date('', '', '', false), get_the_time());
    ?>
</abbr></div>
				<div class="entry-content">
<?php 
    the_content('' . __('Read More <span class="meta-nav">&raquo;</span>', 'sandbox') . '');
    ?>

<?php 
    link_pages("\t\t\t\t\t<div class='page-link'>" . __('Pages: ', 'sandbox'), "</div>\n", 'number');
    ?>
				</div>
				<div class="entry-meta">
					<span class="author vcard"><?php 
    printf(__('By %s', 'sandbox'), '<a class="url fn n" href="' . get_author_link(false, $authordata->ID, $authordata->user_nicename) . '" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">' . get_the_author() . '</a>');
    ?>
</span>
					<span class="meta-sep">|</span>
					<span class="cat-links"><?php 
    printf(__('Posted in %s', 'sandbox'), get_the_category_list(', '));
    ?>
</span>
					<?php 
    if (is_callable('get_the_tag_list')) {
        ?>
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:index.php


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