Clanbite Social Kit

ensure_author_is_admin( int $group_id ): bool

Make a group's author its admin when the group has no admin yet.

Groups made through create_group() already get their creator as admin; groups created any other way (REST, the post editor, imports, third-party code) would otherwise have no admin at all. The repair is idempotent: it never demotes anyone, never overrides an existing admin, and skips banned authors.

public static

Class: Kernowdev\ClanbiteSocialKit\Groups\Group_Data_Access

Parameters

$group_id (int) Required

Group post ID.

Returns

bool True when the author was promoted.

Defined in inc/Groups/Group_Data_Access.php