<!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][12994] trunk: Make sure all BP components init their BP Blocks</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/12994">12994</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/12994","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>2021-07-12 19:48:13 +0000 (Mon, 12 Jul 2021)</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'>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 <a href="http://buddypress.trac.wordpress.org/ticket/8511">#8511</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="#trunksrcbpcoreclassesclassbpblockphp">trunk/src/bp-core/classes/class-bp-block.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpcomponentphp">trunk/src/bp-core/classes/class-bp-component.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpcorephp">trunk/src/bp-core/classes/class-bp-core.php</a></li>
<li><a href="#trunksrcbpfriendsclassesclassbpfriendscomponentphp">trunk/src/bp-friends/classes/class-bp-friends-component.php</a></li>
<li><a href="#trunksrcbpmembersclassesclassbpmemberscomponentphp">trunk/src/bp-members/classes/class-bp-members-component.php</a></li>
<li><a href="#trunksrcbpmessagesclassesclassbpmessagescomponentphp">trunk/src/bp-messages/classes/class-bp-messages-component.php</a></li>
<li><a href="#trunksrcbpsettingsclassesclassbpsettingscomponentphp">trunk/src/bp-settings/classes/class-bp-settings-component.php</a></li>
<li><a href="#trunksrcbpxprofileclassesclassbpxprofilecomponentphp">trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php</a></li>
<li><a href="#trunktestsphpunittestcasescoreclassbpcomponentphp">trunk/tests/phpunit/testcases/core/class-bp-component.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 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-blogs/classes/class-bp-blogs-component.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -379,4 +379,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> parent::rest_api_init( $controllers );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Register the BP Blogs Blocks.
+ *
+ * @since 9.0.0
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init( $blocks = array() ) {
+ parent::blocks_init( array() );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpblockphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-block.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-block.php 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-core/classes/class-bp-block.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +47,29 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 6.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $args The registration arguments for the BP Block.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args {
+ * The registration arguments for the BP Block. Part of the arguments are the ones
+ * used by `WP_Block_Type`. Below are BP specific arguments.
+ *
+ * @type string $name The name of the block (eg: `bp/member`).
+ * @type string $editor_script_url URL to the JavaScript main file of the BP Block
+ * to load into the Block Editor.
+ * @type array $editor_script_deps The list of JavaScript dependency handles for the
+ * BP Block main file.
+ * @type string $script_url URL to the JavaScript file to load into the Block
+ * Editor and on front-end.
+ * @type array $script_deps The list of JavaScript dependency handles for the
+ * JavaScript file to load into the Block Editor and
+ * on front-end.
+ * @type string $editor_style_url URL to the CSS main file of the BP Block to load
+ * into the Block Editor.
+ * @type array $editor_style_deps The list of CSS dependency handles for the
+ * CSS main file.
+ * @type string $style_url URL to the CSS file to load into the Block Editor
+ * and on front-end.
+ * @type array $style_deps The list of CSS dependency handles for the CSS file
+ * to load into the Block Editor and on front-end.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct( $args ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! did_action( 'bp_blocks_init' ) ) {
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpcomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-component.php 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-core/classes/class-bp-component.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -917,21 +917,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 6.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @see `BP_Block->construct()` for a full description of a BP Block arguments.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param array $blocks The list of BP Blocks to register.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function blocks_init( $blocks = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_array( $blocks ) && $blocks ) {
- /**
- * Filter here to disable all or some BP Blocks for a component.
- *
- * This is a dynamic hook that is based on the component string ID.
- *
- * @since 6.0.0
- *
- * @param array $blocks The list of BP Blocks for the component.
- */
- $blocks = (array) apply_filters( 'bp_' . $this->id . '_register_blocks', $blocks );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filter here to add new BP Blocks, disable some or all BP Blocks for a component.
+ *
+ * This is a dynamic hook that is based on the component string ID.
+ *
+ * @since 6.0.0
+ *
+ * @param array $blocks The list of BP Blocks for the component.
+ */
+ $blocks = (array) apply_filters( 'bp_' . $this->id . '_register_blocks', $blocks );
+ $blocks = array_filter( $blocks );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $blocks ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $blocks as $block ) {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_register_block( $block );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpcorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-core.php 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-core/classes/class-bp-core.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -351,4 +351,32 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> parent::register_post_types();
</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 Core controllers of the BP REST API.
+ *
+ * @since 9.0.0
+ *
+ * @param array $controllers Optional. See BP_Component::rest_api_init() for
+ * description.
+ */
+ public function rest_api_init( $controllers = array() ) {
+ $controllers = array(
+ 'BP_REST_Components_Endpoint',
+ );
+
+ parent::rest_api_init( $controllers );
+ }
+
+ /**
+ * Register the BP Core Blocks.
+ *
+ * @since 9.0.0
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init( $blocks = array() ) {
+ parent::blocks_init( array() );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<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 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-friends/classes/class-bp-friends-component.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -337,4 +337,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function rest_api_init( $controllers = array() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> parent::rest_api_init( array( 'BP_REST_Friends_Endpoint' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Register the BP Friends Blocks.
+ *
+ * @since 9.0.0
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init( $blocks = array() ) {
+ parent::blocks_init( array() );
+ }
</ins><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 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-members/classes/class-bp-members-component.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -695,6 +695,7 @@
</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><span class="cx" style="display: block; padding: 0 10px"> * @since 6.0.0 Adds the Member Cover and Signup REST endpoints.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 9.0.0 Moves the `BP_REST_Components_Endpoint` controller in `BP_Core` component.
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -701,11 +702,6 @@
</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><span class="cx" style="display: block; padding: 0 10px"> $controllers = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
- * As the Members component is always loaded,
- * let's register the Components endpoint here.
- */
- 'BP_REST_Components_Endpoint',
</del><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><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="trunksrcbpmessagesclassesclassbpmessagescomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-messages/classes/class-bp-messages-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-messages/classes/class-bp-messages-component.php 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-messages/classes/class-bp-messages-component.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -445,4 +445,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function rest_api_init( $controllers = array() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> parent::rest_api_init( array( 'BP_REST_Messages_Endpoint' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Register the BP Messages Blocks.
+ *
+ * @since 9.0.0
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init( $blocks = array() ) {
+ parent::blocks_init( array() );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpsettingsclassesclassbpsettingscomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-settings/classes/class-bp-settings-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-settings/classes/class-bp-settings-component.php 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-settings/classes/class-bp-settings-component.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -292,4 +292,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> parent::setup_admin_bar( $wp_admin_nav );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Register the BP Settings Blocks.
+ *
+ * @since 9.0.0
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init( $blocks = array() ) {
+ parent::blocks_init( array() );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpxprofileclassesclassbpxprofilecomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -456,4 +456,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_XProfile_Data_Endpoint',
</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">+
+ /**
+ * Register the BP xProfile Blocks.
+ *
+ * @since 9.0.0
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init( $blocks = array() ) {
+ parent::blocks_init( array() );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</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 2021-07-12 19:03:26 UTC (rev 12993)
+++ trunk/tests/phpunit/testcases/core/class-bp-component.php 2021-07-12 19:48:13 UTC (rev 12994)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,7 +30,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $bp_members->rest_api_init();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $bp->unit_test_rest->controllers, array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'BP_REST_Components_Endpoint',
</del><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><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Member_Cover_Endpoint',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,7 +47,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'bp_members_rest_api_controllers', array( $this, 'remove_controller' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $bp->unit_test_rest->controllers, array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'BP_REST_Components_Endpoint',
</del><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Member_Avatar_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Member_Cover_Endpoint',
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,7 +63,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'bp_members_rest_api_controllers', array( $this, 'add_controller' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( $bp->unit_test_rest->controllers, array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'BP_REST_Components_Endpoint',
</del><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><span class="cx" style="display: block; padding: 0 10px"> 'BP_REST_Attachments_Member_Cover_Endpoint',
</span></span></pre>
</div>
</div>
</body>
</html>