bbp_mail( array $args = array() )

Filter the arguments used by wp_mail for bbPress specific emails


Description Description


Parameters Parameters

$args

(Optional) A compacted array of wp_mail() arguments, including the "to" email, subject, message, headers, and attachments values.

Default value: array()


Top ↑

Return Return

(array) Array of capabilities


Top ↑

Source Source

File: includes/core/sub-actions.php

function bbp_mail( $args = array() ) {

	// Bail if headers are missing/malformed
	if ( empty( $args['headers'] ) || ! is_array( $args['headers'] ) ) {
		return $args;
	}

	// Header to search all headers for
	$bbp_header = bbp_get_email_header();

	// Bail if no bbPress header found
	if ( false === array_search( $bbp_header, $args['headers'], true ) ) {
		return $args;
	}

	// Filter & return
	return (array) apply_filters( 'bbp_mail', $args );
}

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.