Your SlideShare is downloading. ×
0
Theme options.
 When the consumer just needs that little bit more
customisation to make themselves feel accomplished.
4 essential components.
•   Variables

•   Form action and setup

•   Form code

•   wp-admin menu hook

•   ???

•   PROF...
Variables
•   $options is an array that
    stores your options in
    elements.

•   Each option needs at
    least 3 att...
Form action and setup

•   theme_add_admin()

•   Saves, resets, and deletes
    options in the database

•   gets form co...
Form code

•   theme_admin()

•   all the code seen on wp-
    admin is here

•   switch() creates fields

•   form save an...
wp-admin menu hook

•   add_action()

•   admin_menu

•   theme_add_admin
Just how cool does it get?
Code can be found at
baffleinc.com/wordcampnz
Stellar

•   100% no-frills free! (I’m
    not even gonna charge
    you for child-themes!)

•   Utilises theme options

•...
Harley Alexander

★   baffleinc.com
★   twitter.com/baffleinc
★   baffleinc@gmail.com
Upcoming SlideShare
Loading in...5
×

Plugin Options

370

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
370
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Plugin Options"

  1. 1. Theme options. When the consumer just needs that little bit more customisation to make themselves feel accomplished.
  2. 2. 4 essential components. • Variables • Form action and setup • Form code • wp-admin menu hook • ??? • PROFIT!!!
  3. 3. Variables • $options is an array that stores your options in elements. • Each option needs at least 3 attributes: ‘name’, ‘id’, and ‘type’. • Optional attributes are ‘desc’, ‘std’, ‘options’
  4. 4. Form action and setup • theme_add_admin() • Saves, resets, and deletes options in the database • gets form code from following function and prepares it for wp-admin
  5. 5. Form code • theme_admin() • all the code seen on wp- admin is here • switch() creates fields • form save and reset
  6. 6. wp-admin menu hook • add_action() • admin_menu • theme_add_admin
  7. 7. Just how cool does it get?
  8. 8. Code can be found at baffleinc.com/wordcampnz
  9. 9. Stellar • 100% no-frills free! (I’m not even gonna charge you for child-themes!) • Utilises theme options • CMS/blog • 100% CSS themeable
  10. 10. Harley Alexander ★ baffleinc.com ★ twitter.com/baffleinc ★ baffleinc@gmail.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×