Make WordPress Core

Opened 16 years ago

Closed 15 years ago

Last modified 14 years ago

#7682 closed defect (bug) (fixed)

API for adding settings to default settings pages

Reported by: ryan's profile ryan Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description (last modified by ryan)

Plugins should be able to integrate new settings and new sections of settings into the default settings pages via API.

Attachments (2)

7682.diff (4.0 KB) - added by ryan 16 years ago.
add_settings_section(), add_settings_field
settings_field_test.txt (1.1 KB) - added by ryan 16 years ago.
Test code

Download all attachments as: .zip

Change History (10)

@ryan
16 years ago

add_settings_section(), add_settings_field

#1 @ryan
16 years ago

Patch implements add_settings_section() and add_settings_field() and changes options-writing.php to make use of them.

@ryan
16 years ago

Test code

#2 @ryan
16 years ago

  • Description modified (diff)

#3 @ryan
16 years ago

(In [8855]) add_settings_section() and add_settings_field(). see #7682

#4 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#5 @technosailor
15 years ago

Anybody confirm this is functional for plugins in 2.7? Doesn't seem to work or maybe I'm missing something.

function myex_conf()
{
  add_settings_section('myex_settings','My Example Settings','myex_settings','reading');
}
add_action('admin_init','myex_conf');

function myex_settings()
{
  echo "foo";
}

#6 @technosailor
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

The API works fine for writing, discussion, etc - but does not work for reading. Reopening.

#7 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [10003]) do_settings_sections('reading'). fixes #7682

#8 @hakre
14 years ago

Related: #7092

Note: See TracTickets for help on using tickets.