Skip to content

Commit 77307fd

Browse files
committed
remove serviceinfo feature
1 parent 3171ff5 commit 77307fd

6 files changed

Lines changed: 18 additions & 168 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
**Tags:** nodeinfo, fediverse, ostatus, diaspora, activitypub
66
**Requires at least:** 4.9
77
**Tested up to:** 6.1
8-
**Stable tag:** 1.0.8
8+
**Stable tag:** 2.0.0
99
**Requires PHP:** 5.6
1010
**License:** MIT
1111
**License URI:** https://opensource.org/licenses/MIT
@@ -24,6 +24,10 @@ This plugin provides a barebone JSON file with basic "node"-informations. The fi
2424

2525
Project and support maintained on github at [pfefferle/wordpress-nodeinfo](https://github.com/pfefferle/wordpress-nodeinfo).
2626

27+
### 2.0.0 ###
28+
29+
* removed support for ServiceInfo, as it never caught on
30+
2731
### 1.0.8 ###
2832

2933
* fix link to WordPress repository (props @jeherve)

includes/class-nodeinfo-endpoint.php

Lines changed: 5 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -66,28 +66,6 @@ public static function register_routes() {
6666
),
6767
)
6868
);
69-
70-
register_rest_route(
71-
'serviceinfo',
72-
'/(?P<version>[\.\d]+)',
73-
array(
74-
array(
75-
'methods' => WP_REST_Server::READABLE,
76-
'callback' => array( 'Nodeinfo_Endpoint', 'render_serviceinfo' ),
77-
'permission_callback' => '__return_true',
78-
'args' => array(
79-
'version' => array(
80-
'required' => true,
81-
'type' => 'string',
82-
'description' => __( 'The version of the ServiceInfo scheme', 'nodeinfo' ),
83-
'enum' => array(
84-
'1.0',
85-
),
86-
),
87-
),
88-
),
89-
)
90-
);
9169
}
9270

9371
/**
@@ -156,28 +134,18 @@ public static function render_nodeinfo2( WP_REST_Request $request ) {
156134
return new WP_REST_Response( $nodeinfo2->to_array() );
157135
}
158136

159-
/**
160-
* Render the ServiceInfo file.
161-
*
162-
* @param WP_REST_Request $request the request object
163-
* @return WP_REST_Response the response object
164-
*/
165-
public static function render_serviceinfo( WP_REST_Request $request ) {
166-
require_once( 'class-serviceinfo.php' );
167-
168-
$serviceinfo = new Serviceinfo( $request->get_param( 'version' ) );
169-
170-
// Create the response object
171-
return new WP_REST_Response( $serviceinfo->to_array() );
172-
}
173-
174137
/**
175138
* Add Host-Meta and WebFinger discovery links
176139
*
177140
* @param array $jrd the JRD file used by Host-Meta and WebFinger
178141
* @return array the extended JRD file
179142
*/
180143
public static function render_jrd( $jrd ) {
144+
$jrd['links'][] = array(
145+
'rel' => 'http://nodeinfo.diaspora.software/ns/schema/2.1',
146+
'href' => get_rest_url( null, '/nodeinfo/2.1' ),
147+
);
148+
181149
$jrd['links'][] = array(
182150
'rel' => 'http://nodeinfo.diaspora.software/ns/schema/2.0',
183151
'href' => get_rest_url( null, '/nodeinfo/2.0' ),
@@ -193,15 +161,6 @@ public static function render_jrd( $jrd ) {
193161
'href' => get_rest_url( null, '/nodeinfo/1.0' ),
194162
);
195163

196-
$jrd['links'][] = array(
197-
'rel' => 'https://feneas.org/ns/serviceinfo',
198-
'type' => 'application/ld+json',
199-
'href' => get_rest_url( null, '/serviceinfo/1.0' ),
200-
'properties' => array(
201-
'https://feneas.org/ns/serviceinfo#software.name' => get_bloginfo( 'name', 'esc_attr' ),
202-
),
203-
);
204-
205164
return $jrd;
206165
}
207166
}

includes/class-serviceinfo.php

Lines changed: 0 additions & 113 deletions
This file was deleted.

languages/nodeinfo.pot

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# This file is distributed under the MIT.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: NodeInfo 1.0.8\n"
5+
"Project-Id-Version: NodeInfo 2.0.0\n"
66
"Report-Msgid-Bugs-To: "
77
"https://wordpress.org/support/plugin/wordpress-nodeinfo\n"
8-
"POT-Creation-Date: 2023-01-06 17:15:27+00:00\n"
8+
"POT-Creation-Date: 2023-01-10 13:40:04+00:00\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=utf-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
@@ -22,10 +22,6 @@ msgstr ""
2222
msgid "The version of the NodeInfo2 scheme"
2323
msgstr ""
2424

25-
#: includes/class-nodeinfo-endpoint.php:82
26-
msgid "The version of the ServiceInfo scheme"
27-
msgstr ""
28-
2925
#. Plugin Name of the plugin/theme
3026
msgid "NodeInfo"
3127
msgstr ""

nodeinfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: NodeInfo
44
* Plugin URI: https://github.com/pfefferle/wordpress-nodeinfo/
55
* Description: NodeInfo is an effort to create a standardized way of exposing metadata about a server running one of the distributed social networks.
6-
* Version: 1.0.8
6+
* Version: 2.0.0
77
* Author: Matthias Pfefferle
88
* Author URI: https://notiz.blog/
99
* License: MIT

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Donate link: https://notiz.blog/donate/
55
Tags: nodeinfo, fediverse, ostatus, diaspora, activitypub
66
Requires at least: 4.9
77
Tested up to: 6.1
8-
Stable tag: 1.0.8
8+
Stable tag: 2.0.0
99
Requires PHP: 5.6
1010
License: MIT
1111
License URI: https://opensource.org/licenses/MIT
@@ -24,6 +24,10 @@ This plugin provides a barebone JSON file with basic "node"-informations. The fi
2424

2525
Project and support maintained on github at [pfefferle/wordpress-nodeinfo](https://github.com/pfefferle/wordpress-nodeinfo).
2626

27+
= 2.0.0 =
28+
29+
* removed support for ServiceInfo, as it never caught on
30+
2731
= 1.0.8 =
2832

2933
* fix link to WordPress repository (props @jeherve)

0 commit comments

Comments
 (0)