SlideShare ist ein Scribd-Unternehmen logo
1 von 10
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

•   ???

•   PROFIT!!!
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’
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
Form code

•   theme_admin()

•   all the code seen on wp-
    admin is here

•   switch() creates fields

•   form save and reset
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

•   CMS/blog

•   100% CSS themeable
Harley Alexander

★   baffleinc.com
★   twitter.com/baffleinc
★   baffleinc@gmail.com

Weitere ähnliche Inhalte

Andere mochten auch

Nikolasa & Potaua Biasiny-Tule – DigitalMāori & WP Magazine Stylz
Nikolasa & Potaua Biasiny-Tule – DigitalMāori & WP Magazine StylzNikolasa & Potaua Biasiny-Tule – DigitalMāori & WP Magazine Stylz
Nikolasa & Potaua Biasiny-Tule – DigitalMāori & WP Magazine StylzWordCamp New Zealand
 
Analytics without the Fuss-Dan Hesson
Analytics without the Fuss-Dan HessonAnalytics without the Fuss-Dan Hesson
Analytics without the Fuss-Dan HessonWordCamp New Zealand
 
CMS Tools for Developers- Owen Harris
CMS Tools for Developers- Owen HarrisCMS Tools for Developers- Owen Harris
CMS Tools for Developers- Owen HarrisWordCamp New Zealand
 
Bronson quick how to client-proof your word press theme
Bronson quick   how to client-proof your word press themeBronson quick   how to client-proof your word press theme
Bronson quick how to client-proof your word press themeWordCamp New Zealand
 
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesLiz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesWordCamp New Zealand
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSSRachel Andrew
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsShelly Sanchez Terrell
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaChris Lema
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back KidEthos3
 

Andere mochten auch (10)

Nikolasa & Potaua Biasiny-Tule – DigitalMāori & WP Magazine Stylz
Nikolasa & Potaua Biasiny-Tule – DigitalMāori & WP Magazine StylzNikolasa & Potaua Biasiny-Tule – DigitalMāori & WP Magazine Stylz
Nikolasa & Potaua Biasiny-Tule – DigitalMāori & WP Magazine Stylz
 
Analytics without the Fuss-Dan Hesson
Analytics without the Fuss-Dan HessonAnalytics without the Fuss-Dan Hesson
Analytics without the Fuss-Dan Hesson
 
CMS Tools for Developers- Owen Harris
CMS Tools for Developers- Owen HarrisCMS Tools for Developers- Owen Harris
CMS Tools for Developers- Owen Harris
 
Sam Cooke – How to Pick a Theme
Sam Cooke – How to Pick a ThemeSam Cooke – How to Pick a Theme
Sam Cooke – How to Pick a Theme
 
Bronson quick how to client-proof your word press theme
Bronson quick   how to client-proof your word press themeBronson quick   how to client-proof your word press theme
Bronson quick how to client-proof your word press theme
 
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesLiz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and Adolescents
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris Lema
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
 

Ähnlich wie Plugin Options

Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme developmentNaeem Junejo
 
Wordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean CodingWordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean Codinginspector_fegter
 
WordPress
WordPressWordPress
WordPressrisager
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016David Brattoli
 
How to get your theme in WordPress
How to get your theme in WordPressHow to get your theme in WordPress
How to get your theme in WordPressNisha Singh
 
Pretty Good Practices/Productivity
Pretty Good Practices/ProductivityPretty Good Practices/Productivity
Pretty Good Practices/Productivityciconf
 
CICONF 2012 - Pretty Good Practices
CICONF 2012 - Pretty Good PracticesCICONF 2012 - Pretty Good Practices
CICONF 2012 - Pretty Good Practicesdarkhouse
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Think Media Inc.
 
Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Kelly Dwan
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress themeDave Wallace
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress WebsitesKyle Cearley
 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Pluginssuperann
 
DevCon - Branding the LMS for your institution - Michael Garner, Blackboard
DevCon - Branding the LMS for your institution - Michael Garner, BlackboardDevCon - Branding the LMS for your institution - Michael Garner, Blackboard
DevCon - Branding the LMS for your institution - Michael Garner, BlackboardBlackboard APAC
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme ReviewCatch Themes
 
Introduction to Django CMS
Introduction to Django CMS Introduction to Django CMS
Introduction to Django CMS Pim Van Heuven
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshopBoston WordPress
 
MCC Web Design Workshop
MCC Web Design WorkshopMCC Web Design Workshop
MCC Web Design WorkshopFaye Tandog
 
Getting the Most from Xamarin Studio - Michael Hutchinson
Getting the Most from Xamarin Studio - Michael HutchinsonGetting the Most from Xamarin Studio - Michael Hutchinson
Getting the Most from Xamarin Studio - Michael HutchinsonXamarin
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3David Bisset
 

Ähnlich wie Plugin Options (20)

Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
 
Wordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean CodingWordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean Coding
 
WordPress
WordPressWordPress
WordPress
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
 
How to get your theme in WordPress
How to get your theme in WordPressHow to get your theme in WordPress
How to get your theme in WordPress
 
Pretty Good Practices/Productivity
Pretty Good Practices/ProductivityPretty Good Practices/Productivity
Pretty Good Practices/Productivity
 
CICONF 2012 - Pretty Good Practices
CICONF 2012 - Pretty Good PracticesCICONF 2012 - Pretty Good Practices
CICONF 2012 - Pretty Good Practices
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
 
Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Plugins
 
DevCon - Branding the LMS for your institution - Michael Garner, Blackboard
DevCon - Branding the LMS for your institution - Michael Garner, BlackboardDevCon - Branding the LMS for your institution - Michael Garner, Blackboard
DevCon - Branding the LMS for your institution - Michael Garner, Blackboard
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme Review
 
Introduction to Django CMS
Introduction to Django CMS Introduction to Django CMS
Introduction to Django CMS
 
Introduction to Wordpress
Introduction to WordpressIntroduction to Wordpress
Introduction to Wordpress
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshop
 
MCC Web Design Workshop
MCC Web Design WorkshopMCC Web Design Workshop
MCC Web Design Workshop
 
Getting the Most from Xamarin Studio - Michael Hutchinson
Getting the Most from Xamarin Studio - Michael HutchinsonGetting the Most from Xamarin Studio - Michael Hutchinson
Getting the Most from Xamarin Studio - Michael Hutchinson
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3
 

Mehr von WordCamp New Zealand

Mehr von WordCamp New Zealand (8)

Alex Shiels – Akismet – Automattic WordPress by the Numbers
Alex Shiels – Akismet – Automattic WordPress by the NumbersAlex Shiels – Akismet – Automattic WordPress by the Numbers
Alex Shiels – Akismet – Automattic WordPress by the Numbers
 
Wordcamp v2 craig deveson cloudsafe365
Wordcamp v2 craig deveson cloudsafe365Wordcamp v2 craig deveson cloudsafe365
Wordcamp v2 craig deveson cloudsafe365
 
Blogging on a hot topic, julianne taylor
Blogging on a hot topic, julianne taylorBlogging on a hot topic, julianne taylor
Blogging on a hot topic, julianne taylor
 
Helloworldwcnz
HelloworldwcnzHelloworldwcnz
Helloworldwcnz
 
Dee teal getting_involved_v2
Dee teal getting_involved_v2Dee teal getting_involved_v2
Dee teal getting_involved_v2
 
Befriending Buddypress
Befriending BuddypressBefriending Buddypress
Befriending Buddypress
 
Bloggers
BloggersBloggers
Bloggers
 
Word Camp Dragging Govt
Word Camp Dragging GovtWord Camp Dragging Govt
Word Camp Dragging Govt
 

Plugin Options

  • 1. Theme options. When the consumer just needs that little bit more customisation to make themselves feel accomplished.
  • 2. 4 essential components. • Variables • Form action and setup • Form code • wp-admin menu hook • ??? • PROFIT!!!
  • 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. 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. Form code • theme_admin() • all the code seen on wp- admin is here • switch() creates fields • form save and reset
  • 6. wp-admin menu hook • add_action() • admin_menu • theme_add_admin
  • 7. Just how cool does it get?
  • 8. Code can be found at baffleinc.com/wordcampnz
  • 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. Harley Alexander ★ baffleinc.com ★ twitter.com/baffleinc ★ baffleinc@gmail.com