Improve admin UI for event-category mapping
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Failing after 48s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m0s
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Failing after 48s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m0s
Based on evaluation results.
This commit is contained in:
parent
7eb011859a
commit
2194f898fd
5 changed files with 27 additions and 5 deletions
|
@ -5,6 +5,12 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
* Improved admin UI for event-category mapping
|
||||||
|
|
||||||
## [0.2.1] - 2024-11-16
|
## [0.2.1] - 2024-11-16
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: ActivityPub Event Bridge
|
* Plugin Name: ActivityPub Event Bridge
|
||||||
* Description: Integrating popular event plugins with the ActivityPub plugin.
|
* Description: Integrating popular event plugins with the ActivityPub plugin.
|
||||||
* Plugin URI: https://event-federation.eu/
|
* Plugin URI: https://event-federation.eu/
|
||||||
* Version: 0.2.1
|
* Version: 0.2.1s
|
||||||
* Author: André Menrath
|
* Author: André Menrath
|
||||||
* Author URI: https://graz.social/@linos
|
* Author URI: https://graz.social/@linos
|
||||||
* Text Domain: activitypub-event-bridge
|
* Text Domain: activitypub-event-bridge
|
||||||
|
|
|
@ -177,3 +177,9 @@ code.activitypub-event-bridge-settings-example-url {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.activitypub-event-bridge-settings .select-cell::before {
|
||||||
|
content: "\21D2";
|
||||||
|
margin-right: 8px;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
|
@ -62,13 +62,17 @@ $current_category_mapping = \get_option( 'activitypub_event_bridge_event_
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php if ( ! empty( $event_terms ) ) : ?>
|
<?php if ( ! empty( $event_terms ) ) : ?>
|
||||||
<h3> <?php esc_html_e( 'Advanced Event Category Settings', 'activitypub-event-bridge' ); ?> </h3>
|
<h3> <?php esc_html_e( 'Fine-grained Event Category Settings', 'activitypub-event-bridge' ); ?> </h3>
|
||||||
<p> <?php esc_html_e( 'Take more control by adjusting how your event categories are mapped to the basic category set used in ActivityPub. This option lets you override the default selection above, ensuring more accurate categorization and better visibility for your events.', 'activitypub-event-bridge' ); ?> </p>
|
<p> <?php esc_html_e( 'For any event category you have created on your WordPress site you can choose an event category which will be used in federation. This option lets you override the default selection above. ', 'activitypub-event-bridge' ); ?> </p>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
|
<tr>
|
||||||
|
<th> <?php esc_html_e( 'Event category on your site', 'activitypub-event-bridge' ); ?> </th>
|
||||||
|
<th> <?php esc_html_e( 'Fediverse event category', 'activitypub-event-bridge' ); ?> </th>
|
||||||
|
</tr>
|
||||||
<?php foreach ( $event_terms as $event_term ) { ?>
|
<?php foreach ( $event_terms as $event_term ) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"> <?php echo esc_html( $event_term->name ); ?> </th>
|
<td scope="row"> <?php echo esc_html( $event_term->name ); ?> </td>
|
||||||
<td>
|
<td class="select-cell">
|
||||||
<select name="activitypub_event_bridge_event_category_mappings[<?php echo esc_attr( $event_term->slug ); ?>]">
|
<select name="activitypub_event_bridge_event_category_mappings[<?php echo esc_attr( $event_term->slug ); ?>]">
|
||||||
<?php
|
<?php
|
||||||
$current_mapping_is_set = false;
|
$current_mapping_is_set = false;
|
||||||
|
|
|
@ -11,6 +11,7 @@ defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
|
||||||
use ActivityPub_Event_Bridge\Setup;
|
use ActivityPub_Event_Bridge\Setup;
|
||||||
use ActivityPub_Event_Bridge\Admin\Settings_Page;
|
use ActivityPub_Event_Bridge\Admin\Settings_Page;
|
||||||
use ActivityPub_Event_Bridge\Admin\Health_Check;
|
use ActivityPub_Event_Bridge\Admin\Health_Check;
|
||||||
|
use ActivityPub_Event_Bridge\Admin\General_Admin_Notices;
|
||||||
|
|
||||||
\load_template(
|
\load_template(
|
||||||
__DIR__ . '/admin-header.php',
|
__DIR__ . '/admin-header.php',
|
||||||
|
@ -21,6 +22,11 @@ use ActivityPub_Event_Bridge\Admin\Health_Check;
|
||||||
);
|
);
|
||||||
|
|
||||||
$active_event_plugins = Setup::get_instance()->get_active_event_plugins();
|
$active_event_plugins = Setup::get_instance()->get_active_event_plugins();
|
||||||
|
|
||||||
|
if ( empty( $active_event_plugins ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$activitypub_event_bridge_status_ok = true;
|
$activitypub_event_bridge_status_ok = true;
|
||||||
$example_event_post = Health_Check::get_most_recent_event_posts();
|
$example_event_post = Health_Check::get_most_recent_event_posts();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue