<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][12607] trunk: Prepare the inclusion of the BP REST API remaining endpoints</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/12607">12607</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/12607","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>imath</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-03-31 11:33:35 +0000 (Tue, 31 Mar 2020)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>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 <a href="http://buddypress.trac.wordpress.org/ticket/7156">#7156</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpblogsclassesclassbpblogscomponentphp">trunk/src/bp-blogs/classes/class-bp-blogs-component.php</a></li>
<li><a href="#trunksrcbpfriendsclassesclassbpfriendscomponentphp">trunk/src/bp-friends/classes/class-bp-friends-component.php</a></li>
<li><a href="#trunksrcbpgroupsclassesclassbpgroupscomponentphp">trunk/src/bp-groups/classes/class-bp-groups-component.php</a></li>
<li><a href="#trunksrcbpmembersclassesclassbpmemberscomponentphp">trunk/src/bp-members/classes/class-bp-members-component.php</a></li>
<li><a href="#trunksrcclassbuddypressphp">trunk/src/class-buddypress.php</a></li>
<li><a href="#trunktestsphpunitassetsbprestapicontrollersphp">trunk/tests/phpunit/assets/bp-rest-api-controllers.php</a></li>
<li><a href="#trunktestsphpunittestcasescoreclassbpcomponentphp">trunk/tests/phpunit/testcases/core/class-bp-component.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunksrcbpcoreclassesclassbprestattachmentsgroupavatarendpointphp">trunk/src/bp-core/classes/class-bp-rest-attachments-group-avatar-endpoint.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbprestattachmentsmemberavatarendpointphp">trunk/src/bp-core/classes/class-bp-rest-attachments-member-avatar-endpoint.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpblogsclassesclassbpblogscomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-blogs/classes/class-bp-blogs-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-blogs/classes/class-bp-blogs-component.php 2020-03-31 02:45:13 UTC (rev 12606)
+++ trunk/src/bp-blogs/classes/class-bp-blogs-component.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -356,4 +356,27 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> parent::setup_cache_groups();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Init the BP REST API.
+ *
+ * @since 6.0.0
+ *
+ * @param array $controllers Optional. See BP_Component::rest_api_init() for
+ * description.
+ */
+ public function rest_api_init( $controllers = array() ) {
+ if ( is_multisite() ) {
+ $controllers = array(
+ 'BP_REST_Blogs_Endpoint',
+ );
+
+ // Support to Blog Avatar.
+ if ( bp_is_active( 'blogs', 'site-icon' ) ) {
+ $controllers[] = 'BP_REST_Attachments_Blog_Avatar_Endpoint';
+ }
+ }
+
+ parent::rest_api_init( $controllers );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbprestattachmentsgroupavatarendpointphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/bp-core/classes/class-bp-rest-attachments-group-avatar-endpoint.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-rest-attachments-group-avatar-endpoint.php (rev 0)
+++ trunk/src/bp-core/classes/class-bp-rest-attachments-group-avatar-endpoint.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,14 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * BP REST: BP_REST_Attachments_Group_Avatar_Endpoint class
+ *
+ * @package BuddyPress
+ * @deprecated 6.0.0
+ */
+
+defined( 'ABSPATH' ) || exit;
+
+_deprecated_file( basename( __FILE__ ), '6.0.0', 'bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php' );
+
+/** BP_REST_Attachments_Group_Avatar_Endpoint class */
+require_once trailingslashit( constant( 'BP_PLUGIN_DIR' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) ) . 'bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php';
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: trunk/src/bp-core/classes/class-bp-rest-attachments-group-avatar-endpoint.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="trunksrcbpcoreclassesclassbprestattachmentsmemberavatarendpointphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/bp-core/classes/class-bp-rest-attachments-member-avatar-endpoint.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-rest-attachments-member-avatar-endpoint.php (rev 0)
+++ trunk/src/bp-core/classes/class-bp-rest-attachments-member-avatar-endpoint.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,14 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * BP REST: BP_REST_Attachments_Member_Avatar_Endpoint class
+ *
+ * @package BuddyPress
+ * @deprecated 6.0.0
+ */
+
+defined( 'ABSPATH' ) || exit;
+
+_deprecated_file( basename( __FILE__ ), '6.0.0', 'bp-members/classes/class-class-bp-rest-attachments-member-avatar-endpoint.php' );
+
+/** BP_REST_Attachments_Member_Avatar_Endpoint class */
+require_once trailingslashit( constant( 'BP_PLUGIN_DIR' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) ) . 'bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php';
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: trunk/src/bp-core/classes/class-bp-rest-attachments-member-avatar-endpoint.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="trunksrcbpfriendsclassesclassbpfriendscomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-friends/classes/class-bp-friends-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-friends/classes/class-bp-friends-component.php 2020-03-31 02:45:13 UTC (rev 12606)
+++ trunk/src/bp-friends/classes/class-bp-friends-component.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -325,4 +325,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> parent::setup_cache_groups();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Init the BP REST API.
+ *
+ * @since 6.0.0
+ *
+ * @param array $controllers Optional. See BP_Component::rest_api_init() for
+ * description.
+ */
+ public function rest_api_init( $controllers = array() ) {
+ parent::rest_api_init( array( 'BP_REST_Friends_Endpoint' ) );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpgroupsclassesclassbpgroupscomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/classes/class-bp-groups-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/classes/class-bp-groups-component.php 2020-03-31 02:45:13 UTC (rev 12606)
+++ trunk/src/bp-groups/classes/class-bp-groups-component.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -936,18 +936,26 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Init the BP REST API.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.0.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 6.0.0 Adds the Group Cover REST endpoint.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $controllers Optional. See BP_Component::rest_api_init() for
</span><span class="cx" style="display: block; padding: 0 10px"> * description.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function rest_api_init( $controllers = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- parent::rest_api_init( array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $controllers = array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Groups_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Group_Membership_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Group_Invites_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Group_Membership_Request_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Group_Avatar_Endpoint',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ );
+
+ // Support to Group Cover.
+ if ( bp_is_active( 'groups', 'cover_image' ) ) {
+ $controllers[] = 'BP_REST_Attachments_Group_Cover_Endpoint';
+ }
+
+ parent::rest_api_init( $controllers );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcbpmembersclassesclassbpmemberscomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-members/classes/class-bp-members-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-members/classes/class-bp-members-component.php 2020-03-31 02:45:13 UTC (rev 12606)
+++ trunk/src/bp-members/classes/class-bp-members-component.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -654,12 +654,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Init the BP REST API.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.0.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 6.0.0 Adds the Member Cover and Signup REST endpoints.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $controllers Optional. See BP_Component::rest_api_init() for
</span><span class="cx" style="display: block; padding: 0 10px"> * description.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function rest_api_init( $controllers = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- parent::rest_api_init( array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $controllers = array(
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * As the Members component is always loaded,
</span><span class="cx" style="display: block; padding: 0 10px"> * let's register the Components endpoint here.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -667,7 +668,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Components_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Members_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Member_Avatar_Endpoint',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ );
+
+ if ( bp_is_active( 'members', 'cover_image' ) ) {
+ $controllers[] = 'BP_REST_Attachments_Member_Cover_Endpoint';
+ }
+
+ if ( bp_get_signup_allowed() ) {
+ $controllers[] = 'BP_REST_Signup_Endpoint';
+ }
+
+ parent::rest_api_init( $controllers );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcclassbuddypressphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/class-buddypress.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/class-buddypress.php 2020-03-31 02:45:13 UTC (rev 12606)
+++ trunk/src/class-buddypress.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -550,41 +550,43 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_Akismet' => 'activity',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Activity_Endpoint' => 'activity',
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'BP_Admin' => 'core',
- 'BP_Attachment_Avatar' => 'core',
- 'BP_Attachment_Cover_Image' => 'core',
- 'BP_Attachment' => 'core',
- 'BP_Button' => 'core',
- 'BP_Block' => 'core',
- 'BP_Component' => 'core',
- 'BP_Customizer_Control_Range' => 'core',
- 'BP_Date_Query' => 'core',
- 'BP_Email_Delivery' => 'core',
- 'BP_Email_Address' => 'core',
- 'BP_Email_Recipient' => 'core',
- 'BP_Email_Sender' => 'core',
- 'BP_Email_Participant' => 'core',
- 'BP_Email' => 'core',
- 'BP_Embed' => 'core',
- 'BP_Media_Extractor' => 'core',
- 'BP_Members_Suggestions' => 'core',
- 'BP_PHPMailer' => 'core',
- 'BP_Recursive_Query' => 'core',
- 'BP_Suggestions' => 'core',
- 'BP_Theme_Compat' => 'core',
- 'BP_User_Query' => 'core',
- 'BP_Walker_Category_Checklist' => 'core',
- 'BP_Walker_Nav_Menu_Checklist' => 'core',
- 'BP_Walker_Nav_Menu' => 'core',
- 'BP_Invitation_Manager' => 'core',
- 'BP_Invitation' => 'core',
- 'BP_REST_Components_Endpoint' => 'core',
- 'BP_REST_Attachments' => 'core',
- 'BP_REST_Attachments_Member_Avatar_Endpoint' => 'core',
- 'BP_REST_Attachments_Group_Avatar_Endpoint' => 'core',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_REST_Blogs_Endpoint' => 'blogs',
+ 'BP_REST_Attachments_Blog_Avatar_Endpoint' => 'blogs',
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'BP_Core_Friends_Widget' => 'friends',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_Admin' => 'core',
+ 'BP_Attachment_Avatar' => 'core',
+ 'BP_Attachment_Cover_Image' => 'core',
+ 'BP_Attachment' => 'core',
+ 'BP_Button' => 'core',
+ 'BP_Block' => 'core',
+ 'BP_Component' => 'core',
+ 'BP_Customizer_Control_Range' => 'core',
+ 'BP_Date_Query' => 'core',
+ 'BP_Email_Delivery' => 'core',
+ 'BP_Email_Address' => 'core',
+ 'BP_Email_Recipient' => 'core',
+ 'BP_Email_Sender' => 'core',
+ 'BP_Email_Participant' => 'core',
+ 'BP_Email' => 'core',
+ 'BP_Embed' => 'core',
+ 'BP_Media_Extractor' => 'core',
+ 'BP_Members_Suggestions' => 'core',
+ 'BP_PHPMailer' => 'core',
+ 'BP_Recursive_Query' => 'core',
+ 'BP_Suggestions' => 'core',
+ 'BP_Theme_Compat' => 'core',
+ 'BP_User_Query' => 'core',
+ 'BP_Walker_Category_Checklist' => 'core',
+ 'BP_Walker_Nav_Menu_Checklist' => 'core',
+ 'BP_Walker_Nav_Menu' => 'core',
+ 'BP_Invitation_Manager' => 'core',
+ 'BP_Invitation' => 'core',
+ 'BP_REST_Components_Endpoint' => 'core',
+ 'BP_REST_Attachments' => 'core',
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_Core_Friends_Widget' => 'friends',
+ 'BP_REST_Friends_Endpoint' => 'friends',
+
</ins><span class="cx" style="display: block; padding: 0 10px"> 'BP_Group_Extension' => 'groups',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_Group_Member_Query' => 'groups',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Groups_Endpoint' => 'groups',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -591,14 +593,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Group_Membership_Endpoint' => 'groups',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Group_Invites_Endpoint' => 'groups',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Group_Membership_Request_Endpoint' => 'groups',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_REST_Attachments_Group_Avatar_Endpoint' => 'groups',
+ 'BP_REST_Attachments_Group_Cover_Endpoint' => 'groups',
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'BP_Core_Members_Template' => 'members',
- 'BP_Core_Members_Widget' => 'members',
- 'BP_Core_Recently_Active_Widget' => 'members',
- 'BP_Core_Whos_Online_Widget' => 'members',
- 'BP_Registration_Theme_Compat' => 'members',
- 'BP_Signup' => 'members',
- 'BP_REST_Members_Endpoint' => 'members',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_Core_Members_Template' => 'members',
+ 'BP_Core_Members_Widget' => 'members',
+ 'BP_Core_Recently_Active_Widget' => 'members',
+ 'BP_Core_Whos_Online_Widget' => 'members',
+ 'BP_Registration_Theme_Compat' => 'members',
+ 'BP_Signup' => 'members',
+ 'BP_REST_Members_Endpoint' => 'members',
+ 'BP_REST_Attachments_Member_Avatar_Endpoint' => 'members',
+ 'BP_REST_Attachments_Member_Cover_Endpoint' => 'members',
+ 'BP_REST_Signup_Endpoint' => 'members',
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Messages_Endpoint' => 'messages',
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunktestsphpunitassetsbprestapicontrollersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/assets/bp-rest-api-controllers.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/assets/bp-rest-api-controllers.php 2020-03-31 02:45:13 UTC (rev 12606)
+++ trunk/tests/phpunit/assets/bp-rest-api-controllers.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,6 +12,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * BP Member Cover Image REST Controller's mock.
+ */
+class BP_REST_Attachments_Member_Cover_Endpoint extends BP_REST_Mock_Class {
+ public function __construct() {
+ $this->namespace = bp_rest_namespace() . '/' . bp_rest_version();
+ $this->rest_base = 'members';
+ }
+
+ public function register_routes( $controller = '' ) {
+ parent::register_routes( 'BP_REST_Attachments_Member_Cover_Endpoint' );
+ }
+}
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * BP Member Avatar REST Controller's mock.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class BP_REST_Attachments_Member_Avatar_Endpoint extends BP_REST_Mock_Class {
</span></span></pre></div>
<a id="trunktestsphpunittestcasescoreclassbpcomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/testcases/core/class-bp-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/testcases/core/class-bp-component.php 2020-03-31 02:45:13 UTC (rev 12606)
+++ trunk/tests/phpunit/testcases/core/class-bp-component.php 2020-03-31 11:33:35 UTC (rev 12607)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,6 +33,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Components_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Members_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Member_Avatar_Endpoint',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_REST_Attachments_Member_Cover_Endpoint',
</ins><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -49,6 +50,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $bp->unit_test_rest->controllers, array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Components_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Member_Avatar_Endpoint',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_REST_Attachments_Member_Cover_Endpoint',
</ins><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -66,6 +68,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Components_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Members_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Member_Avatar_Endpoint',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_REST_Attachments_Member_Cover_Endpoint',
</ins><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre>
</div>
</div>
</body>
</html>