From 4f2a162f6cfdf81a5e7b6c93043f3fd124e37ac3 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 31 May 2023 11:04:29 +0200 Subject: [PATCH] Fix follower-list actions --- includes/class-admin.php | 4 +-- templates/blog-user-followers-list.php | 30 +++++++++++++++++++ ...owers-list.php => user-followers-list.php} | 14 --------- 3 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 templates/blog-user-followers-list.php rename templates/{followers-list.php => user-followers-list.php} (73%) diff --git a/includes/class-admin.php b/includes/class-admin.php index b88a8de..1f8b640 100644 --- a/includes/class-admin.php +++ b/includes/class-admin.php @@ -65,7 +65,7 @@ class Admin { \load_template( ACTIVITYPUB_PLUGIN_DIR . 'templates/settings.php' ); break; case 'followers': - \load_template( ACTIVITYPUB_PLUGIN_DIR . 'templates/followers-list.php' ); + \load_template( ACTIVITYPUB_PLUGIN_DIR . 'templates/blog-user-followers-list.php' ); break; case 'welcome': default: @@ -85,7 +85,7 @@ class Admin { if ( ! current_user_can( 'publish_posts' ) ) { return; } - \load_template( ACTIVITYPUB_PLUGIN_DIR . 'templates/followers-list.php' ); + \load_template( ACTIVITYPUB_PLUGIN_DIR . 'templates/user-followers-list.php' ); } /** diff --git a/templates/blog-user-followers-list.php b/templates/blog-user-followers-list.php new file mode 100644 index 0000000..db77e1e --- /dev/null +++ b/templates/blog-user-followers-list.php @@ -0,0 +1,30 @@ + '', + 'welcome' => '', + 'followers' => 'active', + ) +); +?> + +
+

+ + + + +

get_user_count() ) ); ?>

+ +
+ + + prepare_items(); + $followers_table->display(); + ?> + +
+
diff --git a/templates/followers-list.php b/templates/user-followers-list.php similarity index 73% rename from templates/followers-list.php rename to templates/user-followers-list.php index 733753e..7476192 100644 --- a/templates/followers-list.php +++ b/templates/user-followers-list.php @@ -1,17 +1,3 @@ -id === 'settings_page_activitypub' ) { - \load_template( - \dirname( __FILE__ ) . '/admin-header.php', - true, - array( - 'settings' => '', - 'welcome' => '', - 'followers' => 'active', - ) - ); -} -?> -