Theme common issue
rvpatel opened this issue · 1 comments
Please check and fixed theme issue based on wp theme check plugin
This plugins checks the Theme for a Compliance with the WordPress Theme Directory Guidelines.
FoundationPress is a Starter-Theme not a Final Theme that should be uploaded to the WordPress Theme Directory. The main purpose of FoundationPress is to build a boilerplate for themes that use the Foundation Framework.
That's why think is is not necessary for FoundationPress to match all the Theme Directory Guidelines. This is up to the theme developers out there that build beautiful Themes with FoundationPress
I think the errors from the theme-check-plugin can be clustered into errors that should be fixed and errors that should not be fixed.
This list is just a proposal and open for discussion
Errors that should be fixed:
-
REQUIRED: Text Domain: is missing from your style.css header.
-
REQUIRED: .sticky css class is needed in your theme css.
-
REQUIRED: .gallery-caption css class is needed in your theme css.
-
REQUIRED: .bypostauthor css class is needed in your theme css.
-
WARNING: Found a translation function that is missing a text-domain. Function __, with the arguments 'FP XLarge'
-
WARNING: Found a translation function that is missing a text-domain. Function __, with the arguments 'FP Small'
-
WARNING: Found a translation function that is missing a text-domain. Function __, with the arguments 'FP Medium'
-
WARNING: Found a translation function that is missing a text-domain. Function __, with the arguments 'FP Large'
-
REQUIRED: Reference to add_theme_support( "menus" ) was found in the theme. This should be removed and register_nav_menus() used instead.
-
REQUIRED: Found a Customizer setting that did not have a sanitization callback function. Every call to the add_setting() method needs to have a sanitization callback function passed.
-
RECOMMENDED: Screenshot size should be 1200x900, to account for HiDPI displays. Any 4:3 image size is acceptable, but 1200x900 is preferred.
Errors that should not be fixed:
- WARNING: Found wp_deregister_script in enqueue-scripts.php. Themes must not deregister core scripts.
- WARNING: .babelrc .editorconfig .git .github .gitignore Hidden Files or Folders found.
- REQUIRED: Please remove any extraneous directories like .git or .svn from the ZIP file before uploading it.
- REQUIRED: No content width has been defined. (See #1325)
- RECOMMENDED: Tags: is either empty or missing in style.css header.
- INFO: Possible hard-coded links were found in the file front.php.
- INFO: Only one text-domain is being used in this theme. Make sure it matches the theme's slug correctly so that the theme will be compatible with WordPress.org language packs.
The domain found is foundationpress - INFO: Non-printable characters were found in the front.php file. You may want to check this file for errors.
- INFO: iframe was found in the file kitchen-sink.php iframes are sometimes used to load unwanted adverts and code on your site.
False positives
- REQUIRED: .wp-caption css class is needed in your theme css.
- REQUIRED: .wp-caption-text css class is needed in your theme css.
- REQUIRED: .screen-reader-text css class is needed in your theme css. See See: the Codex for an example implementation.
- REQUIRED: .alignright css class is needed in your theme css.
- REQUIRED: .alignleft css class is needed in your theme css.
- REQUIRED: .aligncenter css class is needed in your theme css.
- WARNING: file_get_contents was found in the file enqueue-scripts.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
Line 23: $manifest = json_decode( file_get_contents( $manifest_path ), true );
Not sure if this errors should be fixed:
- WARNING: Your theme appears to be in the wrong directory for the theme name. The directory name must match the slug of the theme. This theme's correct slug and text-domain is foundationpress.
(If this is a child theme, you can ignore this error.) - WARNING: The theme uses the add_shortcode() function. Custom post-content shortcodes are plugin-territory functionality.
- RECOMMENDED: No reference to add_theme_support( "custom-header", $args ) was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.
- RECOMMENDED: No reference to add_theme_support( "custom-background", $args ) was found in the theme. If the theme uses background images or solid colors for the background, then it is recommended that the theme implement this functionality.
- RECOMMENDED: Could not find the file readme.txt in the theme. Please see Theme_Documentation for more information.