Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#16231 closed enhancement (wontfix)

settings_fields and do_settings_sections should have an echo option

Reported by: AshKyd Owned by:
Priority: normal Milestone:
Component: General Version: 3.1
Severity: normal Keywords: reporter-feedback
Cc: Focuses:

Description

Neither settings_fields() and do_settings_sections() have the option to supress echoing content to the page. This means the output can't be adjusted, and the functions can't easily be used in higher level situations such as within an actual templating language or in an AJAX call.

I had a peek at the code, and adding a $echo parameter to settings_fields seems quite straightforward, but retaining backward compatibility in do_settings_sections could be difficult.

Attachments (1)

plugin.php.diff (681 bytes ) - added by AshKyd 16 years ago.
wp-admin/includes/plugin.php diff from revision 17297.

Download all attachments as: .zip

Change History (5)

@AshKyd
16 years ago

wp-admin/includes/plugin.php diff from revision 17297.

#1 @filosofo
16 years ago

Since this is a small amount of text and an obscure situation, wouldn't it be most easily done with output buffers?

#2 @nacin
16 years ago

  • Keywords reporter-feedback added; settings_fields do_settings_sections plugins settings removed

I'd tend to agree.

#3 @markjaquith
16 years ago

  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

Thirded. There's no shame in output buffers. Well, only a little. :-)

#4 @AshKyd
16 years ago

Cheers, I'll do that instead. :)

Note: See TracTickets for help on using tickets.