Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/31/2020 11:33:35 AM (4 years ago)
Author:
imath
Message:

Prepare the inclusion of the BP REST API remaining endpoints

6.0.0 is introducing 6 new BP REST API endpoints :

  • Blogs, Blog avatar,
  • Friends,
  • Group Cover image,
  • Member Cover Image and User Signups

We're also reorganizing files, making sure they are located to their belonging endpoints. As a result, 2 files are now deprecated:

  • bp-core/classes/class-bp-rest-attachments-group-avatar-endpoint.php (moved into bp-groups/classes)
  • bp-core/classes/class-bp-rest-attachments-member-avatar-endpoint.php (moved into bp-members/classes)

Props espellcaste, boonebgorges & I ;)

Fixes #7156

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/assets/bp-rest-api-controllers.php

    r12485 r12607  
    99    public function register_routes( $controller = '' ) {
    1010        array_push( buddypress()->unit_test_rest->controllers, $controller );
     11    }
     12}
     13
     14/**
     15 * BP Member Cover Image REST Controller's mock.
     16 */
     17class BP_REST_Attachments_Member_Cover_Endpoint extends BP_REST_Mock_Class {
     18    public function __construct() {
     19        $this->namespace = bp_rest_namespace() . '/' . bp_rest_version();
     20        $this->rest_base = 'members';
     21    }
     22
     23    public function register_routes( $controller = '' ) {
     24        parent::register_routes( 'BP_REST_Attachments_Member_Cover_Endpoint' );
    1125    }
    1226}
Note: See TracChangeset for help on using the changeset viewer.