Skip to:
Content

BuddyPress.org

Changeset 13435


Ignore:
Timestamp:
03/09/2023 06:30:55 PM (2 years ago)
Author:
imath
Message:

BP REST API: make sure the SiteWide notice endpoint is available

The corresponding REST Controller wasn't added to list of controllers to
load from the Messages component's rest_api_init() method.

Props sjregan

Closes https://github.com/buddypress/buddypress/pull/72
Fixes #8849

Location:
trunk/src
Files:
2 edited

Legend:

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

    r13432 r13435  
    439439     */
    440440    public function rest_api_init( $controllers = array() ) {
    441         parent::rest_api_init( array( 'BP_REST_Messages_Endpoint' ) );
     441        parent::rest_api_init(
     442            array(
     443                'BP_REST_Messages_Endpoint',
     444                'BP_REST_Sitewide_Notices_Endpoint',
     445            )
     446        );
    442447    }
    443448
  • trunk/src/class-buddypress.php

    r13432 r13435  
    771771
    772772            'BP_REST_Messages_Endpoint'                  => 'messages',
     773            'BP_REST_Sitewide_Notices_Endpoint'          => 'messages',
    773774
    774775            'BP_REST_Notifications_Endpoint'             => 'notifications',
Note: See TracChangeset for help on using the changeset viewer.