Load additional sign-up sanitization filters on bp_loaded.

Description Description

These are used to prevent XSS in the BuddyPress sign-up process. You can unhook these to allow for customization of your registration fields; however, it is highly recommended that you leave these in place for the safety of your network.

Source Source

File: bp-members/bp-members-filters.php

function bp_members_signup_sanitization() {

	// Filters on sign-up fields.
	$fields = array (

	// Add the filters to each field.
	foreach( $fields as $filter ) {
		add_filter( $filter, 'esc_html',       1 );
		add_filter( $filter, 'wp_filter_kses', 2 );
		add_filter( $filter, 'stripslashes',   3 );

	// Sanitize email.
	add_filter( 'bp_get_signup_email_value', 'sanitize_email' );

Top ↑

Changelog Changelog

Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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