SlideShare a Scribd company logo
Making Custom
Theme Options Easy
Developing a Modular Theme for Multiple Site Use
O Hai Canada.
Who are you?
‣ My name is Toby ( @trademark ). A self-
  taught WordPress / PHP / Front end
  Developer.
Who are you?
‣ My name is Toby ( @trademark ). A self-
  taught WordPress / PHP / Front end
  Developer.
‣ I work for Cheezburger Networks
CheezCAP
CHEEZBURGER CUSTOM ADMINISTRATION PANEL
Cheezburger & WordPress
Farm Team
OMG MAKE LOTS OF SITES PLZ
Cheezburger & WordPress
              THEN:


‣ Many self-hosted WordPress.org
  installations
Cheezburger & WordPress
              THEN:

‣ Many self-hosted WordPress.org
  installations
‣ Each had its own customized (read:
  totally hacked) theme.
Cheezburger & WordPress
               THEN:

‣ Many self-hosted WordPress.org
  installations
‣ Each has it’s own customized (read:
  totally hacked) theme.
‣ Making ~2 new sites a week.
Cheezburger & WordPress
        THEN:
Cheezburger & WordPress
        THEN:
Cheezburger & WordPress
        THEN:
Why this was bad.


‣ Spent half the time as a server admin.
Why this was bad.

‣ Spent half the time as a server admin.
‣ No history or version control of the
  changes that were made.
Why this was bad.

‣ Spent half the time as a server admin.
‣ No history or version control of the
  changes that were made.
‣ It looked bad.
Why this was bad.
‣ Spent half the time as a server admin.
‣ No history or version control of the
  changes that were made.
‣ It looked bad.
‣ Easy to make new sites, difficult to
  maintain and update them.
SOLUTION.
The “Unified Theme”


        (.com)
The “Unified Theme”


        (.com)
Cheezburger & WordPress
               NOW:


‣ 10 Sites were already running a Unified
  Theme on WordPress.com VIP
Cheezburger & WordPress
        THEN:
Cheezburger & WordPress
                NOW:

‣ 10 Sites were already running a Unified
  Theme on WordPress.com VIP
‣ One file contained all the customization
  settings for the sites.
Cheezburger & WordPress
                NOW:
‣ 10 Sites were already running a Unified
  Theme on WordPress.com VIP
‣ One file contained all the customization
  settings for the sites.
‣ PROBLEM: Creating a new site meant
  re-copying a bunch of code.
SOLUTION.
CheezCAP
Cheezburger Custom Administration Panel
CheezCAP
What is it?

CheezCAP is a library that
allows you to easily create
an administration panel for
your theme.

There are 4 main features
that make CheezCAP
totally awesome.
CheezCAP
            Getting Started


‣ Add the folder to your theme directory
‣ Add the following to your functions.php
  file:
  require_once('cheezcap/
  cheezcap.php');
CheezCAP
            Getting Started




‣ Edit cheezcap/config.php
CheezCAP
Getting Started
CheezCAP
              Getting Started

‣ Once you’ve created the options you
  want to use, you can start adding them to
  your theme:
  if ( $cap->my_boolean_option ) {
  	 	 // do stuff	
  	 }
CheezCAP
                      Boolean Options

Boolean Options serve as basic toggle
switches:
new BooleanOption(

	   	   	   	    	     'Simple Boolean Example',

	   	   	   	    	     'This will create a simple true/false switch.’,

	   	   	   	    	     'simple_boolean_example',

	   	   	   	    	     true

	   	   	   	    ),
CheezCAP
                       Boolean Options

Boolean Options serve as basic toggle
switches:
new BooleanOption(

	   	   	   	     	     'Simple Boolean Example', <- Title

Description ->	   	     'This will create a simple true/false switch.’,

	   	   	   	     	     'simple_boolean_example', <- ID of the parameter

	   	   	   	     	     true <- Initial Value

	   	   	   	     ),
CheezCAP
                       Text Options

Text Options can represent alphanumeric
strings to be inserted, code, etc.
	    new TextOption(

	    	    	   	   	    'Simple Text Exmaple #3',

	    	    	   	   	    'This will store a string value.’,

    	 	   	   	   	    'simple_text_example3',

	    	    	   	   	    'Say Cheez!'

	    	    	   	   ),
CheezCAP
                    Dropdown Options
Dropdown Options serve as more
complex switches:
new DropdownOption(

	   	       	   	   	    'Inline Options Dropdown Example #3',

        	   	   	   	    'This dropdown creates its options using an

                         inline array.',

	   	       	   	   	    'inline_options_dropdown_example3',

	   	       	   	   	    array( 'Red', 'Yellow', 'Green' ),

	   	       	   	   	    2, // Green

	   	       	   	   ),
CheezCAP Work For Me?
How Can I Make CheezCAP




‣ Text Options: Google Analytics accounts, site
  announcements, customized text in your
  theme ( comment links, page navigation, 404
  pages )
CheezCAP Work For Me?
How Can I Make CheezCAP


‣ Text Options: Google Analytics accounts, site
  announcements, customized text in your
  theme ( comment links, page navigation, 404
  pages )
‣ Boolean Options: Turn Features on and off,
  beta or A/B testing
CheezCAP Work For Me?
How Can I Make CheezCAP
‣ Text Options: Google Analytics accounts, site
  announcements, customized text in your
  theme ( comment links, page navigation, 404
  pages )
‣ Boolean Options: Turn Features on and off,
  beta or A/B testing
‣ Dropdown Options: switching stylesheets or
  color schemes, enabling or disabling sets of
  features, more complex logic than boolean
CheezCAP Work For Me?
How Can I Make CheezCAP




‣ CheezCAP uses the WordPress options
  tables.
CheezCAP Work For Me?
How Can I Make CheezCAP



‣ CheezCAP uses the WordPress options
  tables.
‣ Able to specify required user permissions
  level to edit.
HOLD IT! YOU SAID THERE WERE 4 FEATURES!
CheezCAP
          The Elusive 4th Feature




‣ Import / Export!
CheezCAP
The Elusive 4th Feature
CheezCAP
The Elusive 4th Feature
CheezCAP
The Elusive 4th Feature
CheezCAP
The Elusive 4th Feature
CheezCAP
The Elusive 4th Feature
CheezCAP
The Elusive 4th Feature
CheezCAP
                 In Summary


‣ Create Text Options, Boolean Options
  and Dropdown Options.
‣ Use them to control and modify your
  theme on the fly.
‣ Export your settings to a text file for
  backup and portability.
Thank you.
Thank you.
  Special Thanks to:
       CheezTech
   WordPress.com VIP
Michael Fields - @_mfields
   Matt Martz - @sivel
  #WCDEV Organizers
Thank you.
@trademark
                         DOWNLOAD CHEEZCAP:
http://tmckes.com
                         http://chzb.gr/CheezCAP
toby@cheezburger.com

http://cheezburger.com

More Related Content

Viewers also liked

my first ppt
my first pptmy first ppt
my first ppt
kalyu Teddy
 
脉轮能量书ⅰ
脉轮能量书ⅰ脉轮能量书ⅰ
脉轮能量书ⅰguxianbang
 
Beginning gl.enchant
Beginning gl.enchantBeginning gl.enchant
Beginning gl.enchant
Ryo Shimizu
 
Сравнение SEO с интернет маркетингом
Сравнение SEO с интернет маркетингомСравнение SEO с интернет маркетингом
Сравнение SEO с интернет маркетингом
Олександр Мілютін
 
Briasha King
Briasha KingBriasha King
Briasha King
adubose
 
Train Your Brain Dr. Farhana Shaheen
Train Your Brain Dr. Farhana ShaheenTrain Your Brain Dr. Farhana Shaheen
Train Your Brain Dr. Farhana Shaheen
Farhana Shaheen
 
Annie Savant
Annie Savant Annie Savant
Annie Savant
adubose
 
Amber's evaluation
Amber's evaluationAmber's evaluation
Amber's evaluation
Amber_
 
John Perry
John PerryJohn Perry
John Perry
adubose
 
Beauty of numbers
Beauty of numbersBeauty of numbers
Beauty of numbers
Farhana Shaheen
 
General Lew Wallace & His Study
General Lew Wallace & His StudyGeneral Lew Wallace & His Study
General Lew Wallace & His Study
WallaceStudy
 
17 семинар
17 семинар17 семинар
Media kit mdc asrl 2011
Media kit mdc asrl 2011Media kit mdc asrl 2011
Media kit mdc asrl 2011
andresobel
 
Detoxifying your body dfs
Detoxifying your body dfsDetoxifying your body dfs
Detoxifying your body dfs
Farhana Shaheen
 
Significance of Numbers in life Dr. Farhana Shaheen
Significance of Numbers in life Dr. Farhana ShaheenSignificance of Numbers in life Dr. Farhana Shaheen
Significance of Numbers in life Dr. Farhana Shaheen
Farhana Shaheen
 
Riane Songalia
Riane SongaliaRiane Songalia
Riane Songalia
adubose
 
Will Baughn
Will BaughnWill Baughn
Will Baughn
adubose
 
Get the most out of your accessibility expert
Get the most out of your accessibility expertGet the most out of your accessibility expert
Get the most out of your accessibility expert
Olivier Nourry
 
Module13 theories
Module13 theoriesModule13 theories
Module13 theories
Ray Altmann
 

Viewers also liked (20)

my first ppt
my first pptmy first ppt
my first ppt
 
脉轮能量书ⅰ
脉轮能量书ⅰ脉轮能量书ⅰ
脉轮能量书ⅰ
 
Beginning gl.enchant
Beginning gl.enchantBeginning gl.enchant
Beginning gl.enchant
 
Сравнение SEO с интернет маркетингом
Сравнение SEO с интернет маркетингомСравнение SEO с интернет маркетингом
Сравнение SEO с интернет маркетингом
 
Jc 2013-notafin2
Jc 2013-notafin2Jc 2013-notafin2
Jc 2013-notafin2
 
Briasha King
Briasha KingBriasha King
Briasha King
 
Train Your Brain Dr. Farhana Shaheen
Train Your Brain Dr. Farhana ShaheenTrain Your Brain Dr. Farhana Shaheen
Train Your Brain Dr. Farhana Shaheen
 
Annie Savant
Annie Savant Annie Savant
Annie Savant
 
Amber's evaluation
Amber's evaluationAmber's evaluation
Amber's evaluation
 
John Perry
John PerryJohn Perry
John Perry
 
Beauty of numbers
Beauty of numbersBeauty of numbers
Beauty of numbers
 
General Lew Wallace & His Study
General Lew Wallace & His StudyGeneral Lew Wallace & His Study
General Lew Wallace & His Study
 
17 семинар
17 семинар17 семинар
17 семинар
 
Media kit mdc asrl 2011
Media kit mdc asrl 2011Media kit mdc asrl 2011
Media kit mdc asrl 2011
 
Detoxifying your body dfs
Detoxifying your body dfsDetoxifying your body dfs
Detoxifying your body dfs
 
Significance of Numbers in life Dr. Farhana Shaheen
Significance of Numbers in life Dr. Farhana ShaheenSignificance of Numbers in life Dr. Farhana Shaheen
Significance of Numbers in life Dr. Farhana Shaheen
 
Riane Songalia
Riane SongaliaRiane Songalia
Riane Songalia
 
Will Baughn
Will BaughnWill Baughn
Will Baughn
 
Get the most out of your accessibility expert
Get the most out of your accessibility expertGet the most out of your accessibility expert
Get the most out of your accessibility expert
 
Module13 theories
Module13 theoriesModule13 theories
Module13 theories
 

Recently uploaded

Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 

Recently uploaded (20)

Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 

Cool as a LOLCat: Making Custome Theme Options Easy

  • 1. Making Custom Theme Options Easy Developing a Modular Theme for Multiple Site Use
  • 3. Who are you? ‣ My name is Toby ( @trademark ). A self- taught WordPress / PHP / Front end Developer.
  • 4. Who are you? ‣ My name is Toby ( @trademark ). A self- taught WordPress / PHP / Front end Developer. ‣ I work for Cheezburger Networks
  • 7. Farm Team OMG MAKE LOTS OF SITES PLZ
  • 8. Cheezburger & WordPress THEN: ‣ Many self-hosted WordPress.org installations
  • 9. Cheezburger & WordPress THEN: ‣ Many self-hosted WordPress.org installations ‣ Each had its own customized (read: totally hacked) theme.
  • 10. Cheezburger & WordPress THEN: ‣ Many self-hosted WordPress.org installations ‣ Each has it’s own customized (read: totally hacked) theme. ‣ Making ~2 new sites a week.
  • 14. Why this was bad. ‣ Spent half the time as a server admin.
  • 15. Why this was bad. ‣ Spent half the time as a server admin. ‣ No history or version control of the changes that were made.
  • 16. Why this was bad. ‣ Spent half the time as a server admin. ‣ No history or version control of the changes that were made. ‣ It looked bad.
  • 17. Why this was bad. ‣ Spent half the time as a server admin. ‣ No history or version control of the changes that were made. ‣ It looked bad. ‣ Easy to make new sites, difficult to maintain and update them.
  • 21. Cheezburger & WordPress NOW: ‣ 10 Sites were already running a Unified Theme on WordPress.com VIP
  • 23. Cheezburger & WordPress NOW: ‣ 10 Sites were already running a Unified Theme on WordPress.com VIP ‣ One file contained all the customization settings for the sites.
  • 24. Cheezburger & WordPress NOW: ‣ 10 Sites were already running a Unified Theme on WordPress.com VIP ‣ One file contained all the customization settings for the sites. ‣ PROBLEM: Creating a new site meant re-copying a bunch of code.
  • 27. CheezCAP What is it? CheezCAP is a library that allows you to easily create an administration panel for your theme. There are 4 main features that make CheezCAP totally awesome.
  • 28. CheezCAP Getting Started ‣ Add the folder to your theme directory ‣ Add the following to your functions.php file: require_once('cheezcap/ cheezcap.php');
  • 29. CheezCAP Getting Started ‣ Edit cheezcap/config.php
  • 31. CheezCAP Getting Started ‣ Once you’ve created the options you want to use, you can start adding them to your theme: if ( $cap->my_boolean_option ) { // do stuff }
  • 32. CheezCAP Boolean Options Boolean Options serve as basic toggle switches: new BooleanOption( 'Simple Boolean Example', 'This will create a simple true/false switch.’, 'simple_boolean_example', true ),
  • 33. CheezCAP Boolean Options Boolean Options serve as basic toggle switches: new BooleanOption( 'Simple Boolean Example', <- Title Description -> 'This will create a simple true/false switch.’, 'simple_boolean_example', <- ID of the parameter true <- Initial Value ),
  • 34. CheezCAP Text Options Text Options can represent alphanumeric strings to be inserted, code, etc. new TextOption( 'Simple Text Exmaple #3', 'This will store a string value.’, 'simple_text_example3', 'Say Cheez!' ),
  • 35. CheezCAP Dropdown Options Dropdown Options serve as more complex switches: new DropdownOption( 'Inline Options Dropdown Example #3', 'This dropdown creates its options using an inline array.', 'inline_options_dropdown_example3', array( 'Red', 'Yellow', 'Green' ), 2, // Green ),
  • 36.
  • 37.
  • 38.
  • 39. CheezCAP Work For Me? How Can I Make CheezCAP ‣ Text Options: Google Analytics accounts, site announcements, customized text in your theme ( comment links, page navigation, 404 pages )
  • 40. CheezCAP Work For Me? How Can I Make CheezCAP ‣ Text Options: Google Analytics accounts, site announcements, customized text in your theme ( comment links, page navigation, 404 pages ) ‣ Boolean Options: Turn Features on and off, beta or A/B testing
  • 41. CheezCAP Work For Me? How Can I Make CheezCAP ‣ Text Options: Google Analytics accounts, site announcements, customized text in your theme ( comment links, page navigation, 404 pages ) ‣ Boolean Options: Turn Features on and off, beta or A/B testing ‣ Dropdown Options: switching stylesheets or color schemes, enabling or disabling sets of features, more complex logic than boolean
  • 42. CheezCAP Work For Me? How Can I Make CheezCAP ‣ CheezCAP uses the WordPress options tables.
  • 43. CheezCAP Work For Me? How Can I Make CheezCAP ‣ CheezCAP uses the WordPress options tables. ‣ Able to specify required user permissions level to edit.
  • 44. HOLD IT! YOU SAID THERE WERE 4 FEATURES!
  • 45. CheezCAP The Elusive 4th Feature ‣ Import / Export!
  • 52. CheezCAP In Summary ‣ Create Text Options, Boolean Options and Dropdown Options. ‣ Use them to control and modify your theme on the fly. ‣ Export your settings to a text file for backup and portability.
  • 54. Thank you. Special Thanks to: CheezTech WordPress.com VIP Michael Fields - @_mfields Matt Martz - @sivel #WCDEV Organizers
  • 55. Thank you. @trademark DOWNLOAD CHEEZCAP: http://tmckes.com http://chzb.gr/CheezCAP toby@cheezburger.com http://cheezburger.com

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. Released at WCPDX\n
  6. Cheezburger = 400 million pageviews / month.\nLast year&amp;#x2019;s State of the Word ~10% all traffic to WordPress.com\n50 sites\n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. Tofulator\nIn-house theme (I think)\n
  13. Kubrick\n
  14. Servers constantly being hammered due to increasing traffic. Thanksgiving example.\n
  15. Not using SVN or hg.\n
  16. \n
  17. \n
  18. \n
  19. GRATUITOUS ANIMATION SLIDE\n
  20. \n
  21. \n
  22. Starting to port our WordPress.org sites over, quickly became clear that this would become tedious and tiresome.\n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. 5th option here, defaults to false, lets you render the text option as a text area\n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. Safely stored in the database. Changing your theme doesn&amp;#x2019;t make you lose anything.\n
  41. Safely stored in the database. Changing your theme doesn&amp;#x2019;t make you lose anything.\n\nUser level: so only admins can change, etc. Defaults to &amp;#x2018;manage_options&amp;#x2019;\n
  42. \n
  43. My favorite feature.\n\nGoing to walk you through what this could look like.\n
  44. Let&amp;#x2019;s say I already have CheezCAP in my theme. Need to move site or copy.\nExport\n
  45. New site after import, using default 2010.\n
  46. I enable my theme that&amp;#x2019;s using CheezCAP\n
  47. Import the file.\n
  48. Go from this.\n
  49. To this.\n
  50. \n
  51. \n
  52. Thanks to Matt Martz @sivel, extending and improving the code already\n