Functions

Allow usage of the paragraph tag and the link’s target attribute into Activity content.

bp_activity_blocks_allowed_tags(array $tags = array()) : array
package buddypress\bp-activity-block-functions
since 11.0.0

Parameters

$tags

array

The activity allowed tags.

Returns

arrayThe block based activity allowed tags.

Make sure only Emoji chars are saved into the DB.

bp_activity_blocks_preserve_emoji_chars(string $activity_content) : string
package buddypress\bp-activity-block-functions
since 11.0.0

Parameters

$activity_content

string

The activity content.

Returns

stringThe sanitized activity content.

Parses dynamic blocks out of the activity content and re-renders them.

bp_activity_do_blocks(string $content) : string
package buddypress\bp-activity-block-functions
since 11.0.0

Parameters

$content

string

Activity content.

Returns

stringThe block based activity content.

Determine whether an activity or its content string has blocks.

bp_activity_has_blocks(string|integer|\BP_Activity_Activity|null $activity = null) : boolean
package buddypress\bp-activity-block-functions
since 11.0.0
see

Parameters

$activity

stringinteger\BP_Activity_Activitynull

Activity content, Activity ID, or Activity object.

Returns

booleanWhether the activity content has blocks.

If `bp_activity_do_blocks()` needs to remove `wpautop()` from the `bp_get_activity_content_body` filter, this re-adds it afterwards, for subsequent `bp_get_activity_content_body` usage.

bp_activity_restore_wpautop_hook(string $content) : string
package buddypress\bp-activity-block-functions
since 11.0.0

Parameters

$content

string

The activity content running through this filter.

Returns

stringThe unmodified activity content.