Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/19/2022 10:26:02 AM (4 years ago)
Author:
imath
Message:

Silently introduce block support for Activity content

Functions and filters bringing support for Block based activity content are disabled by default. We're adding these so that it's easier to progress on building a Block Based activity post form from a feature as a plugin and the BP Attachments BuddyPress Add-on. To allow Activity content to support blocks, we simply need to use this filter add_filter( 'bp_is_activity_blocks_active', '__return_true' ); .

This commit also allowes community users to share more than 2 links when these links are coming from the website BuddyPress is activated on.

Closes https://github.com/buddypress/buddypress/pull/38
Fixes #8765

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/classes/class-bp-activity-component.php

    r13291 r13370  
    7878                if ( bp_is_active( $this->id, 'embeds' ) ) {
    7979                        $includes[] = 'embeds';
     80                }
     81
     82                /*
     83                 * Activity blocks feature.
     84                 *
     85                 * By default this feature is inactive. We're including specific block functions
     86                 * in version 11.0.0 so these can be used by BuddyPress Add-ons such as BP Attachments
     87                 * or BP Activity Block Editor.
     88                 */
     89                if ( bp_is_active( $this->id, 'blocks' ) ) {
     90                        $includes[] = 'block-functions';
    8091                }
    8192
Note: See TracChangeset for help on using the changeset viewer.