BP_Admin_Setting_Friends::bp_admin_sanitize_callback_force_friendship_to_message( bool $value = false )

Sanitization for bp-force-friendship-to-message setting.

Description

In the UI, a checkbox asks whether you’d like to enable forceing users to be friends for messaging. For legacy reasons, the option that we store is 1 if these friends or messaging is disabled. So we use this function to flip the boolean before saving the intval.

Parameters

$value

(Optional) Whether or not to sanitize.

Default value: false

Return

(bool)

Source

File: bp-core/admin/settings/bp-admin-setting-friends.php

	public function bp_admin_sanitize_callback_force_friendship_to_message( $value = false ) {
		return $value ? 1 : 0;
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.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.