You've already forked wp-fedistream
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0627dd0db7 |
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [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
|
||||
|
||||
### Added
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Stream music over ActivityPub - Build your own music streaming platform for Musicians and Labels.
|
||||
|
||||
[](CHANGELOG.md)
|
||||
[](CHANGELOG.md)
|
||||
[](https://php.net)
|
||||
[](https://wordpress.org)
|
||||
[](https://www.gnu.org/licenses/gpl-2.0.html)
|
||||
|
||||
@@ -421,15 +421,50 @@ final class Manager {
|
||||
/**
|
||||
* Check if the license is currently valid.
|
||||
*
|
||||
* Uses cached status for performance.
|
||||
* Uses cached status for performance. Bypasses license check on localhost.
|
||||
*
|
||||
* @return 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' );
|
||||
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.
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Plugin Name: 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.
|
||||
* Version: 0.5.0
|
||||
* Version: 0.5.1
|
||||
* Requires at least: 6.4
|
||||
* Requires PHP: 8.3
|
||||
* Author: Marco Graetsch
|
||||
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
define( 'WP_FEDISTREAM_VERSION', '0.5.0' );
|
||||
define( 'WP_FEDISTREAM_VERSION', '0.5.1' );
|
||||
|
||||
/**
|
||||
* Plugin file path.
|
||||
|
||||
Reference in New Issue
Block a user