From 3b88d5e36c4f245506d1d01a9c74722ae15bfc6a Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Thu, 20 Jul 2023 15:19:19 +0200 Subject: [PATCH] update checks --- includes/class-admin.php | 10 +++++----- templates/settings.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/class-admin.php b/includes/class-admin.php index 228606c..2771d76 100644 --- a/includes/class-admin.php +++ b/includes/class-admin.php @@ -77,10 +77,10 @@ class Admin { * Load user settings page */ public static function followers_list_page() { - if ( ! current_user_can( 'publish_posts' ) ) { - return; + // user has to be able to publish posts + if ( ! is_user_disabled( get_current_user_id() ) ) { + \load_template( ACTIVITYPUB_PLUGIN_DIR . 'templates/user-followers-list.php' ); } - \load_template( ACTIVITYPUB_PLUGIN_DIR . 'templates/user-followers-list.php' ); } /** @@ -166,9 +166,9 @@ class Admin { 'activitypub_blog_user_identifier', array( 'type' => 'string', - 'description' => \esc_html__( 'The Identifier of th Blog-User', 'activitypub' ), + 'description' => \esc_html__( 'The Identifier of the Blog-User', 'activitypub' ), 'show_in_rest' => true, - 'default' => 'feed', + 'default' => \Activitypub\Model\Blog_User::get_default_username(), 'sanitize_callback' => function( $value ) { // hack to allow dots in the username $parts = explode( '.', $value ); diff --git a/templates/settings.php b/templates/settings.php index de74554..4270355 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -1,6 +1,6 @@ 'active',