diff --git a/src/bp-core/bp-core-rest-api.php b/src/bp-core/bp-core-rest-api.php
index 40771ef34..0d0fbfa7a 100644
|
a
|
b
|
function bp_rest_version() { |
| 138 | 138 | * Get user URL. |
| 139 | 139 | * |
| 140 | 140 | * @since 5.0.0 |
| | 141 | * @deprecated 9.0.0 Use `bp_rest_get_object_url` instead. |
| 141 | 142 | * |
| 142 | 143 | * @param int $user_id User ID. |
| 143 | 144 | * @return string |
| … |
… |
function bp_rest_get_user_url( $user_id ) { |
| 151 | 152 | ); |
| 152 | 153 | } |
| 153 | 154 | |
| | 155 | /** |
| | 156 | * Get a REST API object URL from a component. |
| | 157 | * |
| | 158 | * @since 9.0.0 |
| | 159 | * |
| | 160 | * @param integer $object_id Object ID. |
| | 161 | * @param string $object_path Path of the component endpoint. |
| | 162 | * @return string |
| | 163 | */ |
| | 164 | function bp_rest_get_object_url( $object_id, $object_path ) { |
| | 165 | return rest_url( |
| | 166 | sprintf( |
| | 167 | '/%1$s/%2$s/%3$s/%4$d', |
| | 168 | bp_rest_namespace(), |
| | 169 | bp_rest_version(), |
| | 170 | $object_path, |
| | 171 | $object_id |
| | 172 | ) |
| | 173 | ); |
| | 174 | } |
| | 175 | |
| 154 | 176 | /** |
| 155 | 177 | * Set headers to let the Client Script be aware of the pagination. |
| 156 | 178 | * |