Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#10694 closed enhancement (invalid)

Simplify creation of options pages for plugins with custom menus

Reported by: sirzooro's profile sirzooro Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8.4
Component: Administration Keywords: close reporter-feedback
Focuses: Cc:

Description

wp-admin/options.php file does a good job for handling options pages for plugins, which adds new item(s) to the Settings menu. Unfortunately this simple approach does not work when plugin registers its own menu and puts all options pages in it - in this case these pages goes through wp-admin/admin.php file, which does not handle options saving. It will be good to either handle this in admin.php too, or add a new function which will do this.

Change History (2)

#1 @dd32
16 years ago

  • Keywords close reporter-feedback added; needs-patch removed

wp-admin/options.php file does a good job for handling options pages for plugins, which adds new item(s) to the Settings menu. Unfortunately this simple approach does not work when plugin registers its own menu and puts all options pages in it

Yes, It does.

You simply need to direct the form action tag to options.php, Add a field for the page to redirect back to(optional), and add a field listing the options you wish to save (Along with a nonce i think).

See http://codex.wordpress.org/Creating_Options_Pages for the full rundown. Dont forget the register_setting() functionality along with the rest..

Pretty sure this is invalid, but leaving open pending reporter-feedback that this doesnt achieve their goals.

#2 @sirzooro
16 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks. I have checked my code and found that I messed parameter passed to the settings_fields() function. So I close this ticket as invalid.

Note: See TracTickets for help on using tickets.