Compare commits
2
Commits
v0.5.0
..
6e45b0b6f1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e45b0b6f1 | ||
|
|
0627dd0db7 |
No files matched your search
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.5.1] - 2026-02-02
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Localhost license bypass** - License check is automatically bypassed on local development environments
|
||||||
|
- Detects `localhost`, `127.0.0.1`, `::1`
|
||||||
|
- Detects common local TLDs: `.local`, `.test`, `.localhost`, `.dev.local`
|
||||||
|
- Allows full plugin functionality without license on development sites
|
||||||
|
|
||||||
## [0.5.0] - 2026-02-02
|
## [0.5.0] - 2026-02-02
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -606,4 +606,55 @@ wp-fedistream/
|
|||||||
- WordPress hook system (class-wp-hook.php) can itself be the recursion point
|
- WordPress hook system (class-wp-hook.php) can itself be the recursion point
|
||||||
- The interaction between FediStream and WP Prometheus appears to be at a fundamental WordPress level
|
- The interaction between FediStream and WP Prometheus appears to be at a fundamental WordPress level
|
||||||
|
|
||||||
**Status:** UNRESOLVED - Documented as known incompatibility, investigation to continue later
|
**Status:** RESOLVED - Issue was fixed in WP Prometheus plugin, removed from known incompatibilities
|
||||||
|
|
||||||
|
### 2026-02-02 - Prometheus Metrics & License Bypass v0.5.0/v0.5.1
|
||||||
|
|
||||||
|
**Summary:** Added Prometheus metrics integration and localhost license bypass for development.
|
||||||
|
|
||||||
|
**v0.5.0 - Prometheus Metrics Integration:**
|
||||||
|
|
||||||
|
- Created `includes/Prometheus/Integration.php` with comprehensive metrics collection
|
||||||
|
- Content metrics: `fedistream_content_total`, `fedistream_genres_total`, `fedistream_moods_total`
|
||||||
|
- Engagement metrics: `fedistream_plays_total`, `fedistream_plays_today`, `fedistream_favorites_total`, `fedistream_local_follows_total`, `fedistream_listening_history_entries`
|
||||||
|
- User metrics: `fedistream_users_with_library`, `fedistream_users_following_artists`, `fedistream_notifications_total`, `fedistream_notifications_pending`
|
||||||
|
- WooCommerce metrics (conditional): `fedistream_purchases_total`, `fedistream_customers_total`, `fedistream_products_total`
|
||||||
|
- ActivityPub metrics (conditional): `fedistream_activitypub_followers_total`, `fedistream_activitypub_followers_by_artist`, `fedistream_activitypub_reactions_total`
|
||||||
|
- New setting in Integrations tab to enable/disable
|
||||||
|
- Uses `wp_prometheus_collect_metrics` action hook
|
||||||
|
|
||||||
|
**v0.5.1 - Localhost License Bypass:**
|
||||||
|
|
||||||
|
- Added `is_localhost()` method to License Manager
|
||||||
|
- Bypasses license check on: `localhost`, `127.0.0.1`, `::1`
|
||||||
|
- Also bypasses for TLDs: `.local`, `.test`, `.localhost`, `.dev.local`
|
||||||
|
- Allows full plugin functionality during local development
|
||||||
|
|
||||||
|
**Files Created:**
|
||||||
|
|
||||||
|
- `includes/Prometheus/Integration.php` - Metrics collection class
|
||||||
|
- `includes/Prometheus/index.php` - Security file
|
||||||
|
|
||||||
|
**Files Modified:**
|
||||||
|
|
||||||
|
- `includes/Plugin.php` - Added Prometheus integration, settings toggle, `is_prometheus_active()` method
|
||||||
|
- `includes/Installer.php` - Added `wp_fedistream_enable_prometheus` default option
|
||||||
|
- `includes/License/Manager.php` - Added `is_localhost()` method, bypass in `is_license_valid()`
|
||||||
|
- `README.md` - Removed known incompatibility section, updated version badge
|
||||||
|
|
||||||
|
**Integration Pattern:**
|
||||||
|
|
||||||
|
Follows same pattern as WooCommerce/ActivityPub integrations:
|
||||||
|
|
||||||
|
```php
|
||||||
|
if (get_option('wp_fedistream_enable_prometheus', 0) && $this->is_prometheus_active()) {
|
||||||
|
new PrometheusIntegration();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Notes:**
|
||||||
|
|
||||||
|
- WP Prometheus memory leak issue was fixed in WP Prometheus itself
|
||||||
|
- Metrics use simple COUNT queries for performance
|
||||||
|
- ActivityPub followers limited to top 10 to avoid cardinality explosion
|
||||||
|
- Default disabled (opt-in via Settings > Integrations)
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Stream music over ActivityPub - Build your own music streaming platform for Musicians and Labels.
|
Stream music over ActivityPub - Build your own music streaming platform for Musicians and Labels.
|
||||||
|
|
||||||
[](CHANGELOG.md)
|
[](CHANGELOG.md)
|
||||||
[](https://php.net)
|
[](https://php.net)
|
||||||
[](https://wordpress.org)
|
[](https://wordpress.org)
|
||||||
[](https://www.gnu.org/licenses/gpl-2.0.html)
|
[](https://www.gnu.org/licenses/gpl-2.0.html)
|
||||||
|
|||||||
@@ -421,15 +421,50 @@ final class Manager {
|
|||||||
/**
|
/**
|
||||||
* Check if the license is currently valid.
|
* Check if the license is currently valid.
|
||||||
*
|
*
|
||||||
* Uses cached status for performance.
|
* Uses cached status for performance. Bypasses license check on localhost.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function is_license_valid(): bool {
|
public static function is_license_valid(): bool {
|
||||||
|
// Bypass license check on localhost for development.
|
||||||
|
if ( self::is_localhost() ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$status = get_option( self::OPTION_LICENSE_STATUS, 'unchecked' );
|
$status = get_option( self::OPTION_LICENSE_STATUS, 'unchecked' );
|
||||||
return 'valid' === $status;
|
return 'valid' === $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the current site is running on localhost.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function is_localhost(): bool {
|
||||||
|
$host = wp_parse_url( home_url(), PHP_URL_HOST );
|
||||||
|
|
||||||
|
// Common localhost identifiers.
|
||||||
|
$localhost_hosts = array(
|
||||||
|
'localhost',
|
||||||
|
'127.0.0.1',
|
||||||
|
'::1',
|
||||||
|
);
|
||||||
|
|
||||||
|
if ( in_array( $host, $localhost_hosts, true ) ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Common local development TLDs.
|
||||||
|
$local_tlds = array( '.local', '.test', '.localhost', '.dev.local' );
|
||||||
|
foreach ( $local_tlds as $tld ) {
|
||||||
|
if ( str_ends_with( $host, $tld ) ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the license key.
|
* Get the license key.
|
||||||
*
|
*
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: WP FediStream
|
* Plugin Name: WP FediStream
|
||||||
* Plugin URI: https://src.bundespruefstelle.ch/magdev/wp-fedistream
|
* Plugin URI: https://src.bundespruefstelle.ch/magdev/wp-fedistream
|
||||||
* Description: Stream music over ActivityPub - Build your own music streaming platform for Musicians and Labels.
|
* Description: Stream music over ActivityPub - Build your own music streaming platform for Musicians and Labels.
|
||||||
* Version: 0.5.0
|
* Version: 0.5.1
|
||||||
* Requires at least: 6.4
|
* Requires at least: 6.4
|
||||||
* Requires PHP: 8.3
|
* Requires PHP: 8.3
|
||||||
* Author: Marco Graetsch
|
* Author: Marco Graetsch
|
||||||
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
define( 'WP_FEDISTREAM_VERSION', '0.5.0' );
|
define( 'WP_FEDISTREAM_VERSION', '0.5.1' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin file path.
|
* Plugin file path.
|
||||||
|
|||||||
Reference in new issue
Block a user