Skip to content

Commit c258697

Browse files
lesterchanclaude
andcommitted
Register the options screen rows with the Settings API
render() built the two form tables by hand: every tr, th, label and the Display Options heading were literal markup, and the row order lived in the template rather than in the registration. Each option key is now an add_settings_field() against one of two add_settings_section() sections, drawn by do_settings_sections(), so core owns the table markup and the label pairing. render() is down to the wrap, settings_fields(), the sections and submit_button(). The select rows pass label_for. The two template rows do not: their heading cell carries the allowed-variables list, which core would nest inside a label element, so they supply their own label in the title. The use_ajax hidden field moved next to settings_fields(). It is what keeps the stored value pinned off when there is no page cache, and it is a hidden input rather than a row, so it does not belong in a section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EcmNzkCYLCvub6vDBMgcdg
1 parent 42812ed commit c258697

2 files changed

Lines changed: 366 additions & 149 deletions

File tree

0 commit comments

Comments
 (0)