7 Tips on Getting Your Theme Approved the First Time

Dmitry Mayorov
Dmitry MayorovWeb Designer and Developer at ThemePatio
7 Tips on Getting
Your Theme Approved
The First Time
Dmitry Mayorov / www.themepatio.com
WordCamp London 2016
7 Tips on Getting Your Theme Approved the First Time
7 Tips on Getting Your Theme Approved the First Time
Why Release
Your Theme Publicly?
Why Release Your Theme Publicly
-- Give back to the community
-- Get real feedback
-- Become a better designer/developer
1. GPL License
With GPL Users are Free to :
-- Use the theme for any purpose
-- Study the source code
-- Modify the theme
-- Redistribute the theme
How To Make Sure Your
Theme is GPL-friendly?
/*
Theme Name:		Maker
Author:						ThemePatio
Text Domain:	maker
License:					GNU GPL v2 or later
License URI:	http://www.gnu.org/licenses/gpl-2
Declare the License in style.css
=== Maker ===
Contributors:	iamdmitrymayorov
Version:						0.2.0
License:						GNU GPL v2 or later
License URI:		http://www.gnu.org/licenses/gpl-
Tags:									black, gray, red, white, dark, l
Declare the License in readme.txt
Typicons
Author: Stephen Hutchings
License: SIL (http://scripts.sil.org/OFL)
URL: http://typicons.com/
Bundle Only GPL-friendly Resources
Chair & Table
Author: Jordan Sanchez
Licence: CC0 1.0
URL: https://unsplash.com/photos/KyB-Eo4xS
Use Only GPL-friendly Images
Check License Compatibility
www.gnu.org/licenses/license-list.en.html
#GPLCompatibleLicenses
GPL Summary
-- Declare the license in style.css and readme.txt
-- Bundle only GPL-friendly code
-- Use only GPL-friendly images
-- Provide info in the readme.txt
2. Don’t Start From Scratch
Underscores (_s)
components.underscores.me
Components
components.underscores.me
3. Requirements
<head>
...
<script src=’theme.js’></script>
...
</head>
3.1 Don’t Hardcode Scripts and Styles
wp_enqueue_script(
		‘maker-custom’,
		get_template_directory_uri() .‘theme.js’,
);
functions.php
wp_enqueue_script(	‘jquery’ );
functions.php
Full List of Bundled Resources
developer.wordpress.org/reference/functions/
wp_enqueue_script/
3.2 Prefix Everything
-- Functions
-- Classes
-- Actions and filters
-- Global variables
-- Database entries
function output() {
// Code goes here.
}
Bad Example
7 Tips on Getting Your Theme Approved the First Time
function maker_entry_meta() {
// Code goes here.
}
Good Example
3.3 Validate & Sanitize
7 Tips on Getting Your Theme Approved the First Time
7 Tips on Getting Your Theme Approved the First Time
sanitize_text_field( $input )
Sanitize On The Input
$wp_customize->add_setting( ‘footer’, array(
		‘sanitize_callback’ => ‘sanitize_text_field’,
) );
Sanitize On The Input
esc_html( $output );
Escape On The Output
// Get the data.
$prefix_name = get_theme_mod( ‘footer’ );
// Escape as a late as possible and display.
echo esc_html( $prefix_name );
Escape On The Output
More Detailed Explanation
codex.wordpress.org/Data_Validation
3.4 Translatable Strings
echo ‘Comments’;
Theme For a Client
echo __( ‘Comments’, ‘themeslug’ );
Public Theme
_e( ‘Comments’, ‘themeslug’ );
Public Theme
esc_html_e( ‘Comments’, ‘themeslug’ );
Public Theme
More Info On I18N
codex.wordpress.org/I18n_for_WordPress_Developers
3.5 Theme vs. Plugin Territory
More Info on Requirements
make.wordpress.org/themes/handbook/
review/required
4. Learn From Others
4.1. Study Default Themes
4.2 	Study Other Themes
					From the Repository
5. Test
define( ‘WP_DEBUG’, true );
5.1 wp-config.php
5.2 Theme Check Plugin
wordpress.org/plugins/theme-check
7 Tips on Getting Your Theme Approved the First Time
5.3 Codesniffer with WPCS
github.com/WordPress-Coding-Standards/
WordPress-Coding-Standards
5.4 Theme Unit Test
codex.wordpress.org/Theme_Unit_Test
5.5 Monster Widget Plugin
wordpress.org/plugins/theme-check
5.6 Real Content
6. Become a Reviewer
7. Keep It Simple
Questions?
Dmitry Mayorov / www.themepatio.com
WordCamp London 2016
1 of 56

Recommended

Class 6 - PHP Web Programming by
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingAhmed Swilam
1.8K views28 slides
Introduction to php web programming - get and post by
Introduction to php  web programming - get and postIntroduction to php  web programming - get and post
Introduction to php web programming - get and postbaabtra.com - No. 1 supplier of quality freshers
1.4K views25 slides
PowerShell 101 by
PowerShell 101PowerShell 101
PowerShell 101Thomas Lee
1.1K views49 slides
PHP: The Beginning and the Zend by
PHP: The Beginning and the ZendPHP: The Beginning and the Zend
PHP: The Beginning and the Zenddoublecompile
1.6K views37 slides
Introduction To Power Shell by
Introduction To Power ShellIntroduction To Power Shell
Introduction To Power ShellIvan Suhinin
1.5K views18 slides
Final opensource record 2019 by
Final opensource record 2019Final opensource record 2019
Final opensource record 2019Karthik Sekhar
51 views131 slides

More Related Content

What's hot

PHP Workshop Notes by
PHP Workshop NotesPHP Workshop Notes
PHP Workshop NotesPamela Fox
5.9K views29 slides
Introduction to PHP by
Introduction to PHPIntroduction to PHP
Introduction to PHPBradley Holt
42.6K views77 slides
PHP FUNCTIONS by
PHP FUNCTIONSPHP FUNCTIONS
PHP FUNCTIONSZeeshan Ahmed
5.8K views75 slides
Web develop in flask by
Web develop in flaskWeb develop in flask
Web develop in flaskJim Yeh
5.7K views73 slides
Php 5.5 by
Php 5.5Php 5.5
Php 5.5Naseer Ahmad
691 views15 slides
Basics PHP by
Basics PHPBasics PHP
Basics PHPAlokin Software Pvt Ltd
5.1K views42 slides

What's hot(20)

PHP Workshop Notes by Pamela Fox
PHP Workshop NotesPHP Workshop Notes
PHP Workshop Notes
Pamela Fox5.9K views
Introduction to PHP by Bradley Holt
Introduction to PHPIntroduction to PHP
Introduction to PHP
Bradley Holt42.6K views
Web develop in flask by Jim Yeh
Web develop in flaskWeb develop in flask
Web develop in flask
Jim Yeh5.7K views
New Features in PHP 5.3 by Bradley Holt
New Features in PHP 5.3New Features in PHP 5.3
New Features in PHP 5.3
Bradley Holt61.3K views
Shell programming 1.ppt by Kalkey
Shell programming  1.pptShell programming  1.ppt
Shell programming 1.ppt
Kalkey219 views
Modern Perl by Dave Cross
Modern PerlModern Perl
Modern Perl
Dave Cross6.6K views
Perl: Hate it for the Right Reasons by Matt Follett
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right Reasons
Matt Follett1K views
Non-Relational Databases by kchodorow
Non-Relational DatabasesNon-Relational Databases
Non-Relational Databases
kchodorow545 views
NYPHP March 2009 Presentation by brian_dailey
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentation
brian_dailey906 views
Php(report) by Yhannah
Php(report)Php(report)
Php(report)
Yhannah2K views
Replacing "exec" with a type and provider: Return manifests to a declarative ... by Puppet
Replacing "exec" with a type and provider: Return manifests to a declarative ...Replacing "exec" with a type and provider: Return manifests to a declarative ...
Replacing "exec" with a type and provider: Return manifests to a declarative ...
Puppet4.9K views

Similar to 7 Tips on Getting Your Theme Approved the First Time

Simplify your professional web development with symfony by
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
2.7K views40 slides
InspiringCon15: Bringing TYPO3 Legacy Applications into the Flow by
InspiringCon15: Bringing TYPO3 Legacy Applications into the FlowInspiringCon15: Bringing TYPO3 Legacy Applications into the Flow
InspiringCon15: Bringing TYPO3 Legacy Applications into the Flowmhelmich
3K views57 slides
Drupal @ MediaCamp Athens by
Drupal @ MediaCamp Athens Drupal @ MediaCamp Athens
Drupal @ MediaCamp Athens Nektarios Sylligardakis
854 views66 slides
Exploring Async PHP (SF Live Berlin 2019) by
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)dantleech
483 views65 slides
Speed up your developments with Symfony2 by
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2Hugo Hamon
4.5K views71 slides
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi by
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiJérémy Derussé
2.6K views29 slides

Similar to 7 Tips on Getting Your Theme Approved the First Time(20)

Simplify your professional web development with symfony by Francois Zaninotto
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
Francois Zaninotto2.7K views
InspiringCon15: Bringing TYPO3 Legacy Applications into the Flow by mhelmich
InspiringCon15: Bringing TYPO3 Legacy Applications into the FlowInspiringCon15: Bringing TYPO3 Legacy Applications into the Flow
InspiringCon15: Bringing TYPO3 Legacy Applications into the Flow
mhelmich3K views
Exploring Async PHP (SF Live Berlin 2019) by dantleech
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)
dantleech483 views
Speed up your developments with Symfony2 by Hugo Hamon
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2
Hugo Hamon4.5K views
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi by Jérémy Derussé
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Jérémy Derussé2.6K views
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016) by James Titcumb
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
James Titcumb1.3K views
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017) by James Titcumb
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
James Titcumb1.5K views
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016) by James Titcumb
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
James Titcumb694 views
What's New and Newer in Apache httpd-24 by Jim Jagielski
What's New and Newer in Apache httpd-24What's New and Newer in Apache httpd-24
What's New and Newer in Apache httpd-24
Jim Jagielski1.1K views
Introduction to PowerShell by Boulos Dib
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
Boulos Dib2.6K views
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA) by cgmonroe
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
cgmonroe67 views
Living With Legacy Code by Rowan Merewood
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
Rowan Merewood25.3K views
How to Build a Custom Plugin in Rundeck by Rundeck
How to Build a Custom Plugin in RundeckHow to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in Rundeck
Rundeck457 views
Istio Playground by QAware GmbH
Istio PlaygroundIstio Playground
Istio Playground
QAware GmbH528 views
ApacheConNA 2015: What's new in Apache httpd 2.4 by Jim Jagielski
ApacheConNA 2015: What's new in Apache httpd 2.4ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4
Jim Jagielski700 views
Fundamentals of Extending Magento 2 - php[world] 2015 by David Alger
Fundamentals of Extending Magento 2 - php[world] 2015Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015
David Alger12.6K views

Recently uploaded

.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...Marc Müller
38 views62 slides
Short_Story_PPT.pdf by
Short_Story_PPT.pdfShort_Story_PPT.pdf
Short_Story_PPT.pdfutkarshsatishkumarsh
5 views16 slides
Sprint 226 by
Sprint 226Sprint 226
Sprint 226ManageIQ
5 views18 slides
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme... by
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...Deltares
5 views28 slides
EV Charging App Case by
EV Charging App Case EV Charging App Case
EV Charging App Case iCoderz Solutions
5 views1 slide
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptxanimuscrm
14 views19 slides

Recently uploaded(20)

.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller38 views
Sprint 226 by ManageIQ
Sprint 226Sprint 226
Sprint 226
ManageIQ5 views
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme... by Deltares
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
Deltares5 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm14 views
Dapr Unleashed: Accelerating Microservice Development by Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski10 views
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... by Deltares
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
Deltares7 views
AI and Ml presentation .pptx by FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8711 views
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... by Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke30 views
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares7 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares11 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -... by Deltares
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
Deltares6 views
Fleet Management Software in India by Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable11 views
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares17 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller37 views

7 Tips on Getting Your Theme Approved the First Time