SlideShare a Scribd company logo
Submit Search
Upload
Creating Customizer Options for Themes and Plugins
Report
Share
R-Cubed Design Forge
R-Cubed Design Forge
Follow
•
1 like
•
1,450 views
1
of
43
Creating Customizer Options for Themes and Plugins
•
1 like
•
1,450 views
Report
Share
Download Now
Download to read offline
Technology
Presentation slides from WordCamp Toronto 2015 talk.
Read more
R-Cubed Design Forge
R-Cubed Design Forge
Follow
Recommended
Intro to WordPress Plugin Development by
Intro to WordPress Plugin Development
R-Cubed Design Forge
2.4K views
•
71 slides
How to WordPress: the basics, part 2 by
How to WordPress: the basics, part 2
R-Cubed Design Forge
1.5K views
•
108 slides
WordPress page builders - a new tool to build awesome pages quickly by
WordPress page builders - a new tool to build awesome pages quickly
R-Cubed Design Forge
456 views
•
40 slides
WordPress page builders a quick introduction by
WordPress page builders a quick introduction
R-Cubed Design Forge
518 views
•
25 slides
WordPress website backups – they're not optional by
WordPress website backups – they're not optional
R-Cubed Design Forge
362 views
•
45 slides
Overview on WordPress theme file structure and working functionality by
Overview on WordPress theme file structure and working functionality
Rakesh Kushwaha
8.5K views
•
25 slides
More Related Content
What's hot
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx) by
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Brian Culver
205 views
•
25 slides
Introduction to-concrete-5 by
Introduction to-concrete-5
ketanraval
6K views
•
14 slides
Introduction to-concrete-5 by
Introduction to-concrete-5
Ketan Raval
4.4K views
•
14 slides
The Future of the Web: HTML5 by
The Future of the Web: HTML5
Derek Bender
8.2K views
•
33 slides
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) by
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Brian Culver
243 views
•
25 slides
soft-shake.ch - WebMatrix: Your Web Made Easy by
soft-shake.ch - WebMatrix: Your Web Made Easy
soft-shake.ch
1.7K views
•
20 slides
What's hot
(19)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx) by Brian Culver
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Brian Culver
•
205 views
Introduction to-concrete-5 by ketanraval
Introduction to-concrete-5
ketanraval
•
6K views
Introduction to-concrete-5 by Ketan Raval
Introduction to-concrete-5
Ketan Raval
•
4.4K views
The Future of the Web: HTML5 by Derek Bender
The Future of the Web: HTML5
Derek Bender
•
8.2K views
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) by Brian Culver
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Brian Culver
•
243 views
soft-shake.ch - WebMatrix: Your Web Made Easy by soft-shake.ch
soft-shake.ch - WebMatrix: Your Web Made Easy
soft-shake.ch
•
1.7K views
Wordpress Command-Line by wpperu
Wordpress Command-Line
wpperu
•
371 views
Mage Titans USA 2016 M2 deployment by Olga Kopylova
Mage Titans USA 2016 M2 deployment
Olga Kopylova
•
5.7K views
The Workflow Methodology to Train Your Team on Drupal 8 by Acquia
The Workflow Methodology to Train Your Team on Drupal 8
Acquia
•
1.3K views
Using composer with WordPress by Micah Wood
Using composer with WordPress
Micah Wood
•
1.2K views
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes by Acquia
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Acquia
•
1.8K views
Getting started with WordPress development by Steve Mortiboy
Getting started with WordPress development
Steve Mortiboy
•
1.3K views
html5.ppt by Niharika Gupta
html5.ppt
Niharika Gupta
•
42K views
Grav CMS by btopro
Grav CMS
btopro
•
293 views
What the heck is HTML 5? by Simon Willison
What the heck is HTML 5?
Simon Willison
•
2.8K views
Meetup-js-112815 by Joe Devlin
Meetup-js-112815
Joe Devlin
•
457 views
HTML5--The 30,000' View (A fast-paced overview of HTML5) by Peter Lubbers
HTML5--The 30,000' View (A fast-paced overview of HTML5)
Peter Lubbers
•
55.9K views
Theming 101 by WinnipegWordcamp
Theming 101
WinnipegWordcamp
•
3.5K views
Nürnberg WooCommerce Talk - 11/24/16 by tshellberg
Nürnberg WooCommerce Talk - 11/24/16
tshellberg
•
2.4K views
Viewers also liked
Ecomm 101 by
Ecomm 101
Al Davis
1.7K views
•
20 slides
Wordcamp_mcglade_ux_mashups by
Wordcamp_mcglade_ux_mashups
Analytical Engine Interactive Inc.
1.7K views
•
20 slides
Using Actions and Filters in WordPress to Make a Plugin Your Own by
Using Actions and Filters in WordPress to Make a Plugin Your Own
Brian Hogg
1.7K views
•
17 slides
Systematic Unit Testing by
Systematic Unit Testing
scotchfield
1.7K views
•
80 slides
A Noob's Journey to the Core by
A Noob's Journey to the Core
Ryan Welcher
1.6K views
•
55 slides
How I Made a Career Using WordPress Without Knowing a Line of Code by
How I Made a Career Using WordPress Without Knowing a Line of Code
Andrea Zoellner
1.6K views
•
15 slides
Viewers also liked
(20)
Ecomm 101 by Al Davis
Ecomm 101
Al Davis
•
1.7K views
Wordcamp_mcglade_ux_mashups by Analytical Engine Interactive Inc.
Wordcamp_mcglade_ux_mashups
Analytical Engine Interactive Inc.
•
1.7K views
Using Actions and Filters in WordPress to Make a Plugin Your Own by Brian Hogg
Using Actions and Filters in WordPress to Make a Plugin Your Own
Brian Hogg
•
1.7K views
Systematic Unit Testing by scotchfield
Systematic Unit Testing
scotchfield
•
1.7K views
A Noob's Journey to the Core by Ryan Welcher
A Noob's Journey to the Core
Ryan Welcher
•
1.6K views
How I Made a Career Using WordPress Without Knowing a Line of Code by Andrea Zoellner
How I Made a Career Using WordPress Without Knowing a Line of Code
Andrea Zoellner
•
1.6K views
Help Me Help You: Practical Tips for Designers from A WordPress Developer by daraskolnick
Help Me Help You: Practical Tips for Designers from A WordPress Developer
daraskolnick
•
1.4K views
Mystery solved pages vs posts by Trailer Trash Design
Mystery solved pages vs posts
Trailer Trash Design
•
1.6K views
Here Be Dragons - Debugging WordPress by Rami Sayar
Here Be Dragons - Debugging WordPress
Rami Sayar
•
2K views
WordCamp Toronto 2015- API Simple Talk by ting-y
WordCamp Toronto 2015- API Simple Talk
ting-y
•
1.6K views
Building and Maintaining A Remote Workforce - A Startup Story by Sucuri
Building and Maintaining A Remote Workforce - A Startup Story
Sucuri
•
1.7K views
Community Consultation Creates Compelling Content by Christine Pollock
Community Consultation Creates Compelling Content
Christine Pollock
•
1.7K views
You have 2 hands Toronto by Shayda Torabi
You have 2 hands Toronto
Shayda Torabi
•
1.7K views
Writing Secure Code for WordPress by Shawn Hooper
Writing Secure Code for WordPress
Shawn Hooper
•
2K views
Speeding up your WordPress Site - WordCamp Toronto 2015 by Alan Lok
Speeding up your WordPress Site - WordCamp Toronto 2015
Alan Lok
•
4.1K views
Managed WordPress Demystified by NewPath Consulting (Technology for Small Business)
Managed WordPress Demystified
NewPath Consulting (Technology for Small Business)
•
2.8K views
Best Friend || Worst Enemy: WordPress Multisite by Taylor McCaslin
Best Friend || Worst Enemy: WordPress Multisite
Taylor McCaslin
•
2.4K views
Delightful Design with the Kano Model (WordCamp Toronto 2015) by Jesse Emmanuel Rosario
Delightful Design with the Kano Model (WordCamp Toronto 2015)
Jesse Emmanuel Rosario
•
1.7K views
How to use CSS3 in WordPress by Suzette Franck
How to use CSS3 in WordPress
Suzette Franck
•
6.1K views
Multilingual content with WordPress by Desaulniers-Simard
Multilingual content with WordPress
Desaulniers-Simard
•
1.9K views
Similar to Creating Customizer Options for Themes and Plugins
WordPress customizer: for themes and more by
WordPress customizer: for themes and more
R-Cubed Design Forge
790 views
•
40 slides
A peek into the world of WordPress plugin development by
A peek into the world of WordPress plugin development
R-Cubed Design Forge
8.5K views
•
56 slides
Introduction to WordPress by
Introduction to WordPress
R-Cubed Design Forge
2.3K views
•
148 slides
Intro to development sites and site migration by
Intro to development sites and site migration
R-Cubed Design Forge
1.6K views
•
73 slides
Introduction to WordPress, WordCamp Ottawa 2019 by
Introduction to WordPress, WordCamp Ottawa 2019
rickrrr
78 views
•
77 slides
Multisite for multilingual by
Multisite for multilingual
R-Cubed Design Forge
1.9K views
•
50 slides
Similar to Creating Customizer Options for Themes and Plugins
(20)
WordPress customizer: for themes and more by R-Cubed Design Forge
WordPress customizer: for themes and more
R-Cubed Design Forge
•
790 views
A peek into the world of WordPress plugin development by R-Cubed Design Forge
A peek into the world of WordPress plugin development
R-Cubed Design Forge
•
8.5K views
Introduction to WordPress by R-Cubed Design Forge
Introduction to WordPress
R-Cubed Design Forge
•
2.3K views
Intro to development sites and site migration by R-Cubed Design Forge
Intro to development sites and site migration
R-Cubed Design Forge
•
1.6K views
Introduction to WordPress, WordCamp Ottawa 2019 by rickrrr
Introduction to WordPress, WordCamp Ottawa 2019
rickrrr
•
78 views
Multisite for multilingual by R-Cubed Design Forge
Multisite for multilingual
R-Cubed Design Forge
•
1.9K views
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA) by cgmonroe
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
cgmonroe
•
67 views
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz... by Nagios
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios
•
1.2K views
Gutenberg 101/Blocks - How to get along with, and even like WordPress's block... by R-Cubed Design Forge
Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...
R-Cubed Design Forge
•
216 views
Introduction to WordPress for Beginners by R-Cubed Design Forge
Introduction to WordPress for Beginners
R-Cubed Design Forge
•
6.6K views
Sst hackathon express by Aeshan Wijetunge
Sst hackathon express
Aeshan Wijetunge
•
331 views
CISOA Conference 2020 Banner 9 Development by Brad Rippe
CISOA Conference 2020 Banner 9 Development
Brad Rippe
•
164 views
Hand-On Lab: CA Release Automation Rapid Development Kit and SDK by CA Technologies
Hand-On Lab: CA Release Automation Rapid Development Kit and SDK
CA Technologies
•
1.2K views
Gutenberg: Revolutionizing your WordPress site by R-Cubed Design Forge
Gutenberg: Revolutionizing your WordPress site
R-Cubed Design Forge
•
494 views
Pre-Con Education: Zero to Compliance Using Software Asset Management Soluti... by CA Technologies
Pre-Con Education: Zero to Compliance Using Software Asset Management Soluti...
CA Technologies
•
3.4K views
Turbogears2 tutorial to create mvc app by fRui Apps
Turbogears2 tutorial to create mvc app
fRui Apps
•
1.5K views
Developer insight into why applications run amazingly Fast in CF 2018 by Pavan Kumar
Developer insight into why applications run amazingly Fast in CF 2018
Pavan Kumar
•
248 views
Working with Images in WordPress by randyhoyt
Working with Images in WordPress
randyhoyt
•
1.3K views
CI/CD with AWS Developer Tools and Fargate by Amazon Web Services
CI/CD with AWS Developer Tools and Fargate
Amazon Web Services
•
2.5K views
Backups, Backups, Backups by R-Cubed Design Forge
Backups, Backups, Backups
R-Cubed Design Forge
•
138 views
More from R-Cubed Design Forge
Finding themes for your WordPress site by
Finding themes for your WordPress site
R-Cubed Design Forge
83 views
•
23 slides
Setting up a local web server environment by
Setting up a local web server environment
R-Cubed Design Forge
303 views
•
8 slides
Gutenberg - The future of WordPress by
Gutenberg - The future of WordPress
R-Cubed Design Forge
181 views
•
18 slides
Backups, Backups, Backups by
Backups, Backups, Backups
R-Cubed Design Forge
260 views
•
50 slides
Setting up a local web server for WordPress by
Setting up a local web server for WordPress
R-Cubed Design Forge
482 views
•
6 slides
Backing up your WordPress website – it’s not optional by
Backing up your WordPress website – it’s not optional
R-Cubed Design Forge
1.3K views
•
43 slides
More from R-Cubed Design Forge
(8)
Finding themes for your WordPress site by R-Cubed Design Forge
Finding themes for your WordPress site
R-Cubed Design Forge
•
83 views
Setting up a local web server environment by R-Cubed Design Forge
Setting up a local web server environment
R-Cubed Design Forge
•
303 views
Gutenberg - The future of WordPress by R-Cubed Design Forge
Gutenberg - The future of WordPress
R-Cubed Design Forge
•
181 views
Backups, Backups, Backups by R-Cubed Design Forge
Backups, Backups, Backups
R-Cubed Design Forge
•
260 views
Setting up a local web server for WordPress by R-Cubed Design Forge
Setting up a local web server for WordPress
R-Cubed Design Forge
•
482 views
Backing up your WordPress website – it’s not optional by R-Cubed Design Forge
Backing up your WordPress website – it’s not optional
R-Cubed Design Forge
•
1.3K views
Getting WordPress to speak your langauge by R-Cubed Design Forge
Getting WordPress to speak your langauge
R-Cubed Design Forge
•
4.7K views
How to WordPress: the basics, part 1 by R-Cubed Design Forge
How to WordPress: the basics, part 1
R-Cubed Design Forge
•
1.6K views
Recently uploaded
SUPPLIER SOURCING.pptx by
SUPPLIER SOURCING.pptx
angelicacueva6
16 views
•
1 slide
Future of AR - Facebook Presentation by
Future of AR - Facebook Presentation
ssuserb54b561
15 views
•
27 slides
Case Study Copenhagen Energy and Business Central.pdf by
Case Study Copenhagen Energy and Business Central.pdf
Aitana
16 views
•
3 slides
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Jasper Oosterveld
19 views
•
49 slides
Powerful Google developer tools for immediate impact! (2023-24) by
Powerful Google developer tools for immediate impact! (2023-24)
wesley chun
10 views
•
38 slides
PRODUCT LISTING.pptx by
PRODUCT LISTING.pptx
angelicacueva6
14 views
•
1 slide
Recently uploaded
(20)
SUPPLIER SOURCING.pptx by angelicacueva6
SUPPLIER SOURCING.pptx
angelicacueva6
•
16 views
Future of AR - Facebook Presentation by ssuserb54b561
Future of AR - Facebook Presentation
ssuserb54b561
•
15 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdf
Aitana
•
16 views
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Jasper Oosterveld
•
19 views
Powerful Google developer tools for immediate impact! (2023-24) by wesley chun
Powerful Google developer tools for immediate impact! (2023-24)
wesley chun
•
10 views
PRODUCT LISTING.pptx by angelicacueva6
PRODUCT LISTING.pptx
angelicacueva6
•
14 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson
•
92 views
Uni Systems for Power Platform.pptx by Uni Systems S.M.S.A.
Uni Systems for Power Platform.pptx
Uni Systems S.M.S.A.
•
56 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf
Liveplex
•
10 views
Vertical User Stories by Moisés Armani Ramírez
Vertical User Stories
Moisés Armani Ramírez
•
14 views
20231123_Camunda Meetup Vienna.pdf by Phactum Softwareentwicklung GmbH
20231123_Camunda Meetup Vienna.pdf
Phactum Softwareentwicklung GmbH
•
41 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker
•
40 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi
•
132 views
Zero to Automated in Under a Year by Network Automation Forum
Zero to Automated in Under a Year
Network Automation Forum
•
15 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec
•
12 views
Network Source of Truth and Infrastructure as Code revisited by Network Automation Forum
Network Source of Truth and Infrastructure as Code revisited
Network Automation Forum
•
27 views
virtual reality.pptx by G036GaikwadSnehal
virtual reality.pptx
G036GaikwadSnehal
•
14 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdf
Virendra Rai, PMP
•
23 views
The Research Portal of Catalonia: Growing more (information) & more (services) by CSUC - Consorci de Serveis Universitaris de Catalunya
The Research Portal of Catalonia: Growing more (information) & more (services)
CSUC - Consorci de Serveis Universitaris de Catalunya
•
80 views
Mini-Track: Challenges to Network Automation Adoption by Network Automation Forum
Mini-Track: Challenges to Network Automation Adoption
Network Automation Forum
•
13 views
Creating Customizer Options for Themes and Plugins
1.
r3df.com lumostech.training Rick Radko “Creating Customizer
Options for Themes and Plugins” WordCamp Toronto October 4th, 2015 Slides at: slideshare.net/r3df
2.
© 2015 Rick
Radko, r3df.com What's this talk about? An introduction to adding customizer options to your plugins and themes. Topics: Introduction Brief introduction to customizer Creating customizer options 4 steps Using the options Beyond the Basics 1Slides at: slideshare.net/r3df
3.
© 2015 Rick
Radko, r3df.com Objectives of this talk: Demonstrate that it is easy to add basic customizer options to plugins and themes. Encourage you to start using the customizer for your options. For code examples for this presentation, I'm going to use a plugin I created recently: wordpress.org/plugins/r3df-copyright-message (Version 1.1.0) 2Slides at: slideshare.net/r3df
4.
© 2015 Rick
Radko, r3df.com About me Rick Radko, @r3designforge Software, website and app designer/developer, trainer, speaker. R-Cubed Design Forge: r3df.com LumosTech Training: lumostech.training Creating custom web sites since 1996. WordPress sites since 2008. An organizer of: WordCamp Ottawa. The Ottawa WordPress Group. 3Slides at: slideshare.net/r3df
5.
© 2015 Rick
Radko, r3df.com Theme Customizer - WordPress 3.4 4
6.
© 2015 Rick
Radko, r3df.com Customizer in 4.3 5
7.
© 2015 Rick
Radko, r3df.com Customizer in 4.3 - Menus 6
8.
© 2015 Rick
Radko, r3df.com Customizer in 4.3 - Site Icon 7
9.
© 2015 Rick
Radko, r3df.com Why use the Customizer for options? It provides a ready to use options framework: Native to WordPress No need to re-invent the wheel. Lots of built in controls. Can add custom controls. Now required for themes in wordpress.org repo. It’s the future for options. I'm using it for: Custom theme & child theme options. Small plugins. 8
10.
© 2015 Rick
Radko, r3df.com Plugin: Custom Login Page Customizer 9
11.
© 2015 Rick
Radko, r3df.com Example Plugin: R3DF Copyright Message 10 wordpress.org/plugins/r3df-copyright-message
12.
© 2015 Rick
Radko, r3df.com Adding a customizer option - 4 easy steps 1. Register your customizer set-up function. 2. Add a section. 3. Add settings. 4. Add controls to connect the settings to the section. 11
13.
© 2015 Rick
Radko, r3df.com Step 1. Register the customizer function 12
14.
© 2015 Rick
Radko, r3df.com A gotcha for the 'customize_register' hook From the codex: "Important: Do not conditionally load your Customizer code with an is_admin() check." 13
15.
© 2015 Rick
Radko, r3df.com Step 2. Add a section $section_id - A unique ID for the section. $args: array title - the name of the section priority - (optional) controls display order of the sections description - (optional) add descriptive text to the section 14
16.
© 2015 Rick
Radko, r3df.com Priorities for top level items 15 Priority (Order) 20 40 60 80 100 110 120 160 (default)
17.
© 2015 Rick
Radko, r3df.com The section code for the plugin Note: You will not be able to see the section until it contains at least one control. 16
18.
© 2015 Rick
Radko, r3df.com Step 3. Add setting(s) $setting_id - A unique ID for the setting. $args: array default - default value for the setting type - (optional) types are 'option' or 'theme_mod' type defaults to 'theme_mod' Note: You will not be able to see the setting until it is registered with a control. 17
19.
© 2015 Rick
Radko, r3df.com Where are the values stored? By default: Values are stored in the "wp_options" table. The option key depends on setting type: theme_mod: Option key: theme_mods_{theme-name} Array key (in the option): setting_id option: Option key: setting_id 18
20.
© 2015 Rick
Radko, r3df.com The settings code for the plugin Note: The pseudo array notation, for the setting id, stores the options as an array. 19
21.
© 2015 Rick
Radko, r3df.com Step 4. Add control(s) $control_id - A unique ID for the control. If you set it to the value of a setting id, it will control that setting. (instead of setting the settings arg) $args: array label - a label for the control description - a description below the label section - the section for the control type - basic types include: text, checkbox, radio, select, dropdown-pages, textarea… 20
22.
© 2015 Rick
Radko, r3df.com The controls code for the plugin 21
23.
© 2015 Rick
Radko, r3df.com The controls code for the plugin 22
24.
© 2015 Rick
Radko, r3df.com The plugin display so far in customizer 23
25.
© 2015 Rick
Radko, r3df.com The plugin - expanded 24
26.
© 2015 Rick
Radko, r3df.com Where’s the copyright message? 25
27.
© 2015 Rick
Radko, r3df.com Using saved option values Setting type: theme_mod: option: Can use with standard WordPress options. ie: convert existing plugin 26
28.
© 2015 Rick
Radko, r3df.com The plugin's output code 27
29.
© 2015 Rick
Radko, r3df.com The complete result in the customizer 28
30.
© 2015 Rick
Radko, r3df.com The result on the frontend 29
31.
© 2015 Rick
Radko, r3df.com Beyond the basics - Conditional actions Conditional display – dependent on radio button 30
32.
© 2015 Rick
Radko, r3df.com Beyond the basics - Transport By default, when a customizer setting is changed: The preview is updated with a page refresh. This has a notable lag… But, we can fix that… 31
33.
© 2015 Rick
Radko, r3df.com Beyond the basics - Transport Add some javascript… …and the page will update “instantly”. Note: Preview javascript is loaded on the "customize_preview_init" action 32
34.
© 2015 Rick
Radko, r3df.com Beyond the basics - Sanitizing values Input data can be sanitized by adding callbacks to the add_setting() definition: Built in WordPress functions can often be used. sanitize_key() checks that the data looks like an internal identifier (key). 33
35.
© 2015 Rick
Radko, r3df.com Beyond the basics - Panels 34 2 Items
36.
© 2015 Rick
Radko, r3df.com Beyond the basics - Panels 35 New top level
37.
© 2015 Rick
Radko, r3df.com Beyond the basics - Panels 36
38.
© 2015 Rick
Radko, r3df.com Beyond the basics - Panels Panel with 2 sections 37
39.
© 2015 Rick
Radko, r3df.com Beyond the basics - Modifying existing sections get_panel() for panels, get_setting() for settings, and get_control() for controls 38 Section Id title_tagline colors header_image background_image nav_menus widgets static_front_page r3df_copyright_message_settings
40.
© 2015 Rick
Radko, r3df.com Beyond the basics - Advanced controls Advanced Controls: Color picker: WP_Customize_Color_Control() Media uploader: WP_Customize_Upload_Control() Image uploader: WP_Customize_Image_Control() Background image control: WP_Customize_Background_Image_Control() Header image control: WP_Customize_Header_Image_Control() Custom controls: ottopress.com/2012/making-a-custom-control-for- the-theme-customizer/ 39
41.
© 2015 Rick
Radko, r3df.com How does preview update without saving? The customizer preview intercepts calls to: get_theme_mod get_option Replaces them with the "live" content from the customizer controls. Note: This only seems to work on or after the action "parse_request". 40
42.
© 2015 Rick
Radko, r3df.com Learn More… codex.wordpress.org/Theme_Customization_API developer.wordpress.org/themes/advanced-topics/customizer-api/ developer.wordpress.org/reference/classes/wp_customize_manager/ ottopress.com/2012/how-to-leverage-the-theme-customizer-in-your-own- themes/ ottopress.com/2012/theme-customizer-part-deux-getting-rid-of-options- pages/ ottopress.com/2012/making-a-custom-control-for-the-theme-customizer/ ottopress.com/2015/whats-new-with-the-customizer/ gavick.com/blog/contextual-controls-theme-customizer gavick.com/blog/using-javascript-theme-customization-screen make.wordpress.org/core/2014/10/27/toward-a-complete-javascript-api- for-the-customizer/ make.wordpress.org/core/2015/07/27/site-icon/ 41
43.
© 2015 Rick
Radko, r3df.com Contact Rick Radko email: wpinfo@r3df.com twitter: @r3designforge Websites: r3df.com lumostech.training Slides at: www.slideshare.net/r3df 42