bp_admin_sanitize_callback_blogforum_comments( bool $value = false )

Sanitization for bp-disable-blogforum-comments setting.


Description Description

In the UI, a checkbox asks whether you’d like to enable post/comment activity comments. For legacy reasons, the option that we store is 1 if these comments are disabled. So we use this function to flip the boolean before saving the intval.


Parameters Parameters

$value

(Optional) Whether or not to sanitize.

Default value: false


Top ↑

Return Return

(bool)


Top ↑

Source Source

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

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

Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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