wordpress-event-bridge-for-.../templates/event-sources.php

52 lines
1.6 KiB
PHP
Raw Normal View History

2024-11-18 16:07:09 +01:00
<?php
/**
* Event Sources management page for the ActivityPub Event Bridge.
*
2024-12-05 17:50:17 +01:00
* @package Event_Bridge_For_ActivityPub
2024-11-18 16:07:09 +01:00
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore
\load_template(
__DIR__ . '/admin-header.php',
true,
array(
'event-sources' => 'active',
)
);
2024-12-05 17:50:17 +01:00
$table = new \Event_Bridge_For_ActivityPub\Table\Event_Sources();
2024-11-18 16:07:09 +01:00
?>
2024-12-05 17:50:17 +01:00
<div class="event-bridge-for-activitypub-settings event-bridge-for-activitypub-settings-page hide-if-no-js">
2024-11-18 16:07:09 +01:00
<div class="box">
2024-12-05 17:50:17 +01:00
<h2> <?php esc_html_e( 'Federated event sources', 'event-bridge-for-activitypub' ); ?> </h2>
<p> <?php esc_html_e( 'Here you can add any Fediverse Account.', 'event-bridge-for-activitypub' ); ?> </p>
2024-11-18 16:07:09 +01:00
<!-- Button that triggers ThickBox -->
2024-12-05 17:50:17 +01:00
<a href="#TB_inline?width=600&height=400&inlineId=Event_Bridge_For_ActivityPub_add_new_source" class="thickbox button button-primary">
<?php esc_html_e( 'Add new', 'event-bridge-for-activitypub' ); ?>
2024-11-18 16:07:09 +01:00
</a>
<!-- ThickBox content (hidden initially) -->
2024-12-05 17:50:17 +01:00
<div id="Event_Bridge_For_ActivityPub_add_new_source" style="display:none;">
<h2><?php esc_html_e( 'Add new ActivityPub follow', 'event-bridge-for-activitypub' ); ?> </h2>
<p> <?php esc_html_e( 'Here you can enter either a handle or instance URL.', 'event-bridge-for-activitypub' ); ?> </p>
2024-11-18 16:07:09 +01:00
</div>
</div>
<div class="wrap activitypub-followers-page">
<form method="get">
<input type="hidden" name="page" value="activitypub" />
<input type="hidden" name="tab" value="followers" />
<?php
$table->prepare_items();
$table->search_box( 'Search', 'search' );
$table->display();
?>
</form>
</div>