Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wpsh/wpcs-for-envato
Unofficial PHP coding standards for WordPress theme and plugins sold on ThemeForest and CodeCanyon
https://github.com/wpsh/wpcs-for-envato
envato envato-market phpcs phpcs-standard wordpress wordpress-development
Last synced: 24 days ago
JSON representation
Unofficial PHP coding standards for WordPress theme and plugins sold on ThemeForest and CodeCanyon
- Host: GitHub
- URL: https://github.com/wpsh/wpcs-for-envato
- Owner: wpsh
- Created: 2019-02-10T13:44:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-03-25T07:28:47.000Z (over 5 years ago)
- Last Synced: 2024-08-21T16:31:24.510Z (3 months ago)
- Topics: envato, envato-market, phpcs, phpcs-standard, wordpress, wordpress-development
- Size: 15.6 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Coding Standard for WordPress Plugins and Themes on Envato Market
[![Build Status](https://travis-ci.com/wpsh/wpcs-for-envato.svg?branch=master)](https://travis-ci.com/wpsh/wpcs-for-envato)
Automatically check for Envato [WordPress plugin](https://help.author.envato.com/hc/en-us/articles/360000481223-WordPress-Theme-Plugin-Requirements) and [theme coding requirements](https://help.author.envato.com/hc/en-us/articles/360000479946-WordPress-Theme-Coding-Requirements). Based on the official [WordPress coding standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) but more relaxed.
## Requirements
- [Composer](https://getcomposer.org)
## Setup
1. Add these coding standards as a [Composer development dependency](https://packagist.org/packages/wpsh/wpcs-for-envato) to your project:
```bash
composer require --dev wpsh/wpcs-for-envato
```2. Define a script in `composer.json` to run the checks:
```json
{
"scripts": {
"phpcs": "./vendor/bin/phpcs --standard=WPCSForEnvato --extensions=php",
"phpcs-fix": "./vendor/bin/phpcbf --standard=WPCSForEnvato --extensions=php"
}
}
```Use `composer phpcs` to run the coding standard checks and `composer phpcs-fix` to automatically fix some of the coding standard violations.
## Configuration
Add `phpcs.xml.dist` to your project root that provides additional configuration options:
```xml
```
## Credits
Created by [Kaspars Dambis](https://kaspars.net).