André Menrath
03b6a8e598
Some checks failed
PHP_CodeSniffer / phpcs (push) Has been cancelled
Unit Testing / phpunit (5.6, 6.2) (push) Has been cancelled
Unit Testing / phpunit (7.0) (push) Has been cancelled
Unit Testing / phpunit (7.2) (push) Has been cancelled
Unit Testing / phpunit (7.3) (push) Has been cancelled
Unit Testing / phpunit (7.4) (push) Has been cancelled
Unit Testing / phpunit (8.0) (push) Has been cancelled
Unit Testing / phpunit (8.1) (push) Has been cancelled
Unit Testing / phpunit (8.2) (push) Has been cancelled
Unit Testing / phpunit (latest) (push) Has been cancelled
- the application actor is managed manually by default - no admin-options are included yet - the old new follower table only is used hardcoded by the application actor - no admin notifications are send yet - todo: a lot more
57 lines
1.8 KiB
PHP
57 lines
1.8 KiB
PHP
<?php
|
|
|
|
use Activitypub\Collection\Users;
|
|
|
|
\load_template(
|
|
__DIR__ . '/admin-header.php',
|
|
true,
|
|
array(
|
|
'settings' => '',
|
|
'welcome' => '',
|
|
'followers' => 'active',
|
|
)
|
|
);
|
|
|
|
// Draw the follow table for the blog user if it is activated.
|
|
if ( ! \Activitypub\is_user_disabled( \Activitypub\Collection\Users::BLOG_USER_ID ) ) :
|
|
$table = new \Activitypub\Table\Followers();
|
|
$follower_count = $table->get_user_count();
|
|
// translators: The follower count.
|
|
$followers_template = _n( 'Your blog profile currently has %s follower.', 'Your blog profile currently has %s followers.', $follower_count, 'activitypub' );
|
|
?>
|
|
<div class="wrap activitypub-followers-page">
|
|
<p><?php \printf( \esc_html( $followers_template ), \esc_attr( $follower_count ) ); ?></p>
|
|
|
|
<form method="get">
|
|
<input type="hidden" name="page" value="activitypub" />
|
|
<input type="hidden" name="tab" value="followers" />
|
|
<?php
|
|
$table->prepare_items();
|
|
$table->search_box( 'Search', 'search' );
|
|
$table->display();
|
|
?>
|
|
</form>
|
|
</div>
|
|
|
|
<?php endif;
|
|
|
|
// Draw the the follow table for the application user with reject and accept options.
|
|
$table = new \Activitypub\Table\Follow_Requests( Users::APPLICATION_USER_ID );
|
|
$table->prepare_items();
|
|
$follow_requests_count = $table->follow_requests_count;
|
|
// translators: The follower count.
|
|
$followers_template = _n( 'Your WordPress site currently has %s follow request.', 'Your WordPress site currently has %s follow requests.', $follow_requests_count, 'activitypub' );
|
|
?>
|
|
<div class="wrap activitypub-followers-page">
|
|
<p><?php \printf( \esc_html( $followers_template ), \esc_attr( $follow_requests_count ) ); ?></p>
|
|
|
|
<form method="get">
|
|
<input type="hidden" name="page" value="activitypub" />
|
|
<input type="hidden" name="tab" value="followers" />
|
|
<?php
|
|
$table->search_box( 'Search', 'search' );
|
|
$table->display();
|
|
|
|
?>
|
|
</form>
|
|
</div>
|