BP_Akismet::setup_actions()

Hook Akismet into the activity feed.

Description

Source

File: bp-activity/classes/class-bp-akismet.php

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
protected function setup_actions() {
    // Add nonces to activity feed lists.
    add_action( 'bp_after_activity_post_form', array( $this, 'add_activity_stream_nonce' ) );
    add_action( 'bp_activity_entry_comments'array( $this, 'add_activity_stream_nonce' ) );
 
    // Add a "mark as spam" button to individual activity items.
    add_action( 'bp_activity_entry_meta',      array( $this, 'add_activity_spam_button' ) );
    add_action( 'bp_activity_comment_options', array( $this, 'add_activity_comment_spam_button' ) );
 
    // Check activity for spam.
    add_action( 'bp_activity_before_save',     array( $this, 'check_activity' ), 4, 1 );
 
    // Tidy up member's latest (activity) update.
    add_action( 'bp_activity_posted_update',   array( $this, 'check_member_activity_update' ), 1, 3 );
 
    // Hooks to extend Activity core spam/ham functions for Akismet.
    add_action( 'bp_activity_mark_as_spam',    array( $this, 'mark_as_spam' ), 10, 2 );
    add_action( 'bp_activity_mark_as_ham',     array( $this, 'mark_as_ham' ),  10, 2 );
 
    // Hook into the Activity wp-admin screen.
    add_action( 'bp_activity_admin_comment_row_actions', array( $this, 'comment_row_action' ), 10, 2 );
    add_action( 'bp_activity_admin_load',                array( $this, 'add_history_metabox' ) );
}

Changelog

Changelog
Version Description
BuddyPress 1.6.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.