Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#16231 closed enhancement (wontfix)

settings_fields and do_settings_sections should have an echo option

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

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 14 years ago.
wp-admin/includes/plugin.php diff from revision 17297.

Download all attachments as: .zip

Change History (5)

@AshKyd
14 years ago

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

#1 @filosofo
14 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
14 years ago

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

I'd tend to agree.

#3 @markjaquith
14 years ago

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

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

#4 @AshKyd
14 years ago

Cheers, I'll do that instead. :)

Note: See TracTickets for help on using tickets.