Enable Settings API to display input field across full page when no title.
|Reported by:||dgwyer||Owned by:|
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.