api.addSaveableUserOptionField는 무엇을 하나요?

There’s virtually no documentation on this, and the plugin API file doesn’t have a comment explaining the use of this function. Plus, the only place I can see it used is in plugins, not in core. So what does api.addSaveableUserOptionField() do exactly? Is there additional configuration needed to use it?

I don’t know, but here’s what I think I found out.

But first–My question is why do you care? Is there something you’re trying to do? But maybe if you’re trying to create a plugin that has user options, this is how to to do it. It’s not used in core since it’s a hook especially for plugins to be able to have their own user options.

Looks like it’s used in the Chat plugin like here:

Looks like if your plugin has user options then you use this to establish that it’s a user option with the UserUpdater.

Yes, I’m planning to have a user setting in a plugin. I saw previosuly that Chat and IIRC AI used this function to add user settings, so I was wondering if there was a documentd way of doing it.

다시 이 주제로 돌아와 보니, 여기에 더 많은 정보가 있는 것 같습니다.

이제 3개의 함수가 나열되어 있습니다: addSaveableUserField(), addSaveableUserOption(), 그리고 addSaveableCustomFields().

첫 번째 함수는 관리자 정의 사용자 정의 필드를 추가하고 저장하는 데 사용되는 것으로 보입니다. 그러나 나머지 두 함수는 명확하지 않습니다. 이 함수들을 사용하려면 백엔드에서 register_custom_user_field :...를 사용해야 합니까? 더 많은 작업이 필요한가요, 아니면 TC(테마 컴포넌트)에서도 작동할 수 있나요?

감사합니다.

UX에서 추가한 커스텀 필드와 플러그인을 통해 추가한 필드 모두에서 작동하는 것 같습니다. 커스텀 필드의 경우, user_field_1과 같은 이름이 붙는 것으로 거의 확신합니다. 예를 들어 데이터 탐색기에서 테이블을 살펴볼 수 있습니다. 혹은 UX에서 추가한 필드(“관리자 정의 프로필 필드”)만 의미하는 것일 수도 있고, 이 경우 생성할 때 지정한 이름을 사용하면 됩니다. 두 가지 방식을 모두 시도해 보는 것이 좋겠습니다.

그리고 GitHub이 중단되어 있어서那里的 코드를 확인할 수 없습니다.