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-members/classes/class-bp-members-component.php

    r12951 r12994  
    696696     * @since 5.0.0
    697697     * @since 6.0.0 Adds the Member Cover and Signup REST endpoints.
     698     * @since 9.0.0 Moves the `BP_REST_Components_Endpoint` controller in `BP_Core` component.
    698699     *
    699700     * @param array $controllers Optional. See BP_Component::rest_api_init() for
     
    702703    public function rest_api_init( $controllers = array() ) {
    703704        $controllers = array(
    704             /**
    705              * As the Members component is always loaded,
    706              * let's register the Components endpoint here.
    707              */
    708             'BP_REST_Components_Endpoint',
    709705            'BP_REST_Members_Endpoint',
    710706            'BP_REST_Attachments_Member_Avatar_Endpoint',
Note: See TracChangeset for help on using the changeset viewer.