Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13376 closed enhancement (maybelater)

Enable Settings API to display input field across full page when no title.

Reported by: dgwyer Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.9.2
Component: Administration Keywords: has-patch
Focuses: Cc:


I came across this whilst using do_settings_fields() function to output the options in the WordPress dashboard. I didn't ALWAYS want to be forced to have a title on the left, with the input field on the right.

Sometimes it is desirable (when title is an empty string) to have an option with the input field on the left, spanning two columns. This can be seen in WordPress 2.9.2 under the Miscellaneous Settings page. The last two options are check boxes that start on the left and span across the full width of the options page, with NO preceding title.

This cannot be reproduced using the do_settings_fields() function as it currently stands. If you leave the option title as an empty string then the option will still appear on the right side of the options page but with no preceding title.

My patch attempts to overcome this by checking to see if the title is an empty string. If so then the option is placed on the left side of the page and spans two columns.

Attachments (1)

template.patch (1.1 KB) - added by dgwyer 5 years ago.

Download all attachments as: .zip

Change History (3)

@dgwyer5 years ago

comment:1 @nacin5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

We intend to re-do the settings pages in a future release, at which time they'll all use the API to actually build the form. (And it'll probably have a much different design.) Closing for now, for lack of traction.

comment:2 @goto105 years ago

  • Cc dromsey@… added
Note: See TracTickets for help on using tickets.