Skip to:
Content

bbPress.org

Changeset 5933


Ignore:
Timestamp:
08/27/2015 06:47:14 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Akismet: include title with content. Props cfinke. Fixes #2858.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/extend/akismet.php

    r5908 r5933  
    158158        }
    159159
     160        // Pass title & content together into comment content
     161        $_post_content = trim( $post_data['post_title'] . "\n\n" . $post_data['post_content'] );
     162
    160163        // Put post_data back into usable array
    161164        $_post = array(
     
    163166            'comment_author_email'           => $user_data['email'],
    164167            'comment_author_url'             => $user_data['website'],
    165             'comment_content'                => $post_data['post_content'],
     168            'comment_content'                => $_post_content,
    166169            'comment_post_ID'                => $post_data['post_parent'],
    167170            'comment_type'                   => $post_data['post_type'],
     
    284287        }
    285288
     289        // Pass title & content together into comment content
     290        $_post_content = trim( $_post->post_title . "\n\n" . $_post->post_content );
     291
    286292        // Set some default post_data
    287293        $post_data = array(
     
    290296            'comment_author_email' => $_post->post_author ? get_the_author_meta( 'email',        $_post->post_author ) : get_post_meta( $post_id, '_bbp_anonymous_email',   true ),
    291297            'comment_author_url'   => $_post->post_author ? bbp_get_user_profile_url(            $_post->post_author ) : get_post_meta( $post_id, '_bbp_anonymous_website', true ),
    292             'comment_content'      => $_post->post_content,
     298            'comment_content'      => $_post_content,
    293299            'comment_date'         => $_post->post_date,
    294300            'comment_ID'           => $post_id,
Note: See TracChangeset for help on using the changeset viewer.