From 45e6ace890ed4cad7c74f30a24f09171515bb245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= <99024746+Menrath@users.noreply.github.com> Date: Thu, 21 Dec 2023 16:05:32 +0100 Subject: [PATCH] Add nodeinfo metadata (#618) * add nodeinfo metadata nodeName, nodeDescription and nodeIcon * Fix CS: double space typo --- includes/rest/class-nodeinfo.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/rest/class-nodeinfo.php b/includes/rest/class-nodeinfo.php index 7f1f094..0c49026 100644 --- a/includes/rest/class-nodeinfo.php +++ b/includes/rest/class-nodeinfo.php @@ -105,6 +105,12 @@ class Nodeinfo { 'outbound' => array(), ); + $nodeinfo['metadata'] = array( + 'nodeName' => \get_bloginfo( 'name' ), + 'nodeDescription' => \get_bloginfo( 'description' ), + 'nodeIcon' => \get_site_icon_url(), + ); + return new WP_REST_Response( $nodeinfo, 200 ); }