Here is a comment I just requested be added to the bottom of the register_setting() page.
If you plan to use your setting in the REST API, use both the
Corey Salzanorest_api_init
andadmin_init
hooks when callingregister_setting()
instead of justadmin_init
. Theshow_in_rest
argument is ineffective when hooked intoadmin_init
alone.
Someday, when my comment is approved, you’ll be able to see it on this page and save an hour or two of debugging time. If you can see my comment on this page, please let me know.