public functions to get/count followers

for a better use in themes/other plugins
This commit is contained in:
Matthias Pfefferle 2019-01-22 21:16:37 +01:00
parent 661d9fc201
commit e9d6f11889

View file

@ -201,3 +201,19 @@ function activitypub_get_identifier_settings( $user_id ) {
</table> </table>
<?php <?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 );
}