Changeset 7451 for trunk/bp-core/bp-core-moderation.php
- Timestamp:
- 10/20/2013 07:21:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-moderation.php
r6342 r7451 1 1 <?php 2 2 /** 3 * BuddyPress Moderation Functions 3 * BuddyPress Moderation Functions. 4 4 * 5 5 * @package BuddyPress 6 6 * @subpackage Core 7 * @since BuddyPress (1.6 )7 * @since BuddyPress (1.6.0) 8 8 */ 9 9 … … 14 14 15 15 /** 16 * Check for flooding 16 * Check for flooding. 17 17 * 18 18 * Check to make sure that a user is not making too many posts in a short amount 19 19 * of time. 20 20 * 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. 28 30 */ 29 31 function bp_core_check_for_flood( $user_id = 0 ) { … … 45 47 46 48 /** 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. 57 61 */ 58 62 function bp_core_check_for_moderation( $user_id = 0, $title = '', $content = '' ) { … … 151 155 152 156 /** 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. 163 169 */ 164 170 function bp_core_check_for_blacklist( $user_id = 0, $title = '', $content = '' ) { … … 239 245 240 246 /** 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. 245 252 */ 246 253 function bp_core_current_user_ip() { … … 251 258 252 259 /** 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. 257 265 */ 258 266 function bp_core_current_user_ua() {
Note: See TracChangeset
for help on using the changeset viewer.