Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed Apr 5, 2024
1 parent 8ab7d95 commit 32b1f78
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 11 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
**Donate link:** https://notiz.blog/donate/
**Tags:** nodeinfo, fediverse, ostatus, diaspora, activitypub
**Requires at least:** 4.9
**Tested up to:** 6.4
**Stable tag:** 2.3.0
**Tested up to:** 6.5
**Stable tag:** 2.3.1
**Requires PHP:** 5.6
**License:** MIT
**License URI:** https://opensource.org/licenses/MIT
Expand All @@ -24,6 +24,10 @@ This plugin provides a barebone JSON file with basic "node"-informations. The fi

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

### 2.3.1 ###

* mask version number

### 2.3.0 ###

* add nodeName, nodeDescription and nodeIcon to meta array
Expand Down
2 changes: 1 addition & 1 deletion includes/class-nodeinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function generate_usage() {
public function generate_software() {
$software = array(
'name' => 'wordpress',
'version' => get_bloginfo( 'version' ),
'version' => nodeinfo_get_masked_version(),
);

if ( '2.1' === $this->version ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/class-nodeinfo2.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function generate_server() {
'baseUrl' => home_url( '/' ),
'name' => get_bloginfo( 'name' ),
'software' => 'wordpress',
'version' => get_bloginfo( 'version' ),
'version' => nodeinfo_get_masked_version(),
),
$this->version
);
Expand Down
16 changes: 16 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,19 @@ function nodeinfo_get_active_users( $duration = '1 month ago' ) {
)
);
}

/**
* Get the masked WordPress version to only show the major and minor version.
*
* @return string The masked version.
*/
function nodeinfo_get_masked_version() {
// only show the major and minor version
$version = get_bloginfo( 'version' );
// strip the RC or beta part
$version = preg_replace( '/-.*$/', '', $version );
$version = explode( '.', $version );
$version = array_slice( $version, 0, 2 );

return implode( '.', $version );
}
8 changes: 4 additions & 4 deletions languages/nodeinfo.pot
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Copyright (C) 2023 Matthias Pfefferle
# Copyright (C) 2024 Matthias Pfefferle
# This file is distributed under the MIT.
msgid ""
msgstr ""
"Project-Id-Version: NodeInfo 2.3.0\n"
"Project-Id-Version: NodeInfo 2.3.1\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/wordpress-nodeinfo\n"
"POT-Creation-Date: 2023-12-22 14:57:32+00:00\n"
"POT-Creation-Date: 2024-04-05 14:07:42+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2023-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2024-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"X-Generator: grunt-wp-i18n 1.0.3\n"
Expand Down
2 changes: 1 addition & 1 deletion nodeinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: NodeInfo
* Plugin URI: https://github.com/pfefferle/wordpress-nodeinfo/
* Description: NodeInfo is an effort to create a standardized way of exposing metadata about a server running one of the distributed social networks.
* Version: 2.3.0
* Version: 2.3.1
* Author: Matthias Pfefferle
* Author URI: https://notiz.blog/
* License: MIT
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Contributors: pfefferle
Donate link: https://notiz.blog/donate/
Tags: nodeinfo, fediverse, ostatus, diaspora, activitypub
Requires at least: 4.9
Tested up to: 6.4
Stable tag: 2.3.0
Tested up to: 6.5
Stable tag: 2.3.1
Requires PHP: 5.6
License: MIT
License URI: https://opensource.org/licenses/MIT
Expand All @@ -24,6 +24,10 @@ This plugin provides a barebone JSON file with basic "node"-informations. The fi

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

= 2.3.1 =

* mask version number

= 2.3.0 =

* add nodeName, nodeDescription and nodeIcon to meta array
Expand Down

0 comments on commit 32b1f78

Please sign in to comment.