Skip to:
Content

BuddyPress.org

Changeset 8229


Ignore:
Timestamp:
04/02/2014 07:15:51 AM (8 years ago)
Author:
r-a-y
Message:

Blogs: When a blog comment is unapproved, mark the corresponding activity item as spam.

This mirrors how BuddyPress handles other similar comment statuses
like 'trash' and 'spam'.

See #5130

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-functions.php

    r8228 r8229  
    973973     * If a blog comment transitions to trashed, or spammed, mark the activity as spam.
    974974     * If a blog comment transitions to approved (and the activity exists), mark the activity as ham.
     975     * If a blog comment transitions to unapproved (and the activity exists), mark the activity as spam.
    975976     * Otherwise, record the comment into the activity stream.
    976977     */
     
    981982
    982983    // These clauses handle trash, spam, and un-spams.
    983     } elseif ( in_array( $new_status, array( 'trash', 'spam' ) ) ) {
     984    } elseif ( in_array( $new_status, array( 'trash', 'spam', 'unapproved' ) ) ) {
    984985        $action = 'spam_activity';
    985986    } elseif ( 'approved' == $new_status ) {
Note: See TracChangeset for help on using the changeset viewer.