WPCOM_VIP_Support_Role::filter_editable_roles PHP Method

filter_editable_roles() public method

Hooks the editable_roles filter to place the VIP Support at the bottom of any roles listing.
public filter_editable_roles ( array $roles ) : array
$roles array An array of WP role data
return array An array of WP role data
    public function filter_editable_roles(array $roles)
    {
        $vip_support_roles = array(self::VIP_SUPPORT_INACTIVE_ROLE => $roles[self::VIP_SUPPORT_INACTIVE_ROLE], self::VIP_SUPPORT_ROLE => $roles[self::VIP_SUPPORT_ROLE]);
        unset($roles[self::VIP_SUPPORT_INACTIVE_ROLE]);
        unset($roles[self::VIP_SUPPORT_ROLE]);
        $roles = array_merge($vip_support_roles, $roles);
        return $roles;
    }