BBP_Topics_Admin::bulk_actions( array $actions )

Add spam/unspam bulk actions to the bulk action dropdown.


Description Description


Parameters Parameters

$actions

(Required) The list of bulk actions.


Top ↑

Return Return

(array) The filtered list of bulk actions.


Top ↑

Source Source

File: includes/admin/topics.php

	public function bulk_actions( $actions ) {

		if ( current_user_can( 'moderate' ) ) {
			if ( bbp_get_spam_status_id() === get_query_var( 'post_status' ) ) {
				$actions['unspam'] = esc_html__( 'Unspam', 'bbpress' );
			} else {
				$actions['spam'] = esc_html__( 'Spam', 'bbpress' );
			}
		}

		return $actions;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.