Skip to content

Commit

Permalink
public functions to get/count followers
Browse files Browse the repository at this point in the history
for a better use in themes/other plugins
  • Loading branch information
pfefferle committed Jan 22, 2019
1 parent 661d9fc commit e9d6f11
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

0 comments on commit e9d6f11

Please sign in to comment.