[wp-trac] [WordPress Trac] #38097: Add ability to Settings API to assign positioning

WordPress Trac noreply at wordpress.org
Tue Mar 23 06:13:26 UTC 2021


#38097: Add ability to Settings API to assign positioning
----------------------------+---------------------
 Reporter:  dartiss         |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  5.8
Component:  Administration  |     Version:  4.7
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+---------------------

Comment (by ribaricplusplus):

 Hi @dartiss,

 We discussed this issue during a triage and agreed that this should be
 done.

 For anyone interested in implementing a patch, here is a suggestion how it
 could be done:

 Add `$position` to `add_settings_field` arguments, and then save it in
 `$wp_settings_fields[ $page ][ $section ][ $id ]` alongside other
 settings. Then before outputting fields in `do_settings_fields` we can do
 a sort so that the fields are output in accordance with `$position`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/38097#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list