From 7de3696c2c14775f27865520bcd2ee4a1034aab1 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 9 Aug 2023 14:13:58 +0200 Subject: [PATCH] fix @context --- includes/rest/class-collection.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/rest/class-collection.php b/includes/rest/class-collection.php index 00b676d..c59bc5d 100644 --- a/includes/rest/class-collection.php +++ b/includes/rest/class-collection.php @@ -80,9 +80,11 @@ class Collection { } $response = array( - '@context' => 'https://www.w3.org/ns/activitystreams', - array( - 'Hashtah' => 'as:Hastag', + '@context' => array( + 'https://www.w3.org/ns/activitystreams', + array( + 'Hastag' => 'as:Hastag', + ), ), 'id' => get_rest_url_by_path( sprintf( 'users/%d/collections/tags', $user_id ) ), 'totalItems' => count( $tags ),