[wp-trac] [WordPress Trac] #18285: New Settings API and workflow

WordPress Trac wp-trac at lists.automattic.com
Sun Jul 31 21:46:53 UTC 2011


#18285: New Settings API and workflow
----------------------------+------------------
 Reporter:  nacin           |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.3
Component:  Plugins         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+------------------
Changes (by Mordof):

 * cc: Mordof (added)


Comment:

 Really interested to see where this goes. Will check it out soon - I had
 to use the Settings API recently and was not happy with it. I made a class
 which, like the other simple ones that were mentioned, just takes care of
 things and makes it easier.

 Just throwing out there how I had done it quickly in case it might help
 anyone. register_section is also available with an id and description
 field, then under register_option another optional argument is the section
 id so they can be grouped.

 It's very very basic, doesn't include styling options.. Anyway It may not
 help much or at all, but whatever comes from this ticket I'm sure will be
 worth the wait :)

 {{{
 $args=array(
         "page_title"=>"Theme Options",
         "menu_title"=>"Theme Options",
         "settings_description"=>"Options specific to the Home Page"
 );

 $ops=new Settings('homepage_options', $args);

 $ops->register_option('homepage_slide_count',"Homepage Slide Count",
   "<input id='%id%' name='%name%' size='2' type='text' value='%value%'
 />");
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18285#comment:27>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list