Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Theme Sniff Class #43

Closed
2 tasks
khacoder opened this issue Aug 1, 2016 · 1 comment
Closed
2 tasks

New Theme Sniff Class #43

khacoder opened this issue Aug 1, 2016 · 1 comment

Comments

@khacoder
Copy link
Contributor

khacoder commented Aug 1, 2016

[New class] Create Theme Sniff Class

Create new theme sniff class that will create a theme data array that will be accessible by other sniffs during a theme check. The theme data will consist of data pulled from the style.css file.

Example array content.

$theme_data = array(
'theme_name' => 'Name of Theme',
'theme_uri' => 'www.theme.uri',
'theme_author' => '
'theme_author' => 'Author Name',
'theme_author_uri' => 'www.author.uri',
'theme_description' => 'Description of theme from style.css',
'theme_version' => '0.0.1',
'theme license' => 'GPLv2 or later',
'theme_license_uri' => 'http://www.gnu.org/licenses/gpl-2.0.html',
'theme_tags' => array( theme tags from style.css),
'text_domain' => 'text domain from style.css',

Elements not in style.css will be blank, for example 'theme_uri' => '',

Sniffs that need the $theme_data array, should set up the class with extends WordPress ThemeSniff.

The array is then accessed with $this->theme_data.

Issues:

Conventional testing of sniffs that use this class is not possible because style.css will be required in addition to a test file.

To do:

  • develop and add Class
  • test Class with a sniff that uses theme data
@jrfnl
Copy link
Contributor

jrfnl commented Aug 12, 2016

Replaced by #45

@jrfnl jrfnl closed this as completed Aug 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants