WordCamp STL: How To Prepare and Submit Your Theme to the WPORG Theme REpository (and get it approved)
1. How to Prepare and Submit Your Theme For the
WPORG Theme Repository
(And get it approved!)
Chip Bennett, WordCamp St. Louis, 06 August 2011
@chip_bennett
2. How to Prepare and Submit Your Theme For the
WPORG Theme Repository
Audience
Developers
Themes intended to be hosted by WPORG
Agenda
Preparing a Theme for public release
Pre-Submission Theme Testing
WPORG Theme Submission/Review/Approval
Getting your Theme approved
Related
Preparing a Theme for Public Release, David Yeiser (@davidyeiser):
http://www.slideshare.net/davidyeiser/how-to-prepare-a-wordpress-theme-for-public-release
Theming for the Masses, Michael Fields (@_mfields):
http://www.slideshare.net/MichaelFields/theming-for-the-masses
2 WordCamp St. Louis: 06 August 2011
3. Preparing a Theme for Public
Release
Philosophy and considerations
3 WordCamp St. Louis: 06 August 2011
4. Preparing a Theme for Public Release
General considerations for publicly released Themes
Design for universal use
β
Site title/description
β
Navigation/menus
β
Hard-coded vs. configurable
β
Social network links, favicons, copyright statements
β
Core post types, taxonomies
β
Custom post types, taxonomies
β
Filtering core content
β
Enqueueing scripts/stylesheets
Ranges vs. edge cases
4 WordCamp St. Louis: 06 August 2011
5. Preparing a Theme for Public Release
General considerations for publicly released Themes
Incorporate core functionality: donβt re-invent the wheel
β
Custom Header/Background
β
Navigation Menus
β
Post Thumbnails
β
Post Formats
β
Gallery posts, Aside posts, etc.
Use core APIs wherever possible
β
Hooks API
β
Settings/Options/Theme Mods APIs
β
Widgets API
5 WordCamp St. Louis: 06 August 2011
6. Preparing a Theme for Public Release
General considerations for publicly released Themes
Plugin integration / graceful degradation
β
Breadcrumb navigation, paginated navigation
β
Provide fallback:
β if ( function_exists( βplugin_functionβ ) {
plugin_function();
} else {
// fallback functionality
}
β
Remember content vs. presentation
Failure modes for integrated features
β
Navigation Menus: items, hierarchy depth, fallback output
β
Overflow: site title/description, content width
6 WordCamp St. Louis: 06 August 2011
7. Preparing a Theme for Public Release
Specific considerations for WPORG-hosted Themes
Check your motivation
β
Not wanted:
β Non-free code of any kind
β Unoriginal Themes only intended to generate backlinks
β Sponsored/Spam links
β Up-selling a commercial Theme via cripple-ware
β
Wanted:
β Giving back to the WordPress community
β New developers working into the WordPress ecosystem
β Showcasing unique/original/innovative design and functionality
License
β
100% GPL-compatible
β
Up-sell Themes must also be 100% GPL-compatible
7 WordCamp St. Louis: 06 August 2011
8. Preparing a Theme for Public Release
Specific considerations for WPORG-hosted Themes
Presentation vs. content
β
Plugin Territory
β Adding/modifying content
β Shortcodes
β
Custom Post Types/Taxonomies
β Theme lock-in
β Consider companion Plugin
β
Exception?
β Niche Themes
8 WordCamp St. Louis: 06 August 2011
9. Preparing a Theme for Public Release
Specific considerations for WPORG-hosted Themes
Child-Theme friendliness
β
Bad:
β Using get_template_directory_*() everywhere
β Using few template files/no template-part files/no context
β
Good:
β Proper use of get_template_directory_*() /
get_stylesheet_directory_*()
β
Better:
β Pluggable (override-able) functions
β Using get_template_part( $file, $context)
β
Best:
β Functions hooked via add_action()
β Content filtered via add_filter()
β
Above and beyond:
β Custom hooks
9 WordCamp St. Louis: 06 August 2011
10. Preparing a Theme for Public Release
Specific considerations for WPORG-hosted Themes
UI Consistency
β
Settings Page UI
β
Core-bundled scripts (e.g. jQuery)
Implementation assumptions
β
Document, document, document!
β
Include a readme.txt (or equivalent)
Future-proofing your code
β
Pay attention to function deprecation
β
Use core functions/template tags
β get_search_form()
β Settings API
10 WordCamp St. Louis: 06 August 2011
11. Pre-Submission Theme Testing
Testing your Theme against WPORG Theme Review
Guidelines before submission
11 WordCamp St. Louis: 06 August 2011
12. Pre-Submission Theme Testing
Setting Up A Test Environment
Clean WordPress Install, plus Plugins
β
Theme Check, Log Deprecated Notices, Debug Bar, Debug Bar
Extender, Debogger, FixPress, WordPress Beta Tester
WordPress settings and Theme Mods
β
wp-config.php: define( βWP_DEBUGβ, true )
β
Settings:
β General (Site Title, Tagline), Reading (# Posts per page)
β Discussion (Threaded comments, Depth, # Comments per page)
β Media (defaults), Permalinks (Pretty)
β
Create custom menus (long, short)
Theme Unit Test Data
β
Install latest test data from the Codex
β Check for updates periodically
12 WordCamp St. Louis: 06 August 2011
13. Pre-Submission Theme Testing
Testing Process
Guide:
http://www.chipbennett.net/2011/04/20/a-guide-to-reviewing-themes-for-the-wordpress-theme-repository/
Policy Requirements:
β
License, Credit Links, Theme Name, Screenshot
Automated Tests:
β
Theme Check, Log Deprecated Notices
Code Quality
β
HTML document head, scripts/stylesheets enqueued/hooked
β
Template files, template tags, file includes
β
functions.php
Theme Unit Tests
β
Activation tests/custom functionality
β
Front-end tests
13 WordCamp St. Louis: 06 August 2011
15. WPORG Theme Submission/Review/Approval
Resources
WordPress.org Theme Uploader
Themes Subversion (SVN)
Themes-Trac
WordPress.org Extend/Themes
WordPress Theme Review Team (WPTRT)
Process
Prepare/Upload Theme Package (developer)
Generate Theme-Trac ticket (SVN/Trac)
Theme Review/Approval (WPTRT reviewers)
Synchronize SVN with Extend (WPTRT admins)
15 WordCamp St. Louis: 06 August 2011
16. WPORG Theme Submission/Review/Approval:
Resources
WordPress.org Theme Uploader
Only way to submit Theme to the
Repository
β
(No SVN-commit access for
themes.svn, at least, not yet)
Includes several automated
scripts/tests
β
Synchronized with Theme Check
Plugin
16 WordCamp St. Louis: 06 August 2011
17. WPORG Theme Submission/Review/Approval:
Resources
Themes SVN
Where uploaded Theme files are
stored, after the Theme ZIP archive is
unpacked by the Theme uploader
Perpetual repository: files are never
deleted, except for extraordinarily
egregious reasons
SVN-checkout access
17 WordCamp St. Louis: 06 August 2011
18. WPORG Theme Submission/Review/Approval:
Resources
Themes-Trac
Theme Review ticketing/tracking
system
Uploader assigns each uploaded
Theme a new ticket
Theme Review process takes place
within Trac tickets
Theme Review progress tracked via
Trac reports
Theme developers can post
comments using WPORG login
credentials
18 WordCamp St. Louis: 06 August 2011
19. WPORG Theme Submission/Review/Approval:
Resources
WordPress.org Extend/Themes
Front-end for access/download of
Repository-hosted Themes
Heavily-modded bbPress install
Must be manually synchronized with
SVN after Theme is approved in Trac
19 WordCamp St. Louis: 06 August 2011
20. WPORG Theme Submission/Review/Approval:
Resources
WordPress Theme Review Team (WPTRT)
Who are they?
β
All-volunteer team of WordPress community members
β
Mostly self-directing, under the WPORG umbrella
β
Varying degrees of WordPress experience/expertise
β
Undergo training period before gaining ticket resolution/closure
privileges
What is their purpose?
β
Review and approve Theme tickets as quickly and as completely as
possible
β
Provide an educational resource for the WordPress Theme
Developer community
β
Encourage and establish community standards for Theme quality
and best practices
Anyone can get involved, and anyone interested is encouraged to do so!
20 WordCamp St. Louis: 06 August 2011
21. WPORG Theme Submission/Review/Approval:
Process
Prepare/Upload Theme (Developer)
Remove any extraneous files
β
.git or .svn directories, MACOSX files, backup files, etc.
Compress the Theme as a ZIP file
β
Filename doesn't matter; it is re-packaged by SVN upon upload
Upload the ZIP file, using the WordPress.org Uploader.
Generate Trac Ticket (SVN/Trac)
If the uploader script finds no warning or required issues, the
Theme is uploaded, and Trac ticket generated.
β
Note: ensure that your Themes-Trac user profile includes an
email address, so that you receive automated notification emails
If the uploader script does find such issues, the upload fails,
and the script returns a report of all detected issues
21 WordCamp St. Louis: 06 August 2011
22. WPORG Theme Submission/Review/Approval:
Process
Theme Review/Approval (WPTRT reviewers)
A WPTRT Reviewer assigns himself the Trac ticket, and
proceeds with the review.
Any issues noted during the review are listed in a comment
to the Trac ticket.
β
Noted issues are indicated as either REQUIRED (must be fixed
for Theme approval) or RECOMMENDED.
β
Some Reviewers will attach screenshots to help clarify Theme
issues, or may give additional information, suggestions, etc.
If the Theme has any REQUIRED issues, the ticket is closed
as βnot-approvedβ. Otherwise, the ticket is closed as
βapprovedβ.
22 WordCamp St. Louis: 06 August 2011
23. WPORG Theme Submission/Review/Approval:
Process
Synchronize SVN with Extend (WPTRT admins)
When a Trac ticket is closed, the version of the Theme
included in the ticket must be synchronized with Extend.
β
Approved Themes are synchronized as βapprovedβ
β
Not-Approved (or Newer-Version-Uploaded) Themes are
synchronized as βoldβ
This synchronization is a manual process, usually performed
by a WPTRT admin at least once per day
Once a Theme is synchronized as βapprovedβ, it becomes
the version available for download in Extend.
β
Note: Extend is comprised of several servers; due to caching, it
may take some time for the new version to propagate
23 WordCamp St. Louis: 06 August 2011
24. Getting Your Theme Approved
Tips, tricks, and practical suggestions
24 WordCamp St. Louis: 06 August 2011
25. Getting Your Theme Approved
While developing your Theme
Donβt fork Kubrick/Default/Classic!
Identify (and document) your assumptions
If you have questions: Ask!
β
Theme-Reviewers mail list, IRC, WPTRT Website
Before you submit your Theme
Pre-submission testing is critical
Dry-run your Theme from the userβs perspective
Volunteer to review other Themes
After you submit your Theme
Interact in the Trac Ticket
25 WordCamp St. Louis: 06 August 2011
26. Recap
Whew! That was a lot!
26 WordCamp St. Louis: 06 August 2011
27. The WordPress Theme Repository
Recap:
Preparing a Theme for public release
Pre-Submission Theme Testing
WPORG Theme Submission/Review/Approval
Getting your Theme approved
Questions?
27 WordCamp St. Louis: 06 August 2011
28. Feedback
Youβve heard from me; now I want to hear from you
28 WordCamp St. Louis: 06 August 2011
29. The WordPress Theme Repository
Open Forum
Feedback, criticism, and ideas for the WordPress Theme Repository:
β
Theme Repository:
β Theme Selection,
β Theme Quality,
β Child Themes/Theme Frameworks
β etc.
β
Theme Review
β Submission/Review/Approval Process
β Theme Review Guidelines
29 WordCamp St. Louis: 06 August 2011
30. Resources
Sites and information referenced, and further reading
30 WordCamp St. Louis: 06 August 2011