diff --git a/.forgejo/workflows/phpunit.yml b/.forgejo/workflows/phpunit.yml index e3e0f9e..a4c9142 100644 --- a/.forgejo/workflows/phpunit.yml +++ b/.forgejo/workflows/phpunit.yml @@ -77,7 +77,7 @@ jobs: - name: Run General Tests - run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=event_bridge_for_activitypub + run: cd /workspace/Event-Federation/wordpress-event-bridge-for-activitypub/ && ./vendor/bin/phpunit --filter=event_bridge_for_activitypub env: PHP_VERSION: ${{ matrix.php-version }} diff --git a/assets/js/event-bridge-for-activitypub-admin.js b/assets/js/event-bridge-for-activitypub-admin.js index 362e134..c270039 100644 --- a/assets/js/event-bridge-for-activitypub-admin.js +++ b/assets/js/event-bridge-for-activitypub-admin.js @@ -14,19 +14,20 @@ jQuery( function( $ ) { // Function to toggle visibility of custom details based on selected radio button. function toggleCustomDetailsForSummary() { - if ($("#activitypub_summary_type_custom").is(':checked')) { - $("#activitypub_summary_type_custom-details").show(); + if ($("#event_bridge_activitypub_summary_type_custom").is(':checked')) { + $("#event_bridge_activitypub_summary_type_custom-details").show(); } else { - $("#activitypub_summary_type_custom-details").hide(); + $("#event_bridge_activitypub_summary_type_custom-details").hide(); } } // Run the toggle function on page load. $(document).ready(function() { + window.console.log("test"); toggleCustomDetailsForSummary(); // Set the correct state on load. // Listen for changes on the radio buttons - $("input[name=activitypub_summary_type]").change(function() { + $("input[name=event_bridge_activitypub_summary_type]").change(function() { toggleCustomDetailsForSummary(); // Update visibility on change. }); }); diff --git a/composer.json b/composer.json index b628de2..01cb90e 100644 --- a/composer.json +++ b/composer.json @@ -60,7 +60,7 @@ ], "test-debug": [ "@prepare-test", - "@test-activitypub-event-bridge-shortcodes" + "@test-event-bridge-for-activitypub-shortcodes" ], "test-vs-event-list": "phpunit --filter=vs_event_list", "test-the-events-calendar": "phpunit --filter=the_events_calendar", @@ -71,7 +71,7 @@ "test-modern-events-calendar-lite": "phpunit --filter=modern_events_calendar_lite", "test-eventprime": "phpunit --filter=eventprime", "test-event-organiser": "phpunit --filter=event_organiser", - "test-activitypub-event-bridge-shortcodes": "phpunit --filter=event_bridge_for_activitypub_shortcodes", + "test-event-bridge-for-activitypub-shortcodes": "phpunit --filter=event_bridge_for_activitypub_shortcodes", "test-all": "phpunit" } } diff --git a/event-bridge-for-activitypub.php b/event-bridge-for-activitypub.php index 8bb7ed3..7b5e262 100644 --- a/event-bridge-for-activitypub.php +++ b/event-bridge-for-activitypub.php @@ -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.1 + * Version: 0.3.1.1 * Author: André Menrath * Author URI: https://graz.social/@linos * Text Domain: event-bridge-for-activitypub diff --git a/includes/activitypub/transformer/class-event.php b/includes/activitypub/transformer/class-event.php index c87f5f6..cb388c2 100644 --- a/includes/activitypub/transformer/class-event.php +++ b/includes/activitypub/transformer/class-event.php @@ -419,7 +419,7 @@ abstract class Event extends Post { * Get the summary. */ public function get_summary(): ?string { - if ( 'preset' === get_option( 'activitypub_summary_type', 'preset' ) ) { + if ( 'preset' === get_option( 'event_bridge_for_activitypub_summary_type', 'preset' ) ) { return $this->format_preset_summary(); } diff --git a/includes/class-settings.php b/includes/class-settings.php index 6e00df1..61c9857 100644 --- a/includes/class-settings.php +++ b/includes/class-settings.php @@ -73,22 +73,22 @@ class Settings { ); \register_setting( - 'activitypub-event-bridge', - 'activitypub_summary_type', + 'event-bridge-for-activitypub', + 'event_bridge_activitypub_summary_type', array( 'type' => 'string', - 'description' => \__( 'Summary type to use for ActivityStreams', 'activitypub-event-bridge' ), + 'description' => \__( 'Summary type to use for ActivityStreams', 'event-bridge-for-activitypub' ), 'show_in_rest' => true, 'default' => 'preset', ) ); \register_setting( - 'activitypub-event-bridge', + 'event-bridge-for-activitypub', 'event_bridge_for_activitypub_custom_summary', array( 'type' => 'string', - 'description' => \__( 'Define your own custom summary template for events', 'activitypub-event-bridge' ), + 'description' => \__( 'Define your own custom summary template for events', 'event-bridge-for-activitypub' ), 'show_in_rest' => true, 'default' => EVENT_BRIDGE_FOR_ACTIVITYPUB_CUSTOM_SUMMARY, ) diff --git a/templates/settings.php b/templates/settings.php index 6309ef0..5e67676 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -46,8 +46,8 @@ $current_category_mapping = \get_option( 'event_bridge_for_activitypub_ev

-

-

-
+