Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#7682 closed defect (bug) (fixed)

API for adding settings to default settings pages

Reported by: 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 7 years ago.
add_settings_section(), add_settings_field
settings_field_test.txt (1.1 KB) - added by ryan 7 years ago.
Test code

Download all attachments as: .zip

Change History (10)

@ryan7 years ago

add_settings_section(), add_settings_field

comment:1 @ryan7 years ago

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

@ryan7 years ago

Test code

comment:2 @ryan7 years ago

  • Description modified (diff)

comment:3 @ryan7 years ago

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

comment:4 @ryan7 years ago

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

comment:5 @technosailor7 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');

function myex_settings()
  echo "foo";

comment:6 @technosailor7 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.

comment:7 @ryan7 years ago

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

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

comment:8 @hakre6 years ago

Related: #7092

Note: See TracTickets for help on using tickets.