diff --git a/assets/css/activitypub-admin.css b/assets/css/activitypub-admin.css index db4546c..805aaa5 100644 --- a/assets/css/activitypub-admin.css +++ b/assets/css/activitypub-admin.css @@ -155,3 +155,24 @@ summary { input.blog-user-identifier { text-align: right; } + +.activitypub-settings-body +.header-image { + width: 100%; + height: 80px; + position: relative; + display: block; + margin-bottom: 40px; + background-image: rgb(168,165,175); + background-image: linear-gradient(180deg, red, yellow); + background-size: cover; +} + +.activitypub-settings-body +.logo { + height: 80px; + width: 80px; + position: relative; + top: 40px; + left: 40px; +} diff --git a/includes/class-activitypub.php b/includes/class-activitypub.php index 2da2dce..7e5ea2f 100644 --- a/includes/class-activitypub.php +++ b/includes/class-activitypub.php @@ -28,6 +28,8 @@ class Activitypub { \add_action( 'untrash_post', array( self::class, 'untrash_post' ), 1 ); \add_action( 'init', array( self::class, 'add_rewrite_rules' ) ); + + \add_action( 'after_setup_theme', array( self::class, 'theme_compat' ), 99 ); } /** @@ -242,4 +244,31 @@ class Activitypub { self::add_rewrite_rules(); \flush_rewrite_rules(); } + + public static function theme_compat() { + $site_icon = get_theme_support( 'custom-logo' ); + + if ( ! $site_icon ) { + // custom logo support + add_theme_support( + 'custom-logo', + array( + 'height' => 80, + 'width' => 80, + ) + ); + } + + $custom_header = get_theme_support( 'custom-header' ); + + if ( ! $custom_header ) { + // This theme supports a custom header + $custom_header_args = array( + 'width' => 1250, + 'height' => 600, + 'header-text' => true, + ); + add_theme_support( 'custom-header', $custom_header_args ); + } + } } diff --git a/templates/settings.php b/templates/settings.php index 08a65a1..5bc9c90 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -32,7 +32,25 @@
- + + ++ + | +
+
+
+
+ + + + |
+
---|