bp_admin_sanitize_callback_blogforum_comments( bool $value = false )
Sanitization for bp-disable-blogforum-comments setting.
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
- $value
-
(bool) (Optional) Whether or not to sanitize.
Default value: false
Return
(bool)
Source
File: bp-core/admin/bp-core-admin-settings.php
function bp_admin_sanitize_callback_blogforum_comments( $value = false ) { return $value ? 0 : 1; }
Changelog
Version | Description |
---|---|
BuddyPress 1.6.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.