Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/12/2021 07:48:13 PM (5 years ago)
Author:
imath
Message:

Make sure all BP components init their BP Blocks

Even if some components don't have native BP Blocks, it makes it easier for developers to add their custom blocks or override existing BP Blocks or disable BP Blocks. Working on the BP Blocks feature as a plugin made us realize this.

This commit also improves the BP_Block constructor inline documentation, adds a new method to the Core component to register REST controllers and moves the BP_REST_Components_Endpoint one from the Members component to the Core component.

Fixes #8511

File:
1 edited

Legend:

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

    r12463 r12994  
    446446        parent::rest_api_init( array( 'BP_REST_Messages_Endpoint' ) );
    447447    }
     448
     449    /**
     450     * Register the BP Messages Blocks.
     451     *
     452     * @since 9.0.0
     453     *
     454     * @param array $blocks Optional. See BP_Component::blocks_init() for
     455     *                      description.
     456     */
     457    public function blocks_init( $blocks = array() ) {
     458        parent::blocks_init( array() );
     459    }
    448460}
Note: See TracChangeset for help on using the changeset viewer.