Fix fatal error in admin-UI when ActivityPub plugin is not installed
All checks were successful
PHP Code Checker / PHP Code Checker (push) Successful in 48s
PHPUnit / PHPUnit – PHP 7.4 (push) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.0 (push) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.1 (push) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.2 (push) Successful in 1m2s
PHPUnit / PHPUnit – PHP 8.3 (push) Successful in 1m3s
PHPUnit / PHPUnit – PHP 8.4 (push) Successful in 1m7s
/ upload-release (push) Successful in 4s

This commit is contained in:
André Menrath 2024-12-21 15:36:01 +01:00
parent c5578776d9
commit e8ec7a4ce6
5 changed files with 8 additions and 9 deletions

View file

@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.3] - 2024-12-19
## [0.3.4] - 2024-12-21
* Initial release on WordPress.org

View file

@ -3,7 +3,7 @@
**Tags:** events, fediverse, activitypub, calendar
**Requires at least:** 6.5
**Tested up to:** 6.7
**Stable tag:** 0.3.3
**Stable tag:** 0.3.4
**Requires PHP:** 7.4
**License:** AGPL-3.0-or-later
**License URI:** https://www.gnu.org/licenses/agpl-3.0.html
@ -101,7 +101,7 @@ We're always interested in your feedback. Feel free to reach out to us via [E-Ma
## Changelog ##
### [0.3.3] 2024-12-19 ###
### [0.3.4] 2024-12-21 ###
* Initial release on https://wordpress.org/

View file

@ -3,7 +3,7 @@
* Plugin Name: Event Bridge for ActivityPub
* Description: Integrating popular event plugins with the ActivityPub plugin.
* Plugin URI: https://event-federation.eu/
* Version: 0.3.3
* Version: 0.3.4
* Author: André Menrath
* Author URI: https://graz.social/@linos
* Text Domain: event-bridge-for-activitypub

View file

@ -14,8 +14,6 @@ namespace Event_Bridge_For_ActivityPub;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
use Activitypub\Activity\Extended_Object\Event;
/**
* Class responsible for the ActivityPui Event Extension related Settings.
*
@ -133,7 +131,8 @@ class Settings {
* @return bool True if allowed, false otherwise.
*/
private static function is_allowed_event_category( $event_category ): bool {
$allowed_event_categories = Event::DEFAULT_EVENT_CATEGORIES;
require_once EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . '/includes/event-categories.php';
$allowed_event_categories = array_keys( EVENT_BRIDGE_FOR_ACTIVITYPUB_EVENT_CATEGORIES );
return in_array( $event_category, $allowed_event_categories, true );
}
}

View file

@ -3,7 +3,7 @@ Contributors: andremenrath
Tags: events, fediverse, activitypub, calendar
Requires at least: 6.5
Tested up to: 6.7
Stable tag: 0.3.3
Stable tag: 0.3.4
Requires PHP: 7.4
License: AGPL-3.0-or-later
License URI: https://www.gnu.org/licenses/agpl-3.0.html
@ -95,6 +95,6 @@ We're always interested in your feedback. Feel free to reach out to us via [E-Ma
== Changelog ==
= [0.3.3] 2024-12-19 =
= [0.3.4] 2024-12-21 =
* Initial release on https://wordpress.org/