Linux 软件免费装

Theme Sniffer

开发者 dingo_d
rabmalin
grapplerulrich
timph
vyskoczilova
abdullahramzan
williampatton
更新时间 2020年4月1日 01:15
PHP版本: 7.0 及以上
WordPress版本: 5.3.2
版权: MIT
版权网址: 版权信息

标签

theme tool check checker coding standards

下载

1.0.0 1.1.0 1.1.1 1.1.2 1.1.3

详情介绍:

Theme Sniffer is a plugin utilizing custom sniffs for PHP_CodeSniffer that statically analyzes your theme and ensures that it adheres to WordPress coding conventions, as well as checking your code against PHP version compatibility.

安装:

Installing from WordPress repository:
  1. From the dashboard of your site, navigate to Plugins –> Add New.
  2. In the Search type Theme Sniffer
  3. Click Install Now
  4. When it’s finished, activate the plugin via the prompt. A message will show confirming activation was successful.
Make sure that your server has php version greater or equal to 7.0, otherwise, the plugin won't activate. Uploading the .zip file:
  1. From the dashboard of your site, navigate to Plugins –> Add New.
  2. Select the Upload option and hit "Choose File."
  3. When the pop-up appears select the theme-sniffer.x.x.zip file from your desktop. (The ‘x.x’ will change depending on the current version number).
  4. Follow the on-screen instructions and wait as the upload completes. When it’s finished, activate the plugin via the prompt. A message will show confirming activation was successful.

屏幕截图:

  • Theme Sniffer main screen

升级注意事项:

The latest upgrade mostly with development changes and some minor improvements in sniff handling.

常见问题:

How to use the plugin?

  • Go to Theme Sniffer menu
  • Select theme from the drop-down
  • Select the desired options
  • Click GO to start the Theme Sniffer

What options are there?

  • Select Standard - Select the standard with which you would like to sniff the theme
  • Hide Warning - Enable this to hide warnings
  • Raw Output - Enable this to display sniff report in plain text format. Suitable to copy/paste report to trac ticket
  • Ignore annotations - Ignores any comment annotation that might disable the sniff
  • Check only PHP files - Only checks PHP files, not CSS and JS - use this to prevent any possible memory leaks
  • Minimum PHP version - Select the minimum PHP Version to check if your theme will work with that version

How can I help with the development of the plugin?

Go to the official repo on Github (https://github.com/WPTRT/theme-sniffer), fork the plugin, read the readme and go through the issues. Any kind of help is appreciated. Either manually testing or writing code is invaluable for the open source project such as this.

Contributors and testers thanks

Thanks to Danny Cooper, Liton Arefin and metallicarosetail (slack) for testing the plugin and finding bugs in the development stage. Thanks to Abdullah Ramzan for fixing minor typos, William Patton for help with the required files checks. Thanks to Karolína Vyskočilová for finding out the issue with cross-env issue. Thanks to the TRT for the support.

更新日志:

1.1.3 1.1.2 1.1.1 1.1.0 1.0.0 0.1.5 0.1.4 0.1.3 0.1.2 0.1.1 0.1.0