diff --git a/assets/css/activitypub-event-bridge-admin.css b/assets/css/event-bridge-for-activitypub-admin.css similarity index 100% rename from assets/css/activitypub-event-bridge-admin.css rename to assets/css/event-bridge-for-activitypub-admin.css diff --git a/assets/js/activitypub-event-bridge-admin.js b/assets/js/event-bridge-for-activitypub-admin.js similarity index 100% rename from assets/js/activitypub-event-bridge-admin.js rename to assets/js/event-bridge-for-activitypub-admin.js diff --git a/includes/activitypub/collection/class-event-sources.php b/includes/activitypub/collection/class-event-sources.php index fed94ff..c72453d 100644 --- a/includes/activitypub/collection/class-event-sources.php +++ b/includes/activitypub/collection/class-event-sources.php @@ -2,15 +2,15 @@ /** * Event sources collection file. * - * @package ActivityPub_Event_Bridge + * @package Event_Bridge_For_ActivityPub * @license AGPL-3.0-or-later */ -namespace ActivityPub_Event_Bridge\ActivityPub\Collection; +namespace Event_Bridge_For_ActivityPub\ActivityPub\Collection; use WP_Error; use WP_Query; -use ActivityPub_Event_Bridge\ActivityPub\Event_Source; +use Event_Bridge_For_ActivityPub\ActivityPub\Event_Source; use function Activitypub\is_tombstone; use function Activitypub\get_remote_metadata_by_actor; @@ -22,7 +22,7 @@ class Event_Sources { /** * The custom post type. */ - const POST_TYPE = 'activitypub_event_bridge_follow'; + const POST_TYPE = 'Event_Bridge_For_ActivityPub_follow'; /** * Register the post type used to store the external event sources (i.e., followed ActivityPub actors). diff --git a/includes/activitypub/model/class-event-source.php b/includes/activitypub/model/class-event-source.php index c59113e..641d171 100644 --- a/includes/activitypub/model/class-event-source.php +++ b/includes/activitypub/model/class-event-source.php @@ -2,14 +2,14 @@ /** * Event-Source (=ActivityPub Actor that is followed) model. * - * @package ActivityPub_Event_Bridge + * @package Event_Bridge_For_ActivityPub * @license AGPL-3.0-or-later */ -namespace ActivityPub_Event_Bridge\ActivityPub; +namespace Event_Bridge_For_ActivityPub\ActivityPub; use Activitypub\Activity\Actor; -use ActivityPub_Event_Bridge\ActivityPub\Collection\Event_Sources; +use Event_Bridge_For_ActivityPub\ActivityPub\Collection\Event_Sources; use WP_Error; /** @@ -36,10 +36,10 @@ class Event_Source extends Actor { } /** - * Convert a Custom-Post-Type input to an \ActivityPub_Event_Bridge\ActivityPub\Model\Event_Source. + * Convert a Custom-Post-Type input to an \Event_Bridge_For_ActivityPub\ActivityPub\Model\Event_Source. * * @param \WP_Post $post The post object. - * @return \ActivityPub_Event_Bridge\ActivityPub\Event_Source|WP_Error + * @return \Event_Bridge_For_ActivityPub\ActivityPub\Event_Source|WP_Error */ public static function init_from_cpt( $post ) { if ( Event_Sources::POST_TYPE !== $post->post_type ) { diff --git a/includes/admin/class-event-sources.php b/includes/admin/class-event-sources.php index f979dd9..bf14c3a 100644 --- a/includes/admin/class-event-sources.php +++ b/includes/admin/class-event-sources.php @@ -2,10 +2,10 @@ /** * Event Sources. * - * @package Activitypub_Event_Bridge + * @package Event_Bridge_For_ActivityPub */ -namespace ActivityPub_Event_Bridge\Admin; +namespace Event_Bridge_For_ActivityPub\Admin; use Activitypub\Collection\Actors; use Activitypub\Activity\Extended_Object\Event; @@ -67,7 +67,7 @@ class Event_Sources { * Respond to the Ajax request to fetch feeds */ public function ajax_fetch_events() { - if ( ! isset( $_POST['activitypub_event_bridge'] ) ) { + if ( ! isset( $_POST['Event_Bridge_For_ActivityPub'] ) ) { wp_send_json_error( 'missing-parameters' ); } diff --git a/includes/admin/class-health-check.php b/includes/admin/class-health-check.php index 61faa18..bfdb340 100644 --- a/includes/admin/class-health-check.php +++ b/includes/admin/class-health-check.php @@ -2,7 +2,7 @@ /** * Health_Check class. * - * @package Activitypub_Event_Bridge + * @package Event_Bridge_For_ActivityPub */ namespace Event_Bridge_For_ActivityPub\Admin; diff --git a/includes/admin/class-settings-page.php b/includes/admin/class-settings-page.php index b4b21a5..f53d379 100644 --- a/includes/admin/class-settings-page.php +++ b/includes/admin/class-settings-page.php @@ -119,7 +119,7 @@ class Settings_Page { case 'event-sources': wp_enqueue_script( 'thickbox' ); wp_enqueue_style( 'thickbox' ); - \load_template( ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . 'templates/event-sources.php', true ); + \load_template( EVENT_BRIDGE_FOR_ACTIVITYPUB_PLUGIN_DIR . 'templates/event-sources.php', true ); break; case 'welcome': default: diff --git a/includes/class-event-sources.php b/includes/class-event-sources.php index 6081a2d..6b5c3b6 100644 --- a/includes/class-event-sources.php +++ b/includes/class-event-sources.php @@ -2,10 +2,10 @@ /** * Class for handling and saving the ActivityPub event sources (i.e. follows). * - * @package ActivityPub_Event_Bridge + * @package Event_Bridge_For_ActivityPub */ -namespace ActivityPub_Event_Bridge; +namespace Event_Bridge_For_ActivityPub; use Activitypub\Http; use Exception; @@ -15,13 +15,13 @@ use function register_post_type; /** * Class for handling and saving the ActivityPub event sources (i.e. follows). * - * @package ActivityPub_Event_Bridge + * @package Event_Bridge_For_ActivityPub */ class Event_Sources { /** * The custom post type. */ - const POST_TYPE = 'activitypub_event_bridge_follow'; + const POST_TYPE = 'event_bridge_follow'; /** * Register the post type used to store the external event sources (i.e., followed ActivityPub actors). diff --git a/includes/class-setup.php b/includes/class-setup.php index 272212d..841a65c 100644 --- a/includes/class-setup.php +++ b/includes/class-setup.php @@ -183,7 +183,7 @@ class Setup { } add_action( 'init', array( Health_Check::class, 'init' ) ); - add_action( 'init', array( Event_Sources::class, 'register_taxonomy' ) ); + add_action( 'init', array( Event_Sources::class, 'register_post_type' ) ); // Check if the minimum required version of the ActivityPub plugin is installed. if ( ! version_compare( $this->activitypub_plugin_version, EVENT_BRIDGE_FOR_ACTIVITYPUB_ACTIVITYPUB_PLUGIN_MIN_VERSION ) ) { diff --git a/includes/table/class-event-sources.php b/includes/table/class-event-sources.php index 32e552a..32210c7 100644 --- a/includes/table/class-event-sources.php +++ b/includes/table/class-event-sources.php @@ -2,14 +2,14 @@ /** * Event Sources Table-Class file. * - * @package ActivityPub_Event_Bridge + * @package Event_Bridge_For_ActivityPub */ -namespace ActivityPub_Event_Bridge\Table; +namespace Event_Bridge_For_ActivityPub\Table; use WP_List_Table; use Activitypub\Collection\Followers as FollowerCollection; -use ActivityPub_Event_Bridge\ActivityPub\Event_Source; +use Event_Bridge_For_ActivityPub\ActivityPub\Event_Source; use function Activitypub\object_to_uri; diff --git a/templates/admin-header.php b/templates/admin-header.php index 41980b3..7456149 100644 --- a/templates/admin-header.php +++ b/templates/admin-header.php @@ -33,8 +33,8 @@ $args = wp_parse_args( - - + + diff --git a/templates/event-sources.php b/templates/event-sources.php index 2e46916..72e2fdc 100644 --- a/templates/event-sources.php +++ b/templates/event-sources.php @@ -2,7 +2,7 @@ /** * Event Sources management page for the ActivityPub Event Bridge. * - * @package ActivityPub_Event_Bridge + * @package Event_Bridge_For_ActivityPub */ // Exit if accessed directly. @@ -17,24 +17,24 @@ defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore ); -$table = new \ActivityPub_Event_Bridge\Table\Event_Sources(); +$table = new \Event_Bridge_For_ActivityPub\Table\Event_Sources(); ?> -
+
-

-

+

+

- - + + -