bp_media_message_validated_content( bool $validated_content, string $content, array|object $post )
Validate message if media is not empty.
Description
Parameters
- $validated_content
-
(Required) Boolean from filter.
- $content
-
(Required) Message content.
- $post
-
(Required) Request object.
Return
(bool)
Source
File: bp-media/bp-media-filters.php
function bp_media_message_validated_content( $validated_content, $content, $post ) {
// check if media is enabled in messages or not and empty media in object request or not.
if ( bp_is_messages_media_support_enabled() && ! empty( $post['media'] ) ) {
$validated_content = true;
}
return $validated_content;
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.5.1 | 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.