diff --git a/assets/css/activitypub-event-bridge-admin.css b/assets/css/activitypub-event-bridge-admin.css new file mode 100644 index 0000000..a3575c3 --- /dev/null +++ b/assets/css/activitypub-event-bridge-admin.css @@ -0,0 +1,52 @@ +.activitypub-event-bridge-settings-page .box { + border: 1px solid #c3c4c7; + background-color: #fff; + padding: 1em 1.5em; + margin-bottom: 1.5em; +} + +.activitypub-event-bridge-settings { + max-width: 800px; + margin: 0 auto; +} + +.activitypub-event-bridge-settings-header { + text-align: center; + margin: 0 0 1rem; + background: #fff; + border-bottom: 1px solid #dcdcde; +} + +.activitypub-event-bridge-settings-title-section { + display: flex; + align-items: center; + justify-content: center; + clear: both; + padding-top: 8px; +} + +.activitypub-event-bridge-settings-tabs-wrapper { + display: -ms-inline-grid; + -ms-grid-columns: auto auto auto auto; + vertical-align: top; + display: inline-grid; + grid-template-columns: auto auto auto auto; +} + +.activitypub-event-bridge-settings-tab.active { + box-shadow: inset 0 -3px #3582c4; + font-weight: 600; +} + +.activitypub-event-bridge-settings-tab { + display: block; + text-decoration: none; + color: inherit; + padding: .5rem 1rem 1rem; + margin: 0 1rem; + transition: box-shadow .5s ease-in-out; +} + +.activitypub-event-bridge-settings .box h3 { + font-size: 1.1rem!important; +} \ No newline at end of file diff --git a/assets/css/activitypub-event-extensions-admin.css b/assets/css/activitypub-event-extensions-admin.css deleted file mode 100644 index c59d1a1..0000000 --- a/assets/css/activitypub-event-extensions-admin.css +++ /dev/null @@ -1,6 +0,0 @@ -.activitypub-event-bridge-settings-page .box { - border: 1px solid #c3c4c7; - background-color: #fff; - padding: 1em 1.5em; - margin-bottom: 1.5em; -} diff --git a/includes/plugins/class-event-plugin.php b/includes/plugins/class-event-plugin.php index f70cfa0..7374794 100644 --- a/includes/plugins/class-event-plugin.php +++ b/includes/plugins/class-event-plugin.php @@ -53,6 +53,18 @@ abstract class Event_Plugin { return ''; } + /** + * Get the plugins name from the main plugin-file's top-level-file-comment. + */ + final public static function get_plugin_name(): string { + $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . static::get_plugin_file() ); + if ( isset( $plugin_data['Name'] ) ) { + return $plugin_data['Name']; + } else { + return ''; + } + } + /** * Detects whether the current screen is a admin page of the event plugin. */ diff --git a/templates/admin-header.php b/templates/admin-header.php new file mode 100644 index 0000000..1890558 --- /dev/null +++ b/templates/admin-header.php @@ -0,0 +1,33 @@ + '', + 'settings' => '', + ) +); +?> + +