Skip to content

Commit 8ab7d95

Browse files
committed
added node informations
add node* informations. thanks @Menrath for the idea!
1 parent b71b84d commit 8ab7d95

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

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.4
8-
**Stable tag:** 2.2.0
8+
**Stable tag:** 2.3.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.3.0 ###
28+
29+
* add nodeName, nodeDescription and nodeIcon to meta array
30+
2731
### 2.2.0 ###
2832

2933
* add MAUs

includes/class-nodeinfo.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,16 @@ public function generate_services() {
107107
public function generate_metadata() {
108108
$metadata = $this->metadata;
109109

110-
$metadata['email'] = get_option( 'admin_email' );
111-
112110
$metadata['generator'] = array(
113111
'name' => 'NodeInfo WordPress-Plugin',
114112
'version' => nodeinfo_version(),
115113
'repository' => 'https://github.com/pfefferle/wordpress-nodeinfo/',
116114
);
117115

116+
$metadata['nodeName'] = \get_bloginfo( 'name' );
117+
$metadata['nodeDescription'] = \get_bloginfo( 'description' );
118+
$metadata['nodeIcon'] = \get_site_icon_url();
119+
118120
$this->metadata = apply_filters( 'nodeinfo_data_metadata', $metadata, $this->version );
119121
}
120122

includes/class-nodeinfo2.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,15 @@ public function generate_services() {
8989
public function generate_metadata() {
9090
$metadata = $this->metadata;
9191

92-
$metadata['email'] = get_option( 'admin_email' );
92+
$metadata['generator'] = array(
93+
'name' => 'NodeInfo WordPress-Plugin',
94+
'version' => nodeinfo_version(),
95+
'repository' => 'https://github.com/pfefferle/wordpress-nodeinfo/',
96+
);
97+
98+
$metadata['nodeName'] = \get_bloginfo( 'name' );
99+
$metadata['nodeDescription'] = \get_bloginfo( 'description' );
100+
$metadata['nodeIcon'] = \get_site_icon_url();
93101

94102
$this->metadata = apply_filters( 'nodeinfo2_data_metadata', $metadata, $this->version );
95103
}

languages/nodeinfo.pot

Lines changed: 2 additions & 2 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 2.2.0\n"
5+
"Project-Id-Version: NodeInfo 2.3.0\n"
66
"Report-Msgid-Bugs-To: "
77
"https://wordpress.org/support/plugin/wordpress-nodeinfo\n"
8-
"POT-Creation-Date: 2023-10-16 15:44:17+00:00\n"
8+
"POT-Creation-Date: 2023-12-22 14:57:32+00:00\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=utf-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"

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: 2.2.0
6+
* Version: 2.3.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.4
8-
Stable tag: 2.2.0
8+
Stable tag: 2.3.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.3.0 =
28+
29+
* add nodeName, nodeDescription and nodeIcon to meta array
30+
2731
= 2.2.0 =
2832

2933
* add MAUs

0 commit comments

Comments
 (0)