A PHP warning is thrown whenever a plugin calls register_setting
without the show_in_rest
argument
#60859
Labels
REST API Interaction
Related to REST API
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
With Gutenberg 18.0+, if a theme/plugin uses the
register_setting()
core function without using theshow_in_rest
, then theis thrown.
I believe Gutenberg should add defensive coding around this line, because according to the
show_in_rest
argument is not required and I expect to see a lot of those warnings in the wild.For example, Yoast SEO's settings pages use the
register_setting()
function without theshow_in_rest
arg, so that warning is consistently thrown there.Step-by-step reproduction instructions
Warning: Undefined array key "show_in_rest"
warningScreenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: