From 96e0d0937cd1d69bc1e1783f0a77b6ec9a136f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sun, 15 Dec 2024 14:08:16 +0100 Subject: [PATCH] improve admin ui --- .../event-bridge-for-activitypub-admin.css | 10 ++++++++ event-bridge-for-activitypub.php | 2 +- templates/settings.php | 25 +++++++++++++++++-- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/assets/css/event-bridge-for-activitypub-admin.css b/assets/css/event-bridge-for-activitypub-admin.css index 17f255f..3240749 100644 --- a/assets/css/event-bridge-for-activitypub-admin.css +++ b/assets/css/event-bridge-for-activitypub-admin.css @@ -207,3 +207,13 @@ code.event-bridge-for-activitypub-settings-example-url { .event_bridge_for_activitypub-admin-table-top > a { display: inline-block; } + +.settings_page_event-bridge-for-activitypub .notice-warning { + background: #fff; + border: 1px solid #c3c4c7; + border-left-width: 4px; + box-shadow: 0 1px 1px rgba(0,0,0,.04); + margin: 5px 15px 2px; + padding: 1px 12px; + border-left-color: #dba617; +} diff --git a/event-bridge-for-activitypub.php b/event-bridge-for-activitypub.php index 37a27ff..e3f4219 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.2.4 + * Version: 0.3.2.6 * Author: André Menrath * Author URI: https://graz.social/@linos * Text Domain: event-bridge-for-activitypub diff --git a/templates/settings.php b/templates/settings.php index 174930d..41b2c83 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -103,7 +103,7 @@ $current_category_mapping = \get_option( 'event_bridge_for_activitypub_ev

@@ -179,7 +179,7 @@ $current_category_mapping = \get_option( 'event_bridge_for_activitypub_ev

@@ -191,6 +191,27 @@ $current_category_mapping = \get_option( 'event_bridge_for_activitypub_ev } echo ''; return; + } else { + $activitypub_plugin_data = get_plugin_data( ACTIVITYPUB_PLUGIN_FILE ); + + $notice = sprintf( + /* translators: 1: The name of the ActivityPub plugin. */ + _x( + 'In order to use this feature your have to enable the Blog-Actor in the the %2$s settings.', + 'admin notice', + 'event-bridge-for-activitypub' + ), + admin_url( 'options-general.php?page=activitypub&tab=settings' ), + esc_html( $activitypub_plugin_data['Name'] ) + ); + + $allowed_html = array( + 'a' => array( + 'href' => true, + 'title' => true, + ), + ); + echo '

' . \wp_kses( $notice, $allowed_html ) . '

'; } ?>