Changeset 3555 for branches/plugin/bbp-includes/bbp-common-functions.php
- Timestamp:
- 10/30/2011 04:24:51 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-common-functions.php
r3548 r3555 706 706 * @param mixed $args Optional. If no args are there, then $_POST values are 707 707 * used. 708 * @param bool $is_edit Optional. Is the topic/reply being edited? There are no709 * IP checks then.710 708 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_name' with the 711 709 * anonymous user name 712 710 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_email' with the 713 711 * anonymous user email 714 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_ip' with the715 * anonymous user's ip address716 712 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_website' with the 717 713 * anonymous user website 718 714 * @return bool|array False on errors, values in an array on success 719 715 */ 720 function bbp_filter_anonymous_post_data( $args = '' , $is_edit = false) {716 function bbp_filter_anonymous_post_data( $args = '' ) { 721 717 722 718 // Assign variables … … 914 910 915 911 // Post title and content 916 $post['title'] = $title; 917 $post['content'] = $content; 912 $post['title'] = $title; 913 $post['content'] = $content; 918 914 919 915 /** Words *****************************************************************/ … … 938 934 // Loop through post data 939 935 foreach( $post as $post_data ) { 940 936 941 937 // Check each user data for current word 942 938 if ( preg_match( $pattern, $post_data ) ) { 943 939 944 940 // Post does not pass 945 941 return false; … … 991 987 992 988 /** Validation ************************************************************/ 989 993 990 $reply_id = bbp_get_reply_id( $reply_id ); 994 991 $topic_id = bbp_get_topic_id( $topic_id ); 995 992 $forum_id = bbp_get_forum_id( $forum_id ); 996 993 997 994 /** Reply *****************************************************************/ 998 995 … … 1362 1359 'value' => $forum_id, 1363 1360 'compare' => '=' 1364 ) ); 1361 ) ); 1365 1362 } 1366 1363 … … 1504 1501 * 1505 1502 * @see WP_Error() 1506 * 1503 * 1507 1504 * @uses is_wp_error() 1508 1505 * @usese WP_Error::get_error_codes() … … 1510 1507 function bbp_has_errors() { 1511 1508 global $bbp; 1512 1509 1513 1510 // Assume no errors 1514 1511 $has_errors = false; … … 1520 1517 // Filter return value 1521 1518 $has_errors = apply_filters( 'bbp_has_errors', $has_errors, $bbp->errors ); 1522 1519 1523 1520 return $has_errors; 1524 1521 }
Note: See TracChangeset
for help on using the changeset viewer.