Summary: This article outlines how Symphony Theme items need to be prepared and the technical requirements expected for this item type.
Please note: There are three parts to preparing your item to sell on Envato. This process includes the item preparation and technical requirements for certain items (as shown below). Make sure to also review our overall Quality Requirements and Technical Requirements as well as Legal Requirements to cover all the bases and get through review!
Technical Requirements
You should follow Symphony's guide in addition to the following technical and documentation requirements.
PHP
- Code must not have any PHP notices, warnings, or errors.
- No PHP short tags are allowed.
- Ensure that the code adheres to PEAR standards.
- Do not include hard-coded URIs and file paths.
- Use of the eval() function is not permitted.
- Authors should be strongly encouraged to always use curly braces even in situations where they are technically optional.
Including curly braces increases readability and decreases the likelihood of logic errors being introduced when new lines are added.
For example:
Following code shows incorrect usage:
if ( empty( $somevar ) )
return false;
Following code shows correct usage:
if ( empty( $somevar ) ) {
return false;
}
Or in the context of a template file or other predominantly HTML file:
if ( empty( $somevar ) ) :
return false;
Endif;
HTML/CSS
- All author-generated HTML needs to be validated via the W3C validator. However, browser prefixes and any other cutting edge code will be exempt.
- If a theme uses the HTML5 doctype, it needs to make proper use of semantic HTML5 elements.
- No hardcoded inline styles are allowed anywhere.
- IDs and classes need to be appropriately named and follow a naming convention.
- Use human readable selectors that describe what element(s) they style.
- Refrain from using over-qualified selectors, div.container can simply be stated as .container.
- Keep media queries grouped by media at the bottom of the stylesheet.
JavaScript
- JavaScript code should be placed in external files whenever possible.
- JavaScript files need to be placed in the footer where possible, barring notable exceptions, for example: Modernizr, jQuery UI, etc.
- The code shouldn't raise any errors or notices.
- All JavaScript should be written with use strict mode on. For example, you can do this with jQuery as follows:
(
function($) {
"use strict";
// Author code here
}
)(jQuery);
Documentation Requirements
Following are the documentation requirements for symphony theme submissions:
- You must provide sufficient documentation to help customers with installation and setup.
- The full installation process of the theme must be documented.
- All required extensions must be documented in your item description and documentation file.
- Custom features falling outside Symphony’s core functionality must be clearly documented.