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


PHP ap_meta_total_count函数代码示例

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


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

示例1: ap_get_parti

function ap_get_parti($post_id, $count = false)
{
    global $wpdb;
    if ($count) {
        return ap_meta_total_count('parti', $post_id, false, 'apmeta_userid');
    } else {
        return ap_get_all_meta(array('where' => array('apmeta_type' => array('value' => 'parti', 'compare' => '=', 'relation' => 'AND'), 'apmeta_actionid' => array('value' => $post_id, 'compare' => '=', 'relation' => 'AND')), 'group' => array('apmeta_userid' => array('relation' => 'AND'))), 5);
    }
}
开发者ID:coollog,项目名称:theboola,代码行数:9,代码来源:anspress-participants.php

示例2: ap_get_parti

function ap_get_parti($post_id = false, $count = false, $param = false)
{
    global $wpdb;
    if ($count) {
        return ap_meta_total_count('parti', $post_id, false, 'apmeta_userid');
    } else {
        $where = array('apmeta_type' => array('value' => 'parti', 'compare' => '=', 'relation' => 'AND'));
        if ($post_id !== false) {
            $where['apmeta_actionid'] = array('value' => $post_id, 'compare' => '=', 'relation' => 'AND');
        }
        if ($param !== false) {
            $where['apmeta_param'] = array('value' => $param, 'compare' => '=', 'relation' => 'AND');
        }
        return ap_get_all_meta(array('where' => $where, 'group' => array('apmeta_userid' => array('relation' => 'AND'))));
    }
}
开发者ID:Byrlyne,项目名称:anspress,代码行数:16,代码来源:participants.php

示例3: ap_following_count

/**
 * Count total numbers of following user 
 * @param  integer 		$user_id
 * @return integer
 */
function ap_following_count($user_id)
{
    return ap_meta_total_count('follower', false, $user_id);
}
开发者ID:CasteyDaSilva,项目名称:anspress,代码行数:9,代码来源:follow.php

示例4: ap_get_views_db

/**
 * @param integer $id
 */
function ap_get_views_db($id)
{
    return ap_meta_total_count('post_view', $id);
}
开发者ID:kennyma603,项目名称:anspress,代码行数:7,代码来源:view.php

示例5: ap_received_reputation_post

function ap_received_reputation_post($post_id)
{
    $reputation = ap_reputation_by_event('question_upvote', true);
    $vote_count = ap_meta_total_count('vote_up', $post_id);
    return $vote_count * $reputation;
}
开发者ID:Byrlyne,项目名称:anspress,代码行数:6,代码来源:reputation.php

示例6: ap_comment_flag_count

/**
 * Count comment flag votes.
 *
 *
 * @return int
 */
function ap_comment_flag_count($comment_id = false)
{
    if (false === $comment_id) {
        $comment_id = get_comment_ID();
    }
    return apply_filters('ap_comment_flag_count', ap_meta_total_count('comment_flag', $comment_id));
}
开发者ID:Byrlyne,项目名称:anspress,代码行数:13,代码来源:flag.php

示例7: ap_post_close_vote

/**
 * post close vote count.
 *
 * @param bool|int $postid
 *
 * @return int
 */
function ap_post_close_vote($postid = false)
{
    global $post;
    $postid = $postid ? $postid : $post->ID;
    return ap_meta_total_count('close', $postid);
}
开发者ID:kennyma603,项目名称:anspress,代码行数:13,代码来源:vote.php

示例8: ap_post_subscribers_count

function ap_post_subscribers_count($post_id)
{
    _deprecated_function('ap_post_subscribers_count', '2.2.0.1', 'ap_subscribers_count');
    $post_id = $post_id ? $post_id : get_question_id();
    return ap_meta_total_count('subscriber', $post_id);
}
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:6,代码来源:deprecated.php

示例9: ap_subscribers_count

/**
 * Return the count of subscribers for question or term
 * @param  integer $action_id Question id or term_id
 * @param  string $type Type of subscription
 * @return integer
 */
function ap_subscribers_count($action_id = false, $type = '')
{
    $subscribe_type = $type != '' ? 'subscriber_' . $type : 'subscriber';
    $action_id = $action_id ? $action_id : get_question_id();
    return ap_meta_total_count($subscribe_type, $action_id);
}
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:12,代码来源:subscriber.php

示例10: ap_post_flag_count

function ap_post_flag_count($postid = false)
{
    global $post;
    $postid = $postid ? $postid : $post->ID;
    return ap_meta_total_count('flag', $postid);
}
开发者ID:haythameyd,项目名称:powrly,代码行数:6,代码来源:vote.php

示例11: ap_received_point_post

function ap_received_point_post($post_id)
{
    $point = ap_point_by_event('question_upvote', true);
    $vote_count = ap_meta_total_count('vote_up', $post_id);
    return $vote_count * $point;
}
开发者ID:jessor,项目名称:anspress,代码行数:6,代码来源:anspress-points.php


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