狠狠撸

狠狠撸Share a Scribd company logo
The
Child Theme Dilemma
WordCamp Cologne 2015
Torsten Landsiedel
Hello!
Torsten Landsiedel
WordPress- Freelancer
Moderator German Supportforum
Editor Team de.w.org
Translation Contributor and Editor
Co-Organisator WP Meetup Hamburg
Co-Organisator WordCamp Hamburg
@zodiac1978
Child Theme Usage
Who has used Child Themes?
Child Theme Usage
Why?
Child Theme Problems
Security
Extensibility
Performance
Security Problems
Parent Theme
search.php (with
vulnerability)
Child Theme
search.php (with
vulnerability)
Parent Theme
search.php (without
vulnerability)
Child Theme
search.php (with
vulnerability)
update
overwrites
no update!overwrites
Child Themes aren’t safe?
Why nobody told us?
Extensibility
Pluggable Functions:
if ( ! function_exists( 'theme_special_nav' ) ) {
function theme_special_nav() {
// Do something.
}
}
Attention:
Now you have to maintain the code!
Missing extensibilities
Framework Theme + Premium Child Theme?
WordPress.org Theme + Child Theme?
Where to put the customizations?
Thre are no Grandchild Themes :(
Missing extensibilities
Why shouldn’t there be Grandchild Themes?
Missing extensibilities
This idea of releasing advanced child themes just creates
the same problem child themes were meant to solve:
upgradability.
– Justin Tadlock
http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-
and-grandchild-themes
Update of Parent Theme
Without any problems?
It depends …
filter/actions removed?
CSS classes changed?
Markup changed?
Paths changed?
Performance Problems
Many Child Themes are using @import
@import url(/slideshow/the-child-theme-dilemma-en/parent-theme/style.css);
But @import stops parallel loading
in all browsers.
http://www.stevesouders.com/blog/2009/04/09/dont-use-import/
Solution:
De-register styles und re-register/re-enqeue parent and
child styles
function twentytwelve_child_scripts() {
wp_deregister_style( 'twentytwelve-style' );
wp_register_style( 'twentytwelve-style',
get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'twentytwelve-child-style',
get_stylesheet_uri(), array( 'twentytwelve-style' ) );
}
add_action( 'wp_enqueue_scripts', 'twentytwelve_child_scripts', 11 );
Performance problems
Even simpler:
Enqueue parent styles. Done! Just works if
get_stylesheet is used (and just this) in the parent
theme.
// Faster than @import
add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' );
function my_child_theme_scripts() {
wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() .
'/style.css' );
}
Performance problems
New problem:
Many themes are not build that way.
Hardcoded stylesheets in the header.php for example:
<link rel="stylesheet" type="text/css" media="all"
href="<?php bloginfo( 'stylesheet_url' ); ?>" />
Performance problems
Performance problems
Or the theme is not compatible with using a child
theme.
Or you have to de-register everything to preserve the
correct order.
wp_enqueue_style( 'base_styles',
get_template_directory_uri() . '/css/base.css' );
wp_enqueue_style( 'responsive_styles',
get_template_directory_uri() . '/css/mobile.css' );
wp_enqueue_style( 'ie_styles',
get_template_directory_uri() . '/css/ie.css' );
Performance Problems
Can be very complicated for beginners ...
Performance Problems
Justin Tadlocks brilliant solution for the parent theme:
function my_enqueue_styles() {
/* If using a child theme, auto-load the parent theme style. */
if ( is_child_theme() ) {
wp_enqueue_style( 'parent-style',
trailingslashit( get_template_directory_uri() ) . 'style.css' );
}
/* Always load active theme's style.css. */
wp_enqueue_style( 'style', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue_styles' );
http://justintadlock.com/archives/2014/11/03/loading-parent-styles-for-child-themes
Hey Torsten!
Grab some water.
Don’t speak too fast.
:)
Child Theme Problems
Security
Extensibilities
Performance ?
Idea 1: Child Theme Lite
“Child themes from theme developers should be nothing
more than a stylesheet and a few functions.”
– Justin Tadlock
http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-and-grandchild-themes
Idea 1: Child Theme Lite
Child Theme just contains functions.php
and style.css.
All changes should just be made with hooks
and filters.
This would be made within a plugin.
Child Theme remains update-ability.
Idea 1: Child Theme Lite
Problem:
How many themes do something like that?
Idea 2: Child Theme Check
Every template file in the theme is ghetting a version
number in the file header.
@version 1.0.0
Check of the version number via plugin
(or even better via WordPress core).
Differences between files can be shown via
wp_text_diff().
Idea 2: Child Theme Check
DEMO!
Child Theme Check
Voilá!
Child Theme Check
Child Theme Check
https://github.com/Zodiac1978/tl-template-checker
- This is a Twitter opportunity! -
Child Theme Problems
Security ?
Extensibilities (?)
Performance ?
● Is Tools the right choice for the menu? Or should it be
Appearance?
● Just open an issue on Github:
https://github.com/Zodiac1978/tl-template-checker/issues
Conribute? Great!
Thank you for your feedback!
Discussion!
Questions? Contradiction? Alternative solutions?
Theme Shop/Theme Developer: Interested?
Let’s speak about it!
@zodiac1978
http://torstenlandsiedel.de/kontakt
Thank you for your time!
Safe travels! :)
Ad

Recommended

The Child Theme Dilemma (EN) - Milano Edition
The Child Theme Dilemma (EN) - Milano Edition
Torsten Landsiedel
?
Intro to WordPress Child Themes
Intro to WordPress Child Themes
vegasgeek
?
Why you should be using WordPress child themes
Why you should be using WordPress child themes
Anthony Hortin
?
WordPress Child Themes: The what. The why. The how.
WordPress Child Themes: The what. The why. The how.
Janelle Reichman
?
WordPress Child Themes
WordPress Child Themes
Alison Foxall
?
Rockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child Themes
Andrew Wikel
?
The Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child Themes
Anthony Hortin
?
Intro to StudioPress child themes
Intro to StudioPress child themes
vegasgeek
?
WordPress Child Themes
WordPress Child Themes
rfair404
?
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WPJoburg
?
Week 9 - Introduction to Child Themes
Week 9 - Introduction to Child Themes
henri_makembe
?
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
topher1kenobe
?
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
Joe Querin
?
Child Theme
Child Theme
Shinichi Nishikawa
?
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
Evan Mullins
?
2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes
LightSpeed
?
Theme frameworks & child themes
Theme frameworks & child themes
Chris Olbekson
?
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notes
Damien Carbery
?
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
Paul Bearne
?
The Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
?
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Amanda Giles
?
Child Themes - WordCamp Dublin 2017
Child Themes - WordCamp Dublin 2017
Damien Carbery
?
Parent and child themes
Parent and child themes
Tom Jenkins
?
Best practices in WordPress Development
Best practices in WordPress Development
Mindfire Solutions
?
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
David Brattoli
?
How to make a WordPress theme
How to make a WordPress theme
Hardeep Asrani
?
Child Themes in WordPress
Child Themes in WordPress
Jeff Cohan
?
WordPress and Child Themes
WordPress and Child Themes
nairobiwordcamp
?
Das Health Check Plugin in der Praxis
Torsten Landsiedel
?
UX-Probleme mit dem neuen Block-Editor (Gutenberg)
Torsten Landsiedel
?

More Related Content

Similar to The Child Theme Dilemma (EN) (20)

WordPress Child Themes
WordPress Child Themes
rfair404
?
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WPJoburg
?
Week 9 - Introduction to Child Themes
Week 9 - Introduction to Child Themes
henri_makembe
?
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
topher1kenobe
?
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
Joe Querin
?
Child Theme
Child Theme
Shinichi Nishikawa
?
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
Evan Mullins
?
2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes
LightSpeed
?
Theme frameworks & child themes
Theme frameworks & child themes
Chris Olbekson
?
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notes
Damien Carbery
?
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
Paul Bearne
?
The Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
?
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Amanda Giles
?
Child Themes - WordCamp Dublin 2017
Child Themes - WordCamp Dublin 2017
Damien Carbery
?
Parent and child themes
Parent and child themes
Tom Jenkins
?
Best practices in WordPress Development
Best practices in WordPress Development
Mindfire Solutions
?
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
David Brattoli
?
How to make a WordPress theme
How to make a WordPress theme
Hardeep Asrani
?
Child Themes in WordPress
Child Themes in WordPress
Jeff Cohan
?
WordPress and Child Themes
WordPress and Child Themes
nairobiwordcamp
?
WordPress Child Themes
WordPress Child Themes
rfair404
?
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WPJoburg
?
Week 9 - Introduction to Child Themes
Week 9 - Introduction to Child Themes
henri_makembe
?
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
topher1kenobe
?
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
Joe Querin
?
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
Evan Mullins
?
2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes
LightSpeed
?
Theme frameworks & child themes
Theme frameworks & child themes
Chris Olbekson
?
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notes
Damien Carbery
?
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
Paul Bearne
?
The Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
?
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Amanda Giles
?
Child Themes - WordCamp Dublin 2017
Child Themes - WordCamp Dublin 2017
Damien Carbery
?
Parent and child themes
Parent and child themes
Tom Jenkins
?
Best practices in WordPress Development
Best practices in WordPress Development
Mindfire Solutions
?
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
David Brattoli
?
How to make a WordPress theme
How to make a WordPress theme
Hardeep Asrani
?
Child Themes in WordPress
Child Themes in WordPress
Jeff Cohan
?

More from Torsten Landsiedel (18)

Das Health Check Plugin in der Praxis
Torsten Landsiedel
?
UX-Probleme mit dem neuen Block-Editor (Gutenberg)
Torsten Landsiedel
?
Oh, no! DSGVO.
Torsten Landsiedel
?
WordPress kaputt machen
Torsten Landsiedel
?
Werde ?bersetzer! Werde Translation Editor!
Torsten Landsiedel
?
Die schmutzige Seite von WordPress
Torsten Landsiedel
?
Umgang mit Frustration im Open-Source-Projekt WordPress
Torsten Landsiedel
?
Wie ich durch Support und ?bersetzung ein (besserer) Entwickler geworden bin
Torsten Landsiedel
?
Das Child-Theme-Dilemma
Torsten Landsiedel
?
Contact Form 7 - Pflicht und Kür
Torsten Landsiedel
?
Social Media Menüs in WordPress
Torsten Landsiedel
?
Mitmachen bei WordPress
Torsten Landsiedel
?
MetaMeetup
Torsten Landsiedel
?
HTML/CSS-Validierung in Zeiten von HTML5
Torsten Landsiedel
?
Shortcodes erstellen mit WordPress
Torsten Landsiedel
?
WordPress absichern - WP Camp 2012 in Berlin
Torsten Landsiedel
?
Podcasting mit WordPress.com-Blogs
Torsten Landsiedel
?
WordPress.com-Blogs individualisieren
Torsten Landsiedel
?
Das Health Check Plugin in der Praxis
Torsten Landsiedel
?
UX-Probleme mit dem neuen Block-Editor (Gutenberg)
Torsten Landsiedel
?
Oh, no! DSGVO.
Torsten Landsiedel
?
WordPress kaputt machen
Torsten Landsiedel
?
Werde ?bersetzer! Werde Translation Editor!
Torsten Landsiedel
?
Die schmutzige Seite von WordPress
Torsten Landsiedel
?
Umgang mit Frustration im Open-Source-Projekt WordPress
Torsten Landsiedel
?
Wie ich durch Support und ?bersetzung ein (besserer) Entwickler geworden bin
Torsten Landsiedel
?
Das Child-Theme-Dilemma
Torsten Landsiedel
?
Contact Form 7 - Pflicht und Kür
Torsten Landsiedel
?
Social Media Menüs in WordPress
Torsten Landsiedel
?
Mitmachen bei WordPress
Torsten Landsiedel
?
HTML/CSS-Validierung in Zeiten von HTML5
Torsten Landsiedel
?
Shortcodes erstellen mit WordPress
Torsten Landsiedel
?
WordPress absichern - WP Camp 2012 in Berlin
Torsten Landsiedel
?
Podcasting mit WordPress.com-Blogs
Torsten Landsiedel
?
WordPress.com-Blogs individualisieren
Torsten Landsiedel
?
Ad

Recently uploaded (20)

BroadLink Cloud Service introduction.pdf
BroadLink Cloud Service introduction.pdf
DevendraDwivdi1
?
Pitch PitchPitchPitchPitchPitchPitch.pptx
Pitch PitchPitchPitchPitchPitchPitch.pptx
157551
?
原版一样(滨厂惭毕业证书)德国多特蒙德国际管理学院毕业证多少钱
原版一样(滨厂惭毕业证书)德国多特蒙德国际管理学院毕业证多少钱
taqyed
?
Dark Web Presentation - 1.pdf about internet which will help you to get to kn...
Dark Web Presentation - 1.pdf about internet which will help you to get to kn...
ragnaralpha7199
?
BASICS OF SAP _ ALL ABOUT SAP _WHY SAP OVER ANY OTHER ERP SYSTEM
BASICS OF SAP _ ALL ABOUT SAP _WHY SAP OVER ANY OTHER ERP SYSTEM
AhmadAli716831
?
PROCESS FOR CREATION OF BUSINESS PARTNER IN SAP
PROCESS FOR CREATION OF BUSINESS PARTNER IN SAP
AhmadAli716831
?
Global Networking Trends, presented at the India ISP Conclave 2025
Global Networking Trends, presented at the India ISP Conclave 2025
APNIC
?
DDoS in India, presented at INNOG 8 by Dave Phelan
DDoS in India, presented at INNOG 8 by Dave Phelan
APNIC
?
ChatGPT A.I. Powered Chatbot and Popularization.pdf
ChatGPT A.I. Powered Chatbot and Popularization.pdf
StanleySamson1
?
BitRecover OST to PST Converter Software
BitRecover OST to PST Converter Software
antoniogosling01
?
最新版加拿大奎斯特大学毕业证(蚕鲍颁毕业证书)原版定制
最新版加拿大奎斯特大学毕业证(蚕鲍颁毕业证书)原版定制
taqyed
?
Make DDoS expensive for the threat actors
Make DDoS expensive for the threat actors
APNIC
?
Logging and Automated Alerting Webinar.pdf
Logging and Automated Alerting Webinar.pdf
ControlCase
?
狠狠撸s: Eco Economic Epochs for The World Game (s) pdf
狠狠撸s: Eco Economic Epochs for The World Game (s) pdf
Steven McGee
?
history of internet in nepal Class-8 (sparsha).pptx
history of internet in nepal Class-8 (sparsha).pptx
SPARSH508080
?
ChatGPT_and_Its_Uses_Presentationss.pptx
ChatGPT_and_Its_Uses_Presentationss.pptx
Neha Prakash
?
COMPUTER ETHICS AND CRIME.......................................................
COMPUTER ETHICS AND CRIME.......................................................
FOOLKUMARI
?
cybercrime investigation and digital forensics
cybercrime investigation and digital forensics
goverdhankumar137300
?
Top Mobile App Development Trends Shaping the Future
Top Mobile App Development Trends Shaping the Future
ChicMic Studios
?
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
notgachabite123
?
BroadLink Cloud Service introduction.pdf
BroadLink Cloud Service introduction.pdf
DevendraDwivdi1
?
Pitch PitchPitchPitchPitchPitchPitch.pptx
Pitch PitchPitchPitchPitchPitchPitch.pptx
157551
?
原版一样(滨厂惭毕业证书)德国多特蒙德国际管理学院毕业证多少钱
原版一样(滨厂惭毕业证书)德国多特蒙德国际管理学院毕业证多少钱
taqyed
?
Dark Web Presentation - 1.pdf about internet which will help you to get to kn...
Dark Web Presentation - 1.pdf about internet which will help you to get to kn...
ragnaralpha7199
?
BASICS OF SAP _ ALL ABOUT SAP _WHY SAP OVER ANY OTHER ERP SYSTEM
BASICS OF SAP _ ALL ABOUT SAP _WHY SAP OVER ANY OTHER ERP SYSTEM
AhmadAli716831
?
PROCESS FOR CREATION OF BUSINESS PARTNER IN SAP
PROCESS FOR CREATION OF BUSINESS PARTNER IN SAP
AhmadAli716831
?
Global Networking Trends, presented at the India ISP Conclave 2025
Global Networking Trends, presented at the India ISP Conclave 2025
APNIC
?
DDoS in India, presented at INNOG 8 by Dave Phelan
DDoS in India, presented at INNOG 8 by Dave Phelan
APNIC
?
ChatGPT A.I. Powered Chatbot and Popularization.pdf
ChatGPT A.I. Powered Chatbot and Popularization.pdf
StanleySamson1
?
BitRecover OST to PST Converter Software
BitRecover OST to PST Converter Software
antoniogosling01
?
最新版加拿大奎斯特大学毕业证(蚕鲍颁毕业证书)原版定制
最新版加拿大奎斯特大学毕业证(蚕鲍颁毕业证书)原版定制
taqyed
?
Make DDoS expensive for the threat actors
Make DDoS expensive for the threat actors
APNIC
?
Logging and Automated Alerting Webinar.pdf
Logging and Automated Alerting Webinar.pdf
ControlCase
?
狠狠撸s: Eco Economic Epochs for The World Game (s) pdf
狠狠撸s: Eco Economic Epochs for The World Game (s) pdf
Steven McGee
?
history of internet in nepal Class-8 (sparsha).pptx
history of internet in nepal Class-8 (sparsha).pptx
SPARSH508080
?
ChatGPT_and_Its_Uses_Presentationss.pptx
ChatGPT_and_Its_Uses_Presentationss.pptx
Neha Prakash
?
COMPUTER ETHICS AND CRIME.......................................................
COMPUTER ETHICS AND CRIME.......................................................
FOOLKUMARI
?
cybercrime investigation and digital forensics
cybercrime investigation and digital forensics
goverdhankumar137300
?
Top Mobile App Development Trends Shaping the Future
Top Mobile App Development Trends Shaping the Future
ChicMic Studios
?
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
notgachabite123
?
Ad

The Child Theme Dilemma (EN)

  • 1. The Child Theme Dilemma WordCamp Cologne 2015 Torsten Landsiedel
  • 2. Hello! Torsten Landsiedel WordPress- Freelancer Moderator German Supportforum Editor Team de.w.org Translation Contributor and Editor Co-Organisator WP Meetup Hamburg Co-Organisator WordCamp Hamburg @zodiac1978
  • 3. Child Theme Usage Who has used Child Themes?
  • 6. Security Problems Parent Theme search.php (with vulnerability) Child Theme search.php (with vulnerability) Parent Theme search.php (without vulnerability) Child Theme search.php (with vulnerability) update overwrites no update!overwrites
  • 7. Child Themes aren’t safe? Why nobody told us?
  • 8. Extensibility Pluggable Functions: if ( ! function_exists( 'theme_special_nav' ) ) { function theme_special_nav() { // Do something. } } Attention: Now you have to maintain the code!
  • 9. Missing extensibilities Framework Theme + Premium Child Theme? WordPress.org Theme + Child Theme? Where to put the customizations? Thre are no Grandchild Themes :(
  • 10. Missing extensibilities Why shouldn’t there be Grandchild Themes?
  • 11. Missing extensibilities This idea of releasing advanced child themes just creates the same problem child themes were meant to solve: upgradability. – Justin Tadlock http://justintadlock.com/archives/2010/08/16/frameworks-parent-child- and-grandchild-themes
  • 12. Update of Parent Theme Without any problems? It depends … filter/actions removed? CSS classes changed? Markup changed? Paths changed?
  • 13. Performance Problems Many Child Themes are using @import @import url(/slideshow/the-child-theme-dilemma-en/parent-theme/style.css); But @import stops parallel loading in all browsers. http://www.stevesouders.com/blog/2009/04/09/dont-use-import/
  • 14. Solution: De-register styles und re-register/re-enqeue parent and child styles function twentytwelve_child_scripts() { wp_deregister_style( 'twentytwelve-style' ); wp_register_style( 'twentytwelve-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'twentytwelve-child-style', get_stylesheet_uri(), array( 'twentytwelve-style' ) ); } add_action( 'wp_enqueue_scripts', 'twentytwelve_child_scripts', 11 ); Performance problems
  • 15. Even simpler: Enqueue parent styles. Done! Just works if get_stylesheet is used (and just this) in the parent theme. // Faster than @import add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' ); function my_child_theme_scripts() { wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() . '/style.css' ); } Performance problems
  • 16. New problem: Many themes are not build that way. Hardcoded stylesheets in the header.php for example: <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> Performance problems
  • 17. Performance problems Or the theme is not compatible with using a child theme. Or you have to de-register everything to preserve the correct order. wp_enqueue_style( 'base_styles', get_template_directory_uri() . '/css/base.css' ); wp_enqueue_style( 'responsive_styles', get_template_directory_uri() . '/css/mobile.css' ); wp_enqueue_style( 'ie_styles', get_template_directory_uri() . '/css/ie.css' );
  • 18. Performance Problems Can be very complicated for beginners ...
  • 19. Performance Problems Justin Tadlocks brilliant solution for the parent theme: function my_enqueue_styles() { /* If using a child theme, auto-load the parent theme style. */ if ( is_child_theme() ) { wp_enqueue_style( 'parent-style', trailingslashit( get_template_directory_uri() ) . 'style.css' ); } /* Always load active theme's style.css. */ wp_enqueue_style( 'style', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'my_enqueue_styles' ); http://justintadlock.com/archives/2014/11/03/loading-parent-styles-for-child-themes
  • 20. Hey Torsten! Grab some water. Don’t speak too fast. :)
  • 22. Idea 1: Child Theme Lite “Child themes from theme developers should be nothing more than a stylesheet and a few functions.” – Justin Tadlock http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-and-grandchild-themes
  • 23. Idea 1: Child Theme Lite Child Theme just contains functions.php and style.css. All changes should just be made with hooks and filters. This would be made within a plugin. Child Theme remains update-ability.
  • 24. Idea 1: Child Theme Lite Problem: How many themes do something like that?
  • 25. Idea 2: Child Theme Check Every template file in the theme is ghetting a version number in the file header. @version 1.0.0 Check of the version number via plugin (or even better via WordPress core). Differences between files can be shown via wp_text_diff().
  • 26. Idea 2: Child Theme Check DEMO!
  • 30. Child Theme Problems Security ? Extensibilities (?) Performance ?
  • 31. ● Is Tools the right choice for the menu? Or should it be Appearance? ● Just open an issue on Github: https://github.com/Zodiac1978/tl-template-checker/issues Conribute? Great!
  • 32. Thank you for your feedback!
  • 33. Discussion! Questions? Contradiction? Alternative solutions? Theme Shop/Theme Developer: Interested? Let’s speak about it! @zodiac1978 http://torstenlandsiedel.de/kontakt
  • 34. Thank you for your time! Safe travels! :)