diff --git a/includes/class-admin.php b/includes/class-admin.php index 3572f98..228606c 100644 --- a/includes/class-admin.php +++ b/includes/class-admin.php @@ -148,7 +148,7 @@ class Admin { array( 'type' => 'boolean', 'description' => \__( 'Add hashtags in the content as native tags and replace the #tag with the tag-link', 'activitypub' ), - 'default' => 0, + 'default' => '0', ) ); \register_setting( @@ -182,6 +182,24 @@ class Admin { }, ) ); + \register_setting( + 'activitypub', + 'activitypub_enable_users', + array( + 'type' => 'boolean', + 'description' => \__( 'Every Author on this Blog (with the publish_posts capability) gets his own ActivityPub enabled Profile.', 'activitypub' ), + 'default' => '1', + ) + ); + \register_setting( + 'activitypub', + 'activitypub_enable_blog_user', + array( + 'type' => 'boolean', + 'description' => \__( 'Your Blog becomes an ActivityPub compatible Profile.', 'activitypub' ), + 'default' => '0', + ) + ); } public static function add_settings_help_tab() { diff --git a/includes/functions.php b/includes/functions.php index 4278501..ee67e16 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -347,7 +347,10 @@ function is_user_type_disabled( $type ) { break; } - // @todo check user settings + if ( '1' !== \get_option( 'activitypub_enable_blog_user', '0' ) ) { + $return = true; + break; + } $return = false; break; @@ -364,7 +367,10 @@ function is_user_type_disabled( $type ) { break; } - // @todo check user settings + if ( '1' !== \get_option( 'activitypub_enable_users', '1' ) ) { + $return = true; + break; + } $return = false; break; diff --git a/templates/settings.php b/templates/settings.php index 3da7eaf..de74554 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -33,7 +33,7 @@ -

+

@@ -58,9 +58,47 @@ +
+ -

+

+ +

+ + + + + + + + +
+ + +

+ +

+

+ publish_posts capability) gets his own ActivityPub enabled Profile.', 'activitypub' ), array( 'code' => array() ) ); ?> +

+

+ +

+

+ +

+
+ + + +

@@ -222,7 +260,7 @@ -

+

diff --git a/templates/welcome.php b/templates/welcome.php index 02e8be3..9233254 100644 --- a/templates/welcome.php +++ b/templates/welcome.php @@ -17,7 +17,7 @@ -

+

-

+

ID ); @@ -63,7 +63,7 @@ -

+


-

+