SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
The
Child Theme Dilemma
WordCamp Milano 2016
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?
There 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-an
d-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(../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 getting 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
http://de.wordpress.org/plugins/child-theme-check/
https://github.com/Zodiac1978/tl-template-checker
- This is a Twitter opportunity! -
Child Theme Problems
Security ✓
Extensibilities (✓)
Performance ✓
Spread the word!
The new default theme is using it, too!
https://github.com/WordPress/twentyseventeen/issues/72
● Italian Translation is waiting for you!
https://translate.wordpress.org/locale/it/default/wp-plugins/chi
ld-theme-check
● Found a bug? Just open an issue on Github:
https://github.com/Zodiac1978/tl-template-checker/issues
● Help me to get this as a recommendation in the Theme Check Plugin
(https://de.wordpress.org/plugins/theme-check/):
https://github.com/WordPress/theme-check/issues/115
Conribute? Great!
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!
Have a great coffee break.
Don’t miss the talk about
Child Plugins from Bernhard Kau
(Track 1 - 17:10 h)

Weitere ähnliche Inhalte

Was ist angesagt?

Child themes
Child themesChild themes
Child themeslkagan
 
Introduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedIntroduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedNile Flores
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themesopenchamp
 
光速テーマ開発のコツ
光速テーマ開発のコツ光速テーマ開発のコツ
光速テーマ開発のコツHishikawa Takuro
 
WordPress Themes - From Designer’s Perspective
WordPress Themes - From Designer’s PerspectiveWordPress Themes - From Designer’s Perspective
WordPress Themes - From Designer’s PerspectiveKanchha kaji Prajapati
 
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】Mami Kuroki
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPressEunus Hosen
 
Birthing a Child Theme - WordCamp Scranton
Birthing a Child Theme - WordCamp ScrantonBirthing a Child Theme - WordCamp Scranton
Birthing a Child Theme - WordCamp ScrantonLauren Pittenger
 
Word press 3 @ wordcamp
Word press 3 @ wordcampWord press 3 @ wordcamp
Word press 3 @ wordcampTris Hussey
 
WooCommerce Customization Masterclass (WordCamp Dublin 2017)
WooCommerce Customization Masterclass (WordCamp Dublin 2017)WooCommerce Customization Masterclass (WordCamp Dublin 2017)
WooCommerce Customization Masterclass (WordCamp Dublin 2017)Rodolfo Melogli
 
WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014Fikri Rasyid
 
Staying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress WebsiteStaying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress WebsiteRaymund Mitchell
 
Introduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design ApplicationIntroduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design ApplicationeXo Platform
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress SecurityNile Flores
 
Wp visual editors - Learning Style
Wp visual editors - Learning StyleWp visual editors - Learning Style
Wp visual editors - Learning StyleOrlando Web Wizard
 
Intro to WordPress Plugins
Intro to WordPress PluginsIntro to WordPress Plugins
Intro to WordPress Pluginszamoose
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPressCraig Bailey
 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressJonny Allbut
 

Was ist angesagt? (20)

Child themes
Child themesChild themes
Child themes
 
Introduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedIntroduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website Speed
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
光速テーマ開発のコツ
光速テーマ開発のコツ光速テーマ開発のコツ
光速テーマ開発のコツ
 
WordPress Themes - From Designer’s Perspective
WordPress Themes - From Designer’s PerspectiveWordPress Themes - From Designer’s Perspective
WordPress Themes - From Designer’s Perspective
 
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
Birthing a Child Theme - WordCamp Scranton
Birthing a Child Theme - WordCamp ScrantonBirthing a Child Theme - WordCamp Scranton
Birthing a Child Theme - WordCamp Scranton
 
Word press 3 @ wordcamp
Word press 3 @ wordcampWord press 3 @ wordcamp
Word press 3 @ wordcamp
 
WooCommerce Customization Masterclass (WordCamp Dublin 2017)
WooCommerce Customization Masterclass (WordCamp Dublin 2017)WooCommerce Customization Masterclass (WordCamp Dublin 2017)
WooCommerce Customization Masterclass (WordCamp Dublin 2017)
 
WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014
 
WPAZ Child Themes
WPAZ Child ThemesWPAZ Child Themes
WPAZ Child Themes
 
Staying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress WebsiteStaying Connected: Securing Your WordPress Website
Staying Connected: Securing Your WordPress Website
 
Introduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design ApplicationIntroduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design Application
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress Security
 
Wp visual editors - Learning Style
Wp visual editors - Learning StyleWp visual editors - Learning Style
Wp visual editors - Learning Style
 
Intro to WordPress Plugins
Intro to WordPress PluginsIntro to WordPress Plugins
Intro to WordPress Plugins
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPress
 

Ähnlich wie The Child Theme Dilemma (EN) - Milano Edition

Week 9 - Introduction to Child Themes
Week 9  - Introduction to Child ThemesWeek 9  - Introduction to Child Themes
Week 9 - Introduction to Child Themeshenri_makembe
 
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish CorneliusWP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish CorneliusWPJoburg
 
WordPress Child Themes: The what. The why. The how.
WordPress Child Themes: The what. The why. The how.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 ThemesWordPress Child Themes
WordPress Child Themesrfair404
 
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme   word camp presentation - atlanta 2013Firstborn child theme   word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013Evan Mullins
 
2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-ThemesLightSpeed
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015topher1kenobe
 
Theme frameworks & child themes
Theme frameworks & child themesTheme frameworks & child themes
Theme frameworks & child themesChris Olbekson
 
Child Theme Frameworks
Child Theme FrameworksChild Theme Frameworks
Child Theme Frameworksryngrn
 
Rockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child ThemesRockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child ThemesAndrew Wikel
 
Why you should be using WordPress child themes
Why you should be using WordPress child themesWhy you should be using WordPress child themes
Why you should be using WordPress child themesAnthony Hortin
 
The Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child ThemesThe Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child ThemesAnthony Hortin
 
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notesChild Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notesDamien Carbery
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child ThemesAlison Foxall
 
Intro to child themes
Intro to child themesIntro to child themes
Intro to child themesvegasgeek
 
Child themes
Child themesChild themes
Child themesbobwlsn
 
Best practices in WordPress Development
Best practices in WordPress DevelopmentBest practices in WordPress Development
Best practices in WordPress DevelopmentMindfire Solutions
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Joe Querin
 

Ähnlich wie The Child Theme Dilemma (EN) - Milano Edition (20)

The Child Theme Dilemma (EN)
The Child Theme Dilemma (EN)The Child Theme Dilemma (EN)
The Child Theme Dilemma (EN)
 
Week 9 - Introduction to Child Themes
Week 9  - Introduction to Child ThemesWeek 9  - Introduction to Child Themes
Week 9 - Introduction to Child Themes
 
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish CorneliusWP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
 
WordPress Child Themes: The what. The why. The how.
WordPress Child Themes: The what. The why. The how.WordPress Child Themes: The what. The why. The how.
WordPress Child Themes: The what. The why. The how.
 
Child Theme
Child ThemeChild Theme
Child Theme
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme   word camp presentation - atlanta 2013Firstborn child theme   word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
 
2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
 
Theme frameworks & child themes
Theme frameworks & child themesTheme frameworks & child themes
Theme frameworks & child themes
 
Child Theme Frameworks
Child Theme FrameworksChild Theme Frameworks
Child Theme Frameworks
 
Rockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child ThemesRockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child Themes
 
Why you should be using WordPress child themes
Why you should be using WordPress child themesWhy you should be using WordPress child themes
Why you should be using WordPress child themes
 
The Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child ThemesThe Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child Themes
 
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notesChild Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notes
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
Intro to child themes
Intro to child themesIntro to child themes
Intro to child themes
 
Child themes
Child themesChild themes
Child themes
 
Best practices in WordPress Development
Best practices in WordPress DevelopmentBest practices in WordPress Development
Best practices in WordPress Development
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
 

Mehr von Torsten Landsiedel

Das Health Check Plugin in der Praxis
Das Health Check Plugin in der PraxisDas Health Check Plugin in der Praxis
Das Health Check Plugin in der PraxisTorsten Landsiedel
 
UX-Probleme mit dem neuen Block-Editor (Gutenberg)
UX-Probleme mit dem neuen Block-Editor (Gutenberg)UX-Probleme mit dem neuen Block-Editor (Gutenberg)
UX-Probleme mit dem neuen Block-Editor (Gutenberg)Torsten Landsiedel
 
Werde Übersetzer! Werde Translation Editor!
Werde Übersetzer!  Werde Translation Editor!Werde Übersetzer!  Werde Translation Editor!
Werde Übersetzer! Werde Translation Editor!Torsten Landsiedel
 
Die schmutzige Seite von WordPress
Die schmutzige Seite von WordPressDie schmutzige Seite von WordPress
Die schmutzige Seite von WordPressTorsten Landsiedel
 
Umgang mit Frustration im Open-Source-Projekt WordPress
Umgang mit Frustration im Open-Source-Projekt WordPressUmgang mit Frustration im Open-Source-Projekt WordPress
Umgang mit Frustration im Open-Source-Projekt WordPressTorsten Landsiedel
 
Wie ich durch Support und Übersetzung ein (besserer) Entwickler geworden bin
Wie ich durch Support und Übersetzung ein (besserer) Entwickler geworden binWie ich durch Support und Übersetzung ein (besserer) Entwickler geworden bin
Wie ich durch Support und Übersetzung ein (besserer) Entwickler geworden binTorsten Landsiedel
 
Contact Form 7 - Pflicht und Kür
Contact Form 7 - Pflicht und KürContact Form 7 - Pflicht und Kür
Contact Form 7 - Pflicht und KürTorsten Landsiedel
 
Social Media Menüs in WordPress
Social Media Menüs in WordPressSocial Media Menüs in WordPress
Social Media Menüs in WordPressTorsten Landsiedel
 
HTML/CSS-Validierung in Zeiten von HTML5
HTML/CSS-Validierung in Zeiten von HTML5HTML/CSS-Validierung in Zeiten von HTML5
HTML/CSS-Validierung in Zeiten von HTML5Torsten Landsiedel
 
Shortcodes erstellen mit WordPress
Shortcodes erstellen mit WordPressShortcodes erstellen mit WordPress
Shortcodes erstellen mit WordPressTorsten Landsiedel
 
WordPress absichern - WP Camp 2012 in Berlin
WordPress absichern - WP Camp 2012 in BerlinWordPress absichern - WP Camp 2012 in Berlin
WordPress absichern - WP Camp 2012 in BerlinTorsten Landsiedel
 
Podcasting mit WordPress.com-Blogs
Podcasting mit WordPress.com-BlogsPodcasting mit WordPress.com-Blogs
Podcasting mit WordPress.com-BlogsTorsten Landsiedel
 
WordPress.com-Blogs individualisieren
WordPress.com-Blogs individualisierenWordPress.com-Blogs individualisieren
WordPress.com-Blogs individualisierenTorsten Landsiedel
 

Mehr von Torsten Landsiedel (18)

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

Kürzlich hochgeladen

How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...sonatiwari757
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 

Kürzlich hochgeladen (20)

Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 

The Child Theme Dilemma (EN) - Milano Edition

  • 1. The Child Theme Dilemma WordCamp Milano 2016 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? There 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-an d-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(../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 getting 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. Spread the word! The new default theme is using it, too! https://github.com/WordPress/twentyseventeen/issues/72
  • 32. ● Italian Translation is waiting for you! https://translate.wordpress.org/locale/it/default/wp-plugins/chi ld-theme-check ● Found a bug? Just open an issue on Github: https://github.com/Zodiac1978/tl-template-checker/issues ● Help me to get this as a recommendation in the Theme Check Plugin (https://de.wordpress.org/plugins/theme-check/): https://github.com/WordPress/theme-check/issues/115 Conribute? Great!
  • 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! Have a great coffee break. Don’t miss the talk about Child Plugins from Bernhard Kau (Track 1 - 17:10 h)