Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/30/2011 04:24:51 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Remove unused $is_edit param in anonymous user data function, and clean up some whitespace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-common-functions.php

    r3548 r3555  
    706706 * @param mixed $args Optional. If no args are there, then $_POST values are
    707707 *                     used.
    708  * @param bool $is_edit Optional. Is the topic/reply being edited? There are no
    709  *                       IP checks then.
    710708 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_name' with the
    711709 *                        anonymous user name
    712710 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_email' with the
    713711 *                        anonymous user email
    714  * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_ip' with the
    715  *                        anonymous user's ip address
    716712 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_website' with the
    717713 *                        anonymous user website
    718714 * @return bool|array False on errors, values in an array on success
    719715 */
    720 function bbp_filter_anonymous_post_data( $args = '', $is_edit = false ) {
     716function bbp_filter_anonymous_post_data( $args = '' ) {
    721717
    722718    // Assign variables
     
    914910
    915911    // Post title and content
    916     $post['title']   = $title; 
    917     $post['content'] = $content; 
     912    $post['title']   = $title;
     913    $post['content'] = $content;
    918914
    919915    /** Words *****************************************************************/
     
    938934        // Loop through post data
    939935        foreach( $post as $post_data ) {
    940            
     936
    941937            // Check each user data for current word
    942938            if ( preg_match( $pattern, $post_data ) ) {
    943                
     939
    944940                // Post does not pass
    945941                return false;
     
    991987
    992988    /** Validation ************************************************************/
     989
    993990    $reply_id = bbp_get_reply_id( $reply_id );
    994991    $topic_id = bbp_get_topic_id( $topic_id );
    995992    $forum_id = bbp_get_forum_id( $forum_id );
    996    
     993
    997994    /** Reply *****************************************************************/
    998995
     
    13621359                            'value'   => $forum_id,
    13631360                            'compare' => '='
    1364                         ) );                       
     1361                        ) );
    13651362                    }
    13661363
     
    15041501 *
    15051502 * @see WP_Error()
    1506  * 
     1503 *
    15071504 * @uses is_wp_error()
    15081505 * @usese WP_Error::get_error_codes()
     
    15101507function bbp_has_errors() {
    15111508    global $bbp;
    1512    
     1509
    15131510    // Assume no errors
    15141511    $has_errors = false;
     
    15201517    // Filter return value
    15211518    $has_errors = apply_filters( 'bbp_has_errors', $has_errors, $bbp->errors );
    1522    
     1519
    15231520    return $has_errors;
    15241521}
Note: See TracChangeset for help on using the changeset viewer.