在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:WPTT/WPThemeReview开源软件地址:https://github.com/WPTT/WPThemeReview开源编程语言:PHP 99.9%开源软件介绍:WPThemeReview Standard for PHP_CodeSnifferIntroductionWordPress Themes for which a hosting application has been made for the theme to be hosted in the theme repository on wordpress.org have to comply with a set of requirements before such an application can be approved. Additionally, there are also recommendations for best practices for themes. This project attempts to automate the code analysis part of the Theme Review Process as much as possible using static code analysis. PHP_CodeSniffer is the base tool upon which this project is build and is a PHP command-line tool. This project is a work in progress and passing the checks is no guarantee that your theme will be approved. RequirementsThe WPThemeReview Standard requires:
InstallationThe only supported installation method is via Composer.
Installing WPThemeReview globallyIf you would like to have the WPThemeReview standard available to all projects on your system, you can install it in a central location. From the command-line, run the following command: $ php composer.phar global require wptrt/wpthemereview dealerdirect/phpcodesniffer-composer-installer Installing WPThemeReview as a project dependencyIf you use Composer to manage dependencies from your project anyway or are considering using it, you can also choose to install the WPThemeReview standard for an individual project. From the command-line, run the following command from the root directory of your project: $ php composer.phar require --dev wptrt/wpthemereview:* dealerdirect/phpcodesniffer-composer-installer:^0.7
Checking your installation was successful# For a global install:
$ phpcs -i
# For a project install:
$ vendor/bin/phpcs -i If everything went well, the output should look something like this:
Using the WPThemeReview standardYou can now test your theme code against the WPThemeReview standard by running the following command from the root directory of your theme: # For a global install:
$ phpcs -p . --standard=WPThemeReview
# For a project install:
$ vendor/bin/phpcs -p . --standard=WPThemeReview If any issues are found, PHP_CodeSniffer will display a report with all the errors (must fix) and warnings (recommended to fix) for each file. More information about running PHP_CodeSniffer can be found in the PHP_CodeSniffer Wiki. ContributingSee CONTRIBUTING, including information about unit testing the standard. LicenseSee LICENSE (MIT). |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论