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


PHP ap_pagination函数代码示例

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


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

示例1: the_pagination

 public function the_pagination()
 {
     $base = ap_get_link_to('users') . '/%_%';
     ap_pagination($this->paged, $this->total_pages, $base);
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:5,代码来源:users-loop.php

示例2: while

<div id="ap-user-favorites">
	<?php 
if ($question->have_posts()) {
    ?>
		<div class="question-list">
	<?php 
    /* Start the Loop */
    while ($question->have_posts()) {
        $question->the_post();
        include ap_get_theme_location('content-list.php');
    }
    ?>
		</div>
	<?php 
    ap_pagination('', 2, $paged, $question);
    ?>
	<?php 
} else {
    _e('No favourite questions', 'ap');
}
?>
</div>
开发者ID:jessor,项目名称:anspress,代码行数:22,代码来源:user-favorites.php

示例3: the_pagination

 public function the_pagination()
 {
     $base = ap_user_link($this->args['user_id'], 'notification') . '/%_%';
     ap_pagination($this->paged, $this->total_pages, $base);
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:5,代码来源:notification.php

示例4: ap_ask_btn

ap_ask_btn(get_the_ID());
?>
</h1>

<div id="ap-lists" class="clearfix">
	<?php 
ap_questions_tab(get_permalink());
?>
	<?php 
if ($questions->have_posts()) {
    ?>
		<div class="question-list">
			<?php 
    /* Start the Loop */
    while ($questions->have_posts()) {
        $questions->the_post();
        global $post;
        include ap_get_theme_location('content-list.php');
    }
    ?>
		</div>
	<?php 
    ap_pagination();
    ?>
	<?php 
} else {
    include ap_get_theme_location('content-none.php');
}
?>
	
</div>
开发者ID:Byrlyne,项目名称:anspress,代码行数:31,代码来源:on-post.php

示例5: _e

			<span class="ap-about-rep-label"><?php 
_e('Total', 'ap');
?>
</span>
			<span class="ap-about-rep-count"><?php 
ap_user_the_reputation();
?>
</span>
		</div>
		<div class="ap-about-rep-chart">
			<span data-action="ap_chart" data-type="bar" data-peity='{"fill" : ["#8fc77e"], "height": 45, "width": "100%"}'><?php 
echo ap_user_get_28_days_reputation();
?>
</span>		
		</div>
		<div class="ap-user-rep">
			<?php 
if (ap_has_reputations()) {
    while (ap_reputations()) {
        ap_the_reputation();
        ap_get_template_part('user/reputation-content');
    }
    ap_pagination(false, anspress()->reputations->total_pages);
} else {
    _e('No reputation earned yet.', 'ap');
}
?>
		</div>
	</div>
</div>
开发者ID:BRoz,项目名称:anspress,代码行数:30,代码来源:reputation.php

示例6: ap_ans_list_tab

<div id="ap-user-answer">
	<div id="answers-c">
	<?php 
if ($answer->have_posts()) {
    ?>
	<?php 
    ap_ans_list_tab();
    ?>
		<div id="answers">
			<?php 
    while ($answer->have_posts()) {
        $answer->the_post();
        include ap_get_theme_location('answer-list.php');
    }
    ?>
		</div>
	<?php 
    ap_pagination('', 2, $paged, $answer);
    ?>
	<?php 
} else {
    _e('No answers posted yet.', 'ap');
}
?>
	
	</div>
</div>
开发者ID:jessor,项目名称:anspress,代码行数:27,代码来源:user-answers.php

示例7: ap_answers_the_pagination

/**
 * output answers pagination
 */
function ap_answers_the_pagination()
{
    global $answers;
    ap_pagination(false, $answers->max_num_pages);
}
开发者ID:troe,项目名称:anspress,代码行数:8,代码来源:answer-loop.php

示例8: ap_get_all_users

function ap_get_all_users()
{
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    $per_page = ap_opt('tags_per_page');
    $total_terms = wp_count_terms('question_tags');
    $offset = $per_page * ($paged - 1);
    $args = array('number' => $per_page, 'offset' => $offset);
    $users = get_users($args);
    echo '<ul class="ap-tags-list">';
    foreach ($users as $key => $user) {
        echo '<li>';
        echo $user->display_name;
        echo '</li>';
    }
    echo '</ul>';
    ap_pagination(ceil($total_terms / $per_page), $range = 1, $paged);
}
开发者ID:Krl4,项目名称:anspress,代码行数:17,代码来源:functions.php

示例9: while

<div id="ap-lists" class="clearfix">
	<?php 
if ($answers->have_posts()) {
    ?>
		<div class="question-list">
			<?php 
    /* Start the Loop */
    while ($answers->have_posts()) {
        $answers->the_post();
        global $post;
        include ap_get_theme_location('answer-list.php');
    }
    ?>
		</div>
	<?php 
    ap_pagination(false, $answers->max_num_pages);
    ?>
	<?php 
} else {
    include ap_get_theme_location('content-none.php');
}
?>
	
</div>
开发者ID:haythameyd,项目名称:powrly,代码行数:24,代码来源:user-answers.php

示例10: ap_questions_the_pagination

/**
 * output questions page pagination
 * @return string pagination html tag
 */
function ap_questions_the_pagination()
{
    $questions = anspress()->questions;
    ap_pagination(false, $questions->max_num_pages);
}
开发者ID:haythameyd,项目名称:powrly,代码行数:9,代码来源:question-loop.php

示例11: ap_questions_the_pagination

/**
 * output questions page pagination
 * @return string pagination html tag
 */
function ap_questions_the_pagination()
{
    global $questions;
    ap_pagination(false, $questions->max_num_pages);
}
开发者ID:Byrlyne,项目名称:anspress,代码行数:9,代码来源:question-loop.php

示例12: ap_answers_the_pagination

/**
 * output answers pagination
 * @return string pagination html tag
 */
function ap_answers_the_pagination()
{
    $answers = anspress()->answers;
    ap_pagination(false, $answers->max_num_pages);
}
开发者ID:BRoz,项目名称:anspress,代码行数:9,代码来源:answer-loop.php

示例13: the_pagination

 public function the_pagination($base = false)
 {
     if (false === $base) {
         $base = ap_get_link_to('activity') . '/%_%';
     }
     ap_pagination($this->paged, $this->total_pages, $base);
 }
开发者ID:Byrlyne,项目名称:anspress,代码行数:7,代码来源:activity.php

示例14: ap_answers_list

function ap_answers_list($question_id, $order = 'voted')
{
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    if (is_question()) {
        $order = get_query_var('sort');
        if (empty($order)) {
            $order = ap_opt('answers_sort');
        }
    }
    if ($order == 'voted') {
        $ans_args = array('ap_query' => 'answer_sort_voted', 'post_type' => 'answer', 'post_status' => 'publish', 'post_parent' => get_the_ID(), 'showposts' => ap_opt('answers_per_page'), 'paged' => $paged, 'orderby' => 'meta_value_num', 'meta_key' => ANSPRESS_VOTE_META, 'meta_query' => array('relation' => 'OR', array('key' => ANSPRESS_BEST_META, 'compare' => '=', 'value' => '1'), array('key' => ANSPRESS_BEST_META, 'compare' => 'NOT EXISTS')));
    } elseif ($order == 'oldest') {
        $ans_args = array('ap_query' => 'answer_sort_newest', 'post_type' => 'answer', 'post_status' => 'publish', 'post_parent' => get_the_ID(), 'showposts' => ap_opt('answers_per_page'), 'paged' => $paged, 'orderby' => 'meta_value date', 'meta_key' => ANSPRESS_BEST_META, 'order' => 'ASC', 'meta_query' => array('relation' => 'OR', array('key' => ANSPRESS_BEST_META, 'compare' => 'NOT EXISTS')));
    } else {
        $ans_args = array('ap_query' => 'answer_sort_newest', 'post_type' => 'answer', 'post_status' => 'publish', 'post_parent' => get_the_ID(), 'showposts' => ap_opt('answers_per_page'), 'paged' => $paged, 'orderby' => 'meta_value date', 'meta_key' => ANSPRESS_BEST_META, 'order' => 'DESC', 'meta_query' => array('relation' => 'OR', array('key' => ANSPRESS_BEST_META, 'compare' => 'NOT EXISTS')));
    }
    $ans_args = apply_filters('ap_answers_query_args', $ans_args);
    $ans = new WP_Query($ans_args);
    // get answer sorting tab
    echo '<div id="answers-c">';
    ap_ans_tab();
    echo '<div id="answers">';
    while ($ans->have_posts()) {
        $ans->the_post();
        include ap_get_theme_location('answer.php');
    }
    echo '</div>';
    ap_pagination('', 2, $paged, $ans);
    echo '</div>';
    wp_reset_query();
}
开发者ID:coollog,项目名称:theboola,代码行数:31,代码来源:anspress-functions.php


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