Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/25/2019 11:22:00 PM (4 years ago)
Author:
imath
Message:

Improve the way BP REST API Controllers are loaded

Introduce a new filter to allow site owners to eventually disable one or more BP REST API Controllers.

See #7156

File:
1 edited

Legend:

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

    r12451 r12463  
    439439     *
    440440     * @since 5.0.0
    441      */
    442     public function rest_api_init() {
    443         $controller = new BP_REST_Messages_Endpoint();
    444         $controller->register_routes();
    445 
    446         parent::rest_api_init();
     441     *
     442     * @param array $controllers Optional. See BP_Component::rest_api_init() for
     443     *                           description.
     444     */
     445    public function rest_api_init( $controllers = array() ) {
     446        parent::rest_api_init( array( 'BP_REST_Messages_Endpoint' ) );
    447447    }
    448448}
Note: See TracChangeset for help on using the changeset viewer.