Skip to:
Content

bbPress.org

Changeset 1369


Ignore:
Timestamp:
03/24/2008 04:17:36 AM (18 years ago)
Author:
sambauers
Message:

PHPDoc for bb-includes/statistics-functions.php from rmccue - See #836

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/statistics-functions.php

    r1273 r1369  
    11<?php
    2 
     2/**
     3 * bbPress Forum Content Statistics Functions
     4 *
     5 * @package bbPress
     6 */
     7
     8/**
     9 * get_total_users() - {@internal Missing Short Description}}
     10 *
     11 * {@internal Missing Long Description}}
     12 *
     13 * @since {@internal Unknown}}
     14 * @global bbdb $bbdb
     15 * @global int $bb_total_users
     16 *
     17 * @return int
     18 */
    319function get_total_users() {
    420    global $bbdb, $bb_total_users;
     
    925}
    1026
     27/**
     28 * total_users() - {@internal Missing Short Description}}
     29 *
     30 * {@internal Missing Long Description}}
     31 *
     32 * @since {@internal Unknown}}
     33 */
    1134function total_users() {
    1235    echo apply_filters('total_users', get_total_users() );
    1336}
    1437
     38/**
     39 * get_total_posts() - {@internal Missing Short Description}}
     40 *
     41 * {@internal Missing Long Description}}
     42 *
     43 * @since {@internal Unknown}}
     44 * @global bbdb $bbdb
     45 * @global int $bb_total_posts
     46 *
     47 * @return int
     48 */
    1549function get_total_posts() {
    1650    global $bbdb, $bb_total_posts;
     
    2155}
    2256
     57/**
     58 * total_users() - {@internal Missing Short Description}}
     59 *
     60 * {@internal Missing Long Description}}
     61 *
     62 * @since {@internal Unknown}}
     63 */
    2364function total_posts() {
    2465    echo apply_filters('total_posts', get_total_posts() );
    2566}
    2667
     68/**
     69 * get_total_topics() - {@internal Missing Short Description}}
     70 *
     71 * {@internal Missing Long Description}}
     72 *
     73 * @since {@internal Unknown}}
     74 * @global bbdb $bbdb
     75 * @global int $bb_total_topics
     76 *
     77 * @return int
     78 */
    2779function get_total_topics() {
    2880    global $bbdb, $bb_total_topics;
     
    3385}
    3486
     87/**
     88 * total_topics() - {@internal Missing Short Description}}
     89 *
     90 * {@internal Missing Long Description}}
     91 *
     92 * @since {@internal Unknown}}
     93 */
    3594function total_topics() {
    3695    echo apply_filters('total_topics', get_total_topics());
    3796}
    3897
     98/**
     99 * get_popular_topics() - {@internal Missing Short Description}}
     100 *
     101 * {@internal Missing Long Description}}
     102 *
     103 * @since {@internal Unknown}}
     104 *
     105 * @return bbdb|BB_Cache
     106 */
    39107function get_popular_topics( $num = 10 ) {
    40108    $query = new BB_Query( 'topic', array('per_page' => $num, 'order_by' => 'topic_posts', 'append_meta' => 0) );
     
    42110}
    43111
     112/**
     113 * get_recent_registrants() - {@internal Missing Short Description}}
     114 *
     115 * {@internal Missing Long Description}}
     116 *
     117 * @since {@internal Unknown}}
     118 * @global bbdb $bbdb
     119 *
     120 * @return array
     121 */
    44122function get_recent_registrants( $num = 10 ) {
    45123    global $bbdb;
     
    50128}
    51129
     130/**
     131 * bb_inception() - {@internal Missing Short Description}}
     132 *
     133 * {@internal Missing Long Description}}
     134 *
     135 * @since {@internal Unknown}}
     136 */
    52137function bb_inception( $args = '' ) {
    53138    $args = _bb_parse_time_function_args( $args );
     
    56141}
    57142
     143/**
     144 * bb_get_inception() - {@internal Missing Short Description}}
     145 *
     146 * {@internal Missing Long Description}}
     147 *
     148 * @since {@internal Unknown}}
     149 * @global bbdb $bbdb
     150 * @global int $bb_inception
     151 *
     152 * @return int
     153 */
    58154function bb_get_inception( $args = '' ) {
    59155    $args = _bb_parse_time_function_args( $args );
     
    65161    return apply_filters( 'bb_get_inception', _bb_time_function_return( $bb_inception, $args ) );
    66162}
     163
     164/**
     165 * get_registrations_per_day() - {@internal Missing Short Description}}
     166 *
     167 * {@internal Missing Long Description}}
     168 *
     169 * @since {@internal Unknown}}
     170 *
     171 * @return int|float
     172 */
    67173function get_registrations_per_day() {
    68174    return get_total_users() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 );
    69175}
    70176
     177/**
     178 * registrations_per_day() - {@internal Missing Short Description}}
     179 *
     180 * {@internal Missing Long Description}}
     181 *
     182 * @since {@internal Unknown}}
     183 */
    71184function registrations_per_day() {
    72185    echo apply_filters('registrations_per_day', bb_number_format_i18n(get_registrations_per_day(),3));
    73186}
    74187
     188/**
     189 * get_posts_per_day() - {@internal Missing Short Description}}
     190 *
     191 * {@internal Missing Long Description}}
     192 *
     193 * @since {@internal Unknown}}
     194 *
     195 * @return int|float
     196 */
    75197function get_posts_per_day() {
    76198    return get_total_posts() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 );
    77199}
    78200
     201/**
     202 * posts_per_day() - {@internal Missing Short Description}}
     203 *
     204 * {@internal Missing Long Description}}
     205 *
     206 * @since {@internal Unknown}}
     207 */
    79208function posts_per_day() {
    80209    echo apply_filters('posts_per_day', bb_number_format_i18n(get_posts_per_day(),3));
    81210}
    82211
     212/**
     213 * get_topics_per_day() - {@internal Missing Short Description}}
     214 *
     215 * {@internal Missing Long Description}}
     216 *
     217 * @since {@internal Unknown}}
     218 *
     219 * @return int|float
     220 */
    83221function get_topics_per_day() {
    84222    return get_total_topics() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 );
    85223}
    86224
     225/**
     226 * topics_per_day() - {@internal Missing Short Description}}
     227 *
     228 * {@internal Missing Long Description}}
     229 *
     230 * @since {@internal Unknown}}
     231 */
    87232function topics_per_day() {
    88233    echo apply_filters('topics_per_day', bb_number_format_i18n(get_topics_per_day(),3));
Note: See TracChangeset for help on using the changeset viewer.