<!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][14047] trunk: Document the BuddyPress Groups REST API routes</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/14047">14047</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/14047","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>2024-10-18 02:24:44 +0000 (Fri, 18 Oct 2024)</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'>Document the BuddyPress Groups REST API routes
Props espellcaste
See <a href="http://buddypress.trac.wordpress.org/ticket/9145">#9145</a>
See https://github.com/buddypress/bp-documentation/issues/298
Closes https://github.com/buddypress/buddypress/pull/387</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdocsdeveloperexecutioncontextsrestapiactivitymd">trunk/docs/developer/execution-contexts/rest-api/activity.md</a></li>
<li><a href="#trunkdocsdeveloperexecutioncontextsrestapireferencemd">trunk/docs/developer/execution-contexts/rest-api/reference.md</a></li>
<li><a href="#trunkdocsdevelopermanifestjson">trunk/docs/developer/manifest.json</a></li>
<li><a href="#trunksrcbpgroupsclassesclassbpgroupsrestcontrollerphp">trunk/src/bp-groups/classes/class-bp-groups-rest-controller.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdocsdeveloperexecutioncontextsrestapigroupsmd">trunk/docs/developer/execution-contexts/rest-api/groups.md</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdocsdeveloperexecutioncontextsrestapiactivitymd"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/docs/developer/execution-contexts/rest-api/activity.md</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/docs/developer/execution-contexts/rest-api/activity.md 2024-10-15 21:25:23 UTC (rev 14046)
+++ trunk/docs/developer/execution-contexts/rest-api/activity.md 2024-10-18 02:24:44 UTC (rev 14047)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -88,7 +88,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> | Name | Description |
</span><span class="cx" style="display: block; padding: 0 10px"> | --- | --- |
</span><span class="cx" style="display: block; padding: 0 10px"> | `primary_item_id` | The ID of some other object primarily associated with this one. <br />JSON data type: _integer_. |
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-| `primary_item_id` | The ID of some other object also associated with this one. <br />JSON data type: _integer_. |
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+| `secondary_item_id` | The ID of some other object also associated with this one. <br />JSON data type: _integer_. |
</ins><span class="cx" style="display: block; padding: 0 10px"> | `link` | The permalink to this activity item on the site. <br />JSON data type: _string_, format: _URI_. |
</span><span class="cx" style="display: block; padding: 0 10px"> | `component` | The active BuddyPress component the activity relates to. <br />JSON data type: _string_. <br />One of: the active BuddyPress component names. <br />Default: `activity`. |
</span><span class="cx" style="display: block; padding: 0 10px"> | `type` | The type of the activity (e.g.: `activity_update`). <br />JSON data type: _string_. <br />One of: the registered activity types. <br />Default: `activity_update`. |
</span></span></pre></div>
<a id="trunkdocsdeveloperexecutioncontextsrestapigroupsmd"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/docs/developer/execution-contexts/rest-api/groups.md</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/docs/developer/execution-contexts/rest-api/groups.md (rev 0)
+++ trunk/docs/developer/execution-contexts/rest-api/groups.md 2024-10-18 02:24:44 UTC (rev 14047)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,285 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# User Groups REST API routes
+
+The Groups component allow your users to organize themselves into specific public, private or hidden sections of your community site with separate activity streams and member listings.
+
+> [!IMPORTANT]
+> The User Groups component is an optional one. This means the `buddypress/v2/groups/*` endpoints will only be available if the component is active on the community site.
+
+## Schema
+
+The schema defines all the fields that exist for a Groups component single item.
+
+| Property | Description |
+| --- | --- |
+| `id` | A unique numeric ID for the Groups single item. <br />JSON data type: _integer_. <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+| `creator_id` | The ID of the user who created the Groups single item. <br />JSON data type: _integer_. <br/>Default: the ID of the logged in member. <br />Context: `embed`, `view`, `edit`. |
+| `name` | The name of the Groups single item. <br />JSON data type: _string_. <br/>Required: `true`. <br />Context: `embed`, `view`, `edit`. |
+| `slug` | The URL-friendly slug for the Groups single item. <br />JSON data type: _string_. <br />Context: `embed`, `view`, `edit`. |
+| `link` | The permalink to the Groups single item on the site. <br />JSON data type: _string_, format: _URI_. <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+| `description` | The description of the Groups single item. <br />JSON data type: _object_ (properties: `raw`, `rendered` ). <br/>Required: `true`. <br />Context: `embed`, `view`, `edit`. |
+| `status` | The status of the Groups single item (e.g.: `private`). <br />JSON data type: _string_. <br />One of: `public`, `private`, `hidden`. <br />Context: `embed`, `view`, `edit`. |
+| `enable_forum` | Whether the Group has a forum enabled or not[^1]. <br />JSON data type: _boolean_. <br />Context: `embed`, `view`, `edit`. |
+| `parent_id` | ID of the parent Groups single item[^2]. <br />JSON data type: _integer_. <br />Context: `embed`, `view`, `edit`. |
+| `date_created` | The date the Groups single item was created, in the site's timezone. <br />JSON data type: _string_ \| _null_, format: _date-time_. <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+| `date_created_gmt` | The date the Groups single item was created, as GMT. <br />JSON data type: _string_ \| _null_, format: _date-time_. <br />Read only. <br />Context: `view`, `edit`. |
+| `created_since` | Time elapsed since the Groups single item was created, in the site's timezone. <br />JSON data type: _string_. <br/>Default: `''`. <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+| `types` | The BP Group type(s) assigned to the Groups single item. See this documentation page for more information about [Group Types](https://github.com/buddypress/buddypress/blob/master/docs/user/administration/groups/group-types.md). <br />JSON data type: _array_. <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+| `admins` | The list of Groups single item administrators. <br />JSON data type: _array_. <br />Read only. <br />Context: `edit`. |
+| `mods` | The list of Groups single item moderators. <br />JSON data type: _array_. <br />Read only. <br />Context: `edit`. |
+| `total_member_count` | Count of all Group members. <br />JSON data type: _integer_. <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+| `last_activity` | The date the Groups single item was last active, in the site's timezone. <br />JSON data type: _string_ \| _null_, format: _date-time_. <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+| `last_activity_gmt` | The date the Groups single item was last active, as GMT. <br />JSON data type: _string_ \| _null_, format: _date-time_. <br />Read only. <br />Context: `view`, `edit`. |
+| `last_activity_diff` | Time elapsed since the Groups single item was last active. <br />JSON data type: _string_. <br/>Default: `''`. <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+| `avatar_urls`[^3] | Avatar URLs for the Groups single item (Full & Thumb sizes). <br />JSON data type: _object_ (properties: `full`, and `thumb`). <br />Read only. <br />Context: `embed`, `view`, `edit`. |
+
+## List User Groups
+
+### Arguments
+
+| Name | Description |
+| --- | --- |
+| `context` | Scope under which the request is made; determines fields present in response. <br />JSON data type: _string_. <br/>Default: `view`. <br/>One of: `view`, `embed`, `edit`. |
+| `page` | Current page of the collection. <br />JSON data type: _integer_. <br />Default: `1`. |
+| `per_page` | Maximum number of groups single items to be returned in result set. <br />JSON data type: _integer_. <br />Default: `10`. |
+| `search` | Limit results to those matching a string. <br />JSON data type: _string_. |
+| `exclude` | Ensure result set excludes Groups with specific IDs <br />JSON data type: _array_. <br />Default: `[]`. |
+| `include` | Ensure result set includes Groups with specific IDs. <br />JSON data type: _array_. <br />Default: `[]`. |
+| `type` | Shorthand for certain orderby/order combinations <br />JSON data type: _string_. <br />Default: `active`. <br />One of: `active`, `newest`, `alphabetical`, `random`, `popular`. |
+| `order` | Order sort attribute ascending or descending. <br />JSON data type: _string_. <br />Default: `desc`. <br/>One of: `desc`, `asc`. |
+| `orderby` | Order Groups by which attribute. <br />JSON data type: _string_. <br />Default: `date_created`. <br />One of: `date_created`, `last_activity`, `total_member_count`, `name`, `random`. |
+| `user_id` | Limit result set to Groups single items that this user (ID) is a member of. <br />JSON data type: _integer_. <br />Default: `0`. |
+| `status` | Group statuses to limit results to. <br />JSON data type: _array_. <br />Default: `[]`. <br />One or more of: `public`, `private`, `hidden`. |
+| `parent_id` | Get Groups single items that are children of the specified Group(s) IDs[^2]. <br />JSON data type: _array_. <br />Default: `[]`. |
+| `meta` | Get Groups based on their meta data information. <br />JSON data type: _array_. <br />Default: `[]`. |
+| `group_type` | Limit results set to a certain Group type. See this documentation page for more information about [Group Types](https://github.com/buddypress/buddypress/blob/master/docs/user/administration/groups/group-types.md). <br />JSON data type: _string_. <br />Default: `''`. <br />One of: the registered Group types on the site. |
+| `enable_forum` | Whether the group has a forum enabled or not. <br />JSON data type: _boolean_. <br />Default: `false`. |
+| `populate_extras` | Whether to fetch extra BP data about the returned groups. <br />JSON data type: _boolean_. <br />Default: `false`. |
+| `show_hidden` | Whether results should include hidden Groups. <br />JSON data type: _boolean_. <br />Default: `false`. |
+
+### Definition
+
+`GET /buddypress/v2/groups`
+
+### Example of use
+
+> [!WARNING]
+> The `requestHeaders` object needs to be set according to the WordPress REST API nonce. Read more about the [REST API authentification](./README.md#about-authentification).
+
+```javascript
+fetch( '/wp-json/buddypress/v2/groups?context=view&populate_extras=true', {
+ method: 'GET',
+ headers: requestHeaders,
+} ).then( ( response ) => {
+ return response.json();
+} ).then( ( data ) => {
+ console.table( data );
+} );
+```
+
+### JSON Response
+
+- An array of objects representing the matching groups single items on success.
+- An object containg the error code, data and message on failure.
+
+## Create a User Group
+
+Logged in users can create Groups single items, unless the Site's administrator has disabled their capacity from [BuddyPress settings](https://github.com/buddypress/buddypress/blob/master/docs/user/administration/settings/options.md#group-photo-upload).
+
+### Arguments
+
+| Name | Description |
+| --- | --- |
+| `creator_id` | The ID of the user who created the Group. <br />JSON data type: _integer_. <br />Default: the ID of the logged in member. |
+| `name` | The name of the Group. <br />JSON data type: _string_. <br />Required. |
+| `description` | The description of the Group. <br />JSON data type: _string_. <br />Required. |
+| `slug` | The URL-friendly slug for the Group. <br />JSON data type: _string_. |
+| `status` | The status of the Group. <br />JSON data type: _string_. <br />One of: `public`, `private`, `hidden`. <br />Default: `public`. |
+| `types` | The BP Group type(s) assigned to the Groups single item. See this documentation page for more information about [Group Types](https://github.com/buddypress/buddypress/blob/master/docs/user/administration/groups/group-types.md). To assign more than one type, use a comma separated list of types. <br />JSON data type: _string_. <br />One of: the registered group types. |
+| `parent_id` | ID of the parent Group[^2]. <br />JSON data type: _integer_. |
+| `enable_forum` | Whether the Group has a forum enabled or not. <br />JSON data type: _boolean_. |
+
+### Definition
+
+`POST /buddypress/v2/groups`
+
+### Example of use
+
+> [!WARNING]
+> The `requestHeaders` object needs to be set according to the WordPress REST API nonce. Read more about the [REST API authentification](./README.md#about-authentification).
+
+```javascript
+fetch( '/wp-json/buddypress/v2/groups', {
+ method: 'POST',
+ headers: requestHeaders,
+ body: JSON.stringify(
+ {
+ name: 'Bapuus',
+ description: 'bapuu is the BuddyPress wapuu',
+ }
+ ),
+} ).then( ( response ) => {
+ return response.json();
+} ).then( ( data ) => {
+ console.log( data );
+} );
+```
+
+### JSON Response
+
+- An object representing the created Groups single item on success.
+- An object containg the error code, data and message on failure.
+
+## Retrieve a specific User Group
+
+### Arguments
+
+| Name | Description |
+| --- | --- |
+| `id` | A unique numeric ID for the Groups single item. **Required**. <br />JSON data type: _integer_. |
+| `context` | Scope under which the request is made; determines fields present in response. <br />JSON data type: _string_. <br /> Default: `view`. <br /> One of: `view, embed, edit`. |
+| `populate_extras` | Whether to fetch extra BP data about the returned groups. <br />JSON data type: _boolean_. <br />Default: `false`. |
+
+### Definition
+
+`GET /buddypress/v2/groups/<id>`
+
+### Example of use
+
+> [!WARNING]
+> The `requestHeaders` object needs to be set according to the WordPress REST API nonce. Read more about the [REST API authentification](./README.md#about-authentification).
+
+```javascript
+fetch( '/wp-json/buddypress/v2/groups/4', {
+ method: 'GET',
+ headers: requestHeaders,
+} ).then( ( response ) => {
+ return response.json();
+} ).then( ( data ) => {
+ console.log( data );
+} );
+```
+
+### JSON Response
+
+- An object representing the Groups single item on success.
+- An object containg the error code, data and message on failure.
+
+## Update a specific User Group
+
+### Arguments
+
+| Name | Description |
+| --- | --- |
+| `id` | A unique numeric ID for the Groups single item. **Required**. <br />JSON data type: _integer_. |
+| `creator_id` | The ID of the user who created the Group. <br />JSON data type: _integer_. <br />Default: the ID of the logged in member. |
+| `name` | The name of the Group. <br />JSON data type: _string_. <br />Required. |
+| `description` | The description of the Group. <br />JSON data type: _string_. <br />Required. |
+| `slug` | The URL-friendly slug for the Group. <br />JSON data type: _string_. |
+| `status` | The status of the Group. <br />JSON data type: _string_. <br />One of: `public`, `private`, `hidden`. <br />Default: `public`. |
+| `parent_id` | ID of the parent Group[^2]. <br />JSON data type: _integer_. |
+| `enable_forum` | Whether the Group has a forum enabled or not. <br />JSON data type: _boolean_. |
+| `types` | The BP Group type(s) assigned to the Groups single item. See this documentation page for more information about [Group Types](https://github.com/buddypress/buddypress/blob/master/docs/user/administration/groups/group-types.md). To assign more than one type, use a comma separated list of types. <br />JSON data type: _string_. <br />One of: the registered group types. |
+| `append_types` | Append one or more BP Group type(s) to a group. To append more than one BP Group type, use a comma separated list of [BP Group types](https://github.com/buddypress/buddypress/blob/master/docs/user/administration/groups/group-types.md). <br />JSON data type: _string_. <br />One of: the registered group types. |
+| `remove_types` | Remove one or more BP Group type(s) from a group. To remove more than one BP Group type, use a comma separated list of [BP Group types](https://github.com/buddypress/buddypress/blob/master/docs/user/administration/groups/group-types.md). <br />JSON data type: _string_. <br />One of: the registered group types. |
+
+### Definition
+
+`PUT /buddypress/v2/groups/<id>`
+
+### Example of use
+
+> [!WARNING]
+> The `requestHeaders` object needs to be set according to the WordPress REST API nonce. Read more about the [REST API authentification](./README.md#about-authentification).
+
+```javascript
+fetch( '/wp-json/buddypress/v2/groups/4', {
+ method: 'PUT',
+ headers: requestHeaders,
+ body: JSON.stringify(
+ {
+ creator_id: 2,
+ status: 'private',
+ }
+ ),
+} ).then( ( response ) => {
+ return response.json();
+} ).then( ( data ) => {
+ console.log( data );
+} );
+```
+
+### JSON Response
+
+- An object representing the updated Groups single item on success.
+- An object containg the error code, data and message on failure.
+
+## Delete a specific User group
+
+### Arguments
+
+| Name | Description |
+| --- | --- |
+| `id` | A unique numeric ID for the Groups single item. **Required**. <br />JSON data type: _integer_. |
+
+### Definition
+
+`DELETE /buddypress/v2/groups/<id>`
+
+### Example of use
+
+> [!WARNING]
+> The `requestHeaders` object needs to be set according to the WordPress REST API nonce. Read more about the [REST API authentification](./README.md#about-authentification).
+
+```javascript
+fetch( '/wp-json/buddypress/v2/groups/4', {
+ method: 'DELETE',
+ headers: requestHeaders,
+} ).then( ( response ) => {
+ return response.json();
+} ).then( ( data ) => {
+ console.log( data );
+} );
+```
+
+### JSON Response
+
+- An object informing about the `deleted` status and the `previous` Groups single item on success.
+- An object containg the error code, data and message on failure.
+
+## List the User Groups of the logged in member
+
+### Arguments
+
+| Name | Description |
+| --- | --- |
+| `context` | Scope under which the request is made; determines fields present in response. <br />JSON data type: _string_. <br /> Default: `view`. <br /> One of: `view, embed, edit`. |
+| `max` | The maximum amount of groups the user is member of to return. Defaults to all groups. <br />JSON data type: _integer_. <br /> Default: `0`. |
+
+### Definition
+
+`GET /buddypress/v2/groups/me`
+
+### Example of use
+
+> [!WARNING]
+> The `requestHeaders` object needs to be set according to the WordPress REST API nonce. Read more about the [REST API authentification](./README.md#about-authentification).
+
+```javascript
+fetch( '/wp-json/buddypress/v2/groups/me', {
+ method: 'GET',
+ headers: requestHeaders,
+} ).then( ( response ) => {
+ return response.json();
+} ).then( ( data ) => {
+ console.log( data );
+} );
+```
+
+### JSON Response
+
+- An array of objects representing the matching groups single items on success.
+- An object containg the error code, data and message on failure.
+
+[^1]: the `enable_forum` is used by the [bbPress](https://wordpress.org/plugins/bbpress/) plugin to inform the corresponding group has a forum associated to it.
+[^2]: the `parent_id` field is not used by BuddyPress internally to provide a groups hierarchy feature leaving this part to BuddyPress Add-ons. See changeset [11095](https://buddypress.trac.wordpress.org/changeset/11095).
+[^3]: This property is only available if the WordPress discussion settings allow avatars and the Site Administrator allowed group administrators to upload profile photos for groups.
</ins></span></pre></div>
<a id="trunkdocsdeveloperexecutioncontextsrestapireferencemd"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/docs/developer/execution-contexts/rest-api/reference.md</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/docs/developer/execution-contexts/rest-api/reference.md 2024-10-15 21:25:23 UTC (rev 14046)
+++ trunk/docs/developer/execution-contexts/rest-api/reference.md 2024-10-18 02:24:44 UTC (rev 14047)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,7 +22,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> | Extended Profile Field | `/buddypress/v2/xprofile/fields` |
</span><span class="cx" style="display: block; padding: 0 10px"> | Extended Profile Data | `/buddypress/v2/xprofile/<field_id>/data/<user_id>` |
</span><span class="cx" style="display: block; padding: 0 10px"> | Friends | `/buddypress/v2/friends` |
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-| User Groups | `/buddypress/v2/groups` |
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+| [User Groups](./groups.md) | `/buddypress/v2/groups` |
</ins><span class="cx" style="display: block; padding: 0 10px"> | Group Profile Photo | `/buddypress/v2/groups/<group_id>/avatar` |
</span><span class="cx" style="display: block; padding: 0 10px"> | Group Profile Cover | `/buddypress/v2/groups/<group_id>/cover` |
</span><span class="cx" style="display: block; padding: 0 10px"> | Group Membership | `/buddypress/v2/groups/<group_id>/members` |
</span></span></pre></div>
<a id="trunkdocsdevelopermanifestjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/docs/developer/manifest.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/docs/developer/manifest.json 2024-10-15 21:25:23 UTC (rev 14046)
+++ trunk/docs/developer/manifest.json 2024-10-18 02:24:44 UTC (rev 14047)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -186,6 +186,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "parent": "bp-rest-api-reference"
</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">+ "title": "User Groups REST API routes",
+ "slug": "bp-rest-api-groups",
+ "markdown_source": "../developer/execution-contexts/rest-api/groups.md",
+ "parent": "bp-rest-api-reference"
+ },
+ {
</ins><span class="cx" style="display: block; padding: 0 10px"> "title": "BuddyPress Functions",
</span><span class="cx" style="display: block; padding: 0 10px"> "slug": "bp-functions",
</span><span class="cx" style="display: block; padding: 0 10px"> "markdown_source": "../developer/functions/README.md",
</span></span></pre></div>
<a id="trunksrcbpgroupsclassesclassbpgroupsrestcontrollerphp"></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-rest-controller.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-rest-controller.php 2024-10-15 21:25:23 UTC (rev 14046)
+++ trunk/src/bp-groups/classes/class-bp-groups-rest-controller.php 2024-10-18 02:24:44 UTC (rev 14047)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1126,6 +1126,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( WP_REST_Server::CREATABLE === $method || WP_REST_Server::EDITABLE === $method ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $key = 'create_item';
</span><span class="cx" style="display: block; padding: 0 10px"> $args['description']['type'] = 'string';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ unset( $args['description']['properties'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Add group types.
</span><span class="cx" style="display: block; padding: 0 10px"> $args['types'] = array(
</span></span></pre>
</div>
</div>
</body>
</html>