Skip to content

Commit

Permalink
Update object type to be a bit more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
obenland committed Jan 15, 2025
1 parent 361495b commit f620cb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/rest/class-outbox-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ public function validate_user_id( $user_id ) {
* @param \WP_REST_Request $request Request object.
* @return array Response object on success, or WP_Error object on failure.
*/
public function prepare_item_for_response( $item, $request ) {
public function prepare_item_for_response( $item, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
$transformer = Factory::get_transformer( $item->post_content );

$type = 'Object';
$type = 'Activity';
$terms = wp_get_object_terms( $item->ID, 'ap_activity_type' );
if ( isset( $terms[0]->name ) ) {
$type = ucfirst( $terms[0]->name );
Expand Down

0 comments on commit f620cb0

Please sign in to comment.