Skip to content

Commit 32b1f78

Browse files
committed
version bump
1 parent 8ab7d95 commit 32b1f78

File tree

7 files changed

+35
-11
lines changed

7 files changed

+35
-11
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
**Donate link:** https://notiz.blog/donate/
55
**Tags:** nodeinfo, fediverse, ostatus, diaspora, activitypub
66
**Requires at least:** 4.9
7-
**Tested up to:** 6.4
8-
**Stable tag:** 2.3.0
7+
**Tested up to:** 6.5
8+
**Stable tag:** 2.3.1
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.1 ###
28+
29+
* mask version number
30+
2731
### 2.3.0 ###
2832

2933
* add nodeName, nodeDescription and nodeIcon to meta array

includes/class-nodeinfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function generate_usage() {
6464
public function generate_software() {
6565
$software = array(
6666
'name' => 'wordpress',
67-
'version' => get_bloginfo( 'version' ),
67+
'version' => nodeinfo_get_masked_version(),
6868
);
6969

7070
if ( '2.1' === $this->version ) {

includes/class-nodeinfo2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function generate_server() {
6767
'baseUrl' => home_url( '/' ),
6868
'name' => get_bloginfo( 'name' ),
6969
'software' => 'wordpress',
70-
'version' => get_bloginfo( 'version' ),
70+
'version' => nodeinfo_get_masked_version(),
7171
),
7272
$this->version
7373
);

includes/functions.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,19 @@ function nodeinfo_get_active_users( $duration = '1 month ago' ) {
3030
)
3131
);
3232
}
33+
34+
/**
35+
* Get the masked WordPress version to only show the major and minor version.
36+
*
37+
* @return string The masked version.
38+
*/
39+
function nodeinfo_get_masked_version() {
40+
// only show the major and minor version
41+
$version = get_bloginfo( 'version' );
42+
// strip the RC or beta part
43+
$version = preg_replace( '/-.*$/', '', $version );
44+
$version = explode( '.', $version );
45+
$version = array_slice( $version, 0, 2 );
46+
47+
return implode( '.', $version );
48+
}

languages/nodeinfo.pot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Copyright (C) 2023 Matthias Pfefferle
1+
# Copyright (C) 2024 Matthias Pfefferle
22
# This file is distributed under the MIT.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: NodeInfo 2.3.0\n"
5+
"Project-Id-Version: NodeInfo 2.3.1\n"
66
"Report-Msgid-Bugs-To: "
77
"https://wordpress.org/support/plugin/wordpress-nodeinfo\n"
8-
"POT-Creation-Date: 2023-12-22 14:57:32+00:00\n"
8+
"POT-Creation-Date: 2024-04-05 14:07:42+00:00\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=utf-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"PO-Revision-Date: 2023-MO-DA HO:MI+ZONE\n"
12+
"PO-Revision-Date: 2024-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
1515
"X-Generator: grunt-wp-i18n 1.0.3\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.3.0
6+
* Version: 2.3.1
77
* Author: Matthias Pfefferle
88
* Author URI: https://notiz.blog/
99
* License: MIT

readme.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Contributors: pfefferle
44
Donate link: https://notiz.blog/donate/
55
Tags: nodeinfo, fediverse, ostatus, diaspora, activitypub
66
Requires at least: 4.9
7-
Tested up to: 6.4
8-
Stable tag: 2.3.0
7+
Tested up to: 6.5
8+
Stable tag: 2.3.1
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.1 =
28+
29+
* mask version number
30+
2731
= 2.3.0 =
2832

2933
* add nodeName, nodeDescription and nodeIcon to meta array

0 commit comments

Comments
 (0)