Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/20/2013 07:21:38 PM (11 years ago)
Author:
boonebgorges
Message:

Improve inline docs in bp-core. See #5022

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-moderation.php

    r6342 r7451  
    11<?php
    22/**
    3  * BuddyPress Moderation Functions
     3 * BuddyPress Moderation Functions.
    44 *
    55 * @package BuddyPress
    66 * @subpackage Core
    7  * @since BuddyPress (1.6)
     7 * @since BuddyPress (1.6.0)
    88 */
    99
     
    1414
    1515/**
    16  * Check for flooding
     16 * Check for flooding.
    1717 *
    1818 * Check to make sure that a user is not making too many posts in a short amount
    1919 * of time.
    2020 *
    21  * @param int $user_id User id to check for flood
    22  * @return bool True if there is no flooding, true if there is
    23  * @since BuddyPress (1.6)
    24  * @uses current_user_can() To check if the current user can throttle
    25  * @uses bp_get_option() To get the throttle time
    26  * @uses get_transient() To get the last posted transient of the ip
    27  * @uses get_user_meta() To get the last posted meta of the user
     21 * @since BuddyPress (1.6.0)
     22 *
     23 * @uses current_user_can() To check if the current user can throttle.
     24 * @uses bp_get_option() To get the throttle time.
     25 * @uses get_transient() To get the last posted transient of the ip.
     26 * @uses get_user_meta() To get the last posted meta of the user.
     27 *
     28 * @param int $user_id User id to check for flood.
     29 * @return bool True if there is no flooding, false if there is.
    2830 */
    2931function bp_core_check_for_flood( $user_id = 0 ) {
     
    4547
    4648/**
    47  * Check for moderation keys and too many links
    48  *
    49  * @param int $user_id Topic or reply author ID
    50  * @param string $title The title of the content
    51  * @param string $content The content being posted
    52  * @return bool True if test is passed, false if fail
    53  * @since BuddyPress (1.6)
    54  * @uses bp_current_author_ip() To get current user IP address
    55  * @uses bp_current_author_ua() To get current user agent
    56  * @uses bp_current_user_can() Allow super admins to bypass blacklist
     49 * Check for moderation keys and too many links.
     50 *
     51 * @since BuddyPress (1.6.0)
     52 *
     53 * @uses bp_current_author_ip() To get current user IP address.
     54 * @uses bp_current_author_ua() To get current user agent.
     55 * @uses bp_current_user_can() Allow super admins to bypass blacklist.
     56 *
     57 * @param int $user_id Topic or reply author ID.
     58 * @param string $title The title of the content.
     59 * @param string $content The content being posted.
     60 * @return bool True if test is passed, false if fail.
    5761 */
    5862function bp_core_check_for_moderation( $user_id = 0, $title = '', $content = '' ) {
     
    151155
    152156/**
    153  * Checks for blocked keys
    154  *
    155  * @param int $user_id Topic or reply author ID
    156  * @param string $title The title of the content
    157  * @param string $content The content being posted
    158  * @return bool True if test is passed, false if fail
    159  * @uses bp_current_author_ip() To get current user IP address
    160  * @uses bp_current_author_ua() To get current user agent
    161  * @uses bp_current_user_can() Allow super admins to bypass blacklist
    162  * @since BuddyPress (1.6)
     157 * Check for blocked keys.
     158 *
     159 * @since BuddyPress (1.6.0)
     160 *
     161 * @uses bp_current_author_ip() To get current user IP address.
     162 * @uses bp_current_author_ua() To get current user agent.
     163 * @uses bp_current_user_can() Allow super admins to bypass blacklist.
     164 *
     165 * @param int $user_id Topic or reply author ID.
     166 * @param string $title The title of the content.
     167 * @param string $content The content being posted.
     168 * @return bool True if test is passed, false if fail.
    163169 */
    164170function bp_core_check_for_blacklist( $user_id = 0, $title = '', $content = '' ) {
     
    239245
    240246/**
    241  * Get the current-user IP address
    242  *
    243  * @return string
    244  * @since BuddyPress (1.6)
     247 * Get the current user's IP address.
     248 *
     249 * @since BuddyPress (1.6.0)
     250 *
     251 * @return string IP address.
    245252 */
    246253function bp_core_current_user_ip() {
     
    251258
    252259/**
    253  * Get the current-user user-agent
    254  *
    255  * @return string
    256  * @since BuddyPress (1.6)
     260 * Get the current user's user-agent.
     261 *
     262 * @since BuddyPress (1.6.0)
     263 *
     264 * @return string User agent string.
    257265 */
    258266function bp_core_current_user_ua() {
Note: See TracChangeset for help on using the changeset viewer.