public functions to get/count followers
for a better use in themes/other plugins
This commit is contained in:
parent
661d9fc201
commit
e9d6f11889
1 changed files with 16 additions and 0 deletions
|
@ -201,3 +201,19 @@ function activitypub_get_identifier_settings( $user_id ) {
|
|||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
function activitypub_get_followers( $user_id ) {
|
||||
$followers = Db_Activitypub_Followers::get_followers( $user_id );
|
||||
|
||||
if ( ! $followers ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
return $followers;
|
||||
}
|
||||
|
||||
function activitypub_count_followers( $user_id ) {
|
||||
$followers = activitypub_get_followers( $user_id );
|
||||
|
||||
return count( $followers );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue